From b2c2efcad8bf5c8454f5b08f5b662e6241a1d149 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Mar 2026 21:14:23 +0000 Subject: [PATCH 1/2] feat: publish client batch config schema feat: publish new error reasons docs: fix documentation formatting docs: update various comments docs: update license year PiperOrigin-RevId: 889289393 Source-Link: https://github.com/googleapis/googleapis/commit/94bc991b3f1df58bc841801631715894a7ac5e28 Source-Link: https://github.com/googleapis/googleapis-gen/commit/db7143a338a7c75839b4698cb3ea6f1013b4c3c7 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfZXhjaGFuZ2UtdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfcG9saWNpZXMtdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfcG9saWNpZXMtdjFiZXRhMS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LWRhdGFfdHJhbnNmZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi12Mi8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXJlc2VydmF0aW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LXN0b3JhZ2UtdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpZ3RhYmxlLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbGxpbmctYnVkZ2V0cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbGxpbmctYnVkZ2V0cy12MWJldGExLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbGxpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbmFyeV9hdXRob3JpemF0aW9uLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbmFyeV9hdXRob3JpemF0aW9uLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJ1aWxkLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJ1aWxkLXYyLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNhcGFjaXR5X3BsYW5uZXItdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNlcnRpZmljYXRlX21hbmFnZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNocm9uaWNsZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiZGI3MTQzYTMzOGE3Yzc1ODM5YjQ2OThjYjNlYTZmMTAxM2I0YzNjNyJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX2NvbnRyb2xzX3BhcnRuZXItdjEvLk93bEJvdC55YW1sIiwiaCI6ImRiNzE0M2EzMzhhN2M3NTgzOWI0Njk4Y2IzZWE2ZjEwMTNiNGMzYzcifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNsb3VkX2NvbnRyb2xzX3BhcnRuZXItdjFiZXRhLy5Pd2xCb3QueWFtbCIsImgiOiJkYjcxNDNhMzM4YTdjNzU4MzliNDY5OGNiM2VhNmYxMDEzYjRjM2M3In0= --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 93 + ...oud-bigquery-data_exchange-v1beta1.gemspec | 30 + ...le-cloud-bigquery-data_exchange-v1beta1.rb | 21 + .../cloud/bigquery/data_exchange/v1beta1.rb | 42 + .../v1beta1/analytics_hub_service.rb | 56 + .../v1beta1/analytics_hub_service/client.rb | 1890 +++++++++ .../analytics_hub_service/credentials.rb | 50 + .../v1beta1/analytics_hub_service/paths.rb | 109 + .../bigquery/data_exchange/v1beta1/version.rb | 30 + .../dataexchange/v1beta1/dataexchange_pb.rb | 57 + .../v1beta1/dataexchange_services_pb.rb | 86 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../dataexchange/v1beta1/dataexchange.rb | 497 +++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../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/wrappers.rb | 148 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../create_data_exchange.rb | 47 + .../analytics_hub_service/create_listing.rb | 47 + .../delete_data_exchange.rb | 47 + .../analytics_hub_service/delete_listing.rb | 47 + .../get_data_exchange.rb | 47 + .../analytics_hub_service/get_iam_policy.rb | 47 + .../analytics_hub_service/get_listing.rb | 47 + .../list_data_exchanges.rb | 51 + .../analytics_hub_service/list_listings.rb | 51 + .../list_org_data_exchanges.rb | 51 + .../analytics_hub_service/set_iam_policy.rb | 47 + .../subscribe_listing.rb | 47 + .../test_iam_permissions.rb | 47 + .../update_data_exchange.rb | 47 + .../analytics_hub_service/update_listing.rb | 47 + ...e.cloud.bigquery.dataexchange.v1beta1.json | 615 +++ .../analytics_hub_service_paths_test.rb | 91 + .../v1beta1/analytics_hub_service_test.rb | 1024 +++++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 63 + ...le-cloud-bigquery-data_policies-v1.gemspec | 29 + .../google-cloud-bigquery-data_policies-v1.rb | 21 + .../google/cloud/bigquery/data_policies/v1.rb | 47 + .../data_policies/v1/data_policy_service.rb | 57 + .../v1/data_policy_service/client.rb | 1323 ++++++ .../v1/data_policy_service/credentials.rb | 50 + .../v1/data_policy_service/paths.rb | 71 + .../v1/data_policy_service/rest.rb | 54 + .../v1/data_policy_service/rest/client.rb | 1217 ++++++ .../data_policy_service/rest/service_stub.rb | 638 +++ .../cloud/bigquery/data_policies/v1/rest.rb | 39 + .../bigquery/data_policies/v1/version.rb | 30 + .../bigquery/datapolicies/v1/datapolicy_pb.rb | 42 + .../datapolicies/v1/datapolicy_services_pb.rb | 65 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../bigquery/datapolicies/v1/datapolicy.rb | 269 ++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../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/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../data_policy_service/create_data_policy.rb | 47 + .../data_policy_service/delete_data_policy.rb | 47 + .../data_policy_service/get_data_policy.rb | 47 + .../data_policy_service/get_iam_policy.rb | 47 + .../data_policy_service/list_data_policies.rb | 51 + .../data_policy_service/rename_data_policy.rb | 47 + .../data_policy_service/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../data_policy_service/update_data_policy.rb | 47 + ...google.cloud.bigquery.datapolicies.v1.json | 375 ++ .../v1/data_policy_service_paths_test.rb | 67 + .../v1/data_policy_service_rest_test.rb | 595 +++ .../v1/data_policy_service_test.rb | 651 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 58 + ...oud-bigquery-data_policies-v1beta1.gemspec | 29 + ...le-cloud-bigquery-data_policies-v1beta1.rb | 21 + .../cloud/bigquery/data_policies/v1beta1.rb | 42 + .../v1beta1/data_policy_service.rb | 51 + .../v1beta1/data_policy_service/client.rb | 1214 ++++++ .../data_policy_service/credentials.rb | 50 + .../v1beta1/data_policy_service/paths.rb | 71 + .../bigquery/data_policies/v1beta1/version.rb | 30 + .../datapolicies/v1beta1/datapolicy_pb.rb | 41 + .../v1beta1/datapolicy_services_pb.rb | 63 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../datapolicies/v1beta1/datapolicy.rb | 195 + .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../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/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../data_policy_service/create_data_policy.rb | 47 + .../data_policy_service/delete_data_policy.rb | 47 + .../data_policy_service/get_data_policy.rb | 47 + .../data_policy_service/get_iam_policy.rb | 47 + .../data_policy_service/list_data_policies.rb | 51 + .../data_policy_service/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../data_policy_service/update_data_policy.rb | 47 + ...e.cloud.bigquery.datapolicies.v1beta1.json | 335 ++ .../v1beta1/data_policy_service_paths_test.rb | 67 + .../v1beta1/data_policy_service_test.rb | 589 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 168 + .../gapic_metadata.json | 98 + ...le-cloud-bigquery-data_transfer-v1.gemspec | 29 + .../google-cloud-bigquery-data_transfer-v1.rb | 21 + .../google/cloud/bigquery/data_transfer/v1.rb | 47 + .../data_transfer/v1/bindings_override.rb | 77 + .../data_transfer/v1/data_transfer_service.rb | 57 + .../v1/data_transfer_service/client.rb | 2170 ++++++++++ .../v1/data_transfer_service/credentials.rb | 53 + .../v1/data_transfer_service/paths.rb | 193 + .../v1/data_transfer_service/rest.rb | 55 + .../v1/data_transfer_service/rest/client.rb | 2021 ++++++++++ .../rest/service_stub.rb | 1177 ++++++ .../cloud/bigquery/data_transfer/v1/rest.rb | 40 + .../bigquery/data_transfer/v1/version.rb | 30 + .../datatransfer/v1/datatransfer_pb.rb | 63 + .../v1/datatransfer_services_pb.rb | 99 + .../bigquery/datatransfer/v1/transfer_pb.rb | 43 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../bigquery/datatransfer/v1/datatransfer.rb | 726 ++++ .../bigquery/datatransfer/v1/transfer.rb | 411 ++ .../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/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../check_valid_creds.rb | 47 + .../create_transfer_config.rb | 47 + .../delete_transfer_config.rb | 47 + .../delete_transfer_run.rb | 47 + .../enroll_data_sources.rb | 47 + .../data_transfer_service/get_data_source.rb | 47 + .../get_transfer_config.rb | 47 + .../data_transfer_service/get_transfer_run.rb | 47 + .../list_data_sources.rb | 51 + .../list_transfer_configs.rb | 51 + .../list_transfer_logs.rb | 51 + .../list_transfer_runs.rb | 51 + .../schedule_transfer_runs.rb | 47 + .../start_manual_transfer_runs.rb | 47 + .../unenroll_data_sources.rb | 47 + .../update_transfer_config.rb | 47 + ...google.cloud.bigquery.datatransfer.v1.json | 655 +++ .../v1/data_transfer_service_paths_test.rb | 112 + .../v1/data_transfer_service_rest_test.rb | 988 +++++ .../v1/data_transfer_service_test.rb | 1103 +++++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 53 + ...google-cloud-bigquery-migration-v2.gemspec | 28 + .../lib/google-cloud-bigquery-migration-v2.rb | 21 + .../lib/google/cloud/bigquery/migration/v2.rb | 47 + .../migration/v2/migration_entities_pb.rb | 40 + .../v2/migration_error_details_pb.rb | 28 + .../migration/v2/migration_metrics_pb.rb | 31 + .../migration/v2/migration_service.rb | 57 + .../migration/v2/migration_service/client.rb | 1101 +++++ .../v2/migration_service/credentials.rb | 49 + .../migration/v2/migration_service/paths.rb | 92 + .../migration/v2/migration_service/rest.rb | 54 + .../v2/migration_service/rest/client.rb | 1009 +++++ .../v2/migration_service/rest/service_stub.rb | 512 +++ .../migration/v2/migration_service_pb.rb | 39 + .../v2/migration_service_services_pb.rb | 62 + .../cloud/bigquery/migration/v2/rest.rb | 39 + .../migration/v2/translation_config_pb.rb | 50 + .../migration/v2/translation_details_pb.rb | 30 + .../migration/v2/translation_suggestion_pb.rb | 27 + .../migration/v2/translation_usability_pb.rb | 26 + .../cloud/bigquery/migration/v2/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/distribution.rb | 233 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/label.rb | 49 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/metric.rb | 299 ++ .../proto_docs/google/api/resource.rb | 227 ++ .../migration/v2/migration_entities.rb | 278 ++ .../migration/v2/migration_error_details.rb | 72 + .../migration/v2/migration_metrics.rb | 129 + .../migration/v2/migration_service.rb | 166 + .../migration/v2/translation_config.rb | 389 ++ .../migration/v2/translation_details.rb | 138 + .../migration/v2/translation_suggestion.rb | 67 + .../migration/v2/translation_usability.rb | 69 + .../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/error_details.rb | 420 ++ .../snippets/Gemfile | 32 + .../create_migration_workflow.rb | 47 + .../delete_migration_workflow.rb | 47 + .../get_migration_subtask.rb | 47 + .../get_migration_workflow.rb | 47 + .../list_migration_subtasks.rb | 51 + .../list_migration_workflows.rb | 51 + .../start_migration_workflow.rb | 47 + ...ta_google.cloud.bigquery.migration.v2.json | 295 ++ .../v2/migration_service_paths_test.rb | 79 + .../v2/migration_service_rest_test.rb | 487 +++ .../migration/v2/migration_service_test.rb | 540 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 163 + ...ogle-cloud-bigquery-reservation-v1.gemspec | 29 + .../google-cloud-bigquery-reservation-v1.rb | 21 + .../google/cloud/bigquery/reservation/v1.rb | 47 + .../bigquery/reservation/v1/reservation_pb.rb | 82 + .../reservation/v1/reservation_service.rb | 71 + .../v1/reservation_service/client.rb | 3514 ++++++++++++++++ .../v1/reservation_service/credentials.rb | 54 + .../v1/reservation_service/paths.rb | 147 + .../v1/reservation_service/rest.rb | 68 + .../v1/reservation_service/rest/client.rb | 3266 +++++++++++++++ .../reservation_service/rest/service_stub.rb | 1889 +++++++++ .../reservation/v1/reservation_services_pb.rb | 297 ++ .../cloud/bigquery/reservation/v1/rest.rb | 39 + .../cloud/bigquery/reservation/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../bigquery/reservation/v1/reservation.rb | 1190 ++++++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../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 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../reservation_service/create_assignment.rb | 47 + .../create_capacity_commitment.rb | 47 + .../reservation_service/create_reservation.rb | 47 + .../create_reservation_group.rb | 47 + .../reservation_service/delete_assignment.rb | 47 + .../delete_capacity_commitment.rb | 47 + .../reservation_service/delete_reservation.rb | 47 + .../delete_reservation_group.rb | 47 + .../failover_reservation.rb | 47 + .../reservation_service/get_bi_reservation.rb | 47 + .../get_capacity_commitment.rb | 47 + .../reservation_service/get_iam_policy.rb | 47 + .../reservation_service/get_reservation.rb | 47 + .../get_reservation_group.rb | 47 + .../reservation_service/list_assignments.rb | 51 + .../list_capacity_commitments.rb | 51 + .../list_reservation_groups.rb | 51 + .../reservation_service/list_reservations.rb | 51 + .../merge_capacity_commitments.rb | 47 + .../reservation_service/move_assignment.rb | 47 + .../search_all_assignments.rb | 51 + .../reservation_service/search_assignments.rb | 51 + .../reservation_service/set_iam_policy.rb | 47 + .../split_capacity_commitment.rb | 47 + .../test_iam_permissions.rb | 47 + .../reservation_service/update_assignment.rb | 47 + .../update_bi_reservation.rb | 47 + .../update_capacity_commitment.rb | 47 + .../reservation_service/update_reservation.rb | 47 + ..._google.cloud.bigquery.reservation.v1.json | 1175 ++++++ .../v1/reservation_service_paths_test.rb | 115 + .../v1/reservation_service_rest_test.rb | 1703 ++++++++ .../v1/reservation_service_test.rb | 1892 +++++++++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-bigquery-storage-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-bigquery-storage-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../google-cloud-bigquery-storage-v1/Rakefile | 169 + .../gapic_metadata.json | 72 + .../google-cloud-bigquery-storage-v1.gemspec | 28 + .../lib/google-cloud-bigquery-storage-v1.rb | 21 + .../lib/google/cloud/bigquery/storage/v1.rb | 43 + .../bigquery/storage/v1/annotations_pb.rb | 24 + .../cloud/bigquery/storage/v1/arrow_pb.rb | 27 + .../cloud/bigquery/storage/v1/avro_pb.rb | 26 + .../bigquery/storage/v1/big_query_read.rb | 53 + .../storage/v1/big_query_read/client.rb | 750 ++++ .../storage/v1/big_query_read/credentials.rb | 54 + .../storage/v1/big_query_read/paths.rb | 108 + .../bigquery/storage/v1/big_query_write.rb | 56 + .../storage/v1/big_query_write/client.rb | 1026 +++++ .../storage/v1/big_query_write/credentials.rb | 55 + .../storage/v1/big_query_write/paths.rb | 75 + .../cloud/bigquery/storage/v1/protobuf_pb.rb | 26 + .../cloud/bigquery/storage/v1/storage_pb.rb | 61 + .../storage/v1/storage_services_pb.rb | 167 + .../cloud/bigquery/storage/v1/stream_pb.rb | 39 + .../cloud/bigquery/storage/v1/table_pb.rb | 30 + .../cloud/bigquery/storage/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/cloud/bigquery/storage/v1/arrow.rb | 103 + .../google/cloud/bigquery/storage/v1/avro.rb | 95 + .../cloud/bigquery/storage/v1/protobuf.rb | 56 + .../cloud/bigquery/storage/v1/storage.rb | 618 +++ .../cloud/bigquery/storage/v1/stream.rb | 321 ++ .../google/cloud/bigquery/storage/v1/table.rb | 208 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../big_query_read/create_read_session.rb | 47 + .../snippets/big_query_read/read_rows.rb | 50 + .../big_query_read/split_read_stream.rb | 47 + .../snippets/big_query_write/append_rows.rb | 56 + .../batch_commit_write_streams.rb | 47 + .../big_query_write/create_write_stream.rb | 47 + .../big_query_write/finalize_write_stream.rb | 47 + .../snippets/big_query_write/flush_rows.rb | 47 + .../big_query_write/get_write_stream.rb | 47 + ...data_google.cloud.bigquery.storage.v1.json | 375 ++ .../storage/v1/big_query_read_paths_test.rb | 91 + .../storage/v1/big_query_read_test.rb | 303 ++ .../storage/v1/big_query_write_paths_test.rb | 67 + .../storage/v1/big_query_write_test.rb | 501 +++ .../test/helper.rb | 26 + .../google-cloud-bigtable-v2/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-bigtable-v2/.rubocop.yml | 33 + .../google-cloud-bigtable-v2/.toys.rb | 28 + .../google-cloud-bigtable-v2/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-bigtable-v2/CHANGELOG.md | 2 + .../google-cloud-bigtable-v2/Gemfile | 14 + .../google-cloud-bigtable-v2/LICENSE.md | 201 + .../google-cloud-bigtable-v2/README.md | 154 + .../google-cloud-bigtable-v2/Rakefile | 169 + .../gapic_metadata.json | 73 + .../google-cloud-bigtable-v2.gemspec | 28 + .../lib/google-cloud-bigtable-v2.rb | 21 + .../lib/google/bigtable/v2/bigtable_pb.rb | 66 + .../bigtable/v2/bigtable_services_pb.rb | 86 + .../lib/google/bigtable/v2/data_pb.rb | 59 + .../google/bigtable/v2/feature_flags_pb.rb | 21 + .../lib/google/bigtable/v2/peer_info_pb.rb | 22 + .../google/bigtable/v2/request_stats_pb.rb | 26 + .../google/bigtable/v2/response_params_pb.rb | 21 + .../lib/google/bigtable/v2/types_pb.rb | 55 + .../lib/google/cloud/bigtable/v2.rb | 40 + .../lib/google/cloud/bigtable/v2/bigtable.rb | 49 + .../cloud/bigtable/v2/bigtable/client.rb | 1820 +++++++++ .../cloud/bigtable/v2/bigtable/credentials.rb | 56 + .../cloud/bigtable/v2/bigtable/paths.rb | 109 + .../lib/google/cloud/bigtable/v2/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/api/routing.rb | 463 +++ .../proto_docs/google/bigtable/v2/bigtable.rb | 940 +++++ .../proto_docs/google/bigtable/v2/data.rb | 997 +++++ .../google/bigtable/v2/feature_flags.rb | 77 + .../google/bigtable/v2/peer_info.rb | 81 + .../google/bigtable/v2/request_stats.rb | 103 + .../google/bigtable/v2/response_params.rb | 42 + .../proto_docs/google/bigtable/v2/types.rb | 593 +++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 148 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 53 + .../google-cloud-bigtable-v2/snippets/Gemfile | 32 + .../snippets/bigtable/check_and_mutate_row.rb | 47 + .../snippets/bigtable/execute_query.rb | 50 + ...nerate_initial_change_stream_partitions.rb | 50 + .../snippets/bigtable/mutate_row.rb | 47 + .../snippets/bigtable/mutate_rows.rb | 50 + .../snippets/bigtable/ping_and_warm.rb | 47 + .../snippets/bigtable/prepare_query.rb | 47 + .../snippets/bigtable/read_change_stream.rb | 50 + .../bigtable/read_modify_write_row.rb | 47 + .../snippets/bigtable/read_rows.rb | 50 + .../snippets/bigtable/sample_row_keys.rb | 50 + .../snippet_metadata_google.bigtable.v2.json | 455 +++ .../cloud/bigtable/v2/bigtable_paths_test.rb | 91 + .../google/cloud/bigtable/v2/bigtable_test.rb | 927 +++++ .../google-cloud-bigtable-v2/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-billing-budgets-v1/.toys.rb | 28 + .../google-cloud-billing-budgets-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-billing-budgets-v1/Gemfile | 14 + .../LICENSE.md | 201 + .../google-cloud-billing-budgets-v1/README.md | 154 + .../google-cloud-billing-budgets-v1/Rakefile | 169 + .../gapic_metadata.json | 43 + .../google-cloud-billing-budgets-v1.gemspec | 28 + .../lib/google-cloud-billing-budgets-v1.rb | 21 + .../lib/google/cloud/billing/budgets/v1.rb | 47 + .../billing/budgets/v1/budget_model_pb.rb | 38 + .../billing/budgets/v1/budget_service.rb | 58 + .../budgets/v1/budget_service/client.rb | 917 +++++ .../budgets/v1/budget_service/credentials.rb | 54 + .../budgets/v1/budget_service/paths.rb | 66 + .../billing/budgets/v1/budget_service/rest.rb | 55 + .../budgets/v1/budget_service/rest/client.rb | 839 ++++ .../v1/budget_service/rest/service_stub.rb | 390 ++ .../billing/budgets/v1/budget_service_pb.rb | 36 + .../budgets/v1/budget_service_services_pb.rb | 72 + .../google/cloud/billing/budgets/v1/rest.rb | 39 + .../cloud/billing/budgets/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/billing/budgets/v1/budget_model.rb | 389 ++ .../billing/budgets/v1/budget_service.rb | 119 + .../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/struct.rb | 108 + .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/money.rb | 43 + .../snippets/Gemfile | 32 + .../snippets/budget_service/create_budget.rb | 47 + .../snippets/budget_service/delete_budget.rb | 47 + .../snippets/budget_service/get_budget.rb | 47 + .../snippets/budget_service/list_budgets.rb | 51 + .../snippets/budget_service/update_budget.rb | 47 + ...adata_google.cloud.billing.budgets.v1.json | 215 + .../budgets/v1/budget_service_paths_test.rb | 67 + .../budgets/v1/budget_service_rest_test.rb | 374 ++ .../billing/budgets/v1/budget_service_test.rb | 409 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 43 + ...ogle-cloud-billing-budgets-v1beta1.gemspec | 28 + .../google-cloud-billing-budgets-v1beta1.rb | 21 + .../google/cloud/billing/budgets/v1beta1.rb | 42 + .../budgets/v1beta1/budget_model_pb.rb | 38 + .../billing/budgets/v1beta1/budget_service.rb | 52 + .../budgets/v1beta1/budget_service/client.rb | 917 +++++ .../v1beta1/budget_service/credentials.rb | 54 + .../budgets/v1beta1/budget_service/paths.rb | 66 + .../budgets/v1beta1/budget_service_pb.rb | 36 + .../v1beta1/budget_service_services_pb.rb | 72 + .../cloud/billing/budgets/v1beta1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../billing/budgets/v1beta1/budget_model.rb | 362 ++ .../billing/budgets/v1beta1/budget_service.rb | 119 + .../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/struct.rb | 108 + .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/money.rb | 43 + .../snippets/Gemfile | 32 + .../snippets/budget_service/create_budget.rb | 47 + .../snippets/budget_service/delete_budget.rb | 47 + .../snippets/budget_service/get_budget.rb | 47 + .../snippets/budget_service/list_budgets.rb | 51 + .../snippets/budget_service/update_budget.rb | 47 + ..._google.cloud.billing.budgets.v1beta1.json | 215 + .../v1beta1/budget_service_paths_test.rb | 67 + .../budgets/v1beta1/budget_service_test.rb | 409 ++ .../test/helper.rb | 26 + .../google-cloud-billing-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-billing-v1/.rubocop.yml | 33 + .../google-cloud-billing-v1/.toys.rb | 28 + .../google-cloud-billing-v1/.yardopts | 12 + .../google-cloud-billing-v1/AUTHENTICATION.md | 122 + .../google-cloud-billing-v1/CHANGELOG.md | 2 + .../google-cloud-billing-v1/Gemfile | 14 + .../google-cloud-billing-v1/LICENSE.md | 201 + .../google-cloud-billing-v1/README.md | 153 + .../google-cloud-billing-v1/Rakefile | 169 + .../gapic_metadata.json | 92 + .../google-cloud-billing-v1.gemspec | 29 + .../lib/google-cloud-billing-v1.rb | 21 + .../lib/google/cloud/billing/v1.rb | 46 + .../google/cloud/billing/v1/cloud_billing.rb | 56 + .../cloud/billing/v1/cloud_billing/client.rb | 1588 ++++++++ .../billing/v1/cloud_billing/credentials.rb | 53 + .../cloud/billing/v1/cloud_billing/paths.rb | 111 + .../cloud/billing/v1/cloud_billing/rest.rb | 53 + .../billing/v1/cloud_billing/rest/client.rb | 1484 +++++++ .../v1/cloud_billing/rest/service_stub.rb | 792 ++++ .../cloud/billing/v1/cloud_billing_pb.rb | 40 + .../billing/v1/cloud_billing_services_pb.rb | 136 + .../google/cloud/billing/v1/cloud_catalog.rb | 57 + .../cloud/billing/v1/cloud_catalog/client.rb | 605 +++ .../billing/v1/cloud_catalog/credentials.rb | 53 + .../cloud/billing/v1/cloud_catalog/paths.rb | 47 + .../cloud/billing/v1/cloud_catalog/rest.rb | 54 + .../billing/v1/cloud_catalog/rest/client.rb | 556 +++ .../v1/cloud_catalog/rest/service_stub.rb | 201 + .../cloud/billing/v1/cloud_catalog_pb.rb | 42 + .../billing/v1/cloud_catalog_services_pb.rb | 49 + .../lib/google/cloud/billing/v1/rest.rb | 38 + .../lib/google/cloud/billing/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/cloud/billing/v1/cloud_billing.rb | 276 ++ .../google/cloud/billing/v1/cloud_catalog.rb | 352 ++ .../proto_docs/google/iam/v1/iam_policy.rb | 87 + .../proto_docs/google/iam/v1/options.rb | 50 + .../proto_docs/google/iam/v1/policy.rb | 426 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/type/expr.rb | 75 + .../proto_docs/google/type/money.rb | 43 + .../google-cloud-billing-v1/snippets/Gemfile | 32 + .../cloud_billing/create_billing_account.rb | 47 + .../cloud_billing/get_billing_account.rb | 47 + .../snippets/cloud_billing/get_iam_policy.rb | 47 + .../cloud_billing/get_project_billing_info.rb | 47 + .../cloud_billing/list_billing_accounts.rb | 51 + .../list_project_billing_info.rb | 51 + .../cloud_billing/move_billing_account.rb | 47 + .../snippets/cloud_billing/set_iam_policy.rb | 47 + .../cloud_billing/test_iam_permissions.rb | 47 + .../cloud_billing/update_billing_account.rb | 47 + .../update_project_billing_info.rb | 47 + .../snippets/cloud_catalog/list_services.rb | 51 + .../snippets/cloud_catalog/list_skus.rb | 51 + ...ppet_metadata_google.cloud.billing.v1.json | 535 +++ .../billing/v1/cloud_billing_paths_test.rb | 94 + .../billing/v1/cloud_billing_rest_test.rb | 707 ++++ .../cloud/billing/v1/cloud_billing_test.rb | 780 ++++ .../billing/v1/cloud_catalog_paths_test.rb | 55 + .../billing/v1/cloud_catalog_rest_test.rb | 213 + .../cloud/billing/v1/cloud_catalog_test.rb | 242 ++ .../google-cloud-billing-v1/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 19 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 168 + .../gapic_metadata.json | 81 + ...ogle-cloud-binary_authorization-v1.gemspec | 29 + .../google-cloud-binary_authorization-v1.rb | 21 + .../google/cloud/binary_authorization/v1.rb | 47 + .../v1/binauthz_management_service.rb | 61 + .../v1/binauthz_management_service/client.rb | 1108 +++++ .../credentials.rb | 51 + .../v1/binauthz_management_service/paths.rb | 97 + .../v1/binauthz_management_service/rest.rb | 58 + .../rest/client.rb | 1016 +++++ .../rest/service_stub.rb | 511 +++ .../cloud/binary_authorization/v1/rest.rb | 39 + .../binary_authorization/v1/system_policy.rb | 55 + .../v1/system_policy/client.rb | 475 +++ .../v1/system_policy/credentials.rb | 51 + .../v1/system_policy/paths.rb | 66 + .../v1/system_policy/rest.rb | 52 + .../v1/system_policy/rest/client.rb | 425 ++ .../v1/system_policy/rest/service_stub.rb | 142 + .../v1/validation_helper.rb | 54 + .../v1/validation_helper/client.rb | 486 +++ .../v1/validation_helper/credentials.rb | 51 + .../v1/validation_helper/rest.rb | 51 + .../v1/validation_helper/rest/client.rb | 436 ++ .../v1/validation_helper/rest/service_stub.rb | 143 + .../cloud/binary_authorization/v1/version.rb | 28 + .../binaryauthorization/v1/resources_pb.rb | 35 + .../binaryauthorization/v1/service_pb.rb | 40 + .../v1/service_services_pb.rb | 115 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/binaryauthorization/v1/resources.rb | 374 ++ .../cloud/binaryauthorization/v1/service.rb | 189 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/grafeas/v1/attestation.rb | 98 + .../proto_docs/grafeas/v1/common.rb | 243 ++ .../snippets/Gemfile | 32 + .../create_attestor.rb | 47 + .../delete_attestor.rb | 47 + .../get_attestor.rb | 47 + .../binauthz_management_service/get_policy.rb | 47 + .../list_attestors.rb | 51 + .../update_attestor.rb | 47 + .../update_policy.rb | 47 + ...a_google.cloud.binaryauthorization.v1.json | 375 ++ .../system_policy/get_system_policy.rb | 47 + .../validate_attestation_occurrence.rb | 47 + .../binauthz_management_service_paths_test.rb | 82 + .../binauthz_management_service_rest_test.rb | 481 +++ .../v1/binauthz_management_service_test.rb | 523 +++ .../v1/system_policy_paths_test.rb | 58 + .../v1/system_policy_rest_test.rb | 153 + .../v1/system_policy_test.rb | 162 + .../v1/validation_helper_rest_test.rb | 156 + .../v1/validation_helper_test.rb | 168 + .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 19 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 67 + ...cloud-binary_authorization-v1beta1.gemspec | 28 + ...ogle-cloud-binary_authorization-v1beta1.rb | 21 + .../cloud/binary_authorization/v1beta1.rb | 46 + .../v1beta1/binauthz_management_service.rb | 61 + .../binauthz_management_service/client.rb | 1108 +++++ .../credentials.rb | 51 + .../binauthz_management_service/paths.rb | 97 + .../binauthz_management_service/rest.rb | 58 + .../rest/client.rb | 1016 +++++ .../rest/service_stub.rb | 511 +++ .../binary_authorization/v1beta1/rest.rb | 38 + .../v1beta1/system_policy.rb | 55 + .../v1beta1/system_policy/client.rb | 475 +++ .../v1beta1/system_policy/credentials.rb | 51 + .../v1beta1/system_policy/paths.rb | 66 + .../v1beta1/system_policy/rest.rb | 52 + .../v1beta1/system_policy/rest/client.rb | 425 ++ .../system_policy/rest/service_stub.rb | 142 + .../binary_authorization/v1beta1/version.rb | 28 + .../continuous_validation_logging_pb.rb | 32 + .../v1beta1/resources_pb.rb | 35 + .../binaryauthorization/v1beta1/service_pb.rb | 36 + .../v1beta1/service_services_pb.rb | 98 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../v1beta1/continuous_validation_logging.rb | 201 + .../binaryauthorization/v1beta1/resources.rb | 376 ++ .../binaryauthorization/v1beta1/service.rb | 138 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + .../create_attestor.rb | 47 + .../delete_attestor.rb | 47 + .../get_attestor.rb | 47 + .../binauthz_management_service/get_policy.rb | 47 + .../list_attestors.rb | 51 + .../update_attestor.rb | 47 + .../update_policy.rb | 47 + ...gle.cloud.binaryauthorization.v1beta1.json | 335 ++ .../system_policy/get_system_policy.rb | 47 + .../binauthz_management_service_paths_test.rb | 82 + .../binauthz_management_service_rest_test.rb | 481 +++ .../binauthz_management_service_test.rb | 523 +++ .../v1beta1/system_policy_paths_test.rb | 58 + .../v1beta1/system_policy_rest_test.rb | 153 + .../v1beta1/system_policy_test.rb | 162 + .../test/helper.rb | 26 + .../google-cloud-build-v1/.gitignore | 22 + .../google-cloud-build-v1/.repo-metadata.json | 18 + .../google-cloud-build-v1/.rubocop.yml | 33 + .../google-cloud-build-v1/.toys.rb | 28 + .../google-cloud-build-v1/.yardopts | 12 + .../google-cloud-build-v1/AUTHENTICATION.md | 122 + .../google-cloud-build-v1/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-build-v1/Gemfile | 14 + .../google-cloud-build-v1/LICENSE.md | 201 + .../google-cloud-build-v1/README.md | 154 + .../google-cloud-build-v1/Rakefile | 169 + .../google-cloud-build-v1/gapic_metadata.json | 113 + .../google-cloud-build-v1.gemspec | 28 + .../lib/google-cloud-build-v1.rb | 21 + .../lib/google/cloud/build/v1.rb | 45 + .../lib/google/cloud/build/v1/cloud_build.rb | 63 + .../cloud/build/v1/cloud_build/client.rb | 2518 ++++++++++++ .../cloud/build/v1/cloud_build/credentials.rb | 51 + .../cloud/build/v1/cloud_build/operations.rb | 841 ++++ .../cloud/build/v1/cloud_build/paths.rb | 392 ++ .../google/cloud/build/v1/cloud_build/rest.rb | 60 + .../cloud/build/v1/cloud_build/rest/client.rb | 2285 +++++++++++ .../build/v1/cloud_build/rest/operations.rb | 940 +++++ .../build/v1/cloud_build/rest/service_stub.rb | 1357 +++++++ .../lib/google/cloud/build/v1/rest.rb | 37 + .../lib/google/cloud/build/v1/version.rb | 28 + .../devtools/cloudbuild/v1/cloudbuild_pb.rb | 138 + .../cloudbuild/v1/cloudbuild_services_pb.rb | 136 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/httpbody.rb | 80 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../proto_docs/google/api/routing.rb | 463 +++ .../devtools/cloudbuild/v1/cloudbuild.rb | 2751 +++++++++++++ .../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-build-v1/snippets/Gemfile | 32 + .../snippets/cloud_build/approve_build.rb | 54 + .../snippets/cloud_build/cancel_build.rb | 47 + .../snippets/cloud_build/create_build.rb | 54 + .../cloud_build/create_build_trigger.rb | 47 + .../cloud_build/create_worker_pool.rb | 54 + .../cloud_build/delete_build_trigger.rb | 47 + .../cloud_build/delete_worker_pool.rb | 54 + .../snippets/cloud_build/get_build.rb | 47 + .../snippets/cloud_build/get_build_trigger.rb | 47 + .../get_default_service_account.rb | 47 + .../snippets/cloud_build/get_worker_pool.rb | 47 + .../cloud_build/list_build_triggers.rb | 51 + .../snippets/cloud_build/list_builds.rb | 51 + .../snippets/cloud_build/list_worker_pools.rb | 51 + .../cloud_build/receive_trigger_webhook.rb | 47 + .../snippets/cloud_build/retry_build.rb | 54 + .../snippets/cloud_build/run_build_trigger.rb | 54 + .../cloud_build/update_build_trigger.rb | 47 + .../cloud_build/update_worker_pool.rb | 54 + ...etadata_google.devtools.cloudbuild.v1.json | 775 ++++ .../build/v1/cloud_build_operations_test.rb | 400 ++ .../cloud/build/v1/cloud_build_paths_test.rb | 244 ++ .../cloud/build/v1/cloud_build_rest_test.rb | 1167 ++++++ .../google/cloud/build/v1/cloud_build_test.rb | 1354 +++++++ .../google-cloud-build-v1/test/helper.rb | 26 + .../google-cloud-build-v2/.gitignore | 22 + .../google-cloud-build-v2/.repo-metadata.json | 18 + .../google-cloud-build-v2/.rubocop.yml | 33 + .../google-cloud-build-v2/.toys.rb | 28 + .../google-cloud-build-v2/.yardopts | 12 + .../google-cloud-build-v2/AUTHENTICATION.md | 122 + .../google-cloud-build-v2/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-build-v2/Gemfile | 14 + .../google-cloud-build-v2/LICENSE.md | 201 + .../google-cloud-build-v2/README.md | 154 + .../google-cloud-build-v2/Rakefile | 169 + .../google-cloud-build-v2/gapic_metadata.json | 88 + .../google-cloud-build-v2.gemspec | 30 + .../lib/google-cloud-build-v2.rb | 21 + .../lib/google/cloud/build/v2.rb | 40 + .../cloud/build/v2/repository_manager.rb | 50 + .../build/v2/repository_manager/client.rb | 1909 +++++++++ .../v2/repository_manager/credentials.rb | 51 + .../build/v2/repository_manager/operations.rb | 841 ++++ .../build/v2/repository_manager/paths.rb | 130 + .../lib/google/cloud/build/v2/version.rb | 28 + .../devtools/cloudbuild/v2/cloudbuild_pb.rb | 28 + .../devtools/cloudbuild/v2/repositories_pb.rb | 66 + .../cloudbuild/v2/repositories_services_pb.rb | 72 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/httpbody.rb | 80 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../devtools/cloudbuild/v2/cloudbuild.rb | 88 + .../devtools/cloudbuild/v2/repositories.rb | 697 ++++ .../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 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-build-v2/snippets/Gemfile | 32 + .../batch_create_repositories.rb | 54 + .../repository_manager/create_connection.rb | 54 + .../repository_manager/create_repository.rb | 54 + .../repository_manager/delete_connection.rb | 54 + .../repository_manager/delete_repository.rb | 54 + .../repository_manager/fetch_git_refs.rb | 47 + .../fetch_linkable_repositories.rb | 51 + .../repository_manager/fetch_read_token.rb | 47 + .../fetch_read_write_token.rb | 47 + .../repository_manager/get_connection.rb | 47 + .../repository_manager/get_repository.rb | 47 + .../repository_manager/list_connections.rb | 51 + .../repository_manager/list_repositories.rb | 51 + .../repository_manager/update_connection.rb | 54 + ...etadata_google.devtools.cloudbuild.v2.json | 575 +++ .../v2/repository_manager_operations_test.rb | 400 ++ .../build/v2/repository_manager_paths_test.rb | 103 + .../cloud/build/v2/repository_manager_test.rb | 1015 +++++ .../google-cloud-build-v2/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 153 + .../Rakefile | 169 + .../gapic_metadata.json | 48 + ...ogle-cloud-capacity_planner-v1beta.gemspec | 28 + .../google-cloud-capacity_planner-v1beta.rb | 21 + .../google/cloud/capacity_planner/v1beta.rb | 45 + .../cloud/capacity_planner/v1beta/rest.rb | 37 + .../capacity_planner/v1beta/usage_service.rb | 56 + .../v1beta/usage_service/client.rb | 1231 ++++++ .../v1beta/usage_service/credentials.rb | 48 + .../v1beta/usage_service/operations.rb | 841 ++++ .../v1beta/usage_service/paths.rb | 50 + .../v1beta/usage_service/rest.rb | 53 + .../v1beta/usage_service/rest/client.rb | 1146 ++++++ .../v1beta/usage_service/rest/operations.rb | 925 +++++ .../v1beta/usage_service/rest/service_stub.rb | 546 +++ .../cloud/capacity_planner/v1beta/version.rb | 28 + .../capacityplanner/v1beta/allocation_pb.rb | 31 + .../v1beta/future_reservation_pb.rb | 28 + .../capacityplanner/v1beta/location_pb.rb | 25 + .../capacityplanner/v1beta/resource_pb.rb | 30 + .../v1beta/usage_service_pb.rb | 65 + .../v1beta/usage_service_services_pb.rb | 61 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../capacityplanner/v1beta/allocation.rb | 206 + .../v1beta/future_reservation.rb | 185 + .../cloud/capacityplanner/v1beta/location.rb | 79 + .../cloud/capacityplanner/v1beta/resource.rb | 159 + .../capacityplanner/v1beta/usage_service.rb | 912 +++++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 53 + .../snippets/Gemfile | 32 + ...a_google.cloud.capacityplanner.v1beta.json | 255 ++ .../usage_service/export_forecasts.rb | 54 + .../export_reservations_usage.rb | 54 + .../usage_service/export_usage_histories.rb | 54 + .../snippets/usage_service/query_forecasts.rb | 47 + .../usage_service/query_reservations.rb | 47 + .../usage_service/query_usage_histories.rb | 47 + .../v1beta/usage_service_operations_test.rb | 400 ++ .../v1beta/usage_service_paths_test.rb | 55 + .../v1beta/usage_service_rest_test.rb | 488 +++ .../v1beta/usage_service_test.rb | 612 +++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 163 + ...oogle-cloud-certificate_manager-v1.gemspec | 29 + .../google-cloud-certificate_manager-v1.rb | 21 + .../google/cloud/certificate_manager/v1.rb | 45 + .../v1/bindings_override.rb | 75 + .../v1/certificate_manager.rb | 81 + .../v1/certificate_manager/client.rb | 3567 +++++++++++++++++ .../v1/certificate_manager/credentials.rb | 47 + .../v1/certificate_manager/operations.rb | 841 ++++ .../v1/certificate_manager/paths.rb | 185 + .../v1/certificate_manager/rest.rb | 79 + .../v1/certificate_manager/rest/client.rb | 3329 +++++++++++++++ .../v1/certificate_manager/rest/operations.rb | 925 +++++ .../certificate_manager/rest/service_stub.rb | 1861 +++++++++ .../cloud/certificate_manager/v1/rest.rb | 38 + .../cloud/certificate_manager/v1/version.rb | 28 + .../v1/certificate_issuance_config_pb.rb | 34 + .../v1/certificate_manager_pb.rb | 75 + .../v1/certificate_manager_services_pb.rb | 128 + .../certificatemanager/v1/trust_config_pb.rb | 35 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../v1/certificate_issuance_config.rb | 186 + .../v1/certificate_manager.rb | 896 +++++ .../certificatemanager/v1/trust_config.rb | 210 + .../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 + .../snippets/Gemfile | 32 + .../certificate_manager/create_certificate.rb | 54 + .../create_certificate_issuance_config.rb | 54 + .../create_certificate_map.rb | 54 + .../create_certificate_map_entry.rb | 54 + .../create_dns_authorization.rb | 54 + .../create_trust_config.rb | 54 + .../certificate_manager/delete_certificate.rb | 54 + .../delete_certificate_issuance_config.rb | 54 + .../delete_certificate_map.rb | 54 + .../delete_certificate_map_entry.rb | 54 + .../delete_dns_authorization.rb | 54 + .../delete_trust_config.rb | 54 + .../certificate_manager/get_certificate.rb | 47 + .../get_certificate_issuance_config.rb | 47 + .../get_certificate_map.rb | 47 + .../get_certificate_map_entry.rb | 47 + .../get_dns_authorization.rb | 47 + .../certificate_manager/get_trust_config.rb | 47 + .../list_certificate_issuance_configs.rb | 51 + .../list_certificate_map_entries.rb | 51 + .../list_certificate_maps.rb | 51 + .../certificate_manager/list_certificates.rb | 51 + .../list_dns_authorizations.rb | 51 + .../certificate_manager/list_trust_configs.rb | 51 + .../certificate_manager/update_certificate.rb | 54 + .../update_certificate_map.rb | 54 + .../update_certificate_map_entry.rb | 54 + .../update_dns_authorization.rb | 54 + .../update_trust_config.rb | 54 + ...ta_google.cloud.certificatemanager.v1.json | 1175 ++++++ .../v1/certificate_manager_operations_test.rb | 400 ++ .../v1/certificate_manager_paths_test.rb | 139 + .../v1/certificate_manager_rest_test.rb | 1707 ++++++++ .../v1/certificate_manager_test.rb | 1999 +++++++++ .../test/helper.rb | 26 + .../google-cloud-chronicle-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-chronicle-v1/.rubocop.yml | 33 + .../google-cloud-chronicle-v1/.toys.rb | 28 + .../google-cloud-chronicle-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-chronicle-v1/CHANGELOG.md | 2 + .../google-cloud-chronicle-v1/Gemfile | 14 + .../google-cloud-chronicle-v1/LICENSE.md | 201 + .../google-cloud-chronicle-v1/README.md | 154 + .../google-cloud-chronicle-v1/Rakefile | 169 + .../gapic_metadata.json | 214 + .../google-cloud-chronicle-v1.gemspec | 28 + .../lib/google-cloud-chronicle-v1.rb | 21 + .../lib/google/cloud/chronicle/v1.rb | 49 + .../chronicle/v1/data_access_control_pb.rb | 44 + .../v1/data_access_control_service.rb | 56 + .../v1/data_access_control_service/client.rb | 1431 +++++++ .../credentials.rb | 47 + .../v1/data_access_control_service/paths.rb | 94 + .../v1/data_access_control_service/rest.rb | 53 + .../rest/client.rb | 1318 ++++++ .../rest/service_stub.rb | 695 ++++ .../v1/data_access_control_services_pb.rb | 76 + .../google/cloud/chronicle/v1/entity_pb.rb | 39 + .../cloud/chronicle/v1/entity_service.rb | 55 + .../chronicle/v1/entity_service/client.rb | 908 +++++ .../v1/entity_service/credentials.rb | 47 + .../chronicle/v1/entity_service/paths.rb | 73 + .../cloud/chronicle/v1/entity_service/rest.rb | 52 + .../v1/entity_service/rest/client.rb | 830 ++++ .../v1/entity_service/rest/service_stub.rb | 388 ++ .../cloud/chronicle/v1/entity_services_pb.rb | 54 + .../google/cloud/chronicle/v1/instance_pb.rb | 27 + .../cloud/chronicle/v1/instance_service.rb | 55 + .../chronicle/v1/instance_service/client.rb | 481 +++ .../v1/instance_service/credentials.rb | 47 + .../chronicle/v1/instance_service/paths.rb | 52 + .../chronicle/v1/instance_service/rest.rb | 52 + .../v1/instance_service/rest/client.rb | 431 ++ .../v1/instance_service/rest/service_stub.rb | 142 + .../chronicle/v1/instance_services_pb.rb | 45 + .../cloud/chronicle/v1/reference_list_pb.rb | 38 + .../chronicle/v1/reference_list_service.rb | 55 + .../v1/reference_list_service/client.rb | 809 ++++ .../v1/reference_list_service/credentials.rb | 47 + .../v1/reference_list_service/paths.rb | 73 + .../v1/reference_list_service/rest.rb | 52 + .../v1/reference_list_service/rest/client.rb | 738 ++++ .../rest/service_stub.rb | 327 ++ .../v1/reference_list_services_pb.rb | 51 + .../lib/google/cloud/chronicle/v1/rest.rb | 41 + .../lib/google/cloud/chronicle/v1/rule_pb.rb | 61 + .../google/cloud/chronicle/v1/rule_service.rb | 56 + .../cloud/chronicle/v1/rule_service/client.rb | 1691 ++++++++ .../chronicle/v1/rule_service/credentials.rb | 47 + .../chronicle/v1/rule_service/operations.rb | 841 ++++ .../cloud/chronicle/v1/rule_service/paths.rb | 159 + .../cloud/chronicle/v1/rule_service/rest.rb | 53 + .../chronicle/v1/rule_service/rest/client.rb | 1564 ++++++++ .../v1/rule_service/rest/operations.rb | 925 +++++ .../v1/rule_service/rest/service_stub.rb | 817 ++++ .../cloud/chronicle/v1/rule_services_pb.rb | 70 + .../lib/google/cloud/chronicle/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/chronicle/v1/data_access_control.rb | 364 ++ .../google/cloud/chronicle/v1/entity.rb | 210 + .../google/cloud/chronicle/v1/instance.rb | 47 + .../cloud/chronicle/v1/reference_list.rb | 232 ++ .../google/cloud/chronicle/v1/rule.rb | 701 ++++ .../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 + .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../create_data_access_label.rb | 47 + .../create_data_access_scope.rb | 47 + .../delete_data_access_label.rb | 47 + .../delete_data_access_scope.rb | 47 + .../get_data_access_label.rb | 47 + .../get_data_access_scope.rb | 47 + .../list_data_access_labels.rb | 51 + .../list_data_access_scopes.rb | 51 + .../update_data_access_label.rb | 47 + .../update_data_access_scope.rb | 47 + .../entity_service/create_watchlist.rb | 47 + .../entity_service/delete_watchlist.rb | 47 + .../snippets/entity_service/get_watchlist.rb | 47 + .../entity_service/list_watchlists.rb | 51 + .../entity_service/update_watchlist.rb | 47 + .../snippets/instance_service/get_instance.rb | 47 + .../create_reference_list.rb | 47 + .../get_reference_list.rb | 47 + .../list_reference_lists.rb | 51 + .../update_reference_list.rb | 47 + .../snippets/rule_service/create_retrohunt.rb | 54 + .../snippets/rule_service/create_rule.rb | 47 + .../snippets/rule_service/delete_rule.rb | 47 + .../snippets/rule_service/get_retrohunt.rb | 47 + .../snippets/rule_service/get_rule.rb | 47 + .../rule_service/get_rule_deployment.rb | 47 + .../snippets/rule_service/list_retrohunts.rb | 51 + .../rule_service/list_rule_deployments.rb | 51 + .../rule_service/list_rule_revisions.rb | 51 + .../snippets/rule_service/list_rules.rb | 51 + .../snippets/rule_service/update_rule.rb | 47 + .../rule_service/update_rule_deployment.rb | 47 + ...et_metadata_google.cloud.chronicle.v1.json | 1295 ++++++ .../data_access_control_service_paths_test.rb | 79 + .../data_access_control_service_rest_test.rb | 651 +++ .../v1/data_access_control_service_test.rb | 718 ++++ .../chronicle/v1/entity_service_paths_test.rb | 67 + .../chronicle/v1/entity_service_rest_test.rb | 376 ++ .../cloud/chronicle/v1/entity_service_test.rb | 413 ++ .../v1/instance_service_paths_test.rb | 55 + .../v1/instance_service_rest_test.rb | 153 + .../chronicle/v1/instance_service_test.rb | 162 + .../v1/reference_list_service_paths_test.rb | 67 + .../v1/reference_list_service_rest_test.rb | 322 ++ .../v1/reference_list_service_test.rb | 355 ++ .../v1/rule_service_operations_test.rb | 400 ++ .../chronicle/v1/rule_service_paths_test.rb | 115 + .../chronicle/v1/rule_service_rest_test.rb | 766 ++++ .../cloud/chronicle/v1/rule_service_test.rb | 877 ++++ .../google-cloud-chronicle-v1/test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 92 + ...le-cloud-cloud_controls_partner-v1.gemspec | 28 + .../google-cloud-cloud_controls_partner-v1.rb | 21 + .../google/cloud/cloud_controls_partner/v1.rb | 46 + .../v1/cloud_controls_partner_core.rb | 55 + .../v1/cloud_controls_partner_core/client.rb | 1504 +++++++ .../credentials.rb | 47 + .../v1/cloud_controls_partner_core/paths.rb | 149 + .../v1/cloud_controls_partner_core/rest.rb | 52 + .../rest/client.rb | 1382 +++++++ .../rest/service_stub.rb | 754 ++++ .../v1/cloud_controls_partner_monitoring.rb | 55 + .../client.rb | 605 +++ .../credentials.rb | 47 + .../paths.rb | 77 + .../cloud_controls_partner_monitoring/rest.rb | 52 + .../rest/client.rb | 548 +++ .../rest/service_stub.rb | 203 + .../cloud/cloud_controls_partner/v1/rest.rb | 38 + .../cloud_controls_partner/v1/version.rb | 28 + .../v1/access_approval_requests_pb.rb | 29 + .../v1/completion_state_pb.rb | 21 + .../cloud/cloudcontrolspartner/v1/core_pb.rb | 34 + .../v1/core_services_pb.rb | 66 + .../v1/customer_workloads_pb.rb | 33 + .../cloudcontrolspartner/v1/customers_pb.rb | 36 + .../v1/ekm_connections_pb.rb | 28 + .../cloudcontrolspartner/v1/monitoring_pb.rb | 24 + .../v1/monitoring_services_pb.rb | 53 + .../v1/partner_permissions_pb.rb | 26 + .../cloudcontrolspartner/v1/partners_pb.rb | 29 + .../cloudcontrolspartner/v1/violations_pb.rb | 35 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../v1/access_approval_requests.rb | 143 + .../v1/completion_state.rb | 44 + .../cloud/cloudcontrolspartner/v1/core.rb | 57 + .../v1/customer_workloads.rb | 177 + .../cloudcontrolspartner/v1/customers.rb | 180 + .../v1/ekm_connections.rb | 96 + .../v1/partner_permissions.rb | 69 + .../cloud/cloudcontrolspartner/v1/partners.rb | 117 + .../cloudcontrolspartner/v1/violations.rb | 229 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../create_customer.rb | 47 + .../delete_customer.rb | 47 + .../get_customer.rb | 47 + .../get_ekm_connections.rb | 47 + .../get_partner.rb | 47 + .../get_partner_permissions.rb | 47 + .../get_workload.rb | 47 + .../list_access_approval_requests.rb | 51 + .../list_customers.rb | 51 + .../list_workloads.rb | 51 + .../update_customer.rb | 47 + .../get_violation.rb | 47 + .../list_violations.rb | 51 + ..._google.cloud.cloudcontrolspartner.v1.json | 535 +++ .../cloud_controls_partner_core_paths_test.rb | 115 + .../cloud_controls_partner_core_rest_test.rb | 708 ++++ .../v1/cloud_controls_partner_core_test.rb | 787 ++++ ..._controls_partner_monitoring_paths_test.rb | 67 + ...d_controls_partner_monitoring_rest_test.rb | 212 + .../cloud_controls_partner_monitoring_test.rb | 235 ++ .../test/helper.rb | 26 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 92 + ...loud-cloud_controls_partner-v1beta.gemspec | 28 + ...gle-cloud-cloud_controls_partner-v1beta.rb | 21 + .../cloud/cloud_controls_partner/v1beta.rb | 46 + .../v1beta/cloud_controls_partner_core.rb | 55 + .../cloud_controls_partner_core/client.rb | 1504 +++++++ .../credentials.rb | 47 + .../cloud_controls_partner_core/paths.rb | 149 + .../cloud_controls_partner_core/rest.rb | 52 + .../rest/client.rb | 1382 +++++++ .../rest/service_stub.rb | 754 ++++ .../cloud_controls_partner_monitoring.rb | 55 + .../client.rb | 605 +++ .../credentials.rb | 47 + .../paths.rb | 77 + .../cloud_controls_partner_monitoring/rest.rb | 52 + .../rest/client.rb | 548 +++ .../rest/service_stub.rb | 203 + .../cloud_controls_partner/v1beta/rest.rb | 38 + .../cloud_controls_partner/v1beta/version.rb | 28 + .../v1beta/access_approval_requests_pb.rb | 29 + .../v1beta/completion_state_pb.rb | 21 + .../cloudcontrolspartner/v1beta/core_pb.rb | 34 + .../v1beta/core_services_pb.rb | 66 + .../v1beta/customer_workloads_pb.rb | 33 + .../v1beta/customers_pb.rb | 36 + .../v1beta/ekm_connections_pb.rb | 28 + .../v1beta/monitoring_pb.rb | 24 + .../v1beta/monitoring_services_pb.rb | 53 + .../v1beta/partner_permissions_pb.rb | 26 + .../v1beta/partners_pb.rb | 29 + .../v1beta/violations_pb.rb | 35 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 589 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../v1beta/access_approval_requests.rb | 143 + .../v1beta/completion_state.rb | 44 + .../cloud/cloudcontrolspartner/v1beta/core.rb | 57 + .../v1beta/customer_workloads.rb | 177 + .../cloudcontrolspartner/v1beta/customers.rb | 180 + .../v1beta/ekm_connections.rb | 96 + .../v1beta/partner_permissions.rb | 69 + .../cloudcontrolspartner/v1beta/partners.rb | 117 + .../cloudcontrolspartner/v1beta/violations.rb | 229 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../create_customer.rb | 47 + .../delete_customer.rb | 47 + .../get_customer.rb | 47 + .../get_ekm_connections.rb | 47 + .../get_partner.rb | 47 + .../get_partner_permissions.rb | 47 + .../get_workload.rb | 47 + .../list_access_approval_requests.rb | 51 + .../list_customers.rb | 51 + .../list_workloads.rb | 51 + .../update_customer.rb | 47 + .../get_violation.rb | 47 + .../list_violations.rb | 51 + ...gle.cloud.cloudcontrolspartner.v1beta.json | 535 +++ .../cloud_controls_partner_core_paths_test.rb | 115 + .../cloud_controls_partner_core_rest_test.rb | 708 ++++ .../cloud_controls_partner_core_test.rb | 787 ++++ ..._controls_partner_monitoring_paths_test.rb | 67 + ...d_controls_partner_monitoring_rest_test.rb | 212 + .../cloud_controls_partner_monitoring_test.rb | 235 ++ .../test/helper.rb | 26 + 1374 files changed, 250912 insertions(+) create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb create mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/README.md create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/check_and_mutate_row.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb create mode 100644 owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/README.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-v1.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/create_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-billing-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-billing-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-billing-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-billing-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-billing-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-billing-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-billing-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-billing-v1/README.md create mode 100644 owl-bot-staging/google-cloud-billing-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-billing-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-v1.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/create_billing_account.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json create mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb create mode 100644 owl-bot-staging/google-cloud-billing-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/README.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-v1.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/attestation.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-build-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-build-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-build-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-build-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-build-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-build-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-build-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-build-v1/README.md create mode 100644 owl-bot-staging/google-cloud-build-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-build-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-v1.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/credentials.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/operations.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/httpbody.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/approve_build.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json create mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb create mode 100644 owl-bot-staging/google-cloud-build-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-build-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-build-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-build-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-build-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-build-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-build-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-build-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-build-v2/README.md create mode 100644 owl-bot-staging/google-cloud-build-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-build-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/credentials.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/operations.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/httpbody.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/batch_create_repositories.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json create mode 100644 owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb create mode 100644 owl-bot-staging/google-cloud-build-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/location_pb.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/resource_pb.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb create mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/README.md create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-v1.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/operations.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb create mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/README.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb create mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/README.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-v1.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb create mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..e0a4faff0029 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "analyticshub.googleapis.com", + "api_shortname": "analyticshub", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_exchange-v1beta1/latest", + "distribution_name": "google-cloud-bigquery-data_exchange-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "analyticshub", + "name_pretty": "Analytics Hub V1beta1 API", + "product_documentation": "https://cloud.google.com/analytics-hub/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Analytics Hub is a data exchange that allows you to efficiently and securely exchange data assets across organizations to address challenges of data reliability and cost. Curate a library of internal and external assets, including unique datasets like Google Trends, backed by the power of BigQuery. Note that google-cloud-bigquery-data_exchange-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_exchange instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/analytics-hub/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..2d3faf077487 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-data_exchange-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-data_exchange-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts new file mode 100644 index 000000000000..802b60f2370f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Analytics Hub V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..938b466bdbfa --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-data_exchange-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-data_exchange-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/data_exchange/v1beta1" + +client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/data_exchange/v1beta1" + +::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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-bigquery-data_exchange-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/data_exchange/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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-bigquery-data_exchange-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md new file mode 100644 index 000000000000..1953ba166c8f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Analytics Hub V1beta1 API + +Exchange data and analytics assets securely and efficiently. + +Analytics Hub is a data exchange that allows you to efficiently and securely exchange data assets across organizations to address challenges of data reliability and cost. Curate a library of internal and external assets, including unique datasets like Google Trends, backed by the power of BigQuery. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Analytics Hub V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-data_exchange](https://rubygems.org/gems/google-cloud-bigquery-data_exchange). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-data_exchange-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/analyticshub.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/data_exchange/v1beta1" + +client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new +request = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.new # (request fields as keyword arguments...) +response = client.list_data_exchanges request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_exchange-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/analytics-hub/) +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/bigquery/data_exchange/v1beta1" +require "logger" + +client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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-bigquery-data_exchange`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-data_exchange-v1beta1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-data_exchange`. +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-bigquery-data_exchange-v1beta1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile new file mode 100644 index 000000000000..917c08f76a66 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-data_exchange-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials" + ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-data_exchange-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-data_exchange-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-data_exchange-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-data_exchange-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-data_exchange-v1beta1" + header "google-cloud-bigquery-data_exchange-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-data_exchange-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-data_exchange-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-data_exchange-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-data_exchange-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..1d12ec52273e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json @@ -0,0 +1,93 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.dataexchange.v1beta1", + "libraryPackage": "::Google::Cloud::Bigquery::DataExchange::V1beta1", + "services": { + "AnalyticsHubService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client", + "rpcs": { + "ListDataExchanges": { + "methods": [ + "list_data_exchanges" + ] + }, + "ListOrgDataExchanges": { + "methods": [ + "list_org_data_exchanges" + ] + }, + "GetDataExchange": { + "methods": [ + "get_data_exchange" + ] + }, + "CreateDataExchange": { + "methods": [ + "create_data_exchange" + ] + }, + "UpdateDataExchange": { + "methods": [ + "update_data_exchange" + ] + }, + "DeleteDataExchange": { + "methods": [ + "delete_data_exchange" + ] + }, + "ListListings": { + "methods": [ + "list_listings" + ] + }, + "GetListing": { + "methods": [ + "get_listing" + ] + }, + "CreateListing": { + "methods": [ + "create_listing" + ] + }, + "UpdateListing": { + "methods": [ + "update_listing" + ] + }, + "DeleteListing": { + "methods": [ + "delete_listing" + ] + }, + "SubscribeListing": { + "methods": [ + "subscribe_listing" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec new file mode 100644 index 000000000000..efaf0336c86b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/data_exchange/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-data_exchange-v1beta1" + gem.version = Google::Cloud::Bigquery::DataExchange::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Analytics Hub is a data exchange that allows you to efficiently and securely exchange data assets across organizations to address challenges of data reliability and cost. Curate a library of internal and external assets, including unique datasets like Google Trends, backed by the power of BigQuery. Note that google-cloud-bigquery-data_exchange-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_exchange instead. See the readme for more details." + gem.summary = "Exchange data and analytics assets securely and efficiently." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb new file mode 100644 index 000000000000..a09a78a6e7e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/data_exchange/v1beta1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb new file mode 100644 index 000000000000..52bef81bdee4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/data_exchange/v1beta1/analytics_hub_service" +require "google/cloud/bigquery/data_exchange/v1beta1/version" + +module Google + module Cloud + module Bigquery + module DataExchange + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_exchange/v1beta1" + # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + module V1beta1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/bigquery/data_exchange/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb new file mode 100644 index 000000000000..9cfbeb207776 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_exchange/v1beta1/version" + +require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials" +require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths" +require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client" + +module Google + module Cloud + module Bigquery + module DataExchange + module V1beta1 + ## + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service" + # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + module AnalyticsHubService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "analytics_hub_service", "helpers.rb" +require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb new file mode 100644 index 000000000000..2008c915b94c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb @@ -0,0 +1,1890 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/dataexchange/v1beta1/dataexchange_pb" +require "google/cloud/location" + +module Google + module Cloud + module Bigquery + module DataExchange + module V1beta1 + module AnalyticsHubService + ## + # Client for the AnalyticsHubService service. + # + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :analytics_hub_service_stub + + ## + # Configure the AnalyticsHubService Client class. + # + # See {::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AnalyticsHubService clients + # ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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", "Bigquery", "DataExchange", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 + @analytics_hub_service_stub.universe_domain + end + + ## + # Create a new AnalyticsHubService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AnalyticsHubService 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/bigquery/dataexchange/v1beta1/dataexchange_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 + + @analytics_hub_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 + ) + + @analytics_hub_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @analytics_hub_service_stub.endpoint + config.universe_domain = @analytics_hub_service_stub.universe_domain + config.logger = @analytics_hub_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @analytics_hub_service_stub.logger + end + + # Service calls + + ## + # Lists all data exchanges in a given project and location. + # + # @overload list_data_exchanges(request, options = nil) + # Pass arguments to `list_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_exchanges(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is 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 resource path of the data exchanges. + # e.g. `projects/myproject/locations/US`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.new + # + # # Call the list_data_exchanges method. + # result = client.list_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. + # p item + # end + # + def list_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest + + # Converts hash 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_data_exchanges.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_data_exchanges, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, 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 all data exchanges from projects in a given organization and + # location. + # + # @overload list_org_data_exchanges(request, options = nil) + # Pass arguments to `list_org_data_exchanges` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param organization [::String] + # Required. The organization resource path of the projects containing DataExchanges. + # e.g. `organizations/myorg/locations/US`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new + # + # # Call the list_org_data_exchanges method. + # result = client.list_org_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. + # p item + # end + # + def list_org_data_exchanges request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest + + # Converts hash 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_org_data_exchanges.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.organization + header_params["organization"] = request.organization + 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_org_data_exchanges.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_org_data_exchanges, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, 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 data exchange. + # + # @overload get_data_exchange(request, options = nil) + # Pass arguments to `get_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_exchange(name: nil) + # Pass arguments to `get_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/US/dataExchanges/123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.new + # + # # Call the get_data_exchange method. + # result = client.get_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. + # p result + # + def get_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest + + # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_data_exchange, 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 data exchange. + # + # @overload create_data_exchange(request, options = nil) + # Pass arguments to `create_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) + # Pass arguments to `create_data_exchange` via keyword arguments. Note that at + # least one keyword argument is 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 resource path of the data exchange. + # e.g. `projects/myproject/locations/US`. + # @param data_exchange_id [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Should not use characters that require URL-escaping, or characters + # outside of ASCII, spaces. + # Max length: 100 bytes. + # @param data_exchange [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange, ::Hash] + # Required. The data exchange to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new + # + # # Call the create_data_exchange method. + # result = client.create_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. + # p result + # + def create_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest + + # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing data exchange. + # + # @overload update_data_exchange(request, options = nil) + # Pass arguments to `update_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_exchange(update_mask: nil, data_exchange: nil) + # Pass arguments to `update_data_exchange` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @param data_exchange [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange, ::Hash] + # Required. The data exchange to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new + # + # # Call the update_data_exchange method. + # result = client.update_data_exchange request + # + # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. + # p result + # + def update_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest + + # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_exchange&.name + header_params["data_exchange.name"] = request.data_exchange.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_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing data exchange. + # + # @overload delete_data_exchange(request, options = nil) + # Pass arguments to `delete_data_exchange` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_exchange(name: nil) + # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at + # least one keyword argument is 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 full name of the data exchange resource that you want to delete. + # For example, `projects/myproject/locations/US/dataExchanges/123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.new + # + # # Call the delete_data_exchange method. + # result = client.delete_data_exchange request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_exchange request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest + + # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_exchange.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_data_exchange, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all listings in a given project and location. + # + # @overload list_listings(request, options = nil) + # Pass arguments to `list_listings` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_listings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_listings` via keyword arguments. Note that at + # least one keyword argument is 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 resource path of the listing. + # e.g. `projects/myproject/locations/US/dataExchanges/123`. + # @param page_size [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @param page_token [::String] + # Page token, returned by a previous call, to request the next page of + # results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.new + # + # # Call the list_listings method. + # result = client.list_listings 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::Bigquery::DataExchange::V1beta1::Listing. + # p item + # end + # + def list_listings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest + + # Converts hash 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_listings.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_listings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_listings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :list_listings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, 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 listing. + # + # @overload get_listing(request, options = nil) + # Pass arguments to `get_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_listing(name: nil) + # Pass arguments to `get_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.new + # + # # Call the get_listing method. + # result = client.get_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. + # p result + # + def get_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest + + # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_listing, 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 listing. + # + # @overload create_listing(request, options = nil) + # Pass arguments to `create_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_listing(parent: nil, listing_id: nil, listing: nil) + # Pass arguments to `create_listing` via keyword arguments. Note that at + # least one keyword argument is 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 resource path of the listing. + # e.g. `projects/myproject/locations/US/dataExchanges/123`. + # @param listing_id [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Should not use characters that require URL-escaping, or characters + # outside of ASCII, spaces. + # Max length: 100 bytes. + # @param listing [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing, ::Hash] + # Required. The listing to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new + # + # # Call the create_listing method. + # result = client.create_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. + # p result + # + def create_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest + + # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :create_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing listing. + # + # @overload update_listing(request, options = nil) + # Pass arguments to `update_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_listing(update_mask: nil, listing: nil) + # Pass arguments to `update_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Field mask specifies the fields to update in the listing resource. The + # fields specified in the `updateMask` are relative to the resource and are + # not a full request. + # @param listing [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing, ::Hash] + # Required. The listing to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new + # + # # Call the update_listing method. + # result = client.update_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. + # p result + # + def update_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest + + # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.listing&.name + header_params["listing.name"] = request.listing.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_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :update_listing, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a listing. + # + # @overload delete_listing(request, options = nil) + # Pass arguments to `delete_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_listing(name: nil) + # Pass arguments to `delete_listing` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.new + # + # # Call the delete_listing method. + # result = client.delete_listing request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest + + # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :delete_listing, 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 + + ## + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + # + # @overload subscribe_listing(request, options = nil) + # Pass arguments to `subscribe_listing` via a request object, either of type + # {::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload subscribe_listing(destination_dataset: nil, name: nil) + # Pass arguments to `subscribe_listing` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param destination_dataset [::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDataset, ::Hash] + # BigQuery destination dataset to create for the subscriber. + # @param name [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new + # + # # Call the subscribe_listing method. + # result = client.subscribe_listing request + # + # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse. + # p result + # + def subscribe_listing request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest + + # Converts hash 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.subscribe_listing.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, + metadata: metadata, + retry_policy: @config.rpcs.subscribe_listing.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :subscribe_listing, 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 the IAM policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the permissions that a caller has. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_exchange/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Bigquery::DataExchange::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @analytics_hub_service_stub.call_rpc :test_iam_permissions, 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 AnalyticsHubService API. + # + # This class represents the configuration for AnalyticsHubService, + # 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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_data_exchanges to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_data_exchanges.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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 = "analyticshub.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 AnalyticsHubService 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_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_exchanges + ## + # RPC-specific configuration for `list_org_data_exchanges` + # @return [::Gapic::Config::Method] + # + attr_reader :list_org_data_exchanges + ## + # RPC-specific configuration for `get_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_exchange + ## + # RPC-specific configuration for `create_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_exchange + ## + # RPC-specific configuration for `update_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_exchange + ## + # RPC-specific configuration for `delete_data_exchange` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_exchange + ## + # RPC-specific configuration for `list_listings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_listings + ## + # RPC-specific configuration for `get_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :get_listing + ## + # RPC-specific configuration for `create_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :create_listing + ## + # RPC-specific configuration for `update_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :update_listing + ## + # RPC-specific configuration for `delete_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_listing + ## + # RPC-specific configuration for `subscribe_listing` + # @return [::Gapic::Config::Method] + # + attr_reader :subscribe_listing + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges + @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config + list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges + @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config + get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange + @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config + create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange + @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config + update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange + @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config + delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange + @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config + list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings + @list_listings = ::Gapic::Config::Method.new list_listings_config + get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing + @get_listing = ::Gapic::Config::Method.new get_listing_config + create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing + @create_listing = ::Gapic::Config::Method.new create_listing_config + update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing + @update_listing = ::Gapic::Config::Method.new update_listing_config + delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing + @delete_listing = ::Gapic::Config::Method.new delete_listing_config + subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing + @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb new file mode 100644 index 000000000000..6841d5db915f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module DataExchange + module V1beta1 + module AnalyticsHubService + # Credentials for the AnalyticsHubService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb new file mode 100644 index 000000000000..385b4b439ec9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataExchange + module V1beta1 + module AnalyticsHubService + # Path helper methods for the AnalyticsHubService API. + module Paths + ## + # Create a fully-qualified DataExchange resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # + # @return [::String] + def data_exchange_path project:, location:, data_exchange: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}` + # + # @param project [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project:, dataset: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified Listing resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}` + # + # @param project [String] + # @param location [String] + # @param data_exchange [String] + # @param listing [String] + # + # @return [::String] + def listing_path project:, location:, data_exchange:, listing: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/listings/#{listing}" + 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 + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb new file mode 100644 index 000000000000..32537fe9e184 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataExchange + module V1beta1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb new file mode 100644 index 000000000000..4371d42ffd33 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/dataexchange/v1beta1/dataexchange.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/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n=google/cloud/bigquery/dataexchange/v1beta1/dataexchange.proto\x12*google.cloud.bigquery.dataexchange.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xb5\x02\n\x0c\x44\x61taExchange\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\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlisting_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01:t\xea\x41q\n(analyticshub.googleapis.com/DataExchange\x12\x45projects/{project}/locations/{location}/dataExchanges/{data_exchange}\"?\n\x0c\x44\x61taProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"<\n\tPublisher\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"O\n\x1b\x44\x65stinationDatasetReference\x12\x17\n\ndataset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x96\x03\n\x12\x44\x65stinationDataset\x12g\n\x11\x64\x61taset_reference\x18\x01 \x01(\x0b\x32G.google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReferenceB\x03\xe0\x41\x02\x12\x38\n\rfriendly_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12\x36\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12_\n\x06labels\x18\x04 \x03(\x0b\x32J.google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset.LabelsEntryB\x03\xe0\x41\x01\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x0b\n\x07Listing\x12j\n\x10\x62igquery_dataset\x18\x06 \x01(\x0b\x32I.google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSourceB\x03\xe0\x41\x02H\x00\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\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.bigquery.dataexchange.v1beta1.Listing.StateB\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12T\n\rdata_provider\x18\t \x01(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataProviderB\x03\xe0\x41\x01\x12U\n\ncategories\x18\n \x03(\x0e\x32<.google.cloud.bigquery.dataexchange.v1beta1.Listing.CategoryB\x03\xe0\x41\x01\x12M\n\tpublisher\x18\x0b \x01(\x0b\x32\x35.google.cloud.bigquery.dataexchange.v1beta1.PublisherB\x03\xe0\x41\x01\x12\x1b\n\x0erequest_access\x18\x0c \x01(\tB\x03\xe0\x41\x01\x1aN\n\x15\x42igQueryDatasetSource\x12\x35\n\x07\x64\x61taset\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\"\xb7\x04\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43\x41TEGORY_OTHERS\x10\x01\x12&\n\"CATEGORY_ADVERTISING_AND_MARKETING\x10\x02\x12\x15\n\x11\x43\x41TEGORY_COMMERCE\x10\x03\x12$\n CATEGORY_CLIMATE_AND_ENVIRONMENT\x10\x04\x12\x19\n\x15\x43\x41TEGORY_DEMOGRAPHICS\x10\x05\x12\x16\n\x12\x43\x41TEGORY_ECONOMICS\x10\x06\x12\x16\n\x12\x43\x41TEGORY_EDUCATION\x10\x07\x12\x13\n\x0f\x43\x41TEGORY_ENERGY\x10\x08\x12\x16\n\x12\x43\x41TEGORY_FINANCIAL\x10\t\x12\x13\n\x0f\x43\x41TEGORY_GAMING\x10\n\x12\x17\n\x13\x43\x41TEGORY_GEOSPATIAL\x10\x0b\x12(\n$CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE\x10\x0c\x12\x12\n\x0e\x43\x41TEGORY_MEDIA\x10\r\x12\x1a\n\x16\x43\x41TEGORY_PUBLIC_SECTOR\x10\x0e\x12\x13\n\x0f\x43\x41TEGORY_RETAIL\x10\x0f\x12\x13\n\x0f\x43\x41TEGORY_SPORTS\x10\x10\x12!\n\x1d\x43\x41TEGORY_SCIENCE_AND_RESEARCH\x10\x11\x12)\n%CATEGORY_TRANSPORTATION_AND_LOGISTICS\x10\x12\x12\x1f\n\x1b\x43\x41TEGORY_TRAVEL_AND_TOURISM\x10\x13:\x82\x01\xea\x41\x7f\n#analyticshub.googleapis.com/Listing\x12Xprojects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}B\x08\n\x06source\"|\n\x18ListDataExchangesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x86\x01\n\x19ListDataExchangesResponse\x12P\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x1bListOrgDataExchangesRequest\x12\x19\n\x0corganization\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x89\x01\n\x1cListOrgDataExchangesResponse\x12P\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16GetDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"\xcb\x01\n\x19\x43reateDataExchangeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1d\n\x10\x64\x61ta_exchange_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\rdata_exchange\x18\x03 \x01(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchangeB\x03\xe0\x41\x02\"\xa7\x01\n\x19UpdateDataExchangeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12T\n\rdata_exchange\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchangeB\x03\xe0\x41\x02\"[\n\x19\x44\x65leteDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"~\n\x13ListListingsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x14ListListingsResponse\x12\x45\n\x08listings\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x11GetListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xbc\x01\n\x14\x43reateListingRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x17\n\nlisting_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x07listing\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.dataexchange.v1beta1.ListingB\x03\xe0\x41\x02\"\x97\x01\n\x14UpdateListingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12I\n\x07listing\x18\x02 \x01(\x0b\x32\x33.google.cloud.bigquery.dataexchange.v1beta1.ListingB\x03\xe0\x41\x02\"Q\n\x14\x44\x65leteListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xc2\x01\n\x17SubscribeListingRequest\x12]\n\x13\x64\x65stination_dataset\x18\x03 \x01(\x0b\x32>.google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetH\x00\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/ListingB\r\n\x0b\x64\x65stination\"\x1a\n\x18SubscribeListingResponse2\xa6\x1d\n\x13\x41nalyticsHubService\x12\xe9\x01\n\x11ListDataExchanges\x12\x44.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest\x1a\x45.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta1/{parent=projects/*/locations/*}/dataExchanges\x12\x83\x02\n\x14ListOrgDataExchanges\x12G.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest\x1aH.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse\"X\xda\x41\x0corganization\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta1/{organization=organizations/*/locations/*}/dataExchanges\x12\xd6\x01\n\x0fGetDataExchange\x12\x42.google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest\x1a\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta1/{name=projects/*/locations/*/dataExchanges/*}\x12\xfb\x01\n\x12\x43reateDataExchange\x12\x45.google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest\x1a\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\"d\xda\x41\x14parent,data_exchange\x82\xd3\xe4\x93\x02G\"6/v1beta1/{parent=projects/*/locations/*}/dataExchanges:\rdata_exchange\x12\x8e\x02\n\x12UpdateDataExchange\x12\x45.google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest\x1a\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\"w\xda\x41\x19\x64\x61ta_exchange,update_mask\x82\xd3\xe4\x93\x02U2D/v1beta1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}:\rdata_exchange\x12\xba\x01\n\x12\x44\x65leteDataExchange\x12\x45.google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1beta1/{name=projects/*/locations/*/dataExchanges/*}\x12\xe5\x01\n\x0cListListings\x12?.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest\x1a@.google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings\x12\xd2\x01\n\nGetListing\x12=.google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest\x1a\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}\x12\xeb\x01\n\rCreateListing\x12@.google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest\x1a\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\"c\xda\x41\x0eparent,listing\x82\xd3\xe4\x93\x02L\"A/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings:\x07listing\x12\xf8\x01\n\rUpdateListing\x12@.google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest\x1a\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\"p\xda\x41\x13listing,update_mask\x82\xd3\xe4\x93\x02T2I/v1beta1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}:\x07listing\x12\xbb\x01\n\rDeleteListing\x12@.google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}\x12\xfc\x01\n\x10SubscribeListing\x12\x43.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest\x1a\x44.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\"K/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe:\x01*\x12\xf8\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xac\x01\x82\xd3\xe4\x93\x02\xa5\x01\"G/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy:\x01*ZW\"R/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy:\x01*\x12\xf8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xac\x01\x82\xd3\xe4\x93\x02\xa5\x01\"G/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy:\x01*ZW\"R/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy:\x01*\x12\xa4\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xb8\x01\x82\xd3\xe4\x93\x02\xb1\x01\"M/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions:\x01*Z]\"X/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions:\x01*\x1ax\xca\x41\x1b\x61nalyticshub.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xef\x02\n.com.google.cloud.bigquery.dataexchange.v1beta1B\x11\x44\x61taExchangeProtoP\x01ZRcloud.google.com/go/bigquery/dataexchange/apiv1beta1/dataexchangepb;dataexchangepb\xaa\x02*Google.Cloud.BigQuery.DataExchange.V1Beta1\xca\x02*Google\\Cloud\\BigQuery\\DataExchange\\V1beta1\xea\x02.Google::Cloud::Bigquery::DataExchange::V1beta1\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module DataExchange + module V1beta1 + DataExchange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DataExchange").msgclass + DataProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DataProvider").msgclass + Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Publisher").msgclass + DestinationDatasetReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference").msgclass + DestinationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset").msgclass + Listing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing").msgclass + Listing::BigQueryDatasetSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource").msgclass + Listing::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing.State").enummodule + Listing::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing.Category").enummodule + ListDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest").msgclass + ListDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse").msgclass + ListOrgDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest").msgclass + ListOrgDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse").msgclass + GetDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest").msgclass + CreateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest").msgclass + UpdateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest").msgclass + DeleteDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest").msgclass + ListListingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest").msgclass + ListListingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse").msgclass + GetListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest").msgclass + CreateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest").msgclass + UpdateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest").msgclass + DeleteListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest").msgclass + SubscribeListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest").msgclass + SubscribeListingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb new file mode 100644 index 000000000000..6e08cf0c2ac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb @@ -0,0 +1,86 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/dataexchange/v1beta1/dataexchange.proto for package 'Google.Cloud.Bigquery.DataExchange.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigquery/dataexchange/v1beta1/dataexchange_pb' + +module Google + module Cloud + module Bigquery + module DataExchange + module V1beta1 + module AnalyticsHubService + # The `AnalyticsHubService` API facilitates data sharing within and across + # organizations. It allows data providers to publish listings that reference + # shared datasets. With Analytics Hub, users can discover and search for + # listings that they have access to. Subscribers can view and subscribe to + # listings. When you subscribe to a listing, Analytics Hub creates a linked + # dataset in your project. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService' + + # Lists all data exchanges in a given project and location. + rpc :ListDataExchanges, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse + # Lists all data exchanges from projects in a given organization and + # location. + rpc :ListOrgDataExchanges, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse + # Gets the details of a data exchange. + rpc :GetDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange + # Creates a new data exchange. + rpc :CreateDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange + # Updates an existing data exchange. + rpc :UpdateDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange + # Deletes an existing data exchange. + rpc :DeleteDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest, ::Google::Protobuf::Empty + # Lists all listings in a given project and location. + rpc :ListListings, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse + # Gets the details of a listing. + rpc :GetListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing + # Creates a new listing. + rpc :CreateListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing + # Updates an existing listing. + rpc :UpdateListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing + # Deletes a listing. + rpc :DeleteListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest, ::Google::Protobuf::Empty + # Subscribes to a listing. + # + # Currently, with Analytics Hub, you can create listings that + # reference only BigQuery datasets. + # Upon subscription to a listing for a BigQuery dataset, Analytics Hub + # creates a linked dataset in the subscriber's project. + rpc :SubscribeListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse + # Gets the IAM policy. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM policy. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the permissions that a caller has. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..a8048c6a1a41 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Analytics Hub V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb new file mode 100644 index 000000000000..7c55d8f22d46 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb @@ -0,0 +1,497 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataExchange + module V1beta1 + # A data exchange is a container that lets you share data. Along with the + # descriptive information about the data exchange, it contains listings that + # reference shared datasets. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the data exchange. + # e.g. `projects/myproject/locations/US/dataExchanges/123`. + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the data exchange. The display name must + # contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), + # spaces ( ), ampersands (&) and must not start or end with spaces. + # Default value is an empty string. + # Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the data exchange. The description must not contain Unicode + # non-characters as well as C0 and C1 control codes except tabs (HT), + # new lines (LF), carriage returns (CR), and page breaks (FF). + # Default value is an empty string. + # Max length: 2000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the data exchange. + # Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the data exchange. + # @!attribute [r] listing_count + # @return [::Integer] + # Output only. Number of listings contained in the data exchange. + # @!attribute [rw] icon + # @return [::String] + # Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB + # Expected image dimensions are 512x512 pixels, however the API only + # performs validation on size of the encoded data. + # Note: For byte fields, the content of the fields are base64-encoded (which + # increases the size of the data by 33-36%) when using JSON on the wire. + class DataExchange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains details of the data provider. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the data provider. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the data provider. + # Max Length: 1000 bytes. + class DataProvider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains details of the listing publisher. + # @!attribute [rw] name + # @return [::String] + # Optional. Name of the listing publisher. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the listing publisher. + # Max Length: 1000 bytes. + class Publisher + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains the reference that identifies a destination bigquery dataset. + # @!attribute [rw] dataset_id + # @return [::String] + # Required. A unique ID for this dataset, without the project name. The ID + # must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + # The maximum length is 1,024 characters. + # @!attribute [rw] project_id + # @return [::String] + # Required. The ID of the project containing this dataset. + class DestinationDatasetReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the destination bigquery dataset. + # @!attribute [rw] dataset_reference + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDatasetReference] + # Required. A reference that identifies the destination dataset. + # @!attribute [rw] friendly_name + # @return [::Google::Protobuf::StringValue] + # Optional. A descriptive name for the dataset. + # @!attribute [rw] description + # @return [::Google::Protobuf::StringValue] + # Optional. A user-friendly description of the dataset. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels associated with this dataset. You can use these + # to organize and group your datasets. + # You can set this property when inserting or updating a dataset. + # See https://cloud.google.com/resource-manager/docs/creating-managing-labels + # for more information. + # @!attribute [rw] location + # @return [::String] + # Required. The geographic location where the dataset should reside. See + # https://cloud.google.com/bigquery/docs/locations for supported + # locations. + class DestinationDataset + 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 + + # A listing is what gets published into a data exchange that a subscriber can + # subscribe to. It contains a reference to the data source along with + # descriptive information that will help subscribers find and subscribe the + # data. + # @!attribute [rw] bigquery_dataset + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing::BigQueryDatasetSource] + # Required. Shared dataset i.e. BigQuery dataset source. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the listing. + # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` + # @!attribute [rw] display_name + # @return [::String] + # Required. Human-readable display name of the listing. The display name must contain + # only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces + # ( ), ampersands (&) and can't start or end with spaces. + # Default value is an empty string. + # Max length: 63 bytes. + # @!attribute [rw] description + # @return [::String] + # Optional. Short description of the listing. The description must not contain + # Unicode non-characters and C0 and C1 control codes except tabs (HT), + # new lines (LF), carriage returns (CR), and page breaks (FF). + # Default value is an empty string. + # Max length: 2000 bytes. + # @!attribute [rw] primary_contact + # @return [::String] + # Optional. Email or URL of the primary point of contact of the listing. + # Max Length: 1000 bytes. + # @!attribute [rw] documentation + # @return [::String] + # Optional. Documentation describing the listing. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing::State] + # Output only. Current state of the listing. + # @!attribute [rw] icon + # @return [::String] + # Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB + # Expected image dimensions are 512x512 pixels, however the API only + # performs validation on size of the encoded data. + # Note: For byte fields, the contents of the field are base64-encoded (which + # increases the size of the data by 33-36%) when using JSON on the wire. + # @!attribute [rw] data_provider + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataProvider] + # Optional. Details of the data provider who owns the source data. + # @!attribute [rw] categories + # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing::Category>] + # Optional. Categories of the listing. Up to two categories are allowed. + # @!attribute [rw] publisher + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Publisher] + # Optional. Details of the publisher who owns the listing and who can share + # the source data. + # @!attribute [rw] request_access + # @return [::String] + # Optional. Email or URL of the request access of the listing. + # Subscribers can use this reference to request access. + # Max Length: 1000 bytes. + class Listing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A reference to a shared dataset. It is an existing BigQuery dataset with a + # collection of objects such as tables and views that you want to share + # with subscribers. + # When subscriber's subscribe to a listing, Analytics Hub creates a linked + # dataset in + # the subscriber's project. A Linked dataset is an opaque, read-only BigQuery + # dataset that serves as a _symbolic link_ to a shared dataset. + # @!attribute [rw] dataset + # @return [::String] + # Resource name of the dataset source for this listing. + # e.g. `projects/myproject/datasets/123` + class BigQueryDatasetSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the listing. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # Subscribable state. Users with dataexchange.listings.subscribe permission + # can subscribe to this listing. + ACTIVE = 1 + end + + # Listing categories. + module Category + CATEGORY_UNSPECIFIED = 0 + + CATEGORY_OTHERS = 1 + + CATEGORY_ADVERTISING_AND_MARKETING = 2 + + CATEGORY_COMMERCE = 3 + + CATEGORY_CLIMATE_AND_ENVIRONMENT = 4 + + CATEGORY_DEMOGRAPHICS = 5 + + CATEGORY_ECONOMICS = 6 + + CATEGORY_EDUCATION = 7 + + CATEGORY_ENERGY = 8 + + CATEGORY_FINANCIAL = 9 + + CATEGORY_GAMING = 10 + + CATEGORY_GEOSPATIAL = 11 + + CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12 + + CATEGORY_MEDIA = 13 + + CATEGORY_PUBLIC_SECTOR = 14 + + CATEGORY_RETAIL = 15 + + CATEGORY_SPORTS = 16 + + CATEGORY_SCIENCE_AND_RESEARCH = 17 + + CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18 + + CATEGORY_TRAVEL_AND_TOURISM = 19 + end + end + + # Message for requesting the list of data exchanges. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the data exchanges. + # e.g. `projects/myproject/locations/US`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListDataExchangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of data exchanges. + # @!attribute [rw] data_exchanges + # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] + # The list of data exchanges. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListDataExchangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of data exchanges from projects in an + # organization and location. + # @!attribute [rw] organization + # @return [::String] + # Required. The organization resource path of the projects containing DataExchanges. + # e.g. `organizations/myorg/locations/US`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListOrgDataExchangesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing data exchanges in an organization and + # location. + # @!attribute [rw] data_exchanges + # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] + # The list of data exchanges. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListOrgDataExchangesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a data exchange. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the data exchange. + # e.g. `projects/myproject/locations/US/dataExchanges/123`. + class GetDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a data exchange. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the data exchange. + # e.g. `projects/myproject/locations/US`. + # @!attribute [rw] data_exchange_id + # @return [::String] + # Required. The ID of the data exchange. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Should not use characters that require URL-escaping, or characters + # outside of ASCII, spaces. + # Max length: 100 bytes. + # @!attribute [rw] data_exchange + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # Required. The data exchange to create. + class CreateDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a data exchange. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask specifies the fields to update in the data exchange + # resource. The fields specified in the + # `updateMask` are relative to the resource and are not a full request. + # @!attribute [rw] data_exchange + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] + # Required. The data exchange to update. + class UpdateDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a data exchange. + # @!attribute [rw] name + # @return [::String] + # Required. The full name of the data exchange resource that you want to delete. + # For example, `projects/myproject/locations/US/dataExchanges/123`. + class DeleteDataExchangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting the list of listings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/US/dataExchanges/123`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return in a single response page. Leverage + # the page tokens to iterate through the entire collection. + # @!attribute [rw] page_token + # @return [::String] + # Page token, returned by a previous call, to request the next page of + # results. + class ListListingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to the list of Listings. + # @!attribute [rw] listings + # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing>] + # The list of Listing. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of results. + class ListListingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a listing. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the listing. + # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + class GetListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a listing. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource path of the listing. + # e.g. `projects/myproject/locations/US/dataExchanges/123`. + # @!attribute [rw] listing_id + # @return [::String] + # Required. The ID of the listing to create. + # Must contain only Unicode letters, numbers (0-9), underscores (_). + # Should not use characters that require URL-escaping, or characters + # outside of ASCII, spaces. + # Max length: 100 bytes. + # @!attribute [rw] listing + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # Required. The listing to create. + class CreateListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a Listing. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Field mask specifies the fields to update in the listing resource. The + # fields specified in the `updateMask` are relative to the resource and are + # not a full request. + # @!attribute [rw] listing + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] + # Required. The listing to update. + class UpdateListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a listing. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the listing to delete. + # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + class DeleteListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for subscribing to a listing. + # @!attribute [rw] destination_dataset + # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDataset] + # BigQuery destination dataset to create for the subscriber. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the listing that you want to subscribe to. + # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. + class SubscribeListingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response when you subscribe to a listing. + class SubscribeListingResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/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-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..87ca6d431f0b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-data_exchange-v1beta1", path: "../" +else + gem "google-cloud-bigquery-data_exchange-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.rb new file mode 100644 index 000000000000..c5c3e8d5a71b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the create_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_data_exchange. +# +def create_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new + + # Call the create_data_exchange method. + result = client.create_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.rb new file mode 100644 index 000000000000..1611914c6c44 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the create_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_listing. +# +def create_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new + + # Call the create_listing method. + result = client.create_listing request + + # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.rb new file mode 100644 index 000000000000..2a170f67c4e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the delete_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_data_exchange. +# +def delete_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.new + + # Call the delete_data_exchange method. + result = client.delete_data_exchange request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.rb new file mode 100644 index 000000000000..c92d3aff1a38 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the delete_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_listing. +# +def delete_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.new + + # Call the delete_listing method. + result = client.delete_listing request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.rb new file mode 100644 index 000000000000..3076ddb16087 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the get_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_data_exchange. +# +def get_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.new + + # Call the get_data_exchange method. + result = client.get_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb new file mode 100644 index 000000000000..4543da253547 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the get_iam_policy call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.rb new file mode 100644 index 000000000000..ac7ef32ed868 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the get_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_listing. +# +def get_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.new + + # Call the get_listing method. + result = client.get_listing request + + # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.rb new file mode 100644 index 000000000000..50c1431dd722 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.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 analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the list_data_exchanges call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_data_exchanges. +# +def list_data_exchanges + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.new + + # Call the list_data_exchanges method. + result = client.list_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. + p item + end +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.rb new file mode 100644 index 000000000000..dddf015f5091 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.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 analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the list_listings call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_listings. +# +def list_listings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.new + + # Call the list_listings method. + result = client.list_listings 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::Bigquery::DataExchange::V1beta1::Listing. + p item + end +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.rb new file mode 100644 index 000000000000..0a3a4b12d7b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.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 analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the list_org_data_exchanges call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_org_data_exchanges. +# +def list_org_data_exchanges + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new + + # Call the list_org_data_exchanges method. + result = client.list_org_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. + p item + end +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb new file mode 100644 index 000000000000..d3e096bd1bf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the set_iam_policy call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.rb new file mode 100644 index 000000000000..46ac028d39cd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the subscribe_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#subscribe_listing. +# +def subscribe_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new + + # Call the subscribe_listing method. + result = client.subscribe_listing request + + # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.rb new file mode 100644 index 000000000000..c10c649a795a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.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 analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the test_iam_permissions call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.rb new file mode 100644 index 000000000000..c9de8a92a423 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the update_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_data_exchange. +# +def update_data_exchange + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new + + # Call the update_data_exchange method. + result = client.update_data_exchange request + + # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.rb new file mode 100644 index 000000000000..35d7c03e9fd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync] +require "google/cloud/bigquery/data_exchange/v1beta1" + +## +# Snippet for the update_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_listing. +# +def update_listing + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new + + # Call the update_listing method. + result = client.update_listing request + + # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. + p result +end +# [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json new file mode 100644 index 000000000000..0a0baa0b5b80 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json @@ -0,0 +1,615 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-data_exchange-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.dataexchange.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync", + "title": "Snippet for the list_data_exchanges call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_data_exchanges.", + "file": "analytics_hub_service/list_data_exchanges.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_exchanges", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_data_exchanges", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListDataExchanges", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.ListDataExchanges", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync", + "title": "Snippet for the list_org_data_exchanges call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_org_data_exchanges.", + "file": "analytics_hub_service/list_org_data_exchanges.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_org_data_exchanges", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_org_data_exchanges", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListOrgDataExchanges", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.ListOrgDataExchanges", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync", + "title": "Snippet for the get_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_data_exchange.", + "file": "analytics_hub_service/get_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_exchange", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetDataExchange", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.GetDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync", + "title": "Snippet for the create_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_data_exchange.", + "file": "analytics_hub_service/create_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_exchange", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateDataExchange", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.CreateDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync", + "title": "Snippet for the update_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_data_exchange.", + "file": "analytics_hub_service/update_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_exchange", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateDataExchange", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.UpdateDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync", + "title": "Snippet for the delete_data_exchange call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_data_exchange.", + "file": "analytics_hub_service/delete_data_exchange.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_exchange", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_data_exchange", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteDataExchange", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.DeleteDataExchange", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync", + "title": "Snippet for the list_listings call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_listings.", + "file": "analytics_hub_service/list_listings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_listings", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_listings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "ListListings", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.ListListings", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync", + "title": "Snippet for the get_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_listing.", + "file": "analytics_hub_service/get_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_listing", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetListing", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.GetListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync", + "title": "Snippet for the create_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_listing.", + "file": "analytics_hub_service/create_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_listing", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "CreateListing", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.CreateListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync", + "title": "Snippet for the update_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_listing.", + "file": "analytics_hub_service/update_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_listing", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "UpdateListing", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.UpdateListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync", + "title": "Snippet for the delete_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_listing.", + "file": "analytics_hub_service/delete_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_listing", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "DeleteListing", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.DeleteListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync", + "title": "Snippet for the subscribe_listing call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#subscribe_listing.", + "file": "analytics_hub_service/subscribe_listing.rb", + "language": "RUBY", + "client_method": { + "short_name": "subscribe_listing", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#subscribe_listing", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SubscribeListing", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.SubscribeListing", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_iam_policy.", + "file": "analytics_hub_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.GetIamPolicy", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#set_iam_policy.", + "file": "analytics_hub_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.SetIamPolicy", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the AnalyticsHubService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#test_iam_permissions.", + "file": "analytics_hub_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "AnalyticsHubService::Client", + "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.TestIamPermissions", + "service": { + "short_name": "AnalyticsHubService", + "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" + } + } + }, + "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-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb new file mode 100644 index 000000000000..be0aaf144603 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/data_exchange/v1beta1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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_data_exchange_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_exchange_path project: "value0", location: "value1", data_exchange: "value2" + assert_equal "projects/value0/locations/value1/dataExchanges/value2", path + end + end + + def test_dataset_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project: "value0", dataset: "value1" + assert_equal "projects/value0/datasets/value1", path + end + end + + def test_listing_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.listing_path project: "value0", location: "value1", data_exchange: "value2", listing: "value3" + assert_equal "projects/value0/locations/value1/dataExchanges/value2/listings/value3", 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb new file mode 100644 index 000000000000..e08fd16717a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb @@ -0,0 +1,1024 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/dataexchange/v1beta1/dataexchange_pb" +require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service" + +class ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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_data_exchanges + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse.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_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_exchanges, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest, 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_data_exchanges_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_exchanges({ 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_data_exchanges 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_data_exchanges ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.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_data_exchanges({ 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_data_exchanges(::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.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_data_exchanges_client_stub.call_rpc_count + end + end + + def test_list_org_data_exchanges + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse.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. + organization = "hello world" + page_size = 42 + page_token = "hello world" + + list_org_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_org_data_exchanges, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest, request + assert_equal "hello world", request["organization"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_org_data_exchanges_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_org_data_exchanges({ organization: organization, 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_org_data_exchanges organization: organization, 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_org_data_exchanges ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges({ organization: organization, 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_org_data_exchanges(::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges_client_stub.call_rpc_count + end + end + + def test_get_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.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_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_exchange({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_exchange name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_exchange({ 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_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.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_data_exchange_client_stub.call_rpc_count + end + end + + def test_create_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.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" + data_exchange_id = "hello world" + data_exchange = {} + + create_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["data_exchange_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange), request["data_exchange"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_exchange_client_stub.call_rpc_count + end + end + + def test_update_data_exchange + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + data_exchange = {} + + update_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange), request["data_exchange"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_exchange_client_stub.call_rpc_count + end + end + + def test_delete_data_exchange + # 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_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_exchange, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_exchange_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_exchange({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_exchange name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_exchange({ 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_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.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_data_exchange_client_stub.call_rpc_count + end + end + + def test_list_listings + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse.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_listings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_listings, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest, 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_listings_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_listings({ 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_listings 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_listings ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.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_listings({ 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_listings(::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.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_listings_client_stub.call_rpc_count + end + end + + def test_get_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.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_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_listing, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_listing({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_listing name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_listing({ 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_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.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_listing_client_stub.call_rpc_count + end + end + + def test_create_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.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" + listing_id = "hello world" + listing = {} + + create_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_listing, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["listing_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing), request["listing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_listing parent: parent, listing_id: listing_id, listing: listing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_listing_client_stub.call_rpc_count + end + end + + def test_update_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + listing = {} + + update_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_listing, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing), request["listing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_listing({ update_mask: update_mask, listing: listing }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_listing update_mask: update_mask, listing: listing do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_listing({ update_mask: update_mask, listing: listing }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_listing_client_stub.call_rpc_count + end + end + + def test_delete_listing + # 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_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_listing, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_listing({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_listing name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_listing({ 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_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.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_listing_client_stub.call_rpc_count + end + end + + def test_subscribe_listing + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse.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. + destination_dataset = {} + name = "hello world" + + subscribe_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :subscribe_listing, name + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDataset), request["destination_dataset"] + assert_equal :destination_dataset, request.destination + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, subscribe_listing_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.subscribe_listing destination_dataset: destination_dataset, name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.subscribe_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.subscribe_listing({ destination_dataset: destination_dataset, name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.subscribe_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, subscribe_listing_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.repo-metadata.json new file mode 100644 index 000000000000..bb5cc865dee4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "bigquerydatapolicy.googleapis.com", + "api_shortname": "bigquerydatapolicy", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest", + "distribution_name": "google-cloud-bigquery-data_policies-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigquerydatapolicy", + "name_pretty": "BigQuery Data Policy Service V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml new file mode 100644 index 000000000000..44bd142b9ba7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.yardopts new file mode 100644 index 000000000000..31aca60843a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Data Policy Service 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-bigquery-data_policies-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..266fe5d650c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-data_policies-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-bigquery-data_policies-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/bigquery/data_policies/v1" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/data_policies/v1" + +::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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-bigquery-data_policies-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/bigquery/data_policies/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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-bigquery-data_policies-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/README.md new file mode 100644 index 000000000000..698192733f1e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Data Policy Service V1 API + +Allows users to manage BigQuery data policies. + +The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Data Policy Service V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-data_policies](https://rubygems.org/gems/google-cloud-bigquery-data_policies). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-data_policies-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/bigquerydatapolicy.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/data_policies/v1" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new +request = ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new # (request fields as keyword arguments...) +response = client.create_data_policy request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/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/bigquery/data_policies/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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-bigquery-data_policies`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-data_policies-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-bigquery-data_policies`. +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-bigquery-data_policies-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-bigquery-data_policies-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Rakefile new file mode 100644 index 000000000000..6191502be580 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/data_policies/v1/data_policy_service/credentials" + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-data_policies-v1" + header "google-cloud-bigquery-data_policies-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-data_policies-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/gapic_metadata.json new file mode 100644 index 000000000000..8058dfc06b6d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.datapolicies.v1", + "libraryPackage": "::Google::Cloud::Bigquery::DataPolicies::V1", + "services": { + "DataPolicyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client", + "rpcs": { + "CreateDataPolicy": { + "methods": [ + "create_data_policy" + ] + }, + "UpdateDataPolicy": { + "methods": [ + "update_data_policy" + ] + }, + "RenameDataPolicy": { + "methods": [ + "rename_data_policy" + ] + }, + "DeleteDataPolicy": { + "methods": [ + "delete_data_policy" + ] + }, + "GetDataPolicy": { + "methods": [ + "get_data_policy" + ] + }, + "ListDataPolicies": { + "methods": [ + "list_data_policies" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec new file mode 100644 index 000000000000..cd2d174af029 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/data_policies/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-data_policies-v1" + gem.version = Google::Cloud::Bigquery::DataPolicies::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details." + gem.summary = "Allows users to manage BigQuery data policies." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-v1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-v1.rb new file mode 100644 index 000000000000..a8b8ca94901d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-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/bigquery/data_policies/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb new file mode 100644 index 000000000000..dd9ce0608822 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/data_policies/v1/data_policy_service" +require "google/cloud/bigquery/data_policies/v1/version" + +module Google + module Cloud + module Bigquery + module DataPolicies + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_policies/v1" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/data_policies/v1" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/data_policies/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb new file mode 100644 index 000000000000..2cbe6062a0d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_policies/v1/version" + +require "google/cloud/bigquery/data_policies/v1/data_policy_service/credentials" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/paths" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/client" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + ## + # Data Policy Service provides APIs for managing the label-policy bindings. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_policies/v1/data_policy_service" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + module DataPolicyService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_policy_service", "helpers.rb" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb new file mode 100644 index 000000000000..0dca412d4c0a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb @@ -0,0 +1,1323 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datapolicies/v1/datapolicy_pb" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + module DataPolicyService + ## + # Client for the DataPolicyService service. + # + # Data Policy Service provides APIs for managing the label-policy bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatapolicy.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_policy_service_stub + + ## + # Configure the DataPolicyService Client class. + # + # See {::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataPolicyService clients + # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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", "Bigquery", "DataPolicies", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_data_policy.timeout = 60.0 + default_config.rpcs.create_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_policy.timeout = 60.0 + default_config.rpcs.update_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.rename_data_policy.timeout = 60.0 + default_config.rpcs.rename_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_data_policy.timeout = 60.0 + default_config.rpcs.delete_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_policy.timeout = 60.0 + default_config.rpcs.get_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_policies.timeout = 60.0 + default_config.rpcs.list_data_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.set_iam_policy.timeout = 60.0 + default_config.rpcs.set_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.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 DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::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 + @data_policy_service_stub.universe_domain + end + + ## + # Create a new DataPolicyService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataPolicyService 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/bigquery/datapolicies/v1/datapolicy_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 + + @data_policy_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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 + ) + + @data_policy_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_policy_service_stub.logger + end + + # Service calls + + ## + # Creates a new data policy under a project with the given `dataPolicyId` + # (used as the display name), policy tag, and data policy type. + # + # @overload create_data_policy(request, options = nil) + # Pass arguments to `create_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(parent: nil, data_policy: nil) + # Pass arguments to `create_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project that the data policy will belong to. + # The format is `projects/{project_number}/locations/{location_id}`. + # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] + # Required. The data policy to create. The `name` field does not need to be + # provided for the data policy creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new + # + # # Call the create_data_policy method. + # result = client.create_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def create_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :create_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the metadata for an existing data policy. The target data policy + # can be specified by the resource name. + # + # @overload update_data_policy(request, options = nil) + # Pass arguments to `update_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(data_policy: nil, update_mask: nil) + # Pass arguments to `update_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] + # Required. Update the data policy's metadata. + # + # The target data policy is determined by the `name` field. + # Other fields are updated to the specified values based on the field masks. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # If not set, defaults to all of the fields that are allowed to update. + # + # Updates to the `name` and `dataPolicyId` fields are not allowed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new + # + # # Call the update_data_policy method. + # result = client.update_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def update_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.data_policy&.name + header_params["data_policy.name"] = request.data_policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :update_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Renames the id (display name) of the specified data policy. + # + # @overload rename_data_policy(request, options = nil) + # Pass arguments to `rename_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rename_data_policy(name: nil, new_data_policy_id: nil) + # Pass arguments to `rename_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the data policy to rename. The format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + # @param new_data_policy_id [::String] + # Required. The new data policy id. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new + # + # # Call the rename_data_policy method. + # result = client.rename_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def rename_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest + + # Converts hash 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.rename_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.rename_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rename_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :rename_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the data policy specified by its resource name. + # + # @overload delete_data_policy(request, options = nil) + # Pass arguments to `delete_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(name: nil) + # Pass arguments to `delete_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the data policy to delete. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new + # + # # Call the delete_data_policy method. + # result = client.delete_data_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :delete_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the data policy specified by its resource name. + # + # @overload get_data_policy(request, options = nil) + # Pass arguments to `get_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(name: nil) + # Pass arguments to `get_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the requested data policy. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new + # + # # Call the get_data_policy method. + # result = client.get_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def get_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :get_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all of the data policies in the specified parent project. + # + # @overload list_data_policies(request, options = nil) + # Pass arguments to `list_data_policies` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policies(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_policies` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the project for which to list data policies. + # Format is `projects/{project_number}/locations/{location_id}`. + # @param page_size [::Integer] + # The maximum number of data policies to return. Must be a value between 1 + # and 1000. + # If not set, defaults to 50. + # @param page_token [::String] + # The `nextPageToken` value returned from a previous list request, if any. If + # not set, defaults to an empty string. + # @param filter [::String] + # Filters the data policies by policy tags that they + # are associated with. Currently filter only supports + # "policy_tag" based filtering and OR based predicates. Sample + # filter can be "policy_tag: + # projects/1/locations/us/taxonomies/2/policyTags/3". + # You may also use wildcard such as "policy_tag: + # projects/1/locations/us/taxonomies/2*". Please note that OR predicates + # cannot be used with wildcard filters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.new + # + # # Call the list_data_policies method. + # result = client.list_data_policies 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::Bigquery::DataPolicies::V1::DataPolicy. + # p item + # end + # + def list_data_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest + + # Converts hash 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_data_policies.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::Bigquery::DataPolicies::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_data_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :list_data_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_policy_service_stub, :list_data_policies, 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 IAM policy for the specified data policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.resource + header_params["resource"] = request.resource + 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_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy for the specified data policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.resource + header_params["resource"] = request.resource + 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.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the caller's permission on the specified data policy resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Bigquery::DataPolicies::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.resource + header_params["resource"] = request.resource + 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.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :test_iam_permissions, 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 DataPolicyService API. + # + # This class represents the configuration for DataPolicyService, + # 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::Bigquery::DataPolicies::V1::DataPolicyService::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 + # # create_data_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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 = "bigquerydatapolicy.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 DataPolicyService 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 `create_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_policy + ## + # RPC-specific configuration for `update_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_policy + ## + # RPC-specific configuration for `rename_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_data_policy + ## + # RPC-specific configuration for `delete_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_policy + ## + # RPC-specific configuration for `get_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_policy + ## + # RPC-specific configuration for `list_data_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_policies + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_data_policy_config = parent_rpcs.create_data_policy if parent_rpcs.respond_to? :create_data_policy + @create_data_policy = ::Gapic::Config::Method.new create_data_policy_config + update_data_policy_config = parent_rpcs.update_data_policy if parent_rpcs.respond_to? :update_data_policy + @update_data_policy = ::Gapic::Config::Method.new update_data_policy_config + rename_data_policy_config = parent_rpcs.rename_data_policy if parent_rpcs.respond_to? :rename_data_policy + @rename_data_policy = ::Gapic::Config::Method.new rename_data_policy_config + delete_data_policy_config = parent_rpcs.delete_data_policy if parent_rpcs.respond_to? :delete_data_policy + @delete_data_policy = ::Gapic::Config::Method.new delete_data_policy_config + get_data_policy_config = parent_rpcs.get_data_policy if parent_rpcs.respond_to? :get_data_policy + @get_data_policy = ::Gapic::Config::Method.new get_data_policy_config + list_data_policies_config = parent_rpcs.list_data_policies if parent_rpcs.respond_to? :list_data_policies + @list_data_policies = ::Gapic::Config::Method.new list_data_policies_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb new file mode 100644 index 000000000000..aa0718faf149 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + module DataPolicyService + # Credentials for the DataPolicyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.rb new file mode 100644 index 000000000000..72ac3bb9cf7e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.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 Cloud + module Bigquery + module DataPolicies + module V1 + module DataPolicyService + # Path helper methods for the DataPolicyService API. + module Paths + ## + # Create a fully-qualified DataPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataPolicies/{data_policy}` + # + # @param project [String] + # @param location [String] + # @param data_policy [String] + # + # @return [::String] + def data_policy_path project:, location:, data_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataPolicies/#{data_policy}" + 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 + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.rb new file mode 100644 index 000000000000..ccca008bec8d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.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! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_policies/v1/version" + +require "google/cloud/bigquery/data_policies/v1/data_policy_service/credentials" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/paths" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + ## + # Data Policy Service provides APIs for managing the label-policy bindings. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + module DataPolicyService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb new file mode 100644 index 000000000000..9841d00b291d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb @@ -0,0 +1,1217 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datapolicies/v1/datapolicy_pb" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + module DataPolicyService + module Rest + ## + # REST client for the DataPolicyService service. + # + # Data Policy Service provides APIs for managing the label-policy bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatapolicy.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_policy_service_stub + + ## + # Configure the DataPolicyService Client class. + # + # See {::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataPolicyService clients + # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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", "Bigquery", "DataPolicies", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_data_policy.timeout = 60.0 + default_config.rpcs.create_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_policy.timeout = 60.0 + default_config.rpcs.update_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.rename_data_policy.timeout = 60.0 + default_config.rpcs.rename_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_data_policy.timeout = 60.0 + default_config.rpcs.delete_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_policy.timeout = 60.0 + default_config.rpcs.get_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_policies.timeout = 60.0 + default_config.rpcs.list_data_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.set_iam_policy.timeout = 60.0 + default_config.rpcs.set_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.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 DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::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 + @data_policy_service_stub.universe_domain + end + + ## + # Create a new DataPolicyService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataPolicyService 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 + + @data_policy_service_stub = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_policy_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_policy_service_stub.logger + end + + # Service calls + + ## + # Creates a new data policy under a project with the given `dataPolicyId` + # (used as the display name), policy tag, and data policy type. + # + # @overload create_data_policy(request, options = nil) + # Pass arguments to `create_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(parent: nil, data_policy: nil) + # Pass arguments to `create_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project that the data policy will belong to. + # The format is `projects/{project_number}/locations/{location_id}`. + # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] + # Required. The data policy to create. The `name` field does not need to be + # provided for the data policy creation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new + # + # # Call the create_data_policy method. + # result = client.create_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def create_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.create_data_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the metadata for an existing data policy. The target data policy + # can be specified by the resource name. + # + # @overload update_data_policy(request, options = nil) + # Pass arguments to `update_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(data_policy: nil, update_mask: nil) + # Pass arguments to `update_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] + # Required. Update the data policy's metadata. + # + # The target data policy is determined by the `name` field. + # Other fields are updated to the specified values based on the field masks. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # If not set, defaults to all of the fields that are allowed to update. + # + # Updates to the `name` and `dataPolicyId` fields are not allowed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new + # + # # Call the update_data_policy method. + # result = client.update_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def update_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.update_data_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Renames the id (display name) of the specified data policy. + # + # @overload rename_data_policy(request, options = nil) + # Pass arguments to `rename_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rename_data_policy(name: nil, new_data_policy_id: nil) + # Pass arguments to `rename_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the data policy to rename. The format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + # @param new_data_policy_id [::String] + # Required. The new data policy id. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new + # + # # Call the rename_data_policy method. + # result = client.rename_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def rename_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest + + # Converts hash 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.rename_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.rename_data_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rename_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.rename_data_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the data policy specified by its resource name. + # + # @overload delete_data_policy(request, options = nil) + # Pass arguments to `delete_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(name: nil) + # Pass arguments to `delete_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the data policy to delete. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new + # + # # Call the delete_data_policy method. + # result = client.delete_data_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.delete_data_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the data policy specified by its resource name. + # + # @overload get_data_policy(request, options = nil) + # Pass arguments to `get_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(name: nil) + # Pass arguments to `get_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the requested data policy. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new + # + # # Call the get_data_policy method. + # result = client.get_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + # p result + # + def get_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.get_data_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all of the data policies in the specified parent project. + # + # @overload list_data_policies(request, options = nil) + # Pass arguments to `list_data_policies` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policies(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_policies` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the project for which to list data policies. + # Format is `projects/{project_number}/locations/{location_id}`. + # @param page_size [::Integer] + # The maximum number of data policies to return. Must be a value between 1 + # and 1000. + # If not set, defaults to 50. + # @param page_token [::String] + # The `nextPageToken` value returned from a previous list request, if any. If + # not set, defaults to an empty string. + # @param filter [::String] + # Filters the data policies by policy tags that they + # are associated with. Currently filter only supports + # "policy_tag" based filtering and OR based predicates. Sample + # filter can be "policy_tag: + # projects/1/locations/us/taxonomies/2/policyTags/3". + # You may also use wildcard such as "policy_tag: + # projects/1/locations/us/taxonomies/2*". Please note that OR predicates + # cannot be used with wildcard filters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.new + # + # # Call the list_data_policies method. + # result = client.list_data_policies 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::Bigquery::DataPolicies::V1::DataPolicy. + # p item + # end + # + def list_data_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest + + # Converts hash 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_data_policies.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::Bigquery::DataPolicies::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_data_policies.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.list_data_policies request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_policy_service_stub, :list_data_policies, "data_policies", 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 IAM policy for the specified data policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy for the specified data policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the caller's permission on the specified data policy resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Bigquery::DataPolicies::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.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.test_iam_permissions 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 DataPolicyService REST API. + # + # This class represents the configuration for DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::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 + # # create_data_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "bigquerydatapolicy.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 DataPolicyService 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 `create_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_policy + ## + # RPC-specific configuration for `update_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_policy + ## + # RPC-specific configuration for `rename_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :rename_data_policy + ## + # RPC-specific configuration for `delete_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_policy + ## + # RPC-specific configuration for `get_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_policy + ## + # RPC-specific configuration for `list_data_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_policies + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_data_policy_config = parent_rpcs.create_data_policy if parent_rpcs.respond_to? :create_data_policy + @create_data_policy = ::Gapic::Config::Method.new create_data_policy_config + update_data_policy_config = parent_rpcs.update_data_policy if parent_rpcs.respond_to? :update_data_policy + @update_data_policy = ::Gapic::Config::Method.new update_data_policy_config + rename_data_policy_config = parent_rpcs.rename_data_policy if parent_rpcs.respond_to? :rename_data_policy + @rename_data_policy = ::Gapic::Config::Method.new rename_data_policy_config + delete_data_policy_config = parent_rpcs.delete_data_policy if parent_rpcs.respond_to? :delete_data_policy + @delete_data_policy = ::Gapic::Config::Method.new delete_data_policy_config + get_data_policy_config = parent_rpcs.get_data_policy if parent_rpcs.respond_to? :get_data_policy + @get_data_policy = ::Gapic::Config::Method.new get_data_policy_config + list_data_policies_config = parent_rpcs.list_data_policies if parent_rpcs.respond_to? :list_data_policies + @list_data_policies = ::Gapic::Config::Method.new list_data_policies_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb new file mode 100644 index 000000000000..fb02c8818682 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb @@ -0,0 +1,638 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datapolicies/v1/datapolicy_pb" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + module DataPolicyService + module Rest + ## + # REST service stub for the DataPolicyService 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 create_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest] + # 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::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # A result object deserialized from the server's reply + def create_data_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_data_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest] + # 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::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # A result object deserialized from the server's reply + def update_data_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_data_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rename_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest] + # 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::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # A result object deserialized from the server's reply + def rename_data_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rename_data_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rename_data_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest] + # 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_data_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_data_policy", + 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 get_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest] + # 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::Bigquery::DataPolicies::V1::DataPolicy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # A result object deserialized from the server's reply + def get_data_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_data_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policies REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest] + # 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::Bigquery::DataPolicies::V1::ListDataPoliciesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse] + # A result object deserialized from the server's reply + def list_data_policies request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_policies_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_data_policies", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse.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_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # 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::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.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_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest] + # 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_data_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataPolicies", + body: "data_policy", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest] + # 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_data_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_policy.name}", + body: "data_policy", + matches: [ + ["data_policy.name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rename_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rename_data_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:rename", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest] + # 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_data_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_policy REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest] + # 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_data_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_policies REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest] + # 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_data_policies_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataPolicies", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:getIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb new file mode 100644 index 000000000000..be172fff042a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" +require "google/cloud/bigquery/data_policies/v1/version" + +module Google + module Cloud + module Bigquery + module DataPolicies + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/data_policies/v1/rest" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb new file mode 100644 index 000000000000..b1678e9b1786 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataPolicies + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb new file mode 100644 index 000000000000..1d344beaf468 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/datapolicies/v1/datapolicy.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/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n6google/cloud/bigquery/datapolicies/v1/datapolicy.proto\x12%google.cloud.bigquery.datapolicies.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xac\x01\n\x17\x43reateDataPolicyRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\x12K\n\x0b\x64\x61ta_policy\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.datapolicies.v1.DataPolicyB\x03\xe0\x41\x02\"\x97\x01\n\x17UpdateDataPolicyRequest\x12K\n\x0b\x64\x61ta_policy\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.datapolicies.v1.DataPolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"M\n\x17RenameDataPolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12new_data_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"]\n\x17\x44\x65leteDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"Z\n\x14GetDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"\x96\x01\n\x17ListDataPoliciesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\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\"}\n\x18ListDataPoliciesResponse\x12H\n\rdata_policies\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x04\n\nDataPolicy\x12\x14\n\npolicy_tag\x18\x04 \x01(\tH\x00\x12W\n\x13\x64\x61ta_masking_policy\x18\x05 \x01(\x0b\x32\x38.google.cloud.bigquery.datapolicies.v1.DataMaskingPolicyH\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x10\x64\x61ta_policy_type\x18\x02 \x01(\x0e\x32@.google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType\x12\x16\n\x0e\x64\x61ta_policy_id\x18\x03 \x01(\t\"m\n\x0e\x44\x61taPolicyType\x12 \n\x1c\x44\x41TA_POLICY_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1c\x43OLUMN_LEVEL_SECURITY_POLICY\x10\x03\x12\x17\n\x13\x44\x41TA_MASKING_POLICY\x10\x02:u\xea\x41r\n,bigquerydatapolicy.googleapis.com/DataPolicy\x12\x42projects/{project}/locations/{location}/dataPolicies/{data_policy}B\x10\n\x0ematching_labelB\x08\n\x06policy\"\xfd\x02\n\x11\x44\x61taMaskingPolicy\x12n\n\x15predefined_expression\x18\x01 \x01(\x0e\x32M.google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpressionH\x00\x12\x11\n\x07routine\x18\x03 \x01(\tH\x00\"\xce\x01\n\x14PredefinedExpression\x12%\n!PREDEFINED_EXPRESSION_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x03\x12\x0f\n\x0b\x41LWAYS_NULL\x10\x05\x12\x19\n\x15\x44\x45\x46\x41ULT_MASKING_VALUE\x10\x07\x12\x18\n\x14LAST_FOUR_CHARACTERS\x10\t\x12\x19\n\x15\x46IRST_FOUR_CHARACTERS\x10\n\x12\x0e\n\nEMAIL_MASK\x10\x0c\x12\x12\n\x0e\x44\x41TE_YEAR_MASK\x10\rB\x14\n\x12masking_expression2\x90\x0f\n\x11\x44\x61taPolicyService\x12\xe1\x01\n\x10\x43reateDataPolicy\x12>.google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"Z\xda\x41\x12parent,data_policy\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/dataPolicies:\x0b\x64\x61ta_policy\x12\xf2\x01\n\x10UpdateDataPolicy\x12>.google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"k\xda\x41\x17\x64\x61ta_policy,update_mask\x82\xd3\xe4\x93\x02K2.google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"\\\xda\x41\x17name,new_data_policy_id\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/dataPolicies/*}:rename:\x01*\x12\xab\x01\n\x10\x44\x65leteDataPolicy\x12>.google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/dataPolicies/*}\x12\xc0\x01\n\rGetDataPolicy\x12;.google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/dataPolicies/*}\x12\xd6\x01\n\x10ListDataPolicies\x12>.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest\x1a?.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/dataPolicies\x12\x97\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy:\x01*\x12\x97\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy:\x01*\x12\xbd\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions:\x01*\x1a~\xca\x41!bigquerydatapolicy.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\x89\x02\n)com.google.cloud.bigquery.datapolicies.v1B\x0f\x44\x61taPolicyProtoP\x01ZMcloud.google.com/go/bigquery/datapolicies/apiv1/datapoliciespb;datapoliciespb\xaa\x02%Google.Cloud.BigQuery.DataPolicies.V1\xca\x02%Google\\Cloud\\BigQuery\\DataPolicies\\V1\xea\x02)Google::Cloud::Bigquery::DataPolicies::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + CreateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest").msgclass + UpdateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest").msgclass + RenameDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest").msgclass + DeleteDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest").msgclass + GetDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest").msgclass + ListDataPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest").msgclass + ListDataPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.ListDataPoliciesResponse").msgclass + DataPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataPolicy").msgclass + DataPolicy::DataPolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType").enummodule + DataMaskingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy").msgclass + DataMaskingPolicy::PredefinedExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb new file mode 100644 index 000000000000..e36a853b040a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb @@ -0,0 +1,65 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto for package 'Google.Cloud.Bigquery.DataPolicies.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigquery/datapolicies/v1/datapolicy_pb' + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1 + module DataPolicyService + # Data Policy Service provides APIs for managing the label-policy bindings. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' + + # Creates a new data policy under a project with the given `dataPolicyId` + # (used as the display name), policy tag, and data policy type. + rpc :CreateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy + # Updates the metadata for an existing data policy. The target data policy + # can be specified by the resource name. + rpc :UpdateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy + # Renames the id (display name) of the specified data policy. + rpc :RenameDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy + # Deletes the data policy specified by its resource name. + rpc :DeleteDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, ::Google::Protobuf::Empty + # Gets the data policy specified by its resource name. + rpc :GetDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy + # List all of the data policies in the specified parent project. + rpc :ListDataPolicies, ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse + # Gets the IAM policy for the specified data policy. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM policy for the specified data policy. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the caller's permission on the specified data policy resource. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md new file mode 100644 index 000000000000..62ba9a3872ea --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Data Policy Service 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-bigquery-data_policies-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb new file mode 100644 index 000000000000..12aef1a09eec --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataPolicies + module V1 + # Request message for the CreateDataPolicy method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project that the data policy will belong to. + # The format is `projects/{project_number}/locations/{location_id}`. + # @!attribute [rw] data_policy + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # Required. The data policy to create. The `name` field does not need to be + # provided for the data policy creation. + class CreateDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the UpdateDataPolicy method. + # @!attribute [rw] data_policy + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] + # Required. Update the data policy's metadata. + # + # The target data policy is determined by the `name` field. + # Other fields are updated to the specified values based on the field masks. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # If not set, defaults to all of the fields that are allowed to update. + # + # Updates to the `name` and `dataPolicyId` fields are not allowed. + class UpdateDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the RenameDataPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the data policy to rename. The format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` + # @!attribute [rw] new_data_policy_id + # @return [::String] + # Required. The new data policy id. + class RenameDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteDataPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the data policy to delete. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + class DeleteDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetDataPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the requested data policy. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + class GetDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListDataPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project for which to list data policies. + # Format is `projects/{project_number}/locations/{location_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data policies to return. Must be a value between 1 + # and 1000. + # If not set, defaults to 50. + # @!attribute [rw] page_token + # @return [::String] + # The `nextPageToken` value returned from a previous list request, if any. If + # not set, defaults to an empty string. + # @!attribute [rw] filter + # @return [::String] + # Filters the data policies by policy tags that they + # are associated with. Currently filter only supports + # "policy_tag" based filtering and OR based predicates. Sample + # filter can be "policy_tag: + # projects/1/locations/us/taxonomies/2/policyTags/3". + # You may also use wildcard such as "policy_tag: + # projects/1/locations/us/taxonomies/2*". Please note that OR predicates + # cannot be used with wildcard filters. + class ListDataPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListDataPolicies method. + # @!attribute [rw] data_policies + # @return [::Array<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] + # Data policies that belong to the requested project. + # @!attribute [rw] next_page_token + # @return [::String] + # Token used to retrieve the next page of results, or empty if there are no + # more results. + class ListDataPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the label-policy binding. + # @!attribute [rw] policy_tag + # @return [::String] + # Policy tag resource name, in the format of + # `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + # @!attribute [rw] data_masking_policy + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy] + # The data masking policy that specifies the data masking rule to use. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of this data policy, in the format of + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # @!attribute [rw] data_policy_type + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy::DataPolicyType] + # Type of data policy. + # @!attribute [rw] data_policy_id + # @return [::String] + # User-assigned (human readable) ID of the data policy that needs to be + # unique within a project. Used as \\{data_policy_id} in part of the resource + # name. + class DataPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of supported data policy types. + module DataPolicyType + # Default value for the data policy type. This should not be used. + DATA_POLICY_TYPE_UNSPECIFIED = 0 + + # Used to create a data policy for column-level security, without data + # masking. + COLUMN_LEVEL_SECURITY_POLICY = 3 + + # Used to create a data policy for data masking. + DATA_MASKING_POLICY = 2 + end + end + + # The data masking policy that is used to specify data masking rule. + # @!attribute [rw] predefined_expression + # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression] + # A predefined masking expression. + # + # Note: The following fields are mutually exclusive: `predefined_expression`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] routine + # @return [::String] + # The name of the BigQuery routine that contains the custom masking + # routine, in the format of + # `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. + # + # Note: The following fields are mutually exclusive: `routine`, `predefined_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DataMaskingPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The available masking rules. Learn more here: + # https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. + module PredefinedExpression + # Default, unspecified predefined expression. No masking will take place + # since no expression is specified. + PREDEFINED_EXPRESSION_UNSPECIFIED = 0 + + # Masking expression to replace data with SHA-256 hash. + SHA256 = 3 + + # Masking expression to replace data with NULLs. + ALWAYS_NULL = 5 + + # Masking expression to replace data with their default masking values. + # The default masking values for each type listed as below: + # + # * STRING: "" + # * BYTES: b'' + # * INTEGER: 0 + # * FLOAT: 0.0 + # * NUMERIC: 0 + # * BOOLEAN: FALSE + # * TIMESTAMP: 1970-01-01 00:00:00 UTC + # * DATE: 1970-01-01 + # * TIME: 00:00:00 + # * DATETIME: 1970-01-01T00:00:00 + # * GEOGRAPHY: POINT(0 0) + # * BIGNUMERIC: 0 + # * ARRAY: [] + # * STRUCT: NOT_APPLICABLE + # * JSON: NULL + DEFAULT_MASKING_VALUE = 7 + + # Masking expression shows the last four characters of text. + # The masking behavior is as follows: + # + # * If text length > 4 characters: Replace text with XXXXX, append last + # four characters of original text. + # * If text length <= 4 characters: Apply SHA-256 hash. + LAST_FOUR_CHARACTERS = 9 + + # Masking expression shows the first four characters of text. + # The masking behavior is as follows: + # + # * If text length > 4 characters: Replace text with XXXXX, prepend first + # four characters of original text. + # * If text length <= 4 characters: Apply SHA-256 hash. + FIRST_FOUR_CHARACTERS = 10 + + # Masking expression for email addresses. + # The masking behavior is as follows: + # + # * Syntax-valid email address: Replace username with XXXXX. For example, + # cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com. + # * Syntax-invalid email address: Apply SHA-256 hash. + # + # For more information, see [Email + # mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options). + EMAIL_MASK = 12 + + # Masking expression to only show the year of `Date`, + # `DateTime` and `TimeStamp`. For example, with the + # year 2076: + # + # * DATE : 2076-01-01 + # * DATETIME : 2076-01-01T00:00:00 + # * TIMESTAMP : 2076-01-01 00:00:00 UTC + # + # Truncation occurs according to the UTC time zone. To change this, adjust + # the default time zone using the `time_zone` system variable. + # For more information, see the System + # variables reference. + DATE_YEAR_MASK = 13 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/Gemfile new file mode 100644 index 000000000000..153abdcf5d18 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1", path: "../" +else + gem "google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb new file mode 100644 index 000000000000..e4a3e67b443c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the create_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#create_data_policy. +# +def create_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new + + # Call the create_data_policy method. + result = client.create_data_policy request + + # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb new file mode 100644 index 000000000000..14e0c6216ecf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the delete_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#delete_data_policy. +# +def delete_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new + + # Call the delete_data_policy method. + result = client.delete_data_policy request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb new file mode 100644 index 000000000000..af76763ff958 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the get_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_data_policy. +# +def get_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new + + # Call the get_data_policy method. + result = client.get_data_policy request + + # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb new file mode 100644 index 000000000000..ed25f30af7f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the get_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.rb new file mode 100644 index 000000000000..4964e03505da --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.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 bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the list_data_policies call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#list_data_policies. +# +def list_data_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.new + + # Call the list_data_policies method. + result = client.list_data_policies 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::Bigquery::DataPolicies::V1::DataPolicy. + p item + end +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb new file mode 100644 index 000000000000..0aa5de79fc6f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the rename_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#rename_data_policy. +# +def rename_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new + + # Call the rename_data_policy method. + result = client.rename_data_policy request + + # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb new file mode 100644 index 000000000000..5c1e443d55d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the set_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.rb new file mode 100644 index 000000000000..57ec42f60ca3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.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 bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the test_iam_permissions call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb new file mode 100644 index 000000000000..cf009da7c10b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1" + +## +# Snippet for the update_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#update_data_policy. +# +def update_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new + + # Call the update_data_policy method. + result = client.update_data_policy request + + # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. + p result +end +# [END bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json new file mode 100644 index 000000000000..881f072008f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json @@ -0,0 +1,375 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-data_policies-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.datapolicies.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync", + "title": "Snippet for the create_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#create_data_policy.", + "file": "data_policy_service/create_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#create_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "CreateDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.CreateDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync", + "title": "Snippet for the update_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#update_data_policy.", + "file": "data_policy_service/update_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#update_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "UpdateDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.UpdateDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync", + "title": "Snippet for the rename_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#rename_data_policy.", + "file": "data_policy_service/rename_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "rename_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#rename_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "RenameDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.RenameDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync", + "title": "Snippet for the delete_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#delete_data_policy.", + "file": "data_policy_service/delete_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#delete_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "DeleteDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.DeleteDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync", + "title": "Snippet for the get_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_data_policy.", + "file": "data_policy_service/get_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "GetDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.GetDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync", + "title": "Snippet for the list_data_policies call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#list_data_policies.", + "file": "data_policy_service/list_data_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_policies", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#list_data_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "ListDataPolicies", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.ListDataPolicies", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_iam_policy.", + "file": "data_policy_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.GetIamPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#set_iam_policy.", + "file": "data_policy_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.SetIamPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#test_iam_permissions.", + "file": "data_policy_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.TestIamPermissions", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" + } + } + }, + "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-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb new file mode 100644 index 000000000000..8a563f1a97d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/data_policies/v1/data_policy_service" + +class ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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_data_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_policy_path project: "value0", location: "value1", data_policy: "value2" + assert_equal "projects/value0/locations/value1/dataPolicies/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::Bigquery::DataPolicies::V1::DataPolicyService::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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb new file mode 100644 index 000000000000..7dd63260bb41 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb @@ -0,0 +1,595 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datapolicies/v1/datapolicy_pb" +require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" + + +class ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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_create_data_policy + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_policy = {} + + create_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_create_data_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_policy({ parent: parent, data_policy: data_policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_policy parent: parent, data_policy: data_policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_policy({ parent: parent, data_policy: data_policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_policy_client_stub.call_count + end + end + end + + def test_update_data_policy + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_policy = {} + update_mask = {} + + update_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_update_data_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_policy data_policy: data_policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_policy_client_stub.call_count + end + end + end + + def test_rename_data_policy + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + new_data_policy_id = "hello world" + + rename_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_rename_data_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rename_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rename_data_policy name: name, new_data_policy_id: new_data_policy_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rename_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rename_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rename_data_policy_client_stub.call_count + end + end + end + + def test_delete_data_policy + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_delete_data_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_policy_client_stub.call_count + end + end + end + + def test_get_data_policy + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_get_data_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_policy_client_stub.call_count + end + end + end + + def test_list_data_policies + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse.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_data_policies_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::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_list_data_policies_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_policies_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_policies({ 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_data_policies 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_data_policies ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies({ 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_data_policies(::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_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::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Bigquery::DataPolicies::V1::DataPolicyService::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::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb new file mode 100644 index 000000000000..4dad1affc7c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb @@ -0,0 +1,651 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datapolicies/v1/datapolicy_pb" +require "google/cloud/bigquery/data_policies/v1/data_policy_service" + +class ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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_create_data_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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" + data_policy = {} + + create_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy), request["data_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_policy({ parent: parent, data_policy: data_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_policy parent: parent, data_policy: data_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_policy({ parent: parent, data_policy: data_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_policy_client_stub.call_rpc_count + end + end + + def test_update_data_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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. + data_policy = {} + update_mask = {} + + update_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy), request["data_policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_policy data_policy: data_policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_policy_client_stub.call_rpc_count + end + end + + def test_rename_data_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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" + new_data_policy_id = "hello world" + + rename_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rename_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["new_data_policy_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rename_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rename_data_policy name: name, new_data_policy_id: new_data_policy_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rename_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rename_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rename_data_policy_client_stub.call_rpc_count + end + end + + def test_delete_data_policy + # 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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.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_data_policy_client_stub.call_rpc_count + end + end + + def test_get_data_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.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_data_policy_client_stub.call_rpc_count + end + end + + def test_list_data_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse.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_data_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_policies, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, 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_data_policies_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_policies({ 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_data_policies 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_data_policies ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies({ 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_data_policies(::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Bigquery::DataPolicies::V1::DataPolicyService::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::Bigquery::DataPolicies::V1::DataPolicyService::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::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..f99980dd6166 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "bigquerydatapolicy.googleapis.com", + "api_shortname": "bigquerydatapolicy", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1beta1/latest", + "distribution_name": "google-cloud-bigquery-data_policies-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "bigquerydatapolicy", + "name_pretty": "BigQuery Data Policy Service V1beta1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..5bc06b98259a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-data_policies-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-bigquery-data_policies-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts new file mode 100644 index 000000000000..b6d22c8f5e9d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Data Policy Service V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..2c265559d728 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-data_policies-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-bigquery-data_policies-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/bigquery/data_policies/v1beta1" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/data_policies/v1beta1" + +::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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-bigquery-data_policies-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/bigquery/data_policies/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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-bigquery-data_policies-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md new file mode 100644 index 000000000000..8c51dbe8a3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Data Policy Service V1beta1 API + +Allows users to manage BigQuery data policies. + +The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Data Policy Service V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-data_policies](https://rubygems.org/gems/google-cloud-bigquery-data_policies). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-data_policies-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerydatapolicy.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/data_policies/v1beta1" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new +request = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new # (request fields as keyword arguments...) +response = client.create_data_policy request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/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/bigquery/data_policies/v1beta1" +require "logger" + +client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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-bigquery-data_policies`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-data_policies-v1beta1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-bigquery-data_policies`. +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-bigquery-data_policies-v1beta1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile new file mode 100644 index 000000000000..90e022e89585 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-bigquery-data_policies-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials" + ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-data_policies-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-data_policies-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-bigquery-data_policies-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-data_policies-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-data_policies-v1beta1" + header "google-cloud-bigquery-data_policies-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-data_policies-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-data_policies-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-data_policies-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-bigquery-data_policies-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..227bf55066b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.datapolicies.v1beta1", + "libraryPackage": "::Google::Cloud::Bigquery::DataPolicies::V1beta1", + "services": { + "DataPolicyService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client", + "rpcs": { + "CreateDataPolicy": { + "methods": [ + "create_data_policy" + ] + }, + "UpdateDataPolicy": { + "methods": [ + "update_data_policy" + ] + }, + "DeleteDataPolicy": { + "methods": [ + "delete_data_policy" + ] + }, + "GetDataPolicy": { + "methods": [ + "get_data_policy" + ] + }, + "ListDataPolicies": { + "methods": [ + "list_data_policies" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec new file mode 100644 index 000000000000..2a621472fe24 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/data_policies/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-data_policies-v1beta1" + gem.version = Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details." + gem.summary = "Allows users to manage BigQuery data policies." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb new file mode 100644 index 000000000000..7ccb61d64c00 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/bigquery/data_policies/v1beta1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb new file mode 100644 index 000000000000..04b5c0edb0d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/data_policies/v1beta1/data_policy_service" +require "google/cloud/bigquery/data_policies/v1beta1/version" + +module Google + module Cloud + module Bigquery + module DataPolicies + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_policies/v1beta1" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + module V1beta1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/bigquery/data_policies/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.rb new file mode 100644 index 000000000000..141dc5e37c77 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.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 "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_policies/v1beta1/version" + +require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials" +require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths" +require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1beta1 + ## + # Data Policy Service provides APIs for managing the label-policy bindings. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service" + # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + module DataPolicyService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_policy_service", "helpers.rb" +require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb new file mode 100644 index 000000000000..5822509fdb6e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb @@ -0,0 +1,1214 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datapolicies/v1beta1/datapolicy_pb" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1beta1 + module DataPolicyService + ## + # Client for the DataPolicyService service. + # + # Data Policy Service provides APIs for managing the label-policy bindings. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatapolicy.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_policy_service_stub + + ## + # Configure the DataPolicyService Client class. + # + # See {::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataPolicyService clients + # ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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", "Bigquery", "DataPolicies", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_data_policy.timeout = 60.0 + default_config.rpcs.create_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_policy.timeout = 60.0 + default_config.rpcs.update_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_data_policy.timeout = 60.0 + default_config.rpcs.delete_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_data_policy.timeout = 60.0 + default_config.rpcs.get_data_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_policies.timeout = 60.0 + default_config.rpcs.list_data_policies.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.set_iam_policy.timeout = 60.0 + default_config.rpcs.set_iam_policy.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.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 DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 + @data_policy_service_stub.universe_domain + end + + ## + # Create a new DataPolicyService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataPolicyService 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/bigquery/datapolicies/v1beta1/datapolicy_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 + + @data_policy_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 + ) + + @data_policy_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_policy_service_stub.logger + end + + # Service calls + + ## + # Creates a new data policy under a project with the given `dataPolicyId` + # (used as the display name), policy tag, and data policy type. + # + # @overload create_data_policy(request, options = nil) + # Pass arguments to `create_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(parent: nil, data_policy: nil) + # Pass arguments to `create_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Resource name of the project that the data policy will belong to. The + # format is `projects/{project_number}/locations/{location_id}`. + # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy, ::Hash] + # Required. The data policy to create. The `name` field does not need to be + # provided for the data policy creation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new + # + # # Call the create_data_policy method. + # result = client.create_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. + # p result + # + def create_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :create_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the metadata for an existing data policy. The target data policy + # can be specified by the resource name. + # + # @overload update_data_policy(request, options = nil) + # Pass arguments to `update_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(data_policy: nil, update_mask: nil) + # Pass arguments to `update_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy, ::Hash] + # Required. Update the data policy's metadata. + # + # The target data policy is determined by the `name` field. + # Other fields are updated to the specified values based on the field masks. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # If not set, defaults to all of the fields that are allowed to update. + # + # Updates to the `name` and `dataPolicyId` fields are not allowed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new + # + # # Call the update_data_policy method. + # result = client.update_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. + # p result + # + def update_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.data_policy&.name + header_params["data_policy.name"] = request.data_policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :update_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the data policy specified by its resource name. + # + # @overload delete_data_policy(request, options = nil) + # Pass arguments to `delete_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(name: nil) + # Pass arguments to `delete_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the data policy to delete. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.new + # + # # Call the delete_data_policy method. + # result = client.delete_data_policy request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :delete_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the data policy specified by its resource name. + # + # @overload get_data_policy(request, options = nil) + # Pass arguments to `get_data_policy` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policy(name: nil) + # Pass arguments to `get_data_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the requested data policy. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.new + # + # # Call the get_data_policy method. + # result = client.get_data_policy request + # + # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. + # p result + # + def get_data_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest + + # Converts hash 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_data_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_data_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :get_data_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all of the data policies in the specified parent project. + # + # @overload list_data_policies(request, options = nil) + # Pass arguments to `list_data_policies` via a request object, either of type + # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_policies(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_data_policies` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the project for which to list data policies. Format is + # `projects/{project_number}/locations/{location_id}`. + # @param page_size [::Integer] + # The maximum number of data policies to return. Must be a value between 1 + # and 1000. + # If not set, defaults to 50. + # @param page_token [::String] + # The `nextPageToken` value returned from a previous list request, if any. If + # not set, defaults to an empty string. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.new + # + # # Call the list_data_policies method. + # result = client.list_data_policies 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::Bigquery::DataPolicies::V1beta1::DataPolicy. + # p item + # end + # + def list_data_policies request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest + + # Converts hash 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_data_policies.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::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_data_policies.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_policies.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :list_data_policies, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_policy_service_stub, :list_data_policies, 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 IAM policy for the specified data policy. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the IAM policy for the specified data policy. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the caller's permission on the specified data policy resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_policies/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Bigquery::DataPolicies::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.resource + header_params["resource"] = request.resource + 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.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_policy_service_stub.call_rpc :test_iam_permissions, 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 DataPolicyService API. + # + # This class represents the configuration for DataPolicyService, + # 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 + # # create_data_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 = "bigquerydatapolicy.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 DataPolicyService 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 `create_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_policy + ## + # RPC-specific configuration for `update_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_policy + ## + # RPC-specific configuration for `delete_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_policy + ## + # RPC-specific configuration for `get_data_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_policy + ## + # RPC-specific configuration for `list_data_policies` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_policies + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + create_data_policy_config = parent_rpcs.create_data_policy if parent_rpcs.respond_to? :create_data_policy + @create_data_policy = ::Gapic::Config::Method.new create_data_policy_config + update_data_policy_config = parent_rpcs.update_data_policy if parent_rpcs.respond_to? :update_data_policy + @update_data_policy = ::Gapic::Config::Method.new update_data_policy_config + delete_data_policy_config = parent_rpcs.delete_data_policy if parent_rpcs.respond_to? :delete_data_policy + @delete_data_policy = ::Gapic::Config::Method.new delete_data_policy_config + get_data_policy_config = parent_rpcs.get_data_policy if parent_rpcs.respond_to? :get_data_policy + @get_data_policy = ::Gapic::Config::Method.new get_data_policy_config + list_data_policies_config = parent_rpcs.list_data_policies if parent_rpcs.respond_to? :list_data_policies + @list_data_policies = ::Gapic::Config::Method.new list_data_policies_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb new file mode 100644 index 000000000000..19e1a6bc6831 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1beta1 + module DataPolicyService + # Credentials for the DataPolicyService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.rb new file mode 100644 index 000000000000..e6a14ca04c67 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.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 Cloud + module Bigquery + module DataPolicies + module V1beta1 + module DataPolicyService + # Path helper methods for the DataPolicyService API. + module Paths + ## + # Create a fully-qualified DataPolicy resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataPolicies/{data_policy}` + # + # @param project [String] + # @param location [String] + # @param data_policy [String] + # + # @return [::String] + def data_policy_path project:, location:, data_policy: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataPolicies/#{data_policy}" + 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 + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb new file mode 100644 index 000000000000..3c2b8c1ec9ed --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataPolicies + module V1beta1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb new file mode 100644 index 000000000000..7a5a337e5939 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/datapolicies/v1beta1/datapolicy.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/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n;google/cloud/bigquery/datapolicies/v1beta1/datapolicy.proto\x12*google.cloud.bigquery.datapolicies.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x17\x43reateDataPolicyRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\x12P\n\x0b\x64\x61ta_policy\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicyB\x03\xe0\x41\x02\"\x9c\x01\n\x17UpdateDataPolicyRequest\x12P\n\x0b\x64\x61ta_policy\x18\x01 \x01(\x0b\x32\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"]\n\x17\x44\x65leteDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"Z\n\x14GetDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"\x86\x01\n\x17ListDataPoliciesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x18ListDataPoliciesResponse\x12M\n\rdata_policies\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8e\x04\n\nDataPolicy\x12\x14\n\npolicy_tag\x18\x04 \x01(\tH\x00\x12\\\n\x13\x64\x61ta_masking_policy\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicyH\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x10\x64\x61ta_policy_type\x18\x02 \x01(\x0e\x32\x45.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy.DataPolicyType\x12\x16\n\x0e\x64\x61ta_policy_id\x18\x03 \x01(\t\"m\n\x0e\x44\x61taPolicyType\x12 \n\x1c\x44\x41TA_POLICY_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1c\x43OLUMN_LEVEL_SECURITY_POLICY\x10\x03\x12\x17\n\x13\x44\x41TA_MASKING_POLICY\x10\x02:u\xea\x41r\n,bigquerydatapolicy.googleapis.com/DataPolicy\x12\x42projects/{project}/locations/{location}/dataPolicies/{data_policy}B\x10\n\x0ematching_labelB\x08\n\x06policy\"\x95\x02\n\x11\x44\x61taMaskingPolicy\x12s\n\x15predefined_expression\x18\x01 \x01(\x0e\x32R.google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicy.PredefinedExpressionH\x00\"u\n\x14PredefinedExpression\x12%\n!PREDEFINED_EXPRESSION_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x03\x12\x0f\n\x0b\x41LWAYS_NULL\x10\x05\x12\x19\n\x15\x44\x45\x46\x41ULT_MASKING_VALUE\x10\x07\x42\x14\n\x12masking_expression2\xff\r\n\x11\x44\x61taPolicyService\x12\xf0\x01\n\x10\x43reateDataPolicy\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest\x1a\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\"_\xda\x41\x12parent,data_policy\x82\xd3\xe4\x93\x02\x44\"5/v1beta1/{parent=projects/*/locations/*}/dataPolicies:\x0b\x64\x61ta_policy\x12\x81\x02\n\x10UpdateDataPolicy\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest\x1a\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\"p\xda\x41\x17\x64\x61ta_policy,update_mask\x82\xd3\xe4\x93\x02P2A/v1beta1/{data_policy.name=projects/*/locations/*/dataPolicies/*}:\x0b\x64\x61ta_policy\x12\xb5\x01\n\x10\x44\x65leteDataPolicy\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta1/{name=projects/*/locations/*/dataPolicies/*}\x12\xcf\x01\n\rGetDataPolicy\x12@.google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest\x1a\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{name=projects/*/locations/*/dataPolicies/*}\x12\xe5\x01\n\x10ListDataPolicies\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest\x1a\x44.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{parent=projects/*/locations/*}/dataPolicies\x12\x9c\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy:\x01*\x12\x9c\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy:\x01*\x12\xc2\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions:\x01*\x1a~\xca\x41!bigquerydatapolicy.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xa2\x02\n.com.google.cloud.bigquery.datapolicies.v1beta1B\x0f\x44\x61taPolicyProtoP\x01ZRcloud.google.com/go/bigquery/datapolicies/apiv1beta1/datapoliciespb;datapoliciespb\xaa\x02*Google.Cloud.BigQuery.DataPolicies.V1Beta1\xca\x02*Google\\Cloud\\BigQuery\\DataPolicies\\V1beta1\xea\x02.Google::Cloud::Bigquery::DataPolicies::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1beta1 + CreateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest").msgclass + UpdateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest").msgclass + DeleteDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest").msgclass + GetDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest").msgclass + ListDataPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest").msgclass + ListDataPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesResponse").msgclass + DataPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataPolicy").msgclass + DataPolicy::DataPolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataPolicy.DataPolicyType").enummodule + DataMaskingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicy").msgclass + DataMaskingPolicy::PredefinedExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicy.PredefinedExpression").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb new file mode 100644 index 000000000000..995d66ad93ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb @@ -0,0 +1,63 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/datapolicies/v1beta1/datapolicy.proto for package 'Google.Cloud.Bigquery.DataPolicies.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigquery/datapolicies/v1beta1/datapolicy_pb' + +module Google + module Cloud + module Bigquery + module DataPolicies + module V1beta1 + module DataPolicyService + # Data Policy Service provides APIs for managing the label-policy bindings. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService' + + # Creates a new data policy under a project with the given `dataPolicyId` + # (used as the display name), policy tag, and data policy type. + rpc :CreateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy + # Updates the metadata for an existing data policy. The target data policy + # can be specified by the resource name. + rpc :UpdateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy + # Deletes the data policy specified by its resource name. + rpc :DeleteDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest, ::Google::Protobuf::Empty + # Gets the data policy specified by its resource name. + rpc :GetDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy + # List all of the data policies in the specified parent project. + rpc :ListDataPolicies, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesResponse + # Gets the IAM policy for the specified data policy. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the IAM policy for the specified data policy. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Returns the caller's permission on the specified data policy resource. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..3018ae05ec87 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Data Policy Service V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb new file mode 100644 index 000000000000..716e8714b276 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb @@ -0,0 +1,195 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataPolicies + module V1beta1 + # Request message for the CreateDataPolicy method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project that the data policy will belong to. The + # format is `projects/{project_number}/locations/{location_id}`. + # @!attribute [rw] data_policy + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # Required. The data policy to create. The `name` field does not need to be + # provided for the data policy creation. + class CreateDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the UpdateDataPolicy method. + # @!attribute [rw] data_policy + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] + # Required. Update the data policy's metadata. + # + # The target data policy is determined by the `name` field. + # Other fields are updated to the specified values based on the field masks. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applies to the resource. For the `FieldMask` definition, + # see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + # If not set, defaults to all of the fields that are allowed to update. + # + # Updates to the `name` and `dataPolicyId` fields are not allowed. + class UpdateDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteDataPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the data policy to delete. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + class DeleteDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the GetDataPolicy method. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the requested data policy. Format is + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + class GetDataPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the ListDataPolicies method. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the project for which to list data policies. Format is + # `projects/{project_number}/locations/{location_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data policies to return. Must be a value between 1 + # and 1000. + # If not set, defaults to 50. + # @!attribute [rw] page_token + # @return [::String] + # The `nextPageToken` value returned from a previous list request, if any. If + # not set, defaults to an empty string. + class ListDataPoliciesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the ListDataPolicies method. + # @!attribute [rw] data_policies + # @return [::Array<::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy>] + # Data policies that belong to the requested project. + # @!attribute [rw] next_page_token + # @return [::String] + # Token used to retrieve the next page of results, or empty if there are no + # more results. + class ListDataPoliciesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the label-policy binding. + # @!attribute [rw] policy_tag + # @return [::String] + # Policy tag resource name, in the format of + # `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + # @!attribute [rw] data_masking_policy + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataMaskingPolicy] + # The data masking policy that specifies the data masking rule to use. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of this data policy, in the format of + # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + # @!attribute [rw] data_policy_type + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy::DataPolicyType] + # Type of data policy. + # @!attribute [rw] data_policy_id + # @return [::String] + # User-assigned (human readable) ID of the data policy that needs to be + # unique within a project. Used as \\{data_policy_id} in part of the resource + # name. + class DataPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A list of supported data policy types. + module DataPolicyType + # Default value for the data policy type. This should not be used. + DATA_POLICY_TYPE_UNSPECIFIED = 0 + + # Used to create a data policy for column-level security, without data + # masking. + COLUMN_LEVEL_SECURITY_POLICY = 3 + + # Used to create a data policy for data masking. + DATA_MASKING_POLICY = 2 + end + end + + # The data masking policy that is used to specify data masking rule. + # @!attribute [rw] predefined_expression + # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataMaskingPolicy::PredefinedExpression] + # A predefined masking expression. + class DataMaskingPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The available masking rules. Learn more here: + # https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. + module PredefinedExpression + # Default, unspecified predefined expression. No masking will take place + # since no expression is specified. + PREDEFINED_EXPRESSION_UNSPECIFIED = 0 + + # Masking expression to replace data with SHA-256 hash. + SHA256 = 3 + + # Masking expression to replace data with NULLs. + ALWAYS_NULL = 5 + + # Masking expression to replace data with their default masking values. + # The default masking values for each type listed as below: + # + # * STRING: "" + # * BYTES: b'' + # * INTEGER: 0 + # * FLOAT: 0.0 + # * NUMERIC: 0 + # * BOOLEAN: FALSE + # * TIMESTAMP: 0001-01-01 00:00:00 UTC + # * DATE: 0001-01-01 + # * TIME: 00:00:00 + # * DATETIME: 0001-01-01T00:00:00 + # * GEOGRAPHY: POINT(0 0) + # * BIGNUMERIC: 0 + # * ARRAY: [] + # * STRUCT: NOT_APPLICABLE + # * JSON: NULL + DEFAULT_MASKING_VALUE = 7 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..1f956db7ba2f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-bigquery-data_policies-v1beta1", path: "../" +else + gem "google-cloud-bigquery-data_policies-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb new file mode 100644 index 000000000000..e0f6e18a70d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_CreateDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the create_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#create_data_policy. +# +def create_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new + + # Call the create_data_policy method. + result = client.create_data_policy request + + # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. + p result +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_CreateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb new file mode 100644 index 000000000000..82841540276f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_DeleteDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the delete_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#delete_data_policy. +# +def delete_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.new + + # Call the delete_data_policy method. + result = client.delete_data_policy request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_DeleteDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb new file mode 100644 index 000000000000..06346d4fa74a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the get_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_data_policy. +# +def get_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.new + + # Call the get_data_policy method. + result = client.get_data_policy request + + # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. + p result +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb new file mode 100644 index 000000000000..10d09b67bb31 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetIamPolicy_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the get_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.rb new file mode 100644 index 000000000000..5313931c7fd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.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 bigquerydatapolicy_v1beta1_generated_DataPolicyService_ListDataPolicies_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the list_data_policies call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#list_data_policies. +# +def list_data_policies + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.new + + # Call the list_data_policies method. + result = client.list_data_policies 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::Bigquery::DataPolicies::V1beta1::DataPolicy. + p item + end +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_ListDataPolicies_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb new file mode 100644 index 000000000000..6b29d784af3c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_SetIamPolicy_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the set_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.rb new file mode 100644 index 000000000000..ea03c1a5fef1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.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 bigquerydatapolicy_v1beta1_generated_DataPolicyService_TestIamPermissions_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the test_iam_permissions call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb new file mode 100644 index 000000000000..6ae87ad19971 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_UpdateDataPolicy_sync] +require "google/cloud/bigquery/data_policies/v1beta1" + +## +# Snippet for the update_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#update_data_policy. +# +def update_data_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new + + # Call the update_data_policy method. + result = client.update_data_policy request + + # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. + p result +end +# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_UpdateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json new file mode 100644 index 000000000000..fb3d73e3a450 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-data_policies-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.datapolicies.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_CreateDataPolicy_sync", + "title": "Snippet for the create_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#create_data_policy.", + "file": "data_policy_service/create_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#create_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "CreateDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.CreateDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_UpdateDataPolicy_sync", + "title": "Snippet for the update_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#update_data_policy.", + "file": "data_policy_service/update_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#update_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "UpdateDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.UpdateDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_DeleteDataPolicy_sync", + "title": "Snippet for the delete_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#delete_data_policy.", + "file": "data_policy_service/delete_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#delete_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "DeleteDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.DeleteDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetDataPolicy_sync", + "title": "Snippet for the get_data_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_data_policy.", + "file": "data_policy_service/get_data_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_data_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "GetDataPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.GetDataPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_ListDataPolicies_sync", + "title": "Snippet for the list_data_policies call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#list_data_policies.", + "file": "data_policy_service/list_data_policies.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_policies", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#list_data_policies", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesResponse", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "ListDataPolicies", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.ListDataPolicies", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_iam_policy.", + "file": "data_policy_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.GetIamPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#set_iam_policy.", + "file": "data_policy_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.SetIamPolicy", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the DataPolicyService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#test_iam_permissions.", + "file": "data_policy_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "DataPolicyService::Client", + "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.TestIamPermissions", + "service": { + "short_name": "DataPolicyService", + "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" + } + } + }, + "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-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb new file mode 100644 index 000000000000..e58c0bec835a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/data_policies/v1beta1/data_policy_service" + +class ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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_data_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_policy_path project: "value0", location: "value1", data_policy: "value2" + assert_equal "projects/value0/locations/value1/dataPolicies/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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb new file mode 100644 index 000000000000..92dbc43ac06a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datapolicies/v1beta1/datapolicy_pb" +require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service" + +class ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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_create_data_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy.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" + data_policy = {} + + create_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy), request["data_policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_policy({ parent: parent, data_policy: data_policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_policy parent: parent, data_policy: data_policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_policy({ parent: parent, data_policy: data_policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_policy_client_stub.call_rpc_count + end + end + + def test_update_data_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy.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. + data_policy = {} + update_mask = {} + + update_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy), request["data_policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_policy data_policy: data_policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_policy_client_stub.call_rpc_count + end + end + + def test_delete_data_policy + # 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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.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_data_policy_client_stub.call_rpc_count + end + end + + def test_get_data_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy.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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_policy, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.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_data_policy_client_stub.call_rpc_count + end + end + + def test_list_data_policies + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesResponse.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_data_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_policies, name + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest, 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_data_policies_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_policies({ 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_data_policies 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_data_policies ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.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_data_policies({ 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_data_policies(::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.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_data_policies_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json new file mode 100644 index 000000000000..682905e95539 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigquerydatatransfer.googleapis.com", + "api_shortname": "bigquerydatatransfer", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest", + "distribution_name": "google-cloud-bigquery-data_transfer-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigquerydatatransfer", + "name_pretty": "BigQuery Data Transfer Service V1 API", + "product_documentation": "https://cloud.google.com/bigquery/transfer", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details.", + "ruby-cloud-env-prefix": "DATA_TRANSFER", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/transfer", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml new file mode 100644 index 000000000000..6f5635fddf0e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts new file mode 100644 index 000000000000..304c3609fa4b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Data Transfer Service 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-bigquery-data_transfer-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..4740aa501122 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-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/bigquery/data_transfer/v1" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/data_transfer/v1" + +::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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-bigquery-data_transfer-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/bigquery/data_transfer/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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-bigquery-data_transfer-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md new file mode 100644 index 000000000000..9ed2e29c2933 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Data Transfer Service V1 API + +Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis. + +Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Data Transfer Service V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-data_transfer](https://rubygems.org/gems/google-cloud-bigquery-data_transfer). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-data_transfer-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/bigquerydatatransfer.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/data_transfer/v1" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new +request = ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new # (request fields as keyword arguments...) +response = client.get_data_source request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/transfer) +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/bigquery/data_transfer/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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-bigquery-data_transfer`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-data_transfer-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-bigquery-data_transfer`. +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-bigquery-data_transfer-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-bigquery-data_transfer-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile new file mode 100644 index 000000000000..0be31481319e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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-bigquery-data_transfer-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["DATA_TRANSFER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["DATA_TRANSFER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["DATA_TRANSFER_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 DATA_TRANSFER_TEST_PROJECT=test123 DATA_TRANSFER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["DATA_TRANSFER_PROJECT"] = project + ENV["DATA_TRANSFER_TEST_PROJECT"] = project + ENV["DATA_TRANSFER_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-bigquery-data_transfer-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-bigquery-data_transfer-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-bigquery-data_transfer-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-bigquery-data_transfer-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-data_transfer-v1" + header "google-cloud-bigquery-data_transfer-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-data_transfer-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-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-bigquery-data_transfer-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-bigquery-data_transfer-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json new file mode 100644 index 000000000000..7ae4ebcd10a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json @@ -0,0 +1,98 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.datatransfer.v1", + "libraryPackage": "::Google::Cloud::Bigquery::DataTransfer::V1", + "services": { + "DataTransferService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client", + "rpcs": { + "GetDataSource": { + "methods": [ + "get_data_source" + ] + }, + "ListDataSources": { + "methods": [ + "list_data_sources" + ] + }, + "CreateTransferConfig": { + "methods": [ + "create_transfer_config" + ] + }, + "UpdateTransferConfig": { + "methods": [ + "update_transfer_config" + ] + }, + "DeleteTransferConfig": { + "methods": [ + "delete_transfer_config" + ] + }, + "GetTransferConfig": { + "methods": [ + "get_transfer_config" + ] + }, + "ListTransferConfigs": { + "methods": [ + "list_transfer_configs" + ] + }, + "ScheduleTransferRuns": { + "methods": [ + "schedule_transfer_runs" + ] + }, + "StartManualTransferRuns": { + "methods": [ + "start_manual_transfer_runs" + ] + }, + "GetTransferRun": { + "methods": [ + "get_transfer_run" + ] + }, + "DeleteTransferRun": { + "methods": [ + "delete_transfer_run" + ] + }, + "ListTransferRuns": { + "methods": [ + "list_transfer_runs" + ] + }, + "ListTransferLogs": { + "methods": [ + "list_transfer_logs" + ] + }, + "CheckValidCreds": { + "methods": [ + "check_valid_creds" + ] + }, + "EnrollDataSources": { + "methods": [ + "enroll_data_sources" + ] + }, + "UnenrollDataSources": { + "methods": [ + "unenroll_data_sources" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec new file mode 100644 index 000000000000..fd94f92ed1e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/data_transfer/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-data_transfer-v1" + gem.version = Google::Cloud::Bigquery::DataTransfer::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details." + gem.summary = "Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb new file mode 100644 index 000000000000..78206ec74e36 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-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/bigquery/data_transfer/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb new file mode 100644 index 000000000000..3d075d750da4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" +require "google/cloud/bigquery/data_transfer/v1/version" + +module Google + module Cloud + module Bigquery + module DataTransfer + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_transfer/v1" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/data_transfer/v1" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/data_transfer/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb new file mode 100644 index 000000000000..40a072a3828e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module Bigquery + module DataTransfer + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/bigquery/data_transfer/v1/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Bigquery", "DataTransfer"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb new file mode 100644 index 000000000000..6800f1bff3af --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_transfer/v1/version" + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/client" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + ## + # This API allows users to manage their data transfers into BigQuery. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module DataTransferService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_transfer_service", "helpers.rb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb new file mode 100644 index 000000000000..ce07ad9249a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb @@ -0,0 +1,2170 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/location" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + ## + # Client for the DataTransferService service. + # + # This API allows users to manage their data transfers into BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_transfer_service_stub + + ## + # Configure the DataTransferService Client class. + # + # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTransferService clients + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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", "Bigquery", "DataTransfer", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_data_source.timeout = 20.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_data_sources.timeout = 20.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_transfer_config.timeout = 30.0 + + default_config.rpcs.update_transfer_config.timeout = 30.0 + + default_config.rpcs.delete_transfer_config.timeout = 20.0 + default_config.rpcs.delete_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_transfer_config.timeout = 20.0 + default_config.rpcs.get_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_configs.timeout = 20.0 + default_config.rpcs.list_transfer_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.schedule_transfer_runs.timeout = 30.0 + + default_config.rpcs.get_transfer_run.timeout = 20.0 + default_config.rpcs.get_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_transfer_run.timeout = 20.0 + default_config.rpcs.delete_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_runs.timeout = 20.0 + default_config.rpcs.list_transfer_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_logs.timeout = 20.0 + default_config.rpcs.list_transfer_logs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.check_valid_creds.timeout = 20.0 + default_config.rpcs.check_valid_creds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::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 + @data_transfer_service_stub.universe_domain + end + + ## + # Create a new DataTransferService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTransferService 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/bigquery/datatransfer/v1/datatransfer_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 + + @data_transfer_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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 + ) + + @data_transfer_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_transfer_service_stub.endpoint + config.universe_domain = @data_transfer_service_stub.universe_domain + config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_transfer_service_stub.logger + end + + # Service calls + + ## + # Retrieves a supported data source and returns its settings. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest + + # Converts hash 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_data_source.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::Bigquery::DataTransfer::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_data_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists supported data sources and returns their settings. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is 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 BigQuery project id for which data sources should be + # returned. Must be in the form: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListDataSourcesRequest` list results. For multiple-page + # results, `ListDataSourcesResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources 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::Bigquery::DataTransfer::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest + + # Converts hash 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_data_sources.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::Bigquery::DataTransfer::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_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, 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 + + ## + # Creates a new data transfer configuration. + # + # @overload create_transfer_config(request, options = nil) + # Pass arguments to `create_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `create_transfer_config` via keyword arguments. Note that at + # least one keyword argument is 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 BigQuery project id where the transfer configuration should + # be created. Must be in the format + # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If + # specified location and location of the destination bigquery dataset do not + # match - the request will fail. + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new + # + # # Call the create_transfer_config method. + # result = client.create_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def create_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :create_transfer_config, 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 data transfer configuration. + # All fields must be set, even if they are not updated. + # + # @overload update_transfer_config(request, options = nil) + # Pass arguments to `update_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `update_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Required list of fields to be updated in this request. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+              #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new + # + # # Call the update_transfer_config method. + # result = client.update_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def update_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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.transfer_config&.name + header_params["transfer_config.name"] = request.transfer_config.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_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :update_transfer_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data transfer configuration, including any associated transfer + # runs and logs. + # + # @overload delete_transfer_config(request, options = nil) + # Pass arguments to `delete_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(name: nil) + # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new + # + # # Call the delete_transfer_config method. + # result = client.delete_transfer_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :delete_transfer_config, 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 + + ## + # Returns information about a data transfer config. + # + # @overload get_transfer_config(request, options = nil) + # Pass arguments to `get_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(name: nil) + # Pass arguments to `get_transfer_config` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new + # + # # Call the get_transfer_config method. + # result = client.get_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def get_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :get_transfer_config, 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 + + ## + # Returns information about all transfer configs owned by a project in the + # specified location. + # + # @overload list_transfer_configs(request, options = nil) + # Pass arguments to `list_transfer_configs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at + # least one keyword argument is 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 BigQuery project id for which transfer configs + # should be returned: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param data_source_ids [::Array<::String>] + # When specified, only configurations of requested data sources are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransfersRequest` list results. For multiple-page + # results, `ListTransfersResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new + # + # # Call the list_transfer_configs method. + # result = client.list_transfer_configs 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::Bigquery::DataTransfer::V1::TransferConfig. + # p item + # end + # + def list_transfer_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest + + # Converts hash 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_transfer_configs.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::Bigquery::DataTransfer::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_transfer_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transfer_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_transfer_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, 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 + + ## + # Creates transfer runs for a time range [start_time, end_time]. + # For each date - or whatever granularity the data source supports - in the + # range, one transfer run is created. + # Note that runs are created per UTC time in the time range. + # DEPRECATED: use StartManualTransferRuns instead. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload schedule_transfer_runs(request, options = nil) + # Pass arguments to `schedule_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) + # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is 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. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new + # + # # Call the schedule_transfer_runs method. + # result = client.schedule_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. + # p result + # + def schedule_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest + + # Converts hash 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.schedule_transfer_runs.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::Bigquery::DataTransfer::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.schedule_transfer_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :schedule_transfer_runs, 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 + + ## + # Start manual transfer runs to be executed now with schedule_time equal to + # current time. The transfer runs can be created for a time range where the + # run_time is between start_time (inclusive) and end_time (exclusive), or for + # a specific run_time. + # + # @overload start_manual_transfer_runs(request, options = nil) + # Pass arguments to `start_manual_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) + # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is 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. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] + # A time_range start and end timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_time_range must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] + # A run_time timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_run_time must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new + # + # # Call the start_manual_transfer_runs method. + # result = client.start_manual_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. + # p result + # + def start_manual_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest + + # Converts hash 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.start_manual_transfer_runs.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::Bigquery::DataTransfer::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.start_manual_transfer_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :start_manual_transfer_runs, 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 + + ## + # Returns information about the particular transfer run. + # + # @overload get_transfer_run(request, options = nil) + # Pass arguments to `get_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_run(name: nil) + # Pass arguments to `get_transfer_run` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new + # + # # Call the get_transfer_run method. + # result = client.get_transfer_run request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + # p result + # + def get_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest + + # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :get_transfer_run, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified transfer run. + # + # @overload delete_transfer_run(request, options = nil) + # Pass arguments to `delete_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_run(name: nil) + # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new + # + # # Call the delete_transfer_run method. + # result = client.delete_transfer_run request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest + + # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :delete_transfer_run, 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 + + ## + # Returns information about running and completed transfer runs. + # + # @overload list_transfer_runs(request, options = nil) + # Pass arguments to `list_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) + # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is 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. Name of transfer configuration for which transfer runs should be + # retrieved. Format of transfer configuration resource name is: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] + # When specified, only transfer runs with requested states are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferRunsRequest` list results. For multiple-page + # results, `ListTransferRunsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] + # Indicates how run attempts are to be pulled. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new + # + # # Call the list_transfer_runs method. + # result = client.list_transfer_runs 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::Bigquery::DataTransfer::V1::TransferRun. + # p item + # end + # + def list_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest + + # Converts hash 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_transfer_runs.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::Bigquery::DataTransfer::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_transfer_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_transfer_runs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, 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 log messages for the transfer run. + # + # @overload list_transfer_logs(request, options = nil) + # Pass arguments to `list_transfer_logs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) + # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at + # least one keyword argument is 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. Transfer run name in the form: + # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferLogsRequest` list results. For multiple-page + # results, `ListTransferLogsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] + # Message types to return. If not populated - INFO, WARNING and ERROR + # messages are returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new + # + # # Call the list_transfer_logs method. + # result = client.list_transfer_logs 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::Bigquery::DataTransfer::V1::TransferMessage. + # p item + # end + # + def list_transfer_logs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest + + # Converts hash 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_transfer_logs.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::Bigquery::DataTransfer::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_transfer_logs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_transfer_logs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :list_transfer_logs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, 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 true if valid credentials exist for the given data source and + # requesting user. + # + # @overload check_valid_creds(request, options = nil) + # Pass arguments to `check_valid_creds` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload check_valid_creds(name: nil) + # Pass arguments to `check_valid_creds` via keyword arguments. Note that at + # least one keyword argument is 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 data source in the form: + # `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new + # + # # Call the check_valid_creds method. + # result = client.check_valid_creds request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. + # p result + # + def check_valid_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest + + # Converts hash 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.check_valid_creds.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::Bigquery::DataTransfer::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.check_valid_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.check_valid_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :check_valid_creds, 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 + + ## + # Enroll data sources in a user project. This allows users to create transfer + # configurations for these data sources. They will also appear in the + # ListDataSources RPC and as such, will appear in the + # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + # can be found in the public guide for + # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + # [Data Transfer + # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). + # + # @overload enroll_data_sources(request, options = nil) + # Pass arguments to `enroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are enrolled. It is required to provide at least one + # data source id. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new + # + # # Call the enroll_data_sources method. + # result = client.enroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def enroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest + + # Converts hash 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.enroll_data_sources.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::Bigquery::DataTransfer::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.enroll_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :enroll_data_sources, 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 + + ## + # Unenroll data sources in a user project. This allows users to remove + # transfer configurations for these data sources. They will no longer appear + # in the ListDataSources RPC and will also no longer appear in the [BigQuery + # UI](https://console.cloud.google.com/bigquery). Data transfers + # configurations of unenrolled data sources will not be scheduled. + # + # @overload unenroll_data_sources(request, options = nil) + # Pass arguments to `unenroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload unenroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are unenrolled. It is required to provide at least one + # data source id. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new + # + # # Call the unenroll_data_sources method. + # result = client.unenroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unenroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest + + # Converts hash 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.unenroll_data_sources.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::Bigquery::DataTransfer::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.unenroll_data_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.unenroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.call_rpc :unenroll_data_sources, 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 DataTransferService API. + # + # This class represents the configuration for DataTransferService, + # 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::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.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::Bigquery::DataTransfer::V1::DataTransferService::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 = "bigquerydatatransfer.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 DataTransferService 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 `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_transfer_config + ## + # RPC-specific configuration for `update_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_transfer_config + ## + # RPC-specific configuration for `delete_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_config + ## + # RPC-specific configuration for `get_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_config + ## + # RPC-specific configuration for `list_transfer_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_configs + ## + # RPC-specific configuration for `schedule_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :schedule_transfer_runs + ## + # RPC-specific configuration for `start_manual_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :start_manual_transfer_runs + ## + # RPC-specific configuration for `get_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_run + ## + # RPC-specific configuration for `delete_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_run + ## + # RPC-specific configuration for `list_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_runs + ## + # RPC-specific configuration for `list_transfer_logs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_logs + ## + # RPC-specific configuration for `check_valid_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :check_valid_creds + ## + # RPC-specific configuration for `enroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :enroll_data_sources + ## + # RPC-specific configuration for `unenroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :unenroll_data_sources + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config + @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config + update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config + @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config + delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config + @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config + get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config + @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config + list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs + @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config + schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs + @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config + start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs + @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config + get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run + @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config + delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run + @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config + list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs + @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config + list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs + @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config + check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds + @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config + enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources + @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config + unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources + @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb new file mode 100644 index 000000000000..bc7f9b48f764 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + # Credentials for the DataTransferService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "DATA_TRANSFER_CREDENTIALS", + "DATA_TRANSFER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "DATA_TRANSFER_CREDENTIALS_JSON", + "DATA_TRANSFER_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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb new file mode 100644 index 000000000000..ad6b7baec0f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb @@ -0,0 +1,193 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataTransfer + module V1 + module DataTransferService + # Path helper methods for the DataTransferService API. + module Paths + ## + # Create a fully-qualified DataSource resource string. + # + # @overload data_source_path(project:, data_source:) + # The resource will be in the following format: + # + # `projects/{project}/dataSources/{data_source}` + # + # @param project [String] + # @param data_source [String] + # + # @overload data_source_path(project:, location:, data_source:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dataSources/{data_source}` + # + # @param project [String] + # @param location [String] + # @param data_source [String] + # + # @return [::String] + def data_source_path **args + resources = { + "data_source:project" => (proc do |project:, data_source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/dataSources/#{data_source}" + end), + "data_source:location:project" => (proc do |project:, location:, data_source:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dataSources/#{data_source}" + 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 Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Run resource string. + # + # @overload run_path(project:, transfer_config:, run:) + # The resource will be in the following format: + # + # `projects/{project}/transferConfigs/{transfer_config}/runs/{run}` + # + # @param project [String] + # @param transfer_config [String] + # @param run [String] + # + # @overload run_path(project:, location:, transfer_config:, run:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}` + # + # @param project [String] + # @param location [String] + # @param transfer_config [String] + # @param run [String] + # + # @return [::String] + def run_path **args + resources = { + "project:run:transfer_config" => (proc do |project:, transfer_config:, run:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" + + "projects/#{project}/transferConfigs/#{transfer_config}/runs/#{run}" + end), + "location:project:run:transfer_config" => (proc do |project:, location:, transfer_config:, run:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" + + "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}/runs/#{run}" + 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 TransferConfig resource string. + # + # @overload transfer_config_path(project:, transfer_config:) + # The resource will be in the following format: + # + # `projects/{project}/transferConfigs/{transfer_config}` + # + # @param project [String] + # @param transfer_config [String] + # + # @overload transfer_config_path(project:, location:, transfer_config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}` + # + # @param project [String] + # @param location [String] + # @param transfer_config [String] + # + # @return [::String] + def transfer_config_path **args + resources = { + "project:transfer_config" => (proc do |project:, transfer_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/transferConfigs/#{transfer_config}" + end), + "location:project:transfer_config" => (proc do |project:, location:, transfer_config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb new file mode 100644 index 000000000000..542bca69647b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/data_transfer/v1/version" +require "google/cloud/bigquery/data_transfer/v1/bindings_override" + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + ## + # This API allows users to manage their data transfers into BigQuery. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module DataTransferService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb new file mode 100644 index 000000000000..f8deec7b0b18 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb @@ -0,0 +1,2021 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + module Rest + ## + # REST client for the DataTransferService service. + # + # This API allows users to manage their data transfers into BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_transfer_service_stub + + ## + # Configure the DataTransferService Client class. + # + # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataTransferService clients + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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", "Bigquery", "DataTransfer", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_data_source.timeout = 20.0 + default_config.rpcs.get_data_source.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_data_sources.timeout = 20.0 + default_config.rpcs.list_data_sources.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_transfer_config.timeout = 30.0 + + default_config.rpcs.update_transfer_config.timeout = 30.0 + + default_config.rpcs.delete_transfer_config.timeout = 20.0 + default_config.rpcs.delete_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_transfer_config.timeout = 20.0 + default_config.rpcs.get_transfer_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_configs.timeout = 20.0 + default_config.rpcs.list_transfer_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.schedule_transfer_runs.timeout = 30.0 + + default_config.rpcs.get_transfer_run.timeout = 20.0 + default_config.rpcs.get_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_transfer_run.timeout = 20.0 + default_config.rpcs.delete_transfer_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_runs.timeout = 20.0 + default_config.rpcs.list_transfer_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_transfer_logs.timeout = 20.0 + default_config.rpcs.list_transfer_logs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.check_valid_creds.timeout = 20.0 + default_config.rpcs.check_valid_creds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::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 + @data_transfer_service_stub.universe_domain + end + + ## + # Create a new DataTransferService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataTransferService 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 + + @data_transfer_service_stub = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_transfer_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @data_transfer_service_stub.endpoint + config.universe_domain = @data_transfer_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_transfer_service_stub.logger + end + + # Service calls + + ## + # Retrieves a supported data source and returns its settings. + # + # @overload get_data_source(request, options = nil) + # Pass arguments to `get_data_source` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_source(name: nil) + # Pass arguments to `get_data_source` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new + # + # # Call the get_data_source method. + # result = client.get_data_source request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + # p result + # + def get_data_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest + + # Converts hash 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_data_source.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::Bigquery::DataTransfer::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_data_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.get_data_source request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists supported data sources and returns their settings. + # + # @overload list_data_sources(request, options = nil) + # Pass arguments to `list_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_sources(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_data_sources` via keyword arguments. Note that at + # least one keyword argument is 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 BigQuery project id for which data sources should be + # returned. Must be in the form: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListDataSourcesRequest` list results. For multiple-page + # results, `ListDataSourcesResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new + # + # # Call the list_data_sources method. + # result = client.list_data_sources 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::Bigquery::DataTransfer::V1::DataSource. + # p item + # end + # + def list_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest + + # Converts hash 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_data_sources.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::Bigquery::DataTransfer::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_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_data_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, "data_sources", 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 + + ## + # Creates a new data transfer configuration. + # + # @overload create_transfer_config(request, options = nil) + # Pass arguments to `create_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `create_transfer_config` via keyword arguments. Note that at + # least one keyword argument is 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 BigQuery project id where the transfer configuration should + # be created. Must be in the format + # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If + # specified location and location of the destination bigquery dataset do not + # match - the request will fail. + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new + # + # # Call the create_transfer_config method. + # result = client.create_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def create_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.create_transfer_config 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 data transfer configuration. + # All fields must be set, even if they are not updated. + # + # @overload update_transfer_config(request, options = nil) + # Pass arguments to `update_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) + # Pass arguments to `update_transfer_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] + # Required. Data transfer configuration to create. + # @param authorization_code [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Required list of fields to be updated in this request. + # @param version_info [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+                #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @param service_account_name [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new + # + # # Call the update_transfer_config method. + # result = client.update_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def update_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.update_transfer_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data transfer configuration, including any associated transfer + # runs and logs. + # + # @overload delete_transfer_config(request, options = nil) + # Pass arguments to `delete_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(name: nil) + # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new + # + # # Call the delete_transfer_config method. + # result = client.delete_transfer_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.delete_transfer_config 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 + + ## + # Returns information about a data transfer config. + # + # @overload get_transfer_config(request, options = nil) + # Pass arguments to `get_transfer_config` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_config(name: nil) + # Pass arguments to `get_transfer_config` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new + # + # # Call the get_transfer_config method. + # result = client.get_transfer_config request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + # p result + # + def get_transfer_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest + + # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_transfer_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.get_transfer_config 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 + + ## + # Returns information about all transfer configs owned by a project in the + # specified location. + # + # @overload list_transfer_configs(request, options = nil) + # Pass arguments to `list_transfer_configs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at + # least one keyword argument is 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 BigQuery project id for which transfer configs + # should be returned: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @param data_source_ids [::Array<::String>] + # When specified, only configurations of requested data sources are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransfersRequest` list results. For multiple-page + # results, `ListTransfersResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new + # + # # Call the list_transfer_configs method. + # result = client.list_transfer_configs 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::Bigquery::DataTransfer::V1::TransferConfig. + # p item + # end + # + def list_transfer_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest + + # Converts hash 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_transfer_configs.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::Bigquery::DataTransfer::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_transfer_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transfer_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_transfer_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, "transfer_configs", 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 + + ## + # Creates transfer runs for a time range [start_time, end_time]. + # For each date - or whatever granularity the data source supports - in the + # range, one transfer run is created. + # Note that runs are created per UTC time in the time range. + # DEPRECATED: use StartManualTransferRuns instead. + # + # @overload schedule_transfer_runs(request, options = nil) + # Pass arguments to `schedule_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) + # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is 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. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Required. End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new + # + # # Call the schedule_transfer_runs method. + # result = client.schedule_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. + # p result + # + def schedule_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest + + # Converts hash 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.schedule_transfer_runs.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::Bigquery::DataTransfer::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.schedule_transfer_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.schedule_transfer_runs 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 + + ## + # Start manual transfer runs to be executed now with schedule_time equal to + # current time. The transfer runs can be created for a time range where the + # run_time is between start_time (inclusive) and end_time (exclusive), or for + # a specific run_time. + # + # @overload start_manual_transfer_runs(request, options = nil) + # Pass arguments to `start_manual_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) + # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is 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. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] + # A time_range start and end timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_time_range must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] + # A run_time timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_run_time must be a past time and cannot include future time + # values. + # + # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new + # + # # Call the start_manual_transfer_runs method. + # result = client.start_manual_transfer_runs request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. + # p result + # + def start_manual_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest + + # Converts hash 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.start_manual_transfer_runs.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::Bigquery::DataTransfer::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.start_manual_transfer_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.start_manual_transfer_runs 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 + + ## + # Returns information about the particular transfer run. + # + # @overload get_transfer_run(request, options = nil) + # Pass arguments to `get_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_run(name: nil) + # Pass arguments to `get_transfer_run` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new + # + # # Call the get_transfer_run method. + # result = client.get_transfer_run request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + # p result + # + def get_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest + + # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.get_transfer_run request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified transfer run. + # + # @overload delete_transfer_run(request, options = nil) + # Pass arguments to `delete_transfer_run` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_run(name: nil) + # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at + # least one keyword argument is 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 field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new + # + # # Call the delete_transfer_run method. + # result = client.delete_transfer_run request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_transfer_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest + + # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_transfer_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.delete_transfer_run 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 + + ## + # Returns information about running and completed transfer runs. + # + # @overload list_transfer_runs(request, options = nil) + # Pass arguments to `list_transfer_runs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) + # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at + # least one keyword argument is 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. Name of transfer configuration for which transfer runs should be + # retrieved. Format of transfer configuration resource name is: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] + # When specified, only transfer runs with requested states are returned. + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferRunsRequest` list results. For multiple-page + # results, `ListTransferRunsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] + # Indicates how run attempts are to be pulled. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new + # + # # Call the list_transfer_runs method. + # result = client.list_transfer_runs 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::Bigquery::DataTransfer::V1::TransferRun. + # p item + # end + # + def list_transfer_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest + + # Converts hash 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_transfer_runs.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::Bigquery::DataTransfer::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_transfer_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transfer_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_transfer_runs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, "transfer_runs", 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 log messages for the transfer run. + # + # @overload list_transfer_logs(request, options = nil) + # Pass arguments to `list_transfer_logs` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) + # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at + # least one keyword argument is 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. Transfer run name in the form: + # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @param page_token [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferLogsRequest` list results. For multiple-page + # results, `ListTransferLogsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @param page_size [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] + # Message types to return. If not populated - INFO, WARNING and ERROR + # messages are returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new + # + # # Call the list_transfer_logs method. + # result = client.list_transfer_logs 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::Bigquery::DataTransfer::V1::TransferMessage. + # p item + # end + # + def list_transfer_logs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest + + # Converts hash 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_transfer_logs.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::Bigquery::DataTransfer::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_transfer_logs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_transfer_logs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.list_transfer_logs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, "transfer_messages", 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 true if valid credentials exist for the given data source and + # requesting user. + # + # @overload check_valid_creds(request, options = nil) + # Pass arguments to `check_valid_creds` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload check_valid_creds(name: nil) + # Pass arguments to `check_valid_creds` via keyword arguments. Note that at + # least one keyword argument is 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 data source in the form: + # `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new + # + # # Call the check_valid_creds method. + # result = client.check_valid_creds request + # + # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. + # p result + # + def check_valid_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest + + # Converts hash 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.check_valid_creds.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::Bigquery::DataTransfer::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.check_valid_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.check_valid_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.check_valid_creds 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 + + ## + # Enroll data sources in a user project. This allows users to create transfer + # configurations for these data sources. They will also appear in the + # ListDataSources RPC and as such, will appear in the + # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + # can be found in the public guide for + # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + # [Data Transfer + # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). + # + # @overload enroll_data_sources(request, options = nil) + # Pass arguments to `enroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are enrolled. It is required to provide at least one + # data source id. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new + # + # # Call the enroll_data_sources method. + # result = client.enroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def enroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest + + # Converts hash 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.enroll_data_sources.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::Bigquery::DataTransfer::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.enroll_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.enroll_data_sources 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 + + ## + # Unenroll data sources in a user project. This allows users to remove + # transfer configurations for these data sources. They will no longer appear + # in the ListDataSources RPC and will also no longer appear in the [BigQuery + # UI](https://console.cloud.google.com/bigquery). Data transfers + # configurations of unenrolled data sources will not be scheduled. + # + # @overload unenroll_data_sources(request, options = nil) + # Pass arguments to `unenroll_data_sources` via a request object, either of type + # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload unenroll_data_sources(name: nil, data_source_ids: nil) + # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @param data_source_ids [::Array<::String>] + # Data sources that are unenrolled. It is required to provide at least one + # data source id. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/data_transfer/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new + # + # # Call the unenroll_data_sources method. + # result = client.unenroll_data_sources request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def unenroll_data_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest + + # Converts hash 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.unenroll_data_sources.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::Bigquery::DataTransfer::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.unenroll_data_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.unenroll_data_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_transfer_service_stub.unenroll_data_sources 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 DataTransferService REST API. + # + # This class represents the configuration for DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_data_source to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_data_source.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 = "bigquerydatatransfer.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the DataTransferService 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 `get_data_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_source + ## + # RPC-specific configuration for `list_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_sources + ## + # RPC-specific configuration for `create_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_transfer_config + ## + # RPC-specific configuration for `update_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_transfer_config + ## + # RPC-specific configuration for `delete_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_config + ## + # RPC-specific configuration for `get_transfer_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_config + ## + # RPC-specific configuration for `list_transfer_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_configs + ## + # RPC-specific configuration for `schedule_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :schedule_transfer_runs + ## + # RPC-specific configuration for `start_manual_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :start_manual_transfer_runs + ## + # RPC-specific configuration for `get_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_transfer_run + ## + # RPC-specific configuration for `delete_transfer_run` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_transfer_run + ## + # RPC-specific configuration for `list_transfer_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_runs + ## + # RPC-specific configuration for `list_transfer_logs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_transfer_logs + ## + # RPC-specific configuration for `check_valid_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :check_valid_creds + ## + # RPC-specific configuration for `enroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :enroll_data_sources + ## + # RPC-specific configuration for `unenroll_data_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :unenroll_data_sources + + # @private + def initialize parent_rpcs = nil + get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source + @get_data_source = ::Gapic::Config::Method.new get_data_source_config + list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources + @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config + create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config + @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config + update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config + @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config + delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config + @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config + get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config + @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config + list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs + @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config + schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs + @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config + start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs + @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config + get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run + @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config + delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run + @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config + list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs + @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config + list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs + @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config + check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds + @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config + enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources + @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config + unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources + @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb new file mode 100644 index 000000000000..0683fbfed415 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb @@ -0,0 +1,1177 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datatransfer/v1/datatransfer_pb" + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + module Rest + ## + # REST service stub for the DataTransferService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] + # 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::Bigquery::DataTransfer::V1::DataSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] + # A result object deserialized from the server's reply + def get_data_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_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_data_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.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_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] + # 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::Bigquery::DataTransfer::V1::ListDataSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse] + # A result object deserialized from the server's reply + def list_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_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_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.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_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] + # 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::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # A result object deserialized from the server's reply + def create_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_transfer_config_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_transfer_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] + # 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::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # A result object deserialized from the server's reply + def update_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_transfer_config_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_transfer_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] + # 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_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_config_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_transfer_config", + 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 get_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] + # 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::Bigquery::DataTransfer::V1::TransferConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # A result object deserialized from the server's reply + def get_transfer_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_config_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_transfer_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_configs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] + # 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::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] + # A result object deserialized from the server's reply + def list_transfer_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_configs_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_transfer_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the schedule_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] + # 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::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] + # A result object deserialized from the server's reply + def schedule_transfer_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_schedule_transfer_runs_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: "schedule_transfer_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the start_manual_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] + # 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::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] + # A result object deserialized from the server's reply + def start_manual_transfer_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_manual_transfer_runs_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: "start_manual_transfer_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.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_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] + # 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::Bigquery::DataTransfer::V1::TransferRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] + # A result object deserialized from the server's reply + def get_transfer_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_run_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_transfer_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.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_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] + # 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_transfer_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_run_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_transfer_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] + # 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::Bigquery::DataTransfer::V1::ListTransferRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse] + # A result object deserialized from the server's reply + def list_transfer_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_runs_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_transfer_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.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_transfer_logs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] + # 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::Bigquery::DataTransfer::V1::ListTransferLogsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse] + # A result object deserialized from the server's reply + def list_transfer_logs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_logs_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_transfer_logs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the check_valid_creds REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] + # 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::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] + # A result object deserialized from the server's reply + def check_valid_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_check_valid_creds_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: "check_valid_creds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] + # 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 enroll_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enroll_data_sources_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: "enroll_data_sources", + 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 unenroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] + # 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 unenroll_data_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_unenroll_data_sources_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: "unenroll_data_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_source REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] + # 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_data_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] + # 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_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataSources", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] + # 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_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/transferConfigs", + body: "transfer_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/transferConfigs", + body: "transfer_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] + # 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_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{transfer_config.name}", + body: "transfer_config", + matches: [ + ["transfer_config.name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{transfer_config.name}", + body: "transfer_config", + matches: [ + ["transfer_config.name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] + # 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_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_transfer_config REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] + # 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_transfer_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transfer_configs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] + # 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_transfer_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the schedule_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_schedule_transfer_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:scheduleRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:scheduleRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_manual_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_manual_transfer_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:startManualRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:startManualRuns", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] + # 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_transfer_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_transfer_run REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] + # 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_transfer_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transfer_runs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] + # 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_transfer_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/runs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/runs", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_transfer_logs REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] + # 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_transfer_logs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferLogs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/transferLogs", + matches: [ + ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the check_valid_creds REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_check_valid_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:checkValidCreds", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:checkValidCreds", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enroll_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:enrollDataSources", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:enrollDataSources", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the unenroll_data_sources REST call + # + # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_unenroll_data_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:unenrollDataSources", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb new file mode 100644 index 000000000000..f6e1e405ec02 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" +require "google/cloud/bigquery/data_transfer/v1/bindings_override" +require "google/cloud/bigquery/data_transfer/v1/version" + +module Google + module Cloud + module Bigquery + module DataTransfer + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/data_transfer/v1/rest" + # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb new file mode 100644 index 000000000000..048f745f46a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataTransfer + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb new file mode 100644 index 000000000000..2e3350ee7636 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/datatransfer/v1/datatransfer.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/bigquery/datatransfer/v1/transfer_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n8google/cloud/bigquery/datatransfer/v1/datatransfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/bigquery/datatransfer/v1/transfer.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x8f\x05\n\x13\x44\x61taSourceParameter\x12\x10\n\x08param_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\x04type\x18\x04 \x01(\x0e\x32?.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type\x12\x10\n\x08required\x18\x05 \x01(\x08\x12\x10\n\x08repeated\x18\x06 \x01(\x08\x12\x18\n\x10validation_regex\x18\x07 \x01(\t\x12\x16\n\x0e\x61llowed_values\x18\x08 \x03(\t\x12/\n\tmin_value\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\tmax_value\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12J\n\x06\x66ields\x18\x0b \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x1e\n\x16validation_description\x18\x0c \x01(\t\x12\x1b\n\x13validation_help_url\x18\r \x01(\t\x12\x11\n\timmutable\x18\x0e \x01(\x08\x12\x0f\n\x07recurse\x18\x0f \x01(\x08\x12\x12\n\ndeprecated\x18\x14 \x01(\x08\"s\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\n\n\x06RECORD\x10\x05\x12\r\n\tPLUS_PAGE\x10\x06\x12\x08\n\x04LIST\x10\x07\"\x9c\t\n\nDataSource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x11\n\tclient_id\x18\x05 \x01(\t\x12\x0e\n\x06scopes\x18\x06 \x03(\t\x12N\n\rtransfer_type\x18\x07 \x01(\x0e\x32\x33.google.cloud.bigquery.datatransfer.v1.TransferTypeB\x02\x18\x01\x12\'\n\x1bsupports_multiple_transfers\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1f\n\x17update_deadline_seconds\x18\t \x01(\x05\x12\x18\n\x10\x64\x65\x66\x61ult_schedule\x18\n \x01(\t\x12 \n\x18supports_custom_schedule\x18\x0b \x01(\x08\x12N\n\nparameters\x18\x0c \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x10\n\x08help_url\x18\r \x01(\t\x12_\n\x12\x61uthorization_type\x18\x0e \x01(\x0e\x32\x43.google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType\x12\\\n\x11\x64\x61ta_refresh_type\x18\x0f \x01(\x0e\x32\x41.google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType\x12(\n default_data_refresh_window_days\x18\x10 \x01(\x05\x12\x1c\n\x14manual_runs_disabled\x18\x11 \x01(\x08\x12<\n\x19minimum_schedule_interval\x18\x12 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8a\x01\n\x11\x41uthorizationType\x12\"\n\x1e\x41UTHORIZATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41UTHORIZATION_CODE\x10\x01\x12\"\n\x1eGOOGLE_PLUS_AUTHORIZATION_CODE\x10\x02\x12\x15\n\x11\x46IRST_PARTY_OAUTH\x10\x03\"c\n\x0f\x44\x61taRefreshType\x12!\n\x1d\x44\x41TA_REFRESH_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLIDING_WINDOW\x10\x01\x12\x19\n\x15\x43USTOM_SLIDING_WINDOW\x10\x02:\xa5\x01\xea\x41\xa1\x01\n.bigquerydatatransfer.googleapis.com/DataSource\x12,projects/{project}/dataSources/{data_source}\x12\x41projects/{project}/locations/{location}/dataSources/{data_source}\"\\\n\x14GetDataSourceRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"\x87\x01\n\x16ListDataSourcesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigquerydatatransfer.googleapis.com/DataSource\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x80\x01\n\x17ListDataSourcesResponse\x12G\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.datatransfer.v1.DataSource\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x92\x02\n\x1b\x43reateTransferConfigRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12S\n\x0ftransfer_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"\xfc\x01\n\x1bUpdateTransferConfigRequest\x12S\n\x0ftransfer_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"d\n\x18GetTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"g\n\x1b\x44\x65leteTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"V\n\x15GetTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"Y\n\x18\x44\x65leteTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"\xa8\x01\n\x1aListTransferConfigsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x91\x01\n\x1bListTransferConfigsResponse\x12T\n\x10transfer_configs\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xde\x02\n\x17ListTransferRunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'bigquerydatatransfer.googleapis.com/Run\x12\x44\n\x06states\x18\x02 \x03(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12^\n\x0brun_attempt\x18\x05 \x01(\x0e\x32I.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt\"5\n\nRunAttempt\x12\x1b\n\x17RUN_ATTEMPT_UNSPECIFIED\x10\x00\x12\n\n\x06LATEST\x10\x01\"\x88\x01\n\x18ListTransferRunsResponse\x12N\n\rtransfer_runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRunB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xe0\x01\n\x17ListTransferLogsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12]\n\rmessage_types\x18\x06 \x03(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\"\x90\x01\n\x18ListTransferLogsResponse\x12V\n\x11transfer_messages\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.TransferMessageB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x16\x43heckValidCredsRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"2\n\x17\x43heckValidCredsResponse\x12\x17\n\x0fhas_valid_creds\x18\x01 \x01(\x08\"\xd1\x01\n\x1bScheduleTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"`\n\x1cScheduleTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"\x8a\x03\n\x1eStartManualTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12o\n\x14requested_time_range\x18\x03 \x01(\x0b\x32O.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRangeH\x00\x12\x38\n\x12requested_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x1ai\n\tTimeRange\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\n\x04time\"c\n\x1fStartManualTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"F\n\x18\x45nrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\"H\n\x1aUnenrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t2\xd5\"\n\x13\x44\x61taTransferService\x12\xe6\x01\n\rGetDataSource\x12;.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest\x1a\x31.google.cloud.bigquery.datatransfer.v1.DataSource\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\x12//v1/{name=projects/*/locations/*/dataSources/*}Z%\x12#/v1/{name=projects/*/dataSources/*}\x12\xf9\x01\n\x0fListDataSources\x12=.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest\x1a>.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse\"g\xda\x41\x06parent\x82\xd3\xe4\x93\x02X\x12//v1/{parent=projects/*/locations/*}/dataSourcesZ%\x12#/v1/{parent=projects/*}/dataSources\x12\xb6\x02\n\x14\x43reateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xa2\x01\xda\x41\x16parent,transfer_config\x82\xd3\xe4\x93\x02\x82\x01\"3/v1/{parent=projects/*/locations/*}/transferConfigs:\x0ftransfer_configZ:\"\'/v1/{parent=projects/*}/transferConfigs:\x0ftransfer_config\x12\xdb\x02\n\x14UpdateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xc7\x01\xda\x41\x1btransfer_config,update_mask\x82\xd3\xe4\x93\x02\xa2\x01\x32\x43/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}:\x0ftransfer_configZJ27/v1/{transfer_config.name=projects/*/transferConfigs/*}:\x0ftransfer_config\x12\xe1\x01\n\x14\x44\x65leteTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest\x1a\x16.google.protobuf.Empty\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`*3/v1/{name=projects/*/locations/*/transferConfigs/*}Z)*\'/v1/{name=projects/*/transferConfigs/*}\x12\xfa\x01\n\x11GetTransferConfig\x12?.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`\x12\x33/v1/{name=projects/*/locations/*/transferConfigs/*}Z)\x12\'/v1/{name=projects/*/transferConfigs/*}\x12\x8d\x02\n\x13ListTransferConfigs\x12\x41.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest\x1a\x42.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse\"o\xda\x41\x06parent\x82\xd3\xe4\x93\x02`\x12\x33/v1/{parent=projects/*/locations/*}/transferConfigsZ)\x12\'/v1/{parent=projects/*}/transferConfigs\x12\xcd\x02\n\x14ScheduleTransferRuns\x12\x42.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest\x1a\x43.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse\"\xab\x01\x88\x02\x01\xda\x41\x1aparent,start_time,end_time\x82\xd3\xe4\x93\x02\x84\x01\"B/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns:\x01*Z;\"6/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns:\x01*\x12\xbc\x02\n\x17StartManualTransferRuns\x12\x45.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest\x1a\x46.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse\"\x91\x01\x82\xd3\xe4\x93\x02\x8a\x01\"E/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns:\x01*Z>\"9/v1/{parent=projects/*/transferConfigs/*}:startManualRuns:\x01*\x12\xff\x01\n\x0eGetTransferRun\x12<.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest\x1a\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0\x12./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\xe9\x01\n\x11\x44\x65leteTransferRun\x12?.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest\x1a\x16.google.protobuf.Empty\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n*:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0*./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\x92\x02\n\x10ListTransferRuns\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse\"}\xda\x41\x06parent\x82\xd3\xe4\x93\x02n\x12:/v1/{parent=projects/*/locations/*/transferConfigs/*}/runsZ0\x12./v1/{parent=projects/*/transferConfigs/*}/runs\x12\xb2\x02\n\x10ListTransferLogs\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse\"\x9c\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8c\x01\x12I/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogsZ?\x12=/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs\x12\x9e\x02\n\x0f\x43heckValidCreds\x12=.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest\x1a>.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse\"\x8b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02~\"?/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds:\x01*Z8\"3/v1/{name=projects/*/dataSources/*}:checkValidCreds:\x01*\x12\xda\x01\n\x11\x45nrollDataSources\x12?.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"l\x82\xd3\xe4\x93\x02\x66\"3/v1/{name=projects/*/locations/*}:enrollDataSources:\x01*Z,\"\'/v1/{name=projects/*}:enrollDataSources:\x01*\x12\xb2\x01\n\x13UnenrollDataSources\x12\x41.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*}:unenrollDataSources:\x01*\x1aW\xca\x41#bigquerydatatransfer.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8b\x02\n)com.google.cloud.bigquery.datatransfer.v1B\x11\x44\x61taTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + DataSourceParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter").msgclass + DataSourceParameter::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type").enummodule + DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource").msgclass + DataSource::AuthorizationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType").enummodule + DataSource::DataRefreshType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType").enummodule + GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest").msgclass + ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest").msgclass + ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse").msgclass + CreateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest").msgclass + UpdateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest").msgclass + GetTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest").msgclass + DeleteTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest").msgclass + GetTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest").msgclass + DeleteTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest").msgclass + ListTransferConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest").msgclass + ListTransferConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse").msgclass + ListTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest").msgclass + ListTransferRunsRequest::RunAttempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt").enummodule + ListTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse").msgclass + ListTransferLogsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest").msgclass + ListTransferLogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse").msgclass + CheckValidCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest").msgclass + CheckValidCredsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse").msgclass + ScheduleTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest").msgclass + ScheduleTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse").msgclass + StartManualTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest").msgclass + StartManualTransferRunsRequest::TimeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange").msgclass + StartManualTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse").msgclass + EnrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest").msgclass + UnenrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb new file mode 100644 index 000000000000..87f710bad15b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb @@ -0,0 +1,99 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto for package 'Google.Cloud.Bigquery.DataTransfer.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigquery/datatransfer/v1/datatransfer_pb' + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + module DataTransferService + # This API allows users to manage their data transfers into BigQuery. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.datatransfer.v1.DataTransferService' + + # Retrieves a supported data source and returns its settings. + rpc :GetDataSource, ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource + # Lists supported data sources and returns their settings. + rpc :ListDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse + # Creates a new data transfer configuration. + rpc :CreateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig + # Updates a data transfer configuration. + # All fields must be set, even if they are not updated. + rpc :UpdateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig + # Deletes a data transfer configuration, including any associated transfer + # runs and logs. + rpc :DeleteTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Google::Protobuf::Empty + # Returns information about a data transfer config. + rpc :GetTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig + # Returns information about all transfer configs owned by a project in the + # specified location. + rpc :ListTransferConfigs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse + # Creates transfer runs for a time range [start_time, end_time]. + # For each date - or whatever granularity the data source supports - in the + # range, one transfer run is created. + # Note that runs are created per UTC time in the time range. + # DEPRECATED: use StartManualTransferRuns instead. + rpc :ScheduleTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse + # Start manual transfer runs to be executed now with schedule_time equal to + # current time. The transfer runs can be created for a time range where the + # run_time is between start_time (inclusive) and end_time (exclusive), or for + # a specific run_time. + rpc :StartManualTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse + # Returns information about the particular transfer run. + rpc :GetTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun + # Deletes the specified transfer run. + rpc :DeleteTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Google::Protobuf::Empty + # Returns information about running and completed transfer runs. + rpc :ListTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse + # Returns log messages for the transfer run. + rpc :ListTransferLogs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse + # Returns true if valid credentials exist for the given data source and + # requesting user. + rpc :CheckValidCreds, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse + # Enroll data sources in a user project. This allows users to create transfer + # configurations for these data sources. They will also appear in the + # ListDataSources RPC and as such, will appear in the + # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents + # can be found in the public guide for + # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and + # [Data Transfer + # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). + rpc :EnrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Google::Protobuf::Empty + # Unenroll data sources in a user project. This allows users to remove + # transfer configurations for these data sources. They will no longer appear + # in the ListDataSources RPC and will also no longer appear in the [BigQuery + # UI](https://console.cloud.google.com/bigquery). Data transfers + # configurations of unenrolled data sources will not be scheduled. + rpc :UnenrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb new file mode 100644 index 000000000000..6e1bfea6e14f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/datatransfer/v1/transfer.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n4google/cloud/bigquery/datatransfer/v1/transfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"0\n\x10\x45mailPreferences\x12\x1c\n\x14\x65nable_failure_email\x18\x01 \x01(\x08\"\x90\x01\n\x0fScheduleOptions\x12\x1f\n\x17\x64isable_auto_scheduling\x18\x03 \x01(\x08\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa7\x02\n\x11ScheduleOptionsV2\x12W\n\x13time_based_schedule\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.TimeBasedScheduleH\x00\x12P\n\x0fmanual_schedule\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.ManualScheduleH\x00\x12[\n\x15\x65vent_driven_schedule\x18\x03 \x01(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.EventDrivenScheduleH\x00\x42\n\n\x08schedule\"\x83\x01\n\x11TimeBasedSchedule\x12\x10\n\x08schedule\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x10\n\x0eManualSchedule\"2\n\x13\x45ventDrivenSchedule\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\t\"(\n\x08UserInfo\x12\x12\n\x05\x65mail\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_email\"\x9b\t\n\x0eTransferConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12 \n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tH\x00\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x61ta_source_id\x18\x05 \x01(\t\x12\'\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08schedule\x18\x07 \x01(\t\x12P\n\x10schedule_options\x18\x18 \x01(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.ScheduleOptions\x12U\n\x13schedule_options_v2\x18\x1f \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2\x12 \n\x18\x64\x61ta_refresh_window_days\x18\x0c \x01(\x05\x12\x10\n\x08\x64isabled\x18\r \x01(\x08\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rnext_run_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\n \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferStateB\x03\xe0\x41\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x1b\n\x0e\x64\x61taset_region\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12!\n\x19notification_pubsub_topic\x18\x0f \x01(\t\x12R\n\x11\x65mail_preferences\x18\x12 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferences\x12M\n\nowner_info\x18\x1b \x01(\x0b\x32/.google.cloud.bigquery.datatransfer.v1.UserInfoB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12`\n\x18\x65ncryption_configuration\x18\x1c \x01(\x0b\x32>.google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration\x12&\n\x05\x65rror\x18 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:\xb9\x01\xea\x41\xb5\x01\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x34projects/{project}/transferConfigs/{transfer_config}\x12Iprojects/{project}/locations/{location}/transferConfigs/{transfer_config}B\r\n\x0b\x64\x65stinationB\r\n\x0b_owner_info\"M\n\x17\x45ncryptionConfiguration\x12\x32\n\x0ckms_key_name\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValue\"\xff\x06\n\x0bTransferRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x31\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08run_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12(\n\x0c\x65rror_status\x18\x15 \x01(\x0b\x32\x12.google.rpc.Status\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_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,\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12%\n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x15\n\x08schedule\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12&\n\x19notification_pubsub_topic\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12W\n\x11\x65mail_preferences\x18\x19 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferencesB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n\'bigquerydatatransfer.googleapis.com/Run\x12?projects/{project}/transferConfigs/{transfer_config}/runs/{run}\x12Tprojects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}B\r\n\x0b\x64\x65stination\"\x8a\x02\n\x0fTransferMessage\x12\x30\n\x0cmessage_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x08severity\x18\x02 \x01(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\x12\x14\n\x0cmessage_text\x18\x03 \x01(\t\"U\n\x0fMessageSeverity\x12 \n\x1cMESSAGE_SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03*K\n\x0cTransferType\x12\x1d\n\x19TRANSFER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41TCH\x10\x01\x12\r\n\tSTREAMING\x10\x02\x1a\x02\x18\x01*s\n\rTransferState\x12\x1e\n\x1aTRANSFER_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x42\x8f\x02\n)com.google.cloud.bigquery.datatransfer.v1B\rTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xa2\x02\x05GCBDT\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module DataTransfer + module V1 + EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EmailPreferences").msgclass + ScheduleOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptions").msgclass + ScheduleOptionsV2 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2").msgclass + TimeBasedSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule").msgclass + ManualSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ManualSchedule").msgclass + EventDrivenSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule").msgclass + UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UserInfo").msgclass + TransferConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferConfig").msgclass + EncryptionConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration").msgclass + TransferRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferRun").msgclass + TransferMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage").msgclass + TransferMessage::MessageSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity").enummodule + TransferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferType").enummodule + TransferState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferState").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md new file mode 100644 index 000000000000..614f3cdea732 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Data Transfer Service 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-bigquery-data_transfer-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb new file mode 100644 index 000000000000..8aee7c146a1f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb @@ -0,0 +1,726 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataTransfer + module V1 + # A parameter used to define custom fields in a data source definition. + # @!attribute [rw] param_id + # @return [::String] + # Parameter identifier. + # @!attribute [rw] display_name + # @return [::String] + # Parameter display name in the user interface. + # @!attribute [rw] description + # @return [::String] + # Parameter description. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter::Type] + # Parameter type. + # @!attribute [rw] required + # @return [::Boolean] + # Is parameter required. + # @!attribute [rw] repeated + # @return [::Boolean] + # Deprecated. This field has no effect. + # @!attribute [rw] validation_regex + # @return [::String] + # Regular expression which can be used for parameter validation. + # @!attribute [rw] allowed_values + # @return [::Array<::String>] + # All possible values for the parameter. + # @!attribute [rw] min_value + # @return [::Google::Protobuf::DoubleValue] + # For integer and double values specifies minimum allowed value. + # @!attribute [rw] max_value + # @return [::Google::Protobuf::DoubleValue] + # For integer and double values specifies maximum allowed value. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] + # Deprecated. This field has no effect. + # @!attribute [rw] validation_description + # @return [::String] + # Description of the requirements for this field, in case the user input does + # not fulfill the regex pattern or min/max values. + # @!attribute [rw] validation_help_url + # @return [::String] + # URL to a help document to further explain the naming requirements. + # @!attribute [rw] immutable + # @return [::Boolean] + # Cannot be changed after initial creation. + # @!attribute [rw] recurse + # @return [::Boolean] + # Deprecated. This field has no effect. + # @!attribute [rw] deprecated + # @return [::Boolean] + # If true, it should not be used in new transfers, and it should not be + # visible to users. + class DataSourceParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Parameter type. + module Type + # Type unspecified. + TYPE_UNSPECIFIED = 0 + + # String parameter. + STRING = 1 + + # Integer parameter (64-bits). + # Will be serialized to json as string. + INTEGER = 2 + + # Double precision floating point parameter. + DOUBLE = 3 + + # Boolean parameter. + BOOLEAN = 4 + + # Deprecated. This field has no effect. + RECORD = 5 + + # Page ID for a Google+ Page. + PLUS_PAGE = 6 + + # List of strings parameter. + LIST = 7 + end + end + + # Defines the properties and custom parameters for a data source. + # @!attribute [r] name + # @return [::String] + # Output only. Data source resource name. + # @!attribute [rw] data_source_id + # @return [::String] + # Data source id. + # @!attribute [rw] display_name + # @return [::String] + # User friendly data source name. + # @!attribute [rw] description + # @return [::String] + # User friendly data source description string. + # @!attribute [rw] client_id + # @return [::String] + # Data source client id which should be used to receive refresh token. + # @!attribute [rw] scopes + # @return [::Array<::String>] + # Api auth scopes for which refresh token needs to be obtained. These are + # scopes needed by a data source to prepare data and ingest them into + # BigQuery, e.g., https://www.googleapis.com/auth/bigquery + # @!attribute [rw] transfer_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferType] + # Deprecated. This field has no effect. + # @!attribute [rw] supports_multiple_transfers + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Deprecated. This field has no effect. + # @!attribute [rw] update_deadline_seconds + # @return [::Integer] + # The number of seconds to wait for an update from the data source + # before the Data Transfer Service marks the transfer as FAILED. + # @!attribute [rw] default_schedule + # @return [::String] + # Default data transfer schedule. + # Examples of valid schedules include: + # `1st,3rd monday of month 15:30`, + # `every wed,fri of jan,jun 13:15`, and + # `first sunday of quarter 00:00`. + # @!attribute [rw] supports_custom_schedule + # @return [::Boolean] + # Specifies whether the data source supports a user defined schedule, or + # operates on the default schedule. + # When set to `true`, user can override default schedule. + # @!attribute [rw] parameters + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] + # Data source parameters. + # @!attribute [rw] help_url + # @return [::String] + # Url for the help document for this data source. + # @!attribute [rw] authorization_type + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::AuthorizationType] + # Indicates the type of authorization. + # @!attribute [rw] data_refresh_type + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::DataRefreshType] + # Specifies whether the data source supports automatic data refresh for the + # past few days, and how it's supported. + # For some data sources, data might not be complete until a few days later, + # so it's useful to refresh data automatically. + # @!attribute [rw] default_data_refresh_window_days + # @return [::Integer] + # Default data refresh window on days. + # Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. + # @!attribute [rw] manual_runs_disabled + # @return [::Boolean] + # Disables backfilling and manual run scheduling + # for the data source. + # @!attribute [rw] minimum_schedule_interval + # @return [::Google::Protobuf::Duration] + # The minimum interval for scheduler to schedule runs. + class DataSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of authorization needed for this data source. + module AuthorizationType + # Type unspecified. + AUTHORIZATION_TYPE_UNSPECIFIED = 0 + + # Use OAuth 2 authorization codes that can be exchanged + # for a refresh token on the backend. + AUTHORIZATION_CODE = 1 + + # Return an authorization code for a given Google+ page that can then be + # exchanged for a refresh token on the backend. + GOOGLE_PLUS_AUTHORIZATION_CODE = 2 + + # Use First Party OAuth. + FIRST_PARTY_OAUTH = 3 + end + + # Represents how the data source supports data auto refresh. + module DataRefreshType + # The data source won't support data auto refresh, which is default value. + DATA_REFRESH_TYPE_UNSPECIFIED = 0 + + # The data source supports data auto refresh, and runs will be scheduled + # for the past few days. Does not allow custom values to be set for each + # transfer config. + SLIDING_WINDOW = 1 + + # The data source supports data auto refresh, and runs will be scheduled + # for the past few days. Allows custom values to be set for each transfer + # config. + CUSTOM_SLIDING_WINDOW = 2 + end + end + + # A request to get data source info. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` + class GetDataSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list supported data sources and their data transfer settings. + # @!attribute [rw] parent + # @return [::String] + # Required. The BigQuery project id for which data sources should be + # returned. Must be in the form: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListDataSourcesRequest` list results. For multiple-page + # results, `ListDataSourcesResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + class ListDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Returns list of supported data sources and their metadata. + # @!attribute [rw] data_sources + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] + # List of supported data sources and their transfer settings. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `ListDataSourcesRequest.page_token` + # to request the next page of list results. + class ListDataSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a data transfer configuration. If new credentials are + # needed for this transfer configuration, authorization info must be provided. + # If authorization info is provided, the transfer configuration will be + # associated with the user id corresponding to the authorization info. + # Otherwise, the transfer configuration will be associated with the calling + # user. + # + # When using a cross project service account for creating a transfer config, + # you must enable cross project service account usage. For more information, + # see [Disable attachment of service accounts to resources in other + # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). + # @!attribute [rw] parent + # @return [::String] + # Required. The BigQuery project id where the transfer configuration should + # be created. Must be in the format + # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If + # specified location and location of the destination bigquery dataset do not + # match - the request will fail. + # @!attribute [rw] transfer_config + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # Required. Data transfer configuration to create. + # @!attribute [rw] authorization_code + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @!attribute [rw] version_info + # @return [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # create the transfer config. + # @!attribute [rw] service_account_name + # @return [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + class CreateTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a transfer configuration. To update the user id of the + # transfer configuration, authorization info needs to be provided. + # + # When using a cross project service account for updating a transfer config, + # you must enable cross project service account usage. For more information, + # see [Disable attachment of service accounts to resources in other + # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). + # @!attribute [rw] transfer_config + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] + # Required. Data transfer configuration to create. + # @!attribute [rw] authorization_code + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: Authorization code was required when + # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used + # in any data sources. Use `version_info` instead. + # + # Optional OAuth2 authorization code to use with this transfer configuration. + # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' + # and new credentials are needed, as indicated by `CheckValidCreds`. In order + # to obtain authorization_code, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Required list of fields to be updated in this request. + # @!attribute [rw] version_info + # @return [::String] + # Optional version info. This parameter replaces `authorization_code` which + # is no longer used in any data sources. This is required only if + # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials + # are needed, as indicated by `CheckValidCreds`. In order to obtain version + # info, make a request to the following URL: + #
+          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
+          #     
+ # * The client_id is the OAuth client_id of the data source as + # returned by ListDataSources method. + # * data_source_scopes are the scopes returned by ListDataSources + # method. + # + # Note that this should not be set when `service_account_name` is used to + # update the transfer config. + # @!attribute [rw] service_account_name + # @return [::String] + # Optional service account email. If this field is set, the transfer config + # will be created with this service account's credentials. It requires that + # the requesting user calling this API has permissions to act as this service + # account. + # + # Note that not all data sources support service account credentials when + # creating a transfer config. For the latest list of data sources, read about + # [using service + # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). + class UpdateTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get data transfer information. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + class GetTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete data transfer information. All associated transfer runs + # and log messages will be deleted as well. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + class DeleteTransferConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get data transfer run information. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + class GetTransferRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete data transfer run information. + # @!attribute [rw] name + # @return [::String] + # Required. The field will contain name of the resource requested, for + # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + # or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + class DeleteTransferRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list data transfers configured for a BigQuery project. + # @!attribute [rw] parent + # @return [::String] + # Required. The BigQuery project id for which transfer configs + # should be returned: `projects/{project_id}` or + # `projects/{project_id}/locations/{location_id}` + # @!attribute [rw] data_source_ids + # @return [::Array<::String>] + # When specified, only configurations of requested data sources are returned. + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransfersRequest` list results. For multiple-page + # results, `ListTransfersResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + class ListTransferConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The returned list of pipelines in the project. + # @!attribute [r] transfer_configs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] + # Output only. The stored pipeline transfer configurations. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `ListTransferConfigsRequest.page_token` + # to request the next page of list results. + class ListTransferConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list data transfer runs. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of transfer configuration for which transfer runs should be + # retrieved. Format of transfer configuration resource name is: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @!attribute [rw] states + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] + # When specified, only transfer runs with requested states are returned. + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferRunsRequest` list results. For multiple-page + # results, `ListTransferRunsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @!attribute [rw] run_attempt + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] + # Indicates how run attempts are to be pulled. + class ListTransferRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents which runs should be pulled. + module RunAttempt + # All runs should be returned. + RUN_ATTEMPT_UNSPECIFIED = 0 + + # Only latest run per day should be returned. + LATEST = 1 + end + end + + # The returned list of pipelines in the project. + # @!attribute [r] transfer_runs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # Output only. The stored pipeline transfer runs. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `ListTransferRunsRequest.page_token` + # to request the next page of list results. + class ListTransferRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get user facing log messages associated with data transfer run. + # @!attribute [rw] parent + # @return [::String] + # Required. Transfer run name in the form: + # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` + # @!attribute [rw] page_token + # @return [::String] + # Pagination token, which can be used to request a specific page + # of `ListTransferLogsRequest` list results. For multiple-page + # results, `ListTransferLogsResponse` outputs + # a `next_page` token, which can be used as the + # `page_token` value to request the next page of list results. + # @!attribute [rw] page_size + # @return [::Integer] + # Page size. The default page size is the maximum value of 1000 results. + # @!attribute [rw] message_types + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] + # Message types to return. If not populated - INFO, WARNING and ERROR + # messages are returned. + class ListTransferLogsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The returned list transfer run messages. + # @!attribute [r] transfer_messages + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] + # Output only. The stored pipeline transfer messages. + # @!attribute [r] next_page_token + # @return [::String] + # Output only. The next-pagination token. For multiple-page list results, + # this token can be used as the + # `GetTransferRunLogRequest.page_token` + # to request the next page of list results. + class ListTransferLogsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to determine whether the user has valid credentials. This method + # is used to limit the number of OAuth popups in the user interface. The + # user id is inferred from the API call context. + # If the data source has the Google+ authorization type, this method + # returns false, as it cannot be determined whether the credentials are + # already valid merely based on the user id. + # @!attribute [rw] name + # @return [::String] + # Required. The data source in the form: + # `projects/{project_id}/dataSources/{data_source_id}` or + # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. + class CheckValidCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response indicating whether the credentials exist and are valid. + # @!attribute [rw] has_valid_creds + # @return [::Boolean] + # If set to `true`, the credentials exist and are valid. + class CheckValidCredsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to schedule transfer runs for a time range. + # @!attribute [rw] parent + # @return [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Required. Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. + class ScheduleTransferRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to schedule transfer runs for a time range. + # @!attribute [rw] runs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # The transfer runs that were scheduled. + class ScheduleTransferRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to start manual transfer runs. + # @!attribute [rw] parent + # @return [::String] + # Required. Transfer configuration name in the form: + # `projects/{project_id}/transferConfigs/{config_id}` or + # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. + # @!attribute [rw] requested_time_range + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange] + # A time_range start and end timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_time_range must be a past time and cannot include future time + # values. + # + # Note: The following fields are mutually exclusive: `requested_time_range`, `requested_run_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] requested_run_time + # @return [::Google::Protobuf::Timestamp] + # A run_time timestamp for historical data files or reports + # that are scheduled to be transferred by the scheduled transfer run. + # requested_run_time must be a past time and cannot include future time + # values. + # + # Note: The following fields are mutually exclusive: `requested_run_time`, `requested_time_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class StartManualTransferRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A specification for a time range, this will request transfer runs with + # run_time between start_time (inclusive) and end_time (exclusive). + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start time of the range of transfer runs. For example, + # `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than + # the end_time. Creates transfer runs where run_time is in the range + # between start_time (inclusive) and end_time (exclusive). + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End time of the range of transfer runs. For example, + # `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. + # Creates transfer runs where run_time is in the range between start_time + # (inclusive) and end_time (exclusive). + class TimeRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A response to start manual transfer runs. + # @!attribute [rw] runs + # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] + # The transfer runs that were created. + class StartManualTransferRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to enroll a set of data sources so they are visible in the + # BigQuery UI's `Transfer` tab. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @!attribute [rw] data_source_ids + # @return [::Array<::String>] + # Data sources that are enrolled. It is required to provide at least one + # data source id. + class EnrollDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to unenroll a set of data sources so they are no longer visible in + # the BigQuery UI's `Transfer` tab. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the project resource in the form: + # `projects/{project_id}` + # @!attribute [rw] data_source_ids + # @return [::Array<::String>] + # Data sources that are unenrolled. It is required to provide at least one + # data source id. + class UnenrollDataSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb new file mode 100644 index 000000000000..f655c166e495 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb @@ -0,0 +1,411 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module DataTransfer + module V1 + # Represents preferences for sending email notifications for transfer run + # events. + # @!attribute [rw] enable_failure_email + # @return [::Boolean] + # If true, email notifications will be sent on transfer run failures. + class EmailPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing the data transfer schedule. + # @!attribute [rw] disable_auto_scheduling + # @return [::Boolean] + # If true, automatic scheduling of data transfer runs for this configuration + # will be disabled. The runs can be started on ad-hoc basis using + # StartManualTransferRuns API. When automatic scheduling is disabled, the + # TransferConfig.schedule field will be ignored. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Specifies time to start scheduling transfer runs. The first run will be + # scheduled at or after the start time according to a recurrence pattern + # defined in the schedule string. The start time can be changed at any + # moment. The time when a data transfer can be triggered manually is not + # limited by this option. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Defines time to stop scheduling transfer runs. A transfer run cannot be + # scheduled at or after the end time. The end time can be changed at any + # moment. The time when a data transfer can be triggered manually is not + # limited by this option. + class ScheduleOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # V2 options customizing different types of data transfer schedule. + # This field supports existing time-based and manual transfer schedule. Also + # supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used + # together with ScheduleOptions/Schedule. + # @!attribute [rw] time_based_schedule + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TimeBasedSchedule] + # Time based transfer schedule options. This is the default schedule + # option. + # + # Note: The following fields are mutually exclusive: `time_based_schedule`, `manual_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] manual_schedule + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ManualSchedule] + # Manual transfer schedule. If set, the transfer run will not be + # auto-scheduled by the system, unless the client invokes + # StartManualTransferRuns. This is equivalent to + # disable_auto_scheduling = true. + # + # Note: The following fields are mutually exclusive: `manual_schedule`, `time_based_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] event_driven_schedule + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EventDrivenSchedule] + # Event driven transfer schedule options. If set, the transfer will be + # scheduled upon events arrial. + # + # Note: The following fields are mutually exclusive: `event_driven_schedule`, `time_based_schedule`, `manual_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ScheduleOptionsV2 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing the time based transfer schedule. + # Options are migrated from the original ScheduleOptions message. + # @!attribute [rw] schedule + # @return [::String] + # Data transfer schedule. + # If the data source does not support a custom schedule, this should be + # empty. If it is empty, the default value for the data source will be used. + # The specified times are in UTC. + # Examples of valid format: + # `1st,3rd monday of month 15:30`, + # `every wed,fri of jan,jun 13:15`, and + # `first sunday of quarter 00:00`. + # See more explanation about the format here: + # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + # + # NOTE: The minimum interval time between recurring transfers depends on the + # data source; refer to the documentation for your data source. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Specifies time to start scheduling transfer runs. The first run will be + # scheduled at or after the start time according to a recurrence pattern + # defined in the schedule string. The start time can be changed at any + # moment. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Defines time to stop scheduling transfer runs. A transfer run cannot be + # scheduled at or after the end time. The end time can be changed at any + # moment. + class TimeBasedSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing manual transfers schedule. + class ManualSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options customizing EventDriven transfers schedule. + # @!attribute [rw] pubsub_subscription + # @return [::String] + # Pub/Sub subscription name used to receive events. + # Only Google Cloud Storage data source support this option. + # Format: projects/\\{project}/subscriptions/\\{subscription} + class EventDrivenSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about a user. + # @!attribute [rw] email + # @return [::String] + # E-mail address of the user. + class UserInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a data transfer configuration. A transfer configuration + # contains all metadata needed to perform a data transfer. For example, + # `destination_dataset_id` specifies where data should be stored. + # When a new transfer configuration is created, the specified + # `destination_dataset_id` is created when needed and shared with the + # appropriate data source service account. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the transfer config. + # Transfer config names have the form either + # `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or + # `projects/{project_id}/transferConfigs/{config_id}`, + # where `config_id` is usually a UUID, even though it is not + # guaranteed or required. The name is ignored when creating a transfer + # config. + # @!attribute [rw] destination_dataset_id + # @return [::String] + # The BigQuery target dataset id. + # @!attribute [rw] display_name + # @return [::String] + # User specified display name for the data transfer. + # @!attribute [rw] data_source_id + # @return [::String] + # Data source ID. This cannot be changed once data transfer is created. The + # full list of available data source IDs can be returned through an API call: + # https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list + # @!attribute [rw] params + # @return [::Google::Protobuf::Struct] + # Parameters specific to each data source. For more information see the + # bq tab in the 'Setting up a data transfer' section for each data source. + # For example the parameters for Cloud Storage transfers are listed here: + # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + # @!attribute [rw] schedule + # @return [::String] + # Data transfer schedule. + # If the data source does not support a custom schedule, this should be + # empty. If it is empty, the default value for the data source will be used. + # The specified times are in UTC. + # Examples of valid format: + # `1st,3rd monday of month 15:30`, + # `every wed,fri of jan,jun 13:15`, and + # `first sunday of quarter 00:00`. + # See more explanation about the format here: + # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format + # + # NOTE: The minimum interval time between recurring transfers depends on the + # data source; refer to the documentation for your data source. + # @!attribute [rw] schedule_options + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptions] + # Options customizing the data transfer schedule. + # @!attribute [rw] schedule_options_v2 + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptionsV2] + # Options customizing different types of data transfer schedule. + # This field replaces "schedule" and "schedule_options" fields. + # ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. + # @!attribute [rw] data_refresh_window_days + # @return [::Integer] + # The number of days to look back to automatically refresh the data. + # For example, if `data_refresh_window_days = 10`, then every day + # BigQuery reingests data for [today-10, today-1], rather than ingesting data + # for just [today-1]. + # Only valid if the data source supports the feature. Set the value to 0 + # to use the default value. + # @!attribute [rw] disabled + # @return [::Boolean] + # Is this config disabled. When set to true, no runs will be scheduled for + # this transfer config. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Data transfer modification time. Ignored by server on input. + # @!attribute [r] next_run_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Next time when data transfer will run. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] + # Output only. State of the most recently updated transfer run. + # @!attribute [rw] user_id + # @return [::Integer] + # Deprecated. Unique ID of the user on whose behalf transfer is done. + # @!attribute [r] dataset_region + # @return [::String] + # Output only. Region in which BigQuery dataset is located. + # @!attribute [rw] notification_pubsub_topic + # @return [::String] + # Pub/Sub topic where notifications will be sent after transfer runs + # associated with this transfer config finish. + # + # The format for specifying a pubsub topic is: + # `projects/{project_id}/topics/{topic_id}` + # @!attribute [rw] email_preferences + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] + # Email notifications will be sent according to these preferences + # to the email address of the user who owns this transfer config. + # @!attribute [r] owner_info + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::UserInfo] + # Output only. Information about the user whose credentials are used to + # transfer data. Populated only for `transferConfigs.get` requests. In case + # the user information is not available, this field will not be populated. + # @!attribute [rw] encryption_configuration + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EncryptionConfiguration] + # The encryption configuration part. Currently, it is only used for the + # optional KMS key name. The BigQuery service account of your project must be + # granted permissions to use the key. Read methods will return the key name + # applied in effect. Write methods will apply the key if it is present, or + # otherwise try to apply project default keys if it is absent. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. Error code with detailed information about reason of the + # latest config failure. + class TransferConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the encryption configuration for a transfer. + # @!attribute [rw] kms_key_name + # @return [::Google::Protobuf::StringValue] + # The name of the KMS key used for encrypting BigQuery data. + class EncryptionConfiguration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a data transfer run. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the transfer run. + # Transfer run names have the form + # `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. + # The name is ignored when creating a transfer run. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # Minimum time after which a transfer run can be started. + # @!attribute [rw] run_time + # @return [::Google::Protobuf::Timestamp] + # For batch transfer runs, specifies the date and time of the data should be + # ingested. + # @!attribute [rw] error_status + # @return [::Google::Rpc::Status] + # Status of the transfer run. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when transfer run was started. + # Parameter ignored by server for input requests. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when transfer run ended. + # Parameter ignored by server for input requests. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last time the data transfer run state was updated. + # @!attribute [r] params + # @return [::Google::Protobuf::Struct] + # Output only. Parameters specific to each data source. For more information + # see the bq tab in the 'Setting up a data transfer' section for each data + # source. For example the parameters for Cloud Storage transfers are listed + # here: + # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq + # @!attribute [r] destination_dataset_id + # @return [::String] + # Output only. The BigQuery target dataset id. + # @!attribute [r] data_source_id + # @return [::String] + # Output only. Data source id. + # @!attribute [rw] state + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] + # Data transfer run state. Ignored for input requests. + # @!attribute [rw] user_id + # @return [::Integer] + # Deprecated. Unique ID of the user on whose behalf transfer is done. + # @!attribute [r] schedule + # @return [::String] + # Output only. Describes the schedule of this transfer run if it was + # created as part of a regular schedule. For batch transfer runs that are + # scheduled manually, this is empty. + # NOTE: the system might choose to delay the schedule depending on the + # current load, so `schedule_time` doesn't always match this. + # @!attribute [r] notification_pubsub_topic + # @return [::String] + # Output only. Pub/Sub topic where a notification will be sent after this + # transfer run finishes. + # + # The format for specifying a pubsub topic is: + # `projects/{project_id}/topics/{topic_id}` + # @!attribute [r] email_preferences + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] + # Output only. Email notifications will be sent according to these + # preferences to the email address of the user who owns the transfer config + # this run was derived from. + class TransferRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a user facing message for a particular data transfer run. + # @!attribute [rw] message_time + # @return [::Google::Protobuf::Timestamp] + # Time when message was logged. + # @!attribute [rw] severity + # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity] + # Message severity. + # @!attribute [rw] message_text + # @return [::String] + # Message text. + class TransferMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents data transfer user facing message severity. + module MessageSeverity + # No severity specified. + MESSAGE_SEVERITY_UNSPECIFIED = 0 + + # Informational message. + INFO = 1 + + # Warning message. + WARNING = 2 + + # Error message. + ERROR = 3 + end + end + + # DEPRECATED. Represents data transfer type. + # @deprecated This enum is deprecated and may be removed in the next major version update. + module TransferType + # Invalid or Unknown transfer type placeholder. + TRANSFER_TYPE_UNSPECIFIED = 0 + + # Batch data transfer. + BATCH = 1 + + # Streaming data transfer. Streaming data source currently doesn't + # support multiple transfer configs per project. + STREAMING = 2 + end + + # Represents data transfer run state. + module TransferState + # State placeholder (0). + TRANSFER_STATE_UNSPECIFIED = 0 + + # Data transfer is scheduled and is waiting to be picked up by + # data transfer backend (2). + PENDING = 2 + + # Data transfer is in progress (3). + RUNNING = 3 + + # Data transfer completed successfully (4). + SUCCEEDED = 4 + + # Data transfer failed (5). + FAILED = 5 + + # Data transfer is cancelled (6). + CANCELLED = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile new file mode 100644 index 000000000000..f317b2ca6a31 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1", path: "../" +else + gem "google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb new file mode 100644 index 000000000000..c280cada5a84 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.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 bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the check_valid_creds call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds. +# +def check_valid_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new + + # Call the check_valid_creds method. + result = client.check_valid_creds request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb new file mode 100644 index 000000000000..8d85ed804920 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the create_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config. +# +def create_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new + + # Call the create_transfer_config method. + result = client.create_transfer_config request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb new file mode 100644 index 000000000000..5b85f2a09133 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the delete_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config. +# +def delete_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new + + # Call the delete_transfer_config method. + result = client.delete_transfer_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb new file mode 100644 index 000000000000..96cbd5325d48 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.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 bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the delete_transfer_run call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run. +# +def delete_transfer_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new + + # Call the delete_transfer_run method. + result = client.delete_transfer_run request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb new file mode 100644 index 000000000000..0aa1d48f390c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.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 bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the enroll_data_sources call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources. +# +def enroll_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new + + # Call the enroll_data_sources method. + result = client.enroll_data_sources request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb new file mode 100644 index 000000000000..0883819624a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.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 bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the get_data_source call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source. +# +def get_data_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new + + # Call the get_data_source method. + result = client.get_data_source request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb new file mode 100644 index 000000000000..0a34e0c405ac --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the get_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config. +# +def get_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new + + # Call the get_transfer_config method. + result = client.get_transfer_config request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb new file mode 100644 index 000000000000..76369885f83e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.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 bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the get_transfer_run call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run. +# +def get_transfer_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new + + # Call the get_transfer_run method. + result = client.get_transfer_run request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb new file mode 100644 index 000000000000..5d17514eec9d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.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 bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_data_sources call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources. +# +def list_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new + + # Call the list_data_sources method. + result = client.list_data_sources 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::Bigquery::DataTransfer::V1::DataSource. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb new file mode 100644 index 000000000000..1d837326d842 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.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 bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_transfer_configs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs. +# +def list_transfer_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new + + # Call the list_transfer_configs method. + result = client.list_transfer_configs 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::Bigquery::DataTransfer::V1::TransferConfig. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb new file mode 100644 index 000000000000..5b6589ed7c49 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.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 bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_transfer_logs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs. +# +def list_transfer_logs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new + + # Call the list_transfer_logs method. + result = client.list_transfer_logs 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::Bigquery::DataTransfer::V1::TransferMessage. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb new file mode 100644 index 000000000000..7bdea24c0b01 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.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 bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the list_transfer_runs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs. +# +def list_transfer_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new + + # Call the list_transfer_runs method. + result = client.list_transfer_runs 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::Bigquery::DataTransfer::V1::TransferRun. + p item + end +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb new file mode 100644 index 000000000000..0f581bd7b3d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.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 bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the schedule_transfer_runs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs. +# +def schedule_transfer_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new + + # Call the schedule_transfer_runs method. + result = client.schedule_transfer_runs request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb new file mode 100644 index 000000000000..5eae9585a6dc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.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 bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the start_manual_transfer_runs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs. +# +def start_manual_transfer_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new + + # Call the start_manual_transfer_runs method. + result = client.start_manual_transfer_runs request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb new file mode 100644 index 000000000000..0f13ef52ede7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.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 bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the unenroll_data_sources call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources. +# +def unenroll_data_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new + + # Call the unenroll_data_sources method. + result = client.unenroll_data_sources request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb new file mode 100644 index 000000000000..78cd53878f8c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] +require "google/cloud/bigquery/data_transfer/v1" + +## +# Snippet for the update_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config. +# +def update_transfer_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new + + # Call the update_transfer_config method. + result = client.update_transfer_config request + + # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. + p result +end +# [END bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json new file mode 100644 index 000000000000..c079afe66ffd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -0,0 +1,655 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-data_transfer-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.datatransfer.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync", + "title": "Snippet for the get_data_source call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source.", + "file": "data_transfer_service/get_data_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_source", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::DataSource", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "GetDataSource", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetDataSource", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync", + "title": "Snippet for the list_data_sources call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources.", + "file": "data_transfer_service/list_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_sources", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListDataSources", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListDataSources", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync", + "title": "Snippet for the create_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config.", + "file": "data_transfer_service/create_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "CreateTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CreateTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync", + "title": "Snippet for the update_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config.", + "file": "data_transfer_service/update_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "UpdateTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UpdateTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync", + "title": "Snippet for the delete_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config.", + "file": "data_transfer_service/delete_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "DeleteTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync", + "title": "Snippet for the get_transfer_config call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config.", + "file": "data_transfer_service/get_transfer_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_transfer_config", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "GetTransferConfig", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferConfig", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync", + "title": "Snippet for the list_transfer_configs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs.", + "file": "data_transfer_service/list_transfer_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transfer_configs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListTransferConfigs", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferConfigs", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync", + "title": "Snippet for the schedule_transfer_runs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs.", + "file": "data_transfer_service/schedule_transfer_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "schedule_transfer_runs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ScheduleTransferRuns", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ScheduleTransferRuns", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync", + "title": "Snippet for the start_manual_transfer_runs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs.", + "file": "data_transfer_service/start_manual_transfer_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_manual_transfer_runs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "StartManualTransferRuns", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.StartManualTransferRuns", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync", + "title": "Snippet for the get_transfer_run call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run.", + "file": "data_transfer_service/get_transfer_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_transfer_run", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "GetTransferRun", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferRun", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync", + "title": "Snippet for the delete_transfer_run call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run.", + "file": "data_transfer_service/delete_transfer_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_transfer_run", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "DeleteTransferRun", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferRun", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync", + "title": "Snippet for the list_transfer_runs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs.", + "file": "data_transfer_service/list_transfer_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transfer_runs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListTransferRuns", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferRuns", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync", + "title": "Snippet for the list_transfer_logs call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs.", + "file": "data_transfer_service/list_transfer_logs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_transfer_logs", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "ListTransferLogs", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferLogs", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync", + "title": "Snippet for the check_valid_creds call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds.", + "file": "data_transfer_service/check_valid_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "check_valid_creds", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "CheckValidCreds", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CheckValidCreds", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync", + "title": "Snippet for the enroll_data_sources call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources.", + "file": "data_transfer_service/enroll_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "enroll_data_sources", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "EnrollDataSources", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.EnrollDataSources", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync", + "title": "Snippet for the unenroll_data_sources call in the DataTransferService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources.", + "file": "data_transfer_service/unenroll_data_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "unenroll_data_sources", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataTransferService::Client", + "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" + }, + "method": { + "short_name": "UnenrollDataSources", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UnenrollDataSources", + "service": { + "short_name": "DataTransferService", + "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" + } + } + }, + "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-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb new file mode 100644 index 000000000000..5d878393639f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/data_transfer/v1/data_transfer_service" + +class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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_data_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_source_path project: "value0", data_source: "value1" + assert_equal "projects/value0/dataSources/value1", path + + path = client.data_source_path project: "value0", location: "value1", data_source: "value2" + assert_equal "projects/value0/locations/value1/dataSources/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::Bigquery::DataTransfer::V1::DataTransferService::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_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_run_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.run_path project: "value0", transfer_config: "value1", run: "value2" + assert_equal "projects/value0/transferConfigs/value1/runs/value2", path + + path = client.run_path project: "value0", location: "value1", transfer_config: "value2", run: "value3" + assert_equal "projects/value0/locations/value1/transferConfigs/value2/runs/value3", path + end + end + + def test_transfer_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.transfer_config_path project: "value0", transfer_config: "value1" + assert_equal "projects/value0/transferConfigs/value1", path + + path = client.transfer_config_path project: "value0", location: "value1", transfer_config: "value2" + assert_equal "projects/value0/locations/value1/transferConfigs/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb new file mode 100644 index 000000000000..8f85391bcb20 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb @@ -0,0 +1,988 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" + + +class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_source_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_source_client_stub.call_count + end + end + end + + def test_list_data_sources + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.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_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_count + end + end + end + + def test_create_transfer_config + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + transfer_config = {} + authorization_code = "hello world" + version_info = "hello world" + service_account_name = "hello world" + + create_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_create_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_transfer_config_client_stub.call_count + end + end + end + + def test_update_transfer_config + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + transfer_config = {} + authorization_code = "hello world" + update_mask = {} + version_info = "hello world" + service_account_name = "hello world" + + update_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_update_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_transfer_config_client_stub.call_count + end + end + end + + def test_delete_transfer_config + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_transfer_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_transfer_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_transfer_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_transfer_config_client_stub.call_count + end + end + end + + def test_get_transfer_config + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_transfer_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_transfer_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_transfer_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_transfer_config_client_stub.call_count + end + end + end + + def test_list_transfer_configs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_source_ids = ["hello world"] + page_token = "hello world" + page_size = 42 + + list_transfer_configs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transfer_configs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_transfer_configs parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs({ parent: parent, data_source_ids: data_source_ids, 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_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs_client_stub.call_count + end + end + end + + def test_schedule_transfer_runs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + start_time = {} + end_time = {} + + schedule_transfer_runs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_schedule_transfer_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, schedule_transfer_runs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, schedule_transfer_runs_client_stub.call_count + end + end + end + + def test_start_manual_transfer_runs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + requested_time_range = {} + + start_manual_transfer_runs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_start_manual_transfer_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_manual_transfer_runs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_manual_transfer_runs_client_stub.call_count + end + end + end + + def test_get_transfer_run + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_transfer_run_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_transfer_run_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_transfer_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_transfer_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_transfer_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_transfer_run_client_stub.call_count + end + end + end + + def test_delete_transfer_run + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_transfer_run_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_transfer_run_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_transfer_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_transfer_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_transfer_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_transfer_run_client_stub.call_count + end + end + end + + def test_list_transfer_runs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + states = [:TRANSFER_STATE_UNSPECIFIED] + page_token = "hello world" + page_size = 42 + run_attempt = :RUN_ATTEMPT_UNSPECIFIED + + list_transfer_runs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transfer_runs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_transfer_runs_client_stub.call_count + end + end + end + + def test_list_transfer_logs + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.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 + message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] + + list_transfer_logs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_logs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_transfer_logs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_transfer_logs_client_stub.call_count + end + end + end + + def test_check_valid_creds + # Create test objects. + client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + check_valid_creds_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_check_valid_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, check_valid_creds_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.check_valid_creds({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.check_valid_creds name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.check_valid_creds({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, check_valid_creds_client_stub.call_count + end + end + end + + def test_enroll_data_sources + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data_source_ids = ["hello world"] + + enroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_enroll_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enroll_data_sources_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.enroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enroll_data_sources_client_stub.call_count + end + end + end + + def test_unenroll_data_sources + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data_source_ids = ["hello world"] + + unenroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_unenroll_data_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, unenroll_data_sources_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.unenroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, unenroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::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::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb new file mode 100644 index 000000000000..3ed397d654bc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb @@ -0,0 +1,1103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/datatransfer/v1/datatransfer_pb" +require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" + +class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_data_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.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_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_source, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_source_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_source({ 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_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.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_data_source_client_stub.call_rpc_count + end + end + + def test_list_data_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.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_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_sources, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, 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_data_sources_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count + end + end + + def test_create_transfer_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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" + transfer_config = {} + authorization_code = "hello world" + version_info = "hello world" + service_account_name = "hello world" + + create_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] + assert_equal "hello world", request["authorization_code"] + assert_equal "hello world", request["version_info"] + assert_equal "hello world", request["service_account_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_transfer_config_client_stub.call_rpc_count + end + end + + def test_update_transfer_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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. + transfer_config = {} + authorization_code = "hello world" + update_mask = {} + version_info = "hello world" + service_account_name = "hello world" + + update_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] + assert_equal "hello world", request["authorization_code"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal "hello world", request["version_info"] + assert_equal "hello world", request["service_account_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_transfer_config_client_stub.call_rpc_count + end + end + + def test_delete_transfer_config + # 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_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_transfer_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_transfer_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_transfer_config({ 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_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.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_transfer_config_client_stub.call_rpc_count + end + end + + def test_get_transfer_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_transfer_config, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_transfer_config_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_transfer_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_transfer_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_transfer_config({ 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_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.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_transfer_config_client_stub.call_rpc_count + end + end + + def test_list_transfer_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.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" + data_source_ids = ["hello world"] + page_token = "hello world" + page_size = 42 + + list_transfer_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transfer_configs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["data_source_ids"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transfer_configs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, 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_transfer_configs parent: parent, data_source_ids: data_source_ids, 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_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs({ parent: parent, data_source_ids: data_source_ids, 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_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs_client_stub.call_rpc_count + end + end + + def test_schedule_transfer_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.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" + start_time = {} + end_time = {} + + schedule_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :schedule_transfer_runs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, schedule_transfer_runs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, schedule_transfer_runs_client_stub.call_rpc_count + end + end + + def test_start_manual_transfer_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.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" + requested_time_range = {} + + start_manual_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_manual_transfer_runs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange), request["requested_time_range"] + assert_equal :requested_time_range, request.time + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_manual_transfer_runs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_manual_transfer_runs_client_stub.call_rpc_count + end + end + + def test_get_transfer_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.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_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_transfer_run, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_transfer_run_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_transfer_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_transfer_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_transfer_run({ 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_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.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_transfer_run_client_stub.call_rpc_count + end + end + + def test_delete_transfer_run + # 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_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_transfer_run, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_transfer_run_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_transfer_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_transfer_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_transfer_run({ 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_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.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_transfer_run_client_stub.call_rpc_count + end + end + + def test_list_transfer_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.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" + states = [:TRANSFER_STATE_UNSPECIFIED] + page_token = "hello world" + page_size = 42 + run_attempt = :RUN_ATTEMPT_UNSPECIFIED + + list_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transfer_runs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, request + assert_equal "hello world", request["parent"] + assert_equal [:TRANSFER_STATE_UNSPECIFIED], request["states"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal :RUN_ATTEMPT_UNSPECIFIED, request["run_attempt"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transfer_runs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) 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_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt 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_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) 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_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, 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_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), 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_transfer_runs_client_stub.call_rpc_count + end + end + + def test_list_transfer_logs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.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 + message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] + + list_transfer_logs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_transfer_logs, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal [:MESSAGE_SEVERITY_UNSPECIFIED], request["message_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_transfer_logs_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) 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_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types 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_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) 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_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, 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_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), 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_transfer_logs_client_stub.call_rpc_count + end + end + + def test_check_valid_creds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.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" + + check_valid_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :check_valid_creds, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, check_valid_creds_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.check_valid_creds({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.check_valid_creds name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.check_valid_creds({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.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, check_valid_creds_client_stub.call_rpc_count + end + end + + def test_enroll_data_sources + # 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" + data_source_ids = ["hello world"] + + enroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enroll_data_sources, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["data_source_ids"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enroll_data_sources_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.enroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, enroll_data_sources_client_stub.call_rpc_count + end + end + + def test_unenroll_data_sources + # 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" + data_source_ids = ["hello world"] + + unenroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :unenroll_data_sources, name + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["data_source_ids"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, unenroll_data_sources_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.unenroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, unenroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::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::Bigquery::DataTransfer::V1::DataTransferService::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::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.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-bigquery-migration-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json new file mode 100644 index 000000000000..519979303a46 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "bigquerymigration.googleapis.com", + "api_shortname": "bigquerymigration", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest", + "distribution_name": "google-cloud-bigquery-migration-v2", + "is_cloud": true, + "language": "ruby", + "name": "bigquerymigration", + "name_pretty": "BigQuery Migration V2 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/migration-intro", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml new file mode 100644 index 000000000000..57be07ac546b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-migration-v2.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-bigquery-migration-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.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-bigquery-migration-v2/.yardopts b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts new file mode 100644 index 000000000000..e1a4dd51c1ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Migration V2 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-bigquery-migration-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..49431cec3789 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-migration-v2 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-bigquery-migration-v2 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/bigquery/migration/v2" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/migration/v2" + +::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-bigquery-migration-v2 +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/bigquery/migration/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-bigquery-migration-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md new file mode 100644 index 000000000000..1b3d10929b14 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Migration V2 API + +The migration service, exposing apis for migration jobs operations, and agent management. + +The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Migration V2 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-migration](https://rubygems.org/gems/google-cloud-bigquery-migration). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-migration-v2 +``` + +## 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/bigquerymigration.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/migration/v2" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new +request = ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new # (request fields as keyword arguments...) +response = client.create_migration_workflow request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/migration-intro) +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/bigquery/migration/v2" +require "logger" + +client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-bigquery-migration`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-migration-v2`. +_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-bigquery-migration`. +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-bigquery-migration-v2`. + +### 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-bigquery-migration-v2/Rakefile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile new file mode 100644 index 000000000000..22b1470bce3b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/migration/v2/migration_service/credentials" + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-migration-v2" + header "google-cloud-bigquery-migration-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-migration-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json new file mode 100644 index 000000000000..da3bd8bcce33 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.migration.v2", + "libraryPackage": "::Google::Cloud::Bigquery::Migration::V2", + "services": { + "MigrationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "create_migration_workflow" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "get_migration_workflow" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "list_migration_workflows" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "delete_migration_workflow" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "start_migration_workflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "get_migration_subtask" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "list_migration_subtasks" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec new file mode 100644 index 000000000000..1050650c896d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/migration/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-migration-v2" + gem.version = Google::Cloud::Bigquery::Migration::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details." + gem.summary = "The migration service, exposing apis for migration jobs operations, and agent management." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb new file mode 100644 index 000000000000..c91652afe47e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.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/bigquery/migration/v2" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb new file mode 100644 index 000000000000..a9ad338b1127 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/migration/v2/migration_service" +require "google/cloud/bigquery/migration/v2/version" + +module Google + module Cloud + module Bigquery + module Migration + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/migration/v2" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/migration/v2" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module V2 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/bigquery/migration/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb new file mode 100644 index 000000000000..3b3b88bfbf9f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/migration_entities.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/migration/v2/migration_error_details_pb' +require 'google/cloud/bigquery/migration/v2/migration_metrics_pb' +require 'google/cloud/bigquery/migration/v2/translation_config_pb' +require 'google/cloud/bigquery/migration/v2/translation_details_pb' +require 'google/cloud/bigquery/migration/v2/translation_usability_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/error_details_pb' + + +descriptor_data = "\n;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1a:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1a;google/cloud/bigquery/migration/v2/translation_config.proto\x1agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\xf6\x04\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\n\x06points\x18\x04 \x03(\x0b\x32).google.cloud.bigquery.migration.v2.PointB\x03\xe0\x41\x02\"\x8a\x01\n\x05Point\x12\x42\n\x08interval\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.TimeInterval\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.migration.v2.TypedValue\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05valueB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationMetricsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TimeSeries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeSeries").msgclass + Point = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Point").msgclass + TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeInterval").msgclass + TypedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TypedValue").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb new file mode 100644 index 000000000000..2d48893a2487 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/migration/v2/version" + +require "google/cloud/bigquery/migration/v2/migration_service/credentials" +require "google/cloud/bigquery/migration/v2/migration_service/paths" +require "google/cloud/bigquery/migration/v2/migration_service/client" +require "google/cloud/bigquery/migration/v2/migration_service/rest" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + ## + # Service to handle EDW migrations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/migration/v2/migration_service" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/migration/v2/migration_service/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module MigrationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "migration_service", "helpers.rb" +require "google/cloud/bigquery/migration/v2/migration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb new file mode 100644 index 000000000000..9996d48313f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb @@ -0,0 +1,1101 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/migration/v2/migration_service_pb" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + ## + # Client for the MigrationService service. + # + # Service to handle EDW migrations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :migration_service_stub + + ## + # Configure the MigrationService Client class. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MigrationService clients + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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", "Bigquery", "Migration", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_migration_workflow.timeout = 60.0 + + default_config.rpcs.get_migration_workflow.timeout = 60.0 + default_config.rpcs.get_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_migration_workflows.timeout = 60.0 + default_config.rpcs.list_migration_workflows.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_migration_workflow.timeout = 60.0 + + default_config.rpcs.start_migration_workflow.timeout = 60.0 + default_config.rpcs.start_migration_workflow.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 MigrationService 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::Bigquery::Migration::V2::MigrationService::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 + @migration_service_stub.universe_domain + end + + ## + # Create a new MigrationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MigrationService 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/bigquery/migration/v2/migration_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 + + @migration_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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 + ) + + @migration_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @migration_service_stub.logger + end + + # Service calls + + ## + # Creates a migration workflow. + # + # @overload create_migration_workflow(request, options = nil) + # Pass arguments to `create_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflow(parent: nil, migration_workflow: nil) + # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] + # Required. The migration workflow to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + # + # # Call the create_migration_workflow method. + # result = client.create_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def create_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest + + # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :create_migration_workflow, 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 a previously created migration workflow. + # + # @overload get_migration_workflow(request, options = nil) + # Pass arguments to `get_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflow(name: nil, read_mask: nil) + # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + # + # # Call the get_migration_workflow method. + # result = client.get_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def get_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest + + # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :get_migration_workflow, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration workflow. + # + # @overload list_migration_workflows(request, options = nil) + # Pass arguments to `list_migration_workflows` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at + # least one keyword argument is 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 project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @param page_size [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @param page_token [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + # + # # Call the list_migration_workflows method. + # result = client.list_migration_workflows 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::Bigquery::Migration::V2::MigrationWorkflow. + # p item + # end + # + def list_migration_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest + + # Converts hash 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_migration_workflows.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::Bigquery::Migration::V2::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_migration_workflows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_migration_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :list_migration_workflows, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a migration workflow by name. + # + # @overload delete_migration_workflow(request, options = nil) + # Pass arguments to `delete_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflow(name: nil) + # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + # + # # Call the delete_migration_workflow method. + # result = client.delete_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest + + # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :delete_migration_workflow, 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 a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + # + # @overload start_migration_workflow(request, options = nil) + # Pass arguments to `start_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload start_migration_workflow(name: nil) + # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + # + # # Call the start_migration_workflow method. + # result = client.start_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def start_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest + + # Converts hash 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.start_migration_workflow.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::Bigquery::Migration::V2::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.start_migration_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :start_migration_workflow, 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 a previously created migration subtask. + # + # @overload get_migration_subtask(request, options = nil) + # Pass arguments to `get_migration_subtask` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_subtask(name: nil, read_mask: nil) + # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + # + # # Call the get_migration_subtask method. + # result = client.get_migration_subtask request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p result + # + def get_migration_subtask request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest + + # Converts hash 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_migration_subtask.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::Bigquery::Migration::V2::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_migration_subtask.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_migration_subtask.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :get_migration_subtask, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration subtasks. + # + # @overload list_migration_subtasks(request, options = nil) + # Pass arguments to `list_migration_subtasks` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at + # least one keyword argument is 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 migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @param page_size [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @param page_token [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + # + # # Call the list_migration_subtasks method. + # result = client.list_migration_subtasks 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::Bigquery::Migration::V2::MigrationSubtask. + # p item + # end + # + def list_migration_subtasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest + + # Converts hash 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_migration_subtasks.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::Bigquery::Migration::V2::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_migration_subtasks.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_migration_subtasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.call_rpc :list_migration_subtasks, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MigrationService API. + # + # This class represents the configuration for MigrationService, + # 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::Bigquery::Migration::V2::MigrationService::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 + # # create_migration_workflow to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.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::Bigquery::Migration::V2::MigrationService::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 = "bigquerymigration.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 MigrationService 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 `create_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_migration_workflow + ## + # RPC-specific configuration for `get_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_workflow + ## + # RPC-specific configuration for `list_migration_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_workflows + ## + # RPC-specific configuration for `delete_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_migration_workflow + ## + # RPC-specific configuration for `start_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :start_migration_workflow + ## + # RPC-specific configuration for `get_migration_subtask` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_subtask + ## + # RPC-specific configuration for `list_migration_subtasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_subtasks + + # @private + def initialize parent_rpcs = nil + create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow + @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config + get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow + @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config + list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows + @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config + delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow + @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config + start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow + @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config + get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask + @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config + list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks + @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb new file mode 100644 index 000000000000..db5d89803933 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + module MigrationService + # Credentials for the MigrationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb new file mode 100644 index 000000000000..21bfeb2669a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb @@ -0,0 +1,92 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + module MigrationService + # Path helper methods for the MigrationService API. + module Paths + ## + # 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 MigrationSubtask resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # @param subtask [String] + # + # @return [::String] + def migration_subtask_path project:, location:, workflow:, subtask: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workflow cannot contain /" if workflow.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workflows/#{workflow}/subtasks/#{subtask}" + end + + ## + # Create a fully-qualified MigrationWorkflow resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # + # @return [::String] + def migration_workflow_path project:, location:, workflow: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workflows/#{workflow}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb new file mode 100644 index 000000000000..d298ae4f0452 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.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! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/migration/v2/version" + +require "google/cloud/bigquery/migration/v2/migration_service/credentials" +require "google/cloud/bigquery/migration/v2/migration_service/paths" +require "google/cloud/bigquery/migration/v2/migration_service/rest/client" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + ## + # Service to handle EDW migrations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/migration/v2/migration_service/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module MigrationService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/migration/v2/migration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb new file mode 100644 index 000000000000..c425938db5a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb @@ -0,0 +1,1009 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + module Rest + ## + # REST client for the MigrationService service. + # + # Service to handle EDW migrations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :migration_service_stub + + ## + # Configure the MigrationService Client class. + # + # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all MigrationService clients + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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", "Bigquery", "Migration", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_migration_workflow.timeout = 60.0 + + default_config.rpcs.get_migration_workflow.timeout = 60.0 + default_config.rpcs.get_migration_workflow.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_migration_workflows.timeout = 60.0 + default_config.rpcs.list_migration_workflows.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_migration_workflow.timeout = 60.0 + + default_config.rpcs.start_migration_workflow.timeout = 60.0 + default_config.rpcs.start_migration_workflow.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 MigrationService 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::Bigquery::Migration::V2::MigrationService::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 + @migration_service_stub.universe_domain + end + + ## + # Create a new MigrationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the MigrationService 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 + + @migration_service_stub = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @migration_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @migration_service_stub.logger + end + + # Service calls + + ## + # Creates a migration workflow. + # + # @overload create_migration_workflow(request, options = nil) + # Pass arguments to `create_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflow(parent: nil, migration_workflow: nil) + # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] + # Required. The migration workflow to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + # + # # Call the create_migration_workflow method. + # result = client.create_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def create_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest + + # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.create_migration_workflow 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 a previously created migration workflow. + # + # @overload get_migration_workflow(request, options = nil) + # Pass arguments to `get_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflow(name: nil, read_mask: nil) + # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + # + # # Call the get_migration_workflow method. + # result = client.get_migration_workflow request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + # p result + # + def get_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest + + # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.get_migration_workflow request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration workflow. + # + # @overload list_migration_workflows(request, options = nil) + # Pass arguments to `list_migration_workflows` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at + # least one keyword argument is 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 project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be retrieved. + # @param page_size [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @param page_token [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + # + # # Call the list_migration_workflows method. + # result = client.list_migration_workflows 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::Bigquery::Migration::V2::MigrationWorkflow. + # p item + # end + # + def list_migration_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest + + # Converts hash 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_migration_workflows.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::Bigquery::Migration::V2::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_migration_workflows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_migration_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.list_migration_workflows request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, "migration_workflows", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a migration workflow by name. + # + # @overload delete_migration_workflow(request, options = nil) + # Pass arguments to `delete_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_workflow(name: nil) + # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + # + # # Call the delete_migration_workflow method. + # result = client.delete_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest + + # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.delete_migration_workflow 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 a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + # + # @overload start_migration_workflow(request, options = nil) + # Pass arguments to `start_migration_workflow` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload start_migration_workflow(name: nil) + # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + # + # # Call the start_migration_workflow method. + # result = client.start_migration_workflow request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def start_migration_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest + + # Converts hash 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.start_migration_workflow.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::Bigquery::Migration::V2::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.start_migration_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_migration_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.start_migration_workflow 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 a previously created migration subtask. + # + # @overload get_migration_subtask(request, options = nil) + # Pass arguments to `get_migration_subtask` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_subtask(name: nil, read_mask: nil) + # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at + # least one keyword argument is 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 unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + # + # # Call the get_migration_subtask method. + # result = client.get_migration_subtask request + # + # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + # p result + # + def get_migration_subtask request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest + + # Converts hash 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_migration_subtask.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::Bigquery::Migration::V2::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_migration_subtask.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_migration_subtask.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.get_migration_subtask request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously created migration subtasks. + # + # @overload list_migration_subtasks(request, options = nil) + # Pass arguments to `list_migration_subtasks` via a request object, either of type + # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at + # least one keyword argument is 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 migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to be retrieved. + # @param page_size [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @param page_token [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/migration/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + # + # # Call the list_migration_subtasks method. + # result = client.list_migration_subtasks 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::Bigquery::Migration::V2::MigrationSubtask. + # p item + # end + # + def list_migration_subtasks request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest + + # Converts hash 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_migration_subtasks.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::Bigquery::Migration::V2::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_migration_subtasks.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_migration_subtasks.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @migration_service_stub.list_migration_subtasks request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, "migration_subtasks", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the MigrationService REST API. + # + # This class represents the configuration for MigrationService 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::Bigquery::Migration::V2::MigrationService::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 + # # create_migration_workflow to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_migration_workflow.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 = "bigquerymigration.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 MigrationService 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 `create_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_migration_workflow + ## + # RPC-specific configuration for `get_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_workflow + ## + # RPC-specific configuration for `list_migration_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_workflows + ## + # RPC-specific configuration for `delete_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_migration_workflow + ## + # RPC-specific configuration for `start_migration_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :start_migration_workflow + ## + # RPC-specific configuration for `get_migration_subtask` + # @return [::Gapic::Config::Method] + # + attr_reader :get_migration_subtask + ## + # RPC-specific configuration for `list_migration_subtasks` + # @return [::Gapic::Config::Method] + # + attr_reader :list_migration_subtasks + + # @private + def initialize parent_rpcs = nil + create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow + @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config + get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow + @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config + list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows + @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config + delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow + @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config + start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow + @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config + get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask + @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config + list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks + @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb new file mode 100644 index 000000000000..21756920f3bf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb @@ -0,0 +1,512 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/migration/v2/migration_service_pb" + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + module Rest + ## + # REST service stub for the MigrationService 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: false, + 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 create_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] + # 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::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # A result object deserialized from the server's reply + def create_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_migration_workflow_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_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] + # 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::Bigquery::Migration::V2::MigrationWorkflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # A result object deserialized from the server's reply + def get_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_workflow_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_migration_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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_migration_workflows REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] + # 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::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] + # A result object deserialized from the server's reply + def list_migration_workflows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_workflows_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_migration_workflows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.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_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] + # 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_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_migration_workflow_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_migration_workflow", + 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 start_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] + # 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 start_migration_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_migration_workflow_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: "start_migration_workflow", + 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 get_migration_subtask REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] + # 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::Bigquery::Migration::V2::MigrationSubtask] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] + # A result object deserialized from the server's reply + def get_migration_subtask request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_subtask_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_migration_subtask", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.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_migration_subtasks REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] + # 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::Bigquery::Migration::V2::ListMigrationSubtasksResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] + # A result object deserialized from the server's reply + def list_migration_subtasks request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_subtasks_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_migration_subtasks", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.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_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] + # 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_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/workflows", + body: "migration_workflow", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] + # 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_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_migration_workflows REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] + # 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_migration_workflows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/workflows", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] + # 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_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_migration_workflow REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_start_migration_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_migration_subtask REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] + # 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_migration_subtask_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/subtasks/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_migration_subtasks REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] + # 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_migration_subtasks_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/subtasks", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb new file mode 100644 index 000000000000..22bab24f5771 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/migration_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/bigquery/migration/v2/migration_entities_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/bigquery/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb3\x01\n\x1e\x43reateMigrationWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x12migration_workflow\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflowB\x03\xe0\x41\x02\"\x96\x01\n\x1bGetMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb0\x01\n\x1dListMigrationWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8d\x01\n\x1eListMigrationWorkflowsResponse\x12R\n\x13migration_workflows\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1e\x44\x65leteMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"i\n\x1dStartMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"\x99\x01\n\x1aGetMigrationSubtaskRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1bigquerymigration.googleapis.com/MigrationSubtask\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xe4\x01\n\x1cListMigrationSubtasksRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\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\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1dListMigrationSubtasksResponse\x12P\n\x12migration_subtasks\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\x0c\n\x10MigrationService\x12\xfb\x01\n\x17\x43reateMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"e\xda\x41\x19parent,migration_workflow\x82\xd3\xe4\x93\x02\x43\"-/v2/{parent=projects/*/locations/*}/workflows:\x12migration_workflow\x12\xcc\x01\n\x14GetMigrationWorkflow\x12?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/workflows/*}\x12\xdf\x01\n\x16ListMigrationWorkflows\x12\x41.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest\x1a\x42.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/workflows\x12\xb3\x01\n\x17\x44\x65leteMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/workflows/*}\x12\xba\x01\n\x16StartMigrationWorkflow\x12\x41.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/workflows/*}:start:\x01*\x12\xd4\x01\n\x13GetMigrationSubtask\x12>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest\x1a\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}\x12\xe7\x01\n\x15ListMigrationSubtasks\x12@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest\x1a\x41.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/workflows/*}/subtasks\x1aT\xca\x41 bigquerymigration.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationServiceProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + CreateMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest").msgclass + GetMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest").msgclass + ListMigrationWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest").msgclass + ListMigrationWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse").msgclass + DeleteMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest").msgclass + StartMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest").msgclass + GetMigrationSubtaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest").msgclass + ListMigrationSubtasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest").msgclass + ListMigrationSubtasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb new file mode 100644 index 000000000000..3232f23f93d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb @@ -0,0 +1,62 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/migration/v2/migration_service.proto for package 'google.cloud.bigquery.migration.v2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigquery/migration/v2/migration_service_pb' + +module Google + module Cloud + module Bigquery + module Migration + module V2 + module MigrationService + # Service to handle EDW migrations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.migration.v2.MigrationService' + + # Creates a migration workflow. + rpc :CreateMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow + # Gets a previously created migration workflow. + rpc :GetMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow + # Lists previously created migration workflow. + rpc :ListMigrationWorkflows, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse + # Deletes a migration workflow by name. + rpc :DeleteMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Google::Protobuf::Empty + # Starts a previously created migration workflow. I.e., the state transitions + # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + # An error will be signaled if the state is anything other than DRAFT or + # RUNNING. + rpc :StartMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Google::Protobuf::Empty + # Gets a previously created migration subtask. + rpc :GetMigrationSubtask, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask + # Lists previously created migration subtasks. + rpc :ListMigrationSubtasks, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb new file mode 100644 index 000000000000..76d58e045e9e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/migration/v2/migration_service/rest" +require "google/cloud/bigquery/migration/v2/version" + +module Google + module Cloud + module Bigquery + module Migration + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/migration/v2/rest" + # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new + # + module V2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb new file mode 100644 index 000000000000..26de688def6d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\t\x12\x14\n\x0ctarget_types\x18\t \x03(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\xeb\n\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x12\x45\n\x0b\x64\x62\x32_dialect\x18\x0f \x01(\x0b\x32..google.cloud.bigquery.migration.v2.DB2DialectH\x00\x12K\n\x0esqlite_dialect\x18\x10 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.SQLiteDialectH\x00\x12Q\n\x11greenplum_dialect\x18\x11 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.GreenplumDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"\x0c\n\nDB2Dialect\"\x0f\n\rSQLiteDialect\"\x12\n\x10GreenplumDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"f\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationConfigDetails").msgclass + Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Dialect").msgclass + BigQueryDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.BigQueryDialect").msgclass + HiveQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.HiveQLDialect").msgclass + RedshiftDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.RedshiftDialect").msgclass + TeradataDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect").msgclass + TeradataDialect::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect.Mode").enummodule + OracleDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.OracleDialect").msgclass + SparkSQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SparkSQLDialect").msgclass + SnowflakeDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SnowflakeDialect").msgclass + NetezzaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NetezzaDialect").msgclass + AzureSynapseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AzureSynapseDialect").msgclass + VerticaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.VerticaDialect").msgclass + SQLServerDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLServerDialect").msgclass + PostgresqlDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PostgresqlDialect").msgclass + PrestoDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PrestoDialect").msgclass + MySQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.MySQLDialect").msgclass + DB2Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DB2Dialect").msgclass + SQLiteDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLiteDialect").msgclass + GreenplumDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GreenplumDialect").msgclass + ObjectNameMappingList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMappingList").msgclass + ObjectNameMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMapping").msgclass + NameMappingKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey").msgclass + NameMappingKey::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey.Type").enummodule + NameMappingValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingValue").msgclass + SourceEnv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnv").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb new file mode 100644 index 000000000000..2035126d366d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_details.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationDetails").msgclass + SourceTargetMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceTargetMapping").msgclass + SourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceSpec").msgclass + TargetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TargetSpec").msgclass + Literal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Literal").msgclass + SourceEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnvironment").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb new file mode 100644 index 000000000000..b371a88bb83b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_suggestion.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n?google/cloud/bigquery/migration/v2/translation_suggestion.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x88\x02\n\x17TranslationReportRecord\x12V\n\x08severity\x18\x01 \x01(\x0e\x32\x44.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity\x12\x13\n\x0bscript_line\x18\x02 \x01(\x05\x12\x15\n\rscript_column\x18\x03 \x01(\x05\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12\x0f\n\x07message\x18\x05 \x01(\t\"F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\xd6\x01\n&com.google.cloud.bigquery.migration.v2B\x1aTranslationSuggestionProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + TranslationReportRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord").msgclass + TranslationReportRecord::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb new file mode 100644 index 000000000000..840017a9f86a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/migration/v2/translation_usability.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/cloud/bigquery/migration/v2/translation_usability.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf6\x01\n\x13GcsReportLogMessage\x12\x10\n\x08severity\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x1a\n\x12source_script_line\x18\x05 \x01(\x05\x12\x1c\n\x14source_script_column\x18\x06 \x01(\x05\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x16\n\x0escript_context\x18\x08 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\t \x01(\t\x12\x0e\n\x06\x65\x66\x66\x65\x63t\x18\n \x01(\t\x12\x13\n\x0bobject_name\x18\x0b \x01(\tB\xd5\x01\n&com.google.cloud.bigquery.migration.v2B\x19TranslationUsabilityProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Migration + module V2 + GcsReportLogMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GcsReportLogMessage").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb new file mode 100644 index 000000000000..c33fa4b1c721 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md new file mode 100644 index 000000000000..6a3802be6255 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Migration V2 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-bigquery-migration-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb new file mode 100644 index 000000000000..e4f870d5ad0d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb @@ -0,0 +1,233 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # `Distribution` contains summary statistics for a population of values. It + # optionally contains a histogram representing the distribution of those values + # across a set of buckets. + # + # The summary statistics are the count, mean, sum of the squared deviation from + # the mean, the minimum, and the maximum of the set of population of values. + # The histogram is based on a sequence of buckets and gives a count of values + # that fall into each bucket. The boundaries of the buckets are given either + # explicitly or by formulas for buckets of fixed or exponentially increasing + # widths. + # + # Although it is not forbidden, it is generally a bad idea to include + # non-finite values (infinities or NaNs) in the population of values, as this + # will render the `mean` and `sum_of_squared_deviation` fields meaningless. + # @!attribute [rw] count + # @return [::Integer] + # The number of values in the population. Must be non-negative. This value + # must equal the sum of the values in `bucket_counts` if a histogram is + # provided. + # @!attribute [rw] mean + # @return [::Float] + # The arithmetic mean of the values in the population. If `count` is zero + # then this field must be zero. + # @!attribute [rw] sum_of_squared_deviation + # @return [::Float] + # The sum of squared deviations from the mean of the values in the + # population. For values x_i this is: + # + # Sum[i=1..n]((x_i - mean)^2) + # + # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition + # describes Welford's method for accumulating this sum in one pass. + # + # If `count` is zero then this field must be zero. + # @!attribute [rw] range + # @return [::Google::Api::Distribution::Range] + # If specified, contains the range of the population values. The field + # must not be present if the `count` is zero. + # @!attribute [rw] bucket_options + # @return [::Google::Api::Distribution::BucketOptions] + # Defines the histogram bucket boundaries. If the distribution does not + # contain a histogram, then omit this field. + # @!attribute [rw] bucket_counts + # @return [::Array<::Integer>] + # The number of values in each bucket of the histogram, as described in + # `bucket_options`. If the distribution does not have a histogram, then omit + # this field. If there is a histogram, then the sum of the values in + # `bucket_counts` must equal the value in the `count` field of the + # distribution. + # + # If present, `bucket_counts` should contain N values, where N is the number + # of buckets specified in `bucket_options`. If you supply fewer than N + # values, the remaining values are assumed to be 0. + # + # The order of the values in `bucket_counts` follows the bucket numbering + # schemes described for the three bucket types. The first value must be the + # count for the underflow bucket (number 0). The next N-2 values are the + # counts for the finite buckets (number 1 through N-2). The N'th value in + # `bucket_counts` is the count for the overflow bucket (number N-1). + # @!attribute [rw] exemplars + # @return [::Array<::Google::Api::Distribution::Exemplar>] + # Must be in increasing order of `value` field. + class Distribution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The range of the population values. + # @!attribute [rw] min + # @return [::Float] + # The minimum of the population values. + # @!attribute [rw] max + # @return [::Float] + # The maximum of the population values. + class Range + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BucketOptions` describes the bucket boundaries used to create a histogram + # for the distribution. The buckets can be in a linear sequence, an + # exponential sequence, or each bucket can be specified explicitly. + # `BucketOptions` does not include the number of values in each bucket. + # + # A bucket has an inclusive lower bound and exclusive upper bound for the + # values that are counted for that bucket. The upper bound of a bucket must + # be strictly greater than the lower bound. The sequence of N buckets for a + # distribution consists of an underflow bucket (number 0), zero or more + # finite buckets (number 1 through N - 2) and an overflow bucket (number N - + # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + # same as the upper bound of bucket i - 1. The buckets span the whole range + # of finite values: lower bound of the underflow bucket is -infinity and the + # upper bound of the overflow bucket is +infinity. The finite buckets are + # so-called because both bounds are finite. + # @!attribute [rw] linear_buckets + # @return [::Google::Api::Distribution::BucketOptions::Linear] + # The linear bucket. + # + # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] exponential_buckets + # @return [::Google::Api::Distribution::BucketOptions::Exponential] + # The exponential buckets. + # + # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explicit_buckets + # @return [::Google::Api::Distribution::BucketOptions::Explicit] + # The explicit buckets. + # + # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BucketOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies a linear sequence of buckets that all have the same width + # (except overflow and underflow). Each bucket represents a constant + # absolute uncertainty on the specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): offset + (width * i). + # + # Lower bound (1 <= i < N): offset + (width * (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] width + # @return [::Float] + # Must be greater than 0. + # @!attribute [rw] offset + # @return [::Float] + # Lower bound of the first bucket. + class Linear + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies an exponential sequence of buckets that have a width that is + # proportional to the value of the lower bound. Each bucket represents a + # constant relative uncertainty on a specific value in the bucket. + # + # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + # following boundaries: + # + # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). + # + # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). + # @!attribute [rw] num_finite_buckets + # @return [::Integer] + # Must be greater than 0. + # @!attribute [rw] growth_factor + # @return [::Float] + # Must be greater than 1. + # @!attribute [rw] scale + # @return [::Float] + # Must be greater than 0. + class Exponential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a set of buckets with arbitrary widths. + # + # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following + # boundaries: + # + # Upper bound (0 <= i < N-1): bounds[i] + # Lower bound (1 <= i < N); bounds[i - 1] + # + # The `bounds` field must contain at least one element. If `bounds` has + # only one element, then there are no finite buckets, and that single + # element is the common boundary of the overflow and underflow buckets. + # @!attribute [rw] bounds + # @return [::Array<::Float>] + # The values must be monotonically increasing. + class Explicit + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Exemplars are example points that may be used to annotate aggregated + # distribution values. They are metadata that gives information about a + # particular value added to a Distribution bucket, such as a trace ID that + # was active when a value was added. They may contain further information, + # such as a example values and timestamps, origin, etc. + # @!attribute [rw] value + # @return [::Float] + # Value of the exemplar point. This value determines to which bucket the + # exemplar belongs. + # @!attribute [rw] timestamp + # @return [::Google::Protobuf::Timestamp] + # The observation (sampling) time of the above value. + # @!attribute [rw] attachments + # @return [::Array<::Google::Protobuf::Any>] + # Contextual information about the example value. Examples are: + # + # Trace: type.googleapis.com/google.monitoring.v3.SpanContext + # + # Literal string: type.googleapis.com/google.protobuf.StringValue + # + # Labels dropped during aggregation: + # type.googleapis.com/google.monitoring.v3.DroppedLabels + # + # There may be only a single attachment of any given message type in a + # single exemplar, and this is enforced by the system. + class Exemplar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb new file mode 100644 index 000000000000..02d2f8d451f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 description of a label. + # @!attribute [rw] key + # @return [::String] + # The label key. + # @!attribute [rw] value_type + # @return [::Google::Api::LabelDescriptor::ValueType] + # The type of data that can be assigned to the label. + # @!attribute [rw] description + # @return [::String] + # A human-readable description for the label. + class LabelDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value types that can be used as label values. + module ValueType + # A variable-length string. This is the default. + STRING = 0 + + # Boolean; true or false. + BOOL = 1 + + # A 64-bit signed integer. + INT64 = 2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb new file mode 100644 index 000000000000..56510feeee0f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb @@ -0,0 +1,299 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Defines a metric type and its schema. Once a metric descriptor is created, + # deleting or altering it stops data collection and makes the metric type's + # existing data unusable. + # @!attribute [rw] name + # @return [::String] + # The resource name of the metric descriptor. + # @!attribute [rw] type + # @return [::String] + # The metric type, including its DNS name prefix. The type is not + # URL-encoded. All user-defined metric types have the DNS name + # `custom.googleapis.com` or `external.googleapis.com`. Metric types should + # use a natural hierarchical grouping. For example: + # + # "custom.googleapis.com/invoice/paid/amount" + # "external.googleapis.com/prometheus/up" + # "appengine.googleapis.com/http/server/response_latencies" + # @!attribute [rw] labels + # @return [::Array<::Google::Api::LabelDescriptor>] + # The set of labels that can be used to describe a specific + # instance of this metric type. For example, the + # `appengine.googleapis.com/http/server/response_latencies` metric + # type has a label for the HTTP response code, `response_code`, so + # you can look at latencies for successful responses or just + # for responses that failed. + # @!attribute [rw] metric_kind + # @return [::Google::Api::MetricDescriptor::MetricKind] + # Whether the metric records instantaneous values, changes to a value, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] value_type + # @return [::Google::Api::MetricDescriptor::ValueType] + # Whether the measurement is an integer, a floating-point number, etc. + # Some combinations of `metric_kind` and `value_type` might not be supported. + # @!attribute [rw] unit + # @return [::String] + # The units in which the metric value is reported. It is only applicable + # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + # defines the representation of the stored metric values. + # + # Different systems might scale the values to be more easily displayed (so a + # value of `0.02kBy` _might_ be displayed as `20By`, and a value of + # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is + # `kBy`, then the value of the metric is always in thousands of bytes, no + # matter how it might be displayed. + # + # If you want a custom metric to record the exact number of CPU-seconds used + # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is + # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 + # CPU-seconds, then the value is written as `12005`. + # + # Alternatively, if you want a custom metric to record data in a more + # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is + # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), + # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). + # + # The supported units are a subset of [The Unified Code for Units of + # Measure](https://unitsofmeasure.org/ucum.html) standard: + # + # **Basic units (UNIT)** + # + # * `bit` bit + # * `By` byte + # * `s` second + # * `min` minute + # * `h` hour + # * `d` day + # * `1` dimensionless + # + # **Prefixes (PREFIX)** + # + # * `k` kilo (10^3) + # * `M` mega (10^6) + # * `G` giga (10^9) + # * `T` tera (10^12) + # * `P` peta (10^15) + # * `E` exa (10^18) + # * `Z` zetta (10^21) + # * `Y` yotta (10^24) + # + # * `m` milli (10^-3) + # * `u` micro (10^-6) + # * `n` nano (10^-9) + # * `p` pico (10^-12) + # * `f` femto (10^-15) + # * `a` atto (10^-18) + # * `z` zepto (10^-21) + # * `y` yocto (10^-24) + # + # * `Ki` kibi (2^10) + # * `Mi` mebi (2^20) + # * `Gi` gibi (2^30) + # * `Ti` tebi (2^40) + # * `Pi` pebi (2^50) + # + # **Grammar** + # + # The grammar also includes these connectors: + # + # * `/` division or ratio (as an infix operator). For examples, + # `kBy/{email}` or `MiBy/10ms` (although you should almost never + # have `/s` in a metric `unit`; rates should always be computed at + # query time from the underlying cumulative or delta value). + # * `.` multiplication or composition (as an infix operator). For + # examples, `GBy.d` or `k{watt}.h`. + # + # The grammar for a unit is as follows: + # + # Expression = Component { "." Component } { "/" Component } ; + # + # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] + # | Annotation + # | "1" + # ; + # + # Annotation = "{" NAME "}" ; + # + # Notes: + # + # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + # is used alone, then the unit is equivalent to `1`. For examples, + # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. + # * `NAME` is a sequence of non-blank printable ASCII characters not + # containing `{` or `}`. + # * `1` represents a unitary [dimensionless + # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + # as in `1/s`. It is typically used when none of the basic units are + # appropriate. For example, "new users per day" can be represented as + # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new + # users). Alternatively, "thousands of page views per day" would be + # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric + # value of `5.3` would mean "5300 page views per day"). + # * `%` represents dimensionless value of 1/100, and annotates values giving + # a percentage (so the metric values are typically in the range of 0..100, + # and a metric value `3` means "3 percent"). + # * `10^2.%` indicates a metric contains a ratio, typically in the range + # 0..1, that will be multiplied by 100 and displayed as a percentage + # (so a metric value `0.03` means "3 percent"). + # @!attribute [rw] description + # @return [::String] + # A detailed description of the metric, which can be used in documentation. + # @!attribute [rw] display_name + # @return [::String] + # A concise name for the metric, which can be displayed in user interfaces. + # Use sentence case without an ending period, for example "Request count". + # This field is optional but it is recommended to be set for any metrics + # associated with user-visible concepts, such as Quota. + # @!attribute [rw] metadata + # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] + # Optional. Metadata which can be used to guide usage of the metric. + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Optional. The launch stage of the metric definition. + # @!attribute [rw] monitored_resource_types + # @return [::Array<::String>] + # Read-only. If present, then a [time + # series][google.monitoring.v3.TimeSeries], which is identified partially by + # a metric type and a + # [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that + # is associated with this metric type can only be associated with one of the + # monitored resource types listed here. + class MetricDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional annotations that can be used to guide the usage of a metric. + # @!attribute [rw] launch_stage + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Api::LaunchStage] + # Deprecated. Must use the + # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} + # instead. + # @!attribute [rw] sample_period + # @return [::Google::Protobuf::Duration] + # The sampling period of metric data points. For metrics which are written + # periodically, consecutive data points are stored at this time interval, + # excluding data loss due to errors. Metrics with a higher granularity have + # a smaller sampling period. + # @!attribute [rw] ingest_delay + # @return [::Google::Protobuf::Duration] + # The delay of data points caused by ingestion. Data points older than this + # age are guaranteed to be ingested and available to be read, excluding + # data loss due to errors. + # @!attribute [rw] time_series_resource_hierarchy_level + # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] + # The scope of the timeseries data of the metric. + class MetricDescriptorMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The resource hierarchy level of the timeseries data of a metric. + module TimeSeriesResourceHierarchyLevel + # Do not use this default value. + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 + + # Scopes a metric to a project. + PROJECT = 1 + + # Scopes a metric to an organization. + ORGANIZATION = 2 + + # Scopes a metric to a folder. + FOLDER = 3 + end + end + + # The kind of measurement. It describes how the data is reported. + # For information on setting the start time and end time based on + # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. + module MetricKind + # Do not use this default value. + METRIC_KIND_UNSPECIFIED = 0 + + # An instantaneous measurement of a value. + GAUGE = 1 + + # The change in a value during a time interval. + DELTA = 2 + + # A value accumulated over a time interval. Cumulative + # measurements in a time series should have the same start time + # and increasing end times, until an event resets the cumulative + # value to zero and sets a new start time for the following + # points. + CUMULATIVE = 3 + end + + # The value type of a metric. + module ValueType + # Do not use this default value. + VALUE_TYPE_UNSPECIFIED = 0 + + # The value is a boolean. + # This value type can be used only if the metric kind is `GAUGE`. + BOOL = 1 + + # The value is a signed 64-bit integer. + INT64 = 2 + + # The value is a double precision floating point number. + DOUBLE = 3 + + # The value is a text string. + # This value type can be used only if the metric kind is `GAUGE`. + STRING = 4 + + # The value is a {::Google::Api::Distribution `Distribution`}. + DISTRIBUTION = 5 + + # The value is money. + MONEY = 6 + end + end + + # A specific metric, identified by specifying values for all of the + # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. + # @!attribute [rw] type + # @return [::String] + # An existing metric type, see + # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, + # `custom.googleapis.com/invoice/paid/amount`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # The set of label values that uniquely identify this metric. All + # labels listed in the `MetricDescriptor` must be assigned values. + class Metric + 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 + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb new file mode 100644 index 000000000000..c6820b25d3aa --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb @@ -0,0 +1,278 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + # A migration workflow which specifies what needs to be done for an EDW + # migration. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. Identifier. The unique identifier for the migration + # workflow. The ID is server-generated. + # + # Example: `projects/123/locations/us/workflows/345` + # @!attribute [rw] display_name + # @return [::String] + # The display name of the workflow. This can be set to give a workflow + # a descriptive name. There is no guarantee or enforcement of uniqueness. + # @!attribute [rw] tasks + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Migration::V2::MigrationTask}] + # The tasks in a workflow in a named map. The name (i.e. key) has no + # meaning and is merely a convenient way to address a specific task + # in a workflow. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow::State] + # Output only. That status of the workflow. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time when the workflow was created. + # @!attribute [rw] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Time when the workflow was last updated. + class MigrationWorkflow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask] + class TasksEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible migration workflow states. + module State + # Workflow state is unspecified. + STATE_UNSPECIFIED = 0 + + # Workflow is in draft status, i.e. tasks are not yet eligible for + # execution. + DRAFT = 1 + + # Workflow is running (i.e. tasks are eligible for execution). + RUNNING = 2 + + # Workflow is paused. Tasks currently in progress may continue, but no + # further tasks will be scheduled. + PAUSED = 3 + + # Workflow is complete. There should not be any task in a non-terminal + # state, but if they are (e.g. forced termination), they will not be + # scheduled. + COMPLETED = 4 + end + end + + # A single task for a migration which has details about the configuration of + # the task. + # @!attribute [rw] translation_config_details + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationConfigDetails] + # Task configuration for CW Batch/Offline SQL Translation. + # + # Note: The following fields are mutually exclusive: `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] translation_details + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationDetails] + # Task details for unified SQL Translation. + # + # Note: The following fields are mutually exclusive: `translation_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] id + # @return [::String] + # Output only. Immutable. The unique identifier for the migration task. The + # ID is server-generated. + # @!attribute [rw] type + # @return [::String] + # The type of the task. This must be one of the supported task types: + # Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, + # Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, + # Translation_Snowflake2BQ, Translation_Netezza2BQ, + # Translation_AzureSynapse2BQ, Translation_Vertica2BQ, + # Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, + # Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask::State] + # Output only. The current state of the task. + # @!attribute [r] processing_error + # @return [::Google::Rpc::ErrorInfo] + # Output only. An explanation that may be populated when the task is in + # FAILED state. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time when the task was created. + # @!attribute [rw] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Time when the task was last updated. + # @!attribute [r] resource_error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] + # Output only. Provides details to errors and issues encountered while + # processing the task. Presence of error details does not mean that the task + # failed. + # @!attribute [rw] resource_error_count + # @return [::Integer] + # The number or resources with errors. Note: This is not the total + # number of errors as each resource can have more than one error. + # This is used to indicate truncation by having a `resource_error_count` + # that is higher than the size of `resource_error_details`. + # @!attribute [rw] metrics + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] + # The metrics for the task. + # @!attribute [r] task_result + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTaskResult] + # Output only. The result of the task. + # @!attribute [rw] total_processing_error_count + # @return [::Integer] + # Count of all the processing errors in this task and its subtasks. + # @!attribute [rw] total_resource_error_count + # @return [::Integer] + # Count of all the resource errors in this task and its subtasks. + class MigrationTask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a migration task. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The task is waiting for orchestration. + PENDING = 1 + + # The task is assigned to an orchestrator. + ORCHESTRATING = 2 + + # The task is running, i.e. its subtasks are ready for execution. + RUNNING = 3 + + # Tha task is paused. Assigned subtasks can continue, but no new subtasks + # will be scheduled. + PAUSED = 4 + + # The task finished successfully. + SUCCEEDED = 5 + + # The task finished unsuccessfully. + FAILED = 6 + end + end + + # A subtask for a migration which carries details about the configuration of + # the subtask. The content of the details should not matter to the end user, + # but is a contract between the subtask creator and subtask worker. + # @!attribute [r] name + # @return [::String] + # Output only. Immutable. The resource name for the migration subtask. The ID + # is server-generated. + # + # Example: `projects/123/locations/us/workflows/345/subtasks/678` + # @!attribute [rw] task_id + # @return [::String] + # The unique ID of the task to which this subtask belongs. + # @!attribute [rw] type + # @return [::String] + # The type of the Subtask. The migration service does not check whether this + # is a known type. It is up to the task creator (i.e. orchestrator or worker) + # to ensure it only creates subtasks for which there are compatible workers + # polling for Subtasks. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask::State] + # Output only. The current state of the subtask. + # @!attribute [r] processing_error + # @return [::Google::Rpc::ErrorInfo] + # Output only. An explanation that may be populated when the task is in + # FAILED state. + # @!attribute [r] resource_error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] + # Output only. Provides details to errors and issues encountered while + # processing the subtask. Presence of error details does not mean that the + # subtask failed. + # @!attribute [rw] resource_error_count + # @return [::Integer] + # The number or resources with errors. Note: This is not the total + # number of errors as each resource can have more than one error. + # This is used to indicate truncation by having a `resource_error_count` + # that is higher than the size of `resource_error_details`. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time when the subtask was created. + # @!attribute [rw] last_update_time + # @return [::Google::Protobuf::Timestamp] + # Time when the subtask was last updated. + # @!attribute [rw] metrics + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] + # The metrics for the subtask. + class MigrationSubtask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible states of a migration subtask. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The subtask is ready, i.e. it is ready for execution. + ACTIVE = 1 + + # The subtask is running, i.e. it is assigned to a worker for execution. + RUNNING = 2 + + # The subtask finished successfully. + SUCCEEDED = 3 + + # The subtask finished unsuccessfully. + FAILED = 4 + + # The subtask is paused, i.e., it will not be scheduled. If it was already + # assigned,it might still finish but no new lease renewals will be granted. + PAUSED = 5 + + # The subtask is pending a dependency. It will be scheduled once its + # dependencies are done. + PENDING_DEPENDENCY = 6 + end + end + + # The migration task result. + # @!attribute [rw] translation_task_result + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationTaskResult] + # Details specific to translation task types. + class MigrationTaskResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Translation specific result details from the migration task. + # @!attribute [rw] translated_literals + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Literal>] + # The list of the translated literals. + # @!attribute [rw] report_log_messages + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::GcsReportLogMessage>] + # The records from the aggregate CSV report for a migration workflow. + class TranslationTaskResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb new file mode 100644 index 000000000000..29dfe6d0ee40 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.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! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # Provides details for errors and the corresponding resources. + # @!attribute [rw] resource_info + # @return [::Google::Rpc::ResourceInfo] + # Required. Information about the resource where the error is located. + # @!attribute [rw] error_details + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ErrorDetail>] + # Required. The error details for the resource. + # @!attribute [rw] error_count + # @return [::Integer] + # Required. How many errors there are in total for the resource. Truncation + # can be indicated by having an `error_count` that is higher than the size of + # `error_details`. + class ResourceErrorDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides details for errors, e.g. issues that where encountered when + # processing a subtask. + # @!attribute [rw] location + # @return [::Google::Cloud::Bigquery::Migration::V2::ErrorLocation] + # Optional. The exact location within the resource (if applicable). + # @!attribute [rw] error_info + # @return [::Google::Rpc::ErrorInfo] + # Required. Describes the cause of the error with structured detail. + class ErrorDetail + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds information about where the error is located. + # @!attribute [rw] line + # @return [::Integer] + # Optional. If applicable, denotes the line where the error occurred. A zero + # value means that there is no line information. + # @!attribute [rw] column + # @return [::Integer] + # Optional. If applicable, denotes the column where the error occurred. A + # zero value means that there is no columns information. + class ErrorLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb new file mode 100644 index 000000000000..41e34dd60654 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb @@ -0,0 +1,129 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + # The metrics object for a SubTask. + # @!attribute [rw] metric + # @return [::String] + # Required. The name of the metric. + # + # If the metric is not known by the service yet, it will be auto-created. + # @!attribute [rw] value_type + # @return [::Google::Api::MetricDescriptor::ValueType] + # Required. The value type of the time series. + # @!attribute [rw] metric_kind + # @return [::Google::Api::MetricDescriptor::MetricKind] + # Optional. The metric kind of the time series. + # + # If present, it must be the same as the metric kind of the associated + # metric. If the associated metric's descriptor must be auto-created, then + # this field specifies the metric kind of the new descriptor and must be + # either `GAUGE` (the default) or `CUMULATIVE`. + # @!attribute [rw] points + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Point>] + # Required. The data points of this time series. When listing time series, + # points are returned in reverse time order. + # + # When creating a time series, this field must contain exactly one point and + # the point's type must be the same as the value type of the associated + # metric. If the associated metric's descriptor must be auto-created, then + # the value type of the descriptor is determined by the point's type, which + # must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + class TimeSeries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single data point in a time series. + # @!attribute [rw] interval + # @return [::Google::Cloud::Bigquery::Migration::V2::TimeInterval] + # The time interval to which the data point applies. For `GAUGE` metrics, + # the start time does not need to be supplied, but if it is supplied, it must + # equal the end time. For `DELTA` metrics, the start and end time should + # specify a non-zero interval, with subsequent points specifying contiguous + # and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + # time should specify a non-zero interval, with subsequent points specifying + # the same start time and increasing end times, until an event resets the + # cumulative value to zero and sets a new start time for the following + # points. + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Migration::V2::TypedValue] + # The value of the data point. + class Point + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A time interval extending just after a start time through an end time. + # If the start time is the same as the end time, then the interval + # represents a single point in time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. The beginning of the time interval. The default value + # for the start time is the end time. The start time must not be + # later than the end time. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. The end of the time interval. + class TimeInterval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single strongly-typed value. + # @!attribute [rw] bool_value + # @return [::Boolean] + # A Boolean value: `true` or `false`. + # + # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int64_value + # @return [::Integer] + # A 64-bit integer. Its range is approximately `+/-9.2x10^18`. + # + # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_value + # @return [::Float] + # A 64-bit double-precision floating-point number. Its magnitude + # is approximately `+/-10^(+/-300)` and it has 16 significant digits of + # precision. + # + # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # A variable-length string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] distribution_value + # @return [::Google::Api::Distribution] + # A distribution value. + # + # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TypedValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb new file mode 100644 index 000000000000..d833be3e5b1d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb @@ -0,0 +1,166 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + # Request to create a migration workflow resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project to which this migration workflow belongs. + # Example: `projects/foo/locations/bar` + # @!attribute [rw] migration_workflow + # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] + # Required. The migration workflow to create. + class CreateMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be retrieved. + class GetMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list previously created migration workflows. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location of the migration workflows to list. + # Example: `projects/123/locations/us` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be retrieved. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of migration workflows to return. The service may return + # fewer than this number. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from previous `ListMigrationWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationWorkflows` + # must match the call that provided the page token. + class ListMigrationWorkflowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for a `ListMigrationWorkflows` call. + # @!attribute [rw] migration_workflows + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] + # The migration workflows for the specified project / location. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMigrationWorkflowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + class DeleteMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to start a previously created migration workflow. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration workflow. + # Example: `projects/123/locations/us/workflows/1234` + class StartMigrationWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a previously created migration subtasks. + # @!attribute [rw] name + # @return [::String] + # Required. The unique identifier for the migration subtask. + # Example: `projects/123/locations/us/workflows/1234/subtasks/543` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be retrieved. + class GetMigrationSubtaskRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list previously created migration subtasks. + # @!attribute [rw] parent + # @return [::String] + # Required. The migration task of the subtasks to list. + # Example: `projects/123/locations/us/workflows/1234` + # @!attribute [rw] read_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to be retrieved. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of migration tasks to return. The service may + # return fewer than this number. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from previous `ListMigrationSubtasks` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListMigrationSubtasks` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter to apply. This can be used to get the subtasks of a + # specific tasks in a workflow, e.g. `migration_task = "ab012"` where + # `"ab012"` is the task ID (not the name in the named map). + class ListMigrationSubtasksRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response object for a `ListMigrationSubtasks` call. + # @!attribute [rw] migration_subtasks + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] + # The migration subtasks for the specified task. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListMigrationSubtasksResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb new file mode 100644 index 000000000000..d0c7dde5e35b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + # The translation config to capture necessary settings for a translation task + # and subtask. + # @!attribute [rw] gcs_source_path + # @return [::String] + # The Cloud Storage path for a directory of files to translate in a task. + # @!attribute [rw] gcs_target_path + # @return [::String] + # The Cloud Storage path to write back the corresponding input files to. + # @!attribute [rw] name_mapping_list + # @return [::Google::Cloud::Bigquery::Migration::V2::ObjectNameMappingList] + # The mapping of objects to their desired output names in list form. + # @!attribute [rw] source_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] + # The dialect of the input files. + # @!attribute [rw] target_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] + # The target dialect for the engine to translate the input to. + # @!attribute [rw] source_env + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnv] + # The default source environment values for the translation. + # @!attribute [rw] request_source + # @return [::String] + # The indicator to show translation request initiator. + # @!attribute [rw] target_types + # @return [::Array<::String>] + # The types of output to generate, e.g. sql, metadata etc. If not specified, + # a default set of targets will be generated. Some additional target types + # may be slower to generate. See the documentation for the set of available + # target types. + class TranslationConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible dialect options for translation. + # @!attribute [rw] bigquery_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::BigQueryDialect] + # The BigQuery dialect + # + # Note: The following fields are mutually exclusive: `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hiveql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::HiveQLDialect] + # The HiveQL dialect + # + # Note: The following fields are mutually exclusive: `hiveql_dialect`, `bigquery_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] redshift_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::RedshiftDialect] + # The Redshift dialect + # + # Note: The following fields are mutually exclusive: `redshift_dialect`, `bigquery_dialect`, `hiveql_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] teradata_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect] + # The Teradata dialect + # + # Note: The following fields are mutually exclusive: `teradata_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oracle_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::OracleDialect] + # The Oracle dialect + # + # Note: The following fields are mutually exclusive: `oracle_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sparksql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SparkSQLDialect] + # The SparkSQL dialect + # + # Note: The following fields are mutually exclusive: `sparksql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] snowflake_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SnowflakeDialect] + # The Snowflake dialect + # + # Note: The following fields are mutually exclusive: `snowflake_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] netezza_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::NetezzaDialect] + # The Netezza dialect + # + # Note: The following fields are mutually exclusive: `netezza_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] azure_synapse_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::AzureSynapseDialect] + # The Azure Synapse dialect + # + # Note: The following fields are mutually exclusive: `azure_synapse_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vertica_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::VerticaDialect] + # The Vertica dialect + # + # Note: The following fields are mutually exclusive: `vertica_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sql_server_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SQLServerDialect] + # The SQL Server dialect + # + # Note: The following fields are mutually exclusive: `sql_server_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] postgresql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::PostgresqlDialect] + # The Postgresql dialect + # + # Note: The following fields are mutually exclusive: `postgresql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] presto_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::PrestoDialect] + # The Presto dialect + # + # Note: The following fields are mutually exclusive: `presto_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] mysql_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::MySQLDialect] + # The MySQL dialect + # + # Note: The following fields are mutually exclusive: `mysql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] db2_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::DB2Dialect] + # DB2 dialect + # + # Note: The following fields are mutually exclusive: `db2_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sqlite_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::SQLiteDialect] + # SQLite dialect + # + # Note: The following fields are mutually exclusive: `sqlite_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] greenplum_dialect + # @return [::Google::Cloud::Bigquery::Migration::V2::GreenplumDialect] + # Greenplum dialect + # + # Note: The following fields are mutually exclusive: `greenplum_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Dialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for BigQuery. + class BigQueryDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for HiveQL. + class HiveQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Redshift. + class RedshiftDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Teradata. + # @!attribute [rw] mode + # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect::Mode] + # Which Teradata sub-dialect mode the user specifies. + class TeradataDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The sub-dialect options for Teradata. + module Mode + # Unspecified mode. + MODE_UNSPECIFIED = 0 + + # Teradata SQL mode. + SQL = 1 + + # BTEQ mode (which includes SQL). + BTEQ = 2 + end + end + + # The dialect definition for Oracle. + class OracleDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SparkSQL. + class SparkSQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Snowflake. + class SnowflakeDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Netezza. + class NetezzaDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Azure Synapse. + class AzureSynapseDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Vertica. + class VerticaDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SQL Server. + class SQLServerDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Postgresql. + class PostgresqlDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Presto. + class PrestoDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for MySQL. + class MySQLDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for DB2. + class DB2Dialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for SQLite. + class SQLiteDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The dialect definition for Greenplum. + class GreenplumDialect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a map of name mappings using a list of key:value proto messages of + # existing name to desired output name. + # @!attribute [rw] name_map + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ObjectNameMapping>] + # The elements of the object name map. + class ObjectNameMappingList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a key-value pair of NameMappingKey to NameMappingValue to + # represent the mapping of SQL names from the input value to desired output. + # @!attribute [rw] source + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey] + # The name of the object in source that is being mapped. + # @!attribute [rw] target + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingValue] + # The desired target name of the object that is being mapped. + class ObjectNameMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The potential components of a full name mapping that will be mapped + # during translation in the source data warehouse. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey::Type] + # The type of object that is being mapped. + # @!attribute [rw] database + # @return [::String] + # The database name (BigQuery project ID equivalent in the source data + # warehouse). + # @!attribute [rw] schema + # @return [::String] + # The schema name (BigQuery dataset equivalent in the source data warehouse). + # @!attribute [rw] relation + # @return [::String] + # The relation name (BigQuery table or view equivalent in the source data + # warehouse). + # @!attribute [rw] attribute + # @return [::String] + # The attribute name (BigQuery column equivalent in the source data + # warehouse). + class NameMappingKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the object that is being mapped. + module Type + # Unspecified name mapping type. + TYPE_UNSPECIFIED = 0 + + # The object being mapped is a database. + DATABASE = 1 + + # The object being mapped is a schema. + SCHEMA = 2 + + # The object being mapped is a relation. + RELATION = 3 + + # The object being mapped is an attribute. + ATTRIBUTE = 4 + + # The object being mapped is a relation alias. + RELATION_ALIAS = 5 + + # The object being mapped is a an attribute alias. + ATTRIBUTE_ALIAS = 6 + + # The object being mapped is a function. + FUNCTION = 7 + end + end + + # The potential components of a full name mapping that will be mapped + # during translation in the target data warehouse. + # @!attribute [rw] database + # @return [::String] + # The database name (BigQuery project ID equivalent in the target data + # warehouse). + # @!attribute [rw] schema + # @return [::String] + # The schema name (BigQuery dataset equivalent in the target data warehouse). + # @!attribute [rw] relation + # @return [::String] + # The relation name (BigQuery table or view equivalent in the target data + # warehouse). + # @!attribute [rw] attribute + # @return [::String] + # The attribute name (BigQuery column equivalent in the target data + # warehouse). + class NameMappingValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the default source environment values for the translation. + # @!attribute [rw] default_database + # @return [::String] + # The default database name to fully qualify SQL objects when their database + # name is missing. + # @!attribute [rw] schema_search_path + # @return [::Array<::String>] + # The schema search path. When SQL objects are missing schema name, + # translation engine will search through this list to find the value. + # @!attribute [rw] metadata_store_dataset + # @return [::String] + # Optional. Expects a valid BigQuery dataset ID that exists, e.g., + # project-123.metadata_store_123. If specified, translation will search and + # read the required schema information from a metadata store in this dataset. + # If metadata store doesn't exist, translation will parse the metadata file + # and upload the schema info to a temp table in the dataset to speed up + # future translation jobs. + class SourceEnv + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb new file mode 100644 index 000000000000..46a35f58930e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + # The translation details to capture the necessary settings for a translation + # job. + # @!attribute [rw] source_target_mapping + # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SourceTargetMapping>] + # The mapping from source to target SQL. + # @!attribute [rw] target_base_uri + # @return [::String] + # The base URI for all writes to persistent storage. + # @!attribute [rw] source_environment + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnvironment] + # The default source environment values for the translation. + # @!attribute [rw] target_return_literals + # @return [::Array<::String>] + # The list of literal targets that will be directly returned to the response. + # Each entry consists of the constructed path, EXCLUDING the base path. Not + # providing a target_base_uri will prevent writing to persistent storage. + # @!attribute [rw] target_types + # @return [::Array<::String>] + # The types of output to generate, e.g. sql, metadata, + # lineage_from_sql_scripts, etc. If not specified, a default set of + # targets will be generated. Some additional target types may be slower to + # generate. See the documentation for the set of available target types. + class TranslationDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents one mapping from a source SQL to a target SQL. + # @!attribute [rw] source_spec + # @return [::Google::Cloud::Bigquery::Migration::V2::SourceSpec] + # The source SQL or the path to it. + # @!attribute [rw] target_spec + # @return [::Google::Cloud::Bigquery::Migration::V2::TargetSpec] + # The target SQL or the path for it. + class SourceTargetMapping + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents one path to the location that holds source data. + # @!attribute [rw] base_uri + # @return [::String] + # The base URI for all files to be read in as sources for translation. + # + # Note: The following fields are mutually exclusive: `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] literal + # @return [::Google::Cloud::Bigquery::Migration::V2::Literal] + # Source literal. + # + # Note: The following fields are mutually exclusive: `literal`, `base_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] encoding + # @return [::String] + # Optional. The optional field to specify the encoding of the sql bytes. + class SourceSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents one path to the location that holds target data. + # @!attribute [rw] relative_path + # @return [::String] + # The relative path for the target data. Given source file + # `base_uri/input/sql`, the output would be + # `target_base_uri/sql/relative_path/input.sql`. + class TargetSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Literal data. + # @!attribute [rw] literal_string + # @return [::String] + # Literal string data. + # + # Note: The following fields are mutually exclusive: `literal_string`, `literal_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] literal_bytes + # @return [::String] + # Literal byte data. + # + # Note: The following fields are mutually exclusive: `literal_bytes`, `literal_string`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] relative_path + # @return [::String] + # Required. The identifier of the literal entry. + class Literal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the default source environment values for the translation. + # @!attribute [rw] default_database + # @return [::String] + # The default database name to fully qualify SQL objects when their database + # name is missing. + # @!attribute [rw] schema_search_path + # @return [::Array<::String>] + # The schema search path. When SQL objects are missing schema name, + # translation engine will search through this list to find the value. + # @!attribute [rw] metadata_store_dataset + # @return [::String] + # Optional. Expects a validQ BigQuery dataset ID that exists, e.g., + # project-123.metadata_store_123. If specified, translation will search and + # read the required schema information from a metadata store in this dataset. + # If metadata store doesn't exist, translation will parse the metadata file + # and upload the schema info to a temp table in the dataset to speed up + # future translation jobs. + class SourceEnvironment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb new file mode 100644 index 000000000000..ba08b1dfb393 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Migration + module V2 + # Details about a record. + # @!attribute [rw] severity + # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationReportRecord::Severity] + # Severity of the translation record. + # @!attribute [rw] script_line + # @return [::Integer] + # Specifies the row from the source text where the error occurred (0 based). + # Example: 2 + # @!attribute [rw] script_column + # @return [::Integer] + # Specifies the column from the source texts where the error occurred. (0 + # based) example: 6 + # @!attribute [rw] category + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] message + # @return [::String] + # Detailed message of the record. + class TranslationReportRecord + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity type of the record. + module Severity + # SeverityType not specified. + SEVERITY_UNSPECIFIED = 0 + + # INFO type. + INFO = 1 + + # WARNING type. The translated query may still provide useful information + # if all the report records are WARNING. + WARNING = 2 + + # ERROR type. Translation failed. + ERROR = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb new file mode 100644 index 000000000000..13d55b41ed54 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.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! + + +module Google + module Cloud + module Bigquery + module Migration + module V2 + # A record in the aggregate CSV report for a migration workflow + # @!attribute [rw] severity + # @return [::String] + # Severity of the translation record. + # @!attribute [rw] category + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] file_path + # @return [::String] + # The file path in which the error occurred + # @!attribute [rw] filename + # @return [::String] + # The file name in which the error occurred + # @!attribute [rw] source_script_line + # @return [::Integer] + # Specifies the row from the source text where the error occurred (0 based, + # -1 for messages without line location). Example: 2 + # @!attribute [rw] source_script_column + # @return [::Integer] + # Specifies the column from the source texts where the error occurred. (0 + # based, -1 for messages without column location) example: 6 + # @!attribute [rw] message + # @return [::String] + # Detailed message of the record. + # @!attribute [rw] script_context + # @return [::String] + # The script context (obfuscated) in which the error occurred + # @!attribute [rw] action + # @return [::String] + # Category of the error/warning. Example: SyntaxError + # @!attribute [rw] effect + # @return [::String] + # Effect of the error/warning. Example: COMPATIBILITY + # @!attribute [rw] object_name + # @return [::String] + # Name of the affected object in the log message. + class GcsReportLogMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb new file mode 100644 index 000000000000..877bfaef4149 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb @@ -0,0 +1,420 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Describes the cause of the error with structured details. + # + # Example of an error when contacting the "pubsub.googleapis.com" API when it + # is not enabled: + # + # { "reason": "API_DISABLED" + # "domain": "googleapis.com" + # "metadata": { + # "resource": "projects/123", + # "service": "pubsub.googleapis.com" + # } + # } + # + # This response indicates that the pubsub.googleapis.com API is not enabled. + # + # Example of an error that is returned when attempting to create a Spanner + # instance in a region that is out of stock: + # + # { "reason": "STOCKOUT" + # "domain": "spanner.googleapis.com", + # "metadata": { + # "availableRegions": "us-central1,us-east2" + # } + # } + # @!attribute [rw] reason + # @return [::String] + # The reason of the error. This is a constant value that identifies the + # proximate cause of the error. Error reasons are unique within a particular + # domain of errors. This should be at most 63 characters and match a + # regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents + # UPPER_SNAKE_CASE. + # @!attribute [rw] domain + # @return [::String] + # The logical grouping to which the "reason" belongs. The error domain + # is typically the registered service name of the tool or product that + # generates the error. Example: "pubsub.googleapis.com". If the error is + # generated by some common infrastructure, the error domain must be a + # globally unique value that identifies the infrastructure. For Google API + # infrastructure, the error domain is "googleapis.com". + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Additional structured details about this error. + # + # Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should + # ideally be lowerCamelCase. Also, they must be limited to 64 characters in + # length. When identifying the current value of an exceeded limit, the units + # should be contained in the key, not the value. For example, rather than + # `{"instanceLimit": "100/request"}`, should be returned as, + # `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of + # instances that can be created in a single (batch) request. + class ErrorInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes when the clients can retry a failed request. Clients could ignore + # the recommendation here or retry when this information is missing from error + # responses. + # + # It's always recommended that clients should use exponential backoff when + # retrying. + # + # Clients should wait until `retry_delay` amount of time has passed since + # receiving the error response before retrying. If retrying requests also + # fail, clients should use an exponential backoff scheme to gradually increase + # the delay between retries based on `retry_delay`, until either a maximum + # number of retries have been reached or a maximum retry delay cap has been + # reached. + # @!attribute [rw] retry_delay + # @return [::Google::Protobuf::Duration] + # Clients should wait at least this long between retrying the same request. + class RetryInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes additional debugging info. + # @!attribute [rw] stack_entries + # @return [::Array<::String>] + # The stack trace entries indicating where the error occurred. + # @!attribute [rw] detail + # @return [::String] + # Additional debugging information provided by the server. + class DebugInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes how a quota check failed. + # + # For example if a daily limit was exceeded for the calling project, + # a service could respond with a QuotaFailure detail containing the project + # id and the description of the quota limit that was exceeded. If the + # calling project hasn't enabled the service in the developer console, then + # a service could respond with the project id and set `service_disabled` + # to true. + # + # Also see RetryInfo and Help types for other details about handling a + # quota failure. + # @!attribute [rw] violations + # @return [::Array<::Google::Rpc::QuotaFailure::Violation>] + # Describes all quota violations. + class QuotaFailure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single quota violation. For example, a + # daily quota or a custom quota that was exceeded. + # @!attribute [rw] subject + # @return [::String] + # The subject on which the quota check failed. + # For example, "clientip:" or "project:". + # @!attribute [rw] description + # @return [::String] + # A description of how the quota check failed. Clients can use this + # description to find more about the quota configuration in the service's + # public documentation, or find the relevant quota limit to adjust through + # developer console. + # + # For example: "Service disabled" or "Daily Limit for read operations + # exceeded". + # @!attribute [rw] api_service + # @return [::String] + # The API Service from which the `QuotaFailure.Violation` orginates. In + # some cases, Quota issues originate from an API Service other than the one + # that was called. In other words, a dependency of the called API Service + # could be the cause of the `QuotaFailure`, and this field would have the + # dependency API service name. + # + # For example, if the called API is Kubernetes Engine API + # (container.googleapis.com), and a quota violation occurs in the + # Kubernetes Engine API itself, this field would be + # "container.googleapis.com". On the other hand, if the quota violation + # occurs when the Kubernetes Engine API creates VMs in the Compute Engine + # API (compute.googleapis.com), this field would be + # "compute.googleapis.com". + # @!attribute [rw] quota_metric + # @return [::String] + # The metric of the violated quota. A quota metric is a named counter to + # measure usage, such as API requests or CPUs. When an activity occurs in a + # service, such as Virtual Machine allocation, one or more quota metrics + # may be affected. + # + # For example, "compute.googleapis.com/cpus_per_vm_family", + # "storage.googleapis.com/internet_egress_bandwidth". + # @!attribute [rw] quota_id + # @return [::String] + # The id of the violated quota. Also know as "limit name", this is the + # unique identifier of a quota in the context of an API service. + # + # For example, "CPUS-PER-VM-FAMILY-per-project-region". + # @!attribute [rw] quota_dimensions + # @return [::Google::Protobuf::Map{::String => ::String}] + # The dimensions of the violated quota. Every non-global quota is enforced + # on a set of dimensions. While quota metric defines what to count, the + # dimensions specify for what aspects the counter should be increased. + # + # For example, the quota "CPUs per region per VM family" enforces a limit + # on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions + # "region" and "vm_family". And if the violation occurred in region + # "us-central1" and for VM family "n1", the quota_dimensions would be, + # + # { + # "region": "us-central1", + # "vm_family": "n1", + # } + # + # When a quota is enforced globally, the quota_dimensions would always be + # empty. + # @!attribute [rw] quota_value + # @return [::Integer] + # The enforced quota value at the time of the `QuotaFailure`. + # + # For example, if the enforced quota value at the time of the + # `QuotaFailure` on the number of CPUs is "10", then the value of this + # field would reflect this quantity. + # @!attribute [rw] future_quota_value + # @return [::Integer] + # The new quota value being rolled out at the time of the violation. At the + # completion of the rollout, this value will be enforced in place of + # quota_value. If no rollout is in progress at the time of the violation, + # this field is not set. + # + # For example, if at the time of the violation a rollout is in progress + # changing the number of CPUs quota from 10 to 20, 20 would be the value of + # this field. + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class QuotaDimensionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Describes what preconditions have failed. + # + # For example, if an RPC failed because it required the Terms of Service to be + # acknowledged, it could list the terms of service violation in the + # PreconditionFailure message. + # @!attribute [rw] violations + # @return [::Array<::Google::Rpc::PreconditionFailure::Violation>] + # Describes all precondition violations. + class PreconditionFailure + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single precondition failure. + # @!attribute [rw] type + # @return [::String] + # The type of PreconditionFailure. We recommend using a service-specific + # enum type to define the supported precondition violation subjects. For + # example, "TOS" for "Terms of Service violation". + # @!attribute [rw] subject + # @return [::String] + # The subject, relative to the type, that failed. + # For example, "google.com/cloud" relative to the "TOS" type would indicate + # which terms of service is being referenced. + # @!attribute [rw] description + # @return [::String] + # A description of how the precondition failed. Developers can use this + # description to understand how to fix the failure. + # + # For example: "Terms of service not accepted". + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes violations in a client request. This error type focuses on the + # syntactic aspects of the request. + # @!attribute [rw] field_violations + # @return [::Array<::Google::Rpc::BadRequest::FieldViolation>] + # Describes all violations in a client request. + class BadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A message type used to describe a single bad request field. + # @!attribute [rw] field + # @return [::String] + # A path that leads to a field in the request body. The value will be a + # sequence of dot-separated identifiers that identify a protocol buffer + # field. + # + # Consider the following: + # + # message CreateContactRequest { + # message EmailAddress { + # enum Type { + # TYPE_UNSPECIFIED = 0; + # HOME = 1; + # WORK = 2; + # } + # + # optional string email = 1; + # repeated EmailType type = 2; + # } + # + # string full_name = 1; + # repeated EmailAddress email_addresses = 2; + # } + # + # In this example, in proto `field` could take one of the following values: + # + # * `full_name` for a violation in the `full_name` value + # * `email_addresses[1].email` for a violation in the `email` field of the + # first `email_addresses` message + # * `email_addresses[3].type[2]` for a violation in the second `type` + # value in the third `email_addresses` message. + # + # In JSON, the same values are represented as: + # + # * `fullName` for a violation in the `fullName` value + # * `emailAddresses[1].email` for a violation in the `email` field of the + # first `emailAddresses` message + # * `emailAddresses[3].type[2]` for a violation in the second `type` + # value in the third `emailAddresses` message. + # @!attribute [rw] description + # @return [::String] + # A description of why the request element is bad. + # @!attribute [rw] reason + # @return [::String] + # The reason of the field-level error. This is a constant value that + # identifies the proximate cause of the field-level error. It should + # uniquely identify the type of the FieldViolation within the scope of the + # google.rpc.ErrorInfo.domain. This should be at most 63 + # characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, + # which represents UPPER_SNAKE_CASE. + # @!attribute [rw] localized_message + # @return [::Google::Rpc::LocalizedMessage] + # Provides a localized error message for field-level errors that is safe to + # return to the API consumer. + class FieldViolation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains metadata about the request that clients can attach when filing a bug + # or providing other forms of feedback. + # @!attribute [rw] request_id + # @return [::String] + # An opaque string that should only be interpreted by the service generating + # it. For example, it can be used to identify requests in the service's logs. + # @!attribute [rw] serving_data + # @return [::String] + # Any data that was used to serve this request. For example, an encrypted + # stack trace that can be sent back to the service provider for debugging. + class RequestInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the resource that is being accessed. + # @!attribute [rw] resource_type + # @return [::String] + # A name for the type of resource being accessed, e.g. "sql table", + # "cloud storage bucket", "file", "Google calendar"; or the type URL + # of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". + # @!attribute [rw] resource_name + # @return [::String] + # The name of the resource being accessed. For example, a shared calendar + # name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current + # error is + # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. + # @!attribute [rw] owner + # @return [::String] + # The owner of the resource (optional). + # For example, "user:" or "project:". + # @!attribute [rw] description + # @return [::String] + # Describes what error is encountered when accessing this resource. + # For example, updating a cloud project may require the `writer` permission + # on the developer console project. + class ResourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides links to documentation or for performing an out of band action. + # + # For example, if a quota check failed with an error indicating the calling + # project hasn't enabled the accessed service, this can contain a URL pointing + # directly to the right place in the developer console to flip the bit. + # @!attribute [rw] links + # @return [::Array<::Google::Rpc::Help::Link>] + # URL(s) pointing to additional information on handling the current error. + class Help + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a URL link. + # @!attribute [rw] description + # @return [::String] + # Describes what the link offers. + # @!attribute [rw] url + # @return [::String] + # The URL of the link. + class Link + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Provides a localized error message that is safe to return to the user + # which can be attached to an RPC error. + # @!attribute [rw] locale + # @return [::String] + # The locale used following the specification defined at + # https://www.rfc-editor.org/rfc/bcp/bcp47.txt. + # Examples are: "en-US", "fr-CH", "es-MX" + # @!attribute [rw] message + # @return [::String] + # The localized error message in the above locale. + class LocalizedMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile new file mode 100644 index 000000000000..4d1b3eac9aa1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2", path: "../" +else + gem "google-cloud-bigquery-migration-v2" +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-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb new file mode 100644 index 000000000000..eb3b21d627fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the create_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow. +# +def create_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new + + # Call the create_migration_workflow method. + result = client.create_migration_workflow request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb new file mode 100644 index 000000000000..add86a0f96f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the delete_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow. +# +def delete_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new + + # Call the delete_migration_workflow method. + result = client.delete_migration_workflow request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb new file mode 100644 index 000000000000..1e668aecb17b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.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 bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the get_migration_subtask call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask. +# +def get_migration_subtask + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new + + # Call the get_migration_subtask method. + result = client.get_migration_subtask request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb new file mode 100644 index 000000000000..835a5af7a227 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the get_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow. +# +def get_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new + + # Call the get_migration_workflow method. + result = client.get_migration_workflow request + + # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb new file mode 100644 index 000000000000..b526522af82b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.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 bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the list_migration_subtasks call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks. +# +def list_migration_subtasks + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new + + # Call the list_migration_subtasks method. + result = client.list_migration_subtasks 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::Bigquery::Migration::V2::MigrationSubtask. + p item + end +end +# [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb new file mode 100644 index 000000000000..acc8872c9867 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.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 bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the list_migration_workflows call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows. +# +def list_migration_workflows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new + + # Call the list_migration_workflows method. + result = client.list_migration_workflows 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::Bigquery::Migration::V2::MigrationWorkflow. + p item + end +end +# [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb new file mode 100644 index 000000000000..db1b4071ef4d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] +require "google/cloud/bigquery/migration/v2" + +## +# Snippet for the start_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow. +# +def start_migration_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new + + # Call the start_migration_workflow method. + result = client.start_migration_workflow request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json new file mode 100644 index 000000000000..a72510c3fe90 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-migration-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.migration.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync", + "title": "Snippet for the create_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow.", + "file": "migration_service/create_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "CreateMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync", + "title": "Snippet for the get_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow.", + "file": "migration_service/get_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "GetMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync", + "title": "Snippet for the list_migration_workflows call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows.", + "file": "migration_service/list_migration_workflows.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_migration_workflows", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "ListMigrationWorkflows", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync", + "title": "Snippet for the delete_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow.", + "file": "migration_service/delete_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "DeleteMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync", + "title": "Snippet for the start_migration_workflow call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow.", + "file": "migration_service/start_migration_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_migration_workflow", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "StartMigrationWorkflow", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync", + "title": "Snippet for the get_migration_subtask call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask.", + "file": "migration_service/get_migration_subtask.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_migration_subtask", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "GetMigrationSubtask", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync", + "title": "Snippet for the list_migration_subtasks call in the MigrationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks.", + "file": "migration_service/list_migration_subtasks.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_migration_subtasks", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse", + "client": { + "short_name": "MigrationService::Client", + "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" + }, + "method": { + "short_name": "ListMigrationSubtasks", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", + "service": { + "short_name": "MigrationService", + "full_name": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb new file mode 100644 index 000000000000..930bdb76bea3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/bigquery/migration/v2/migration_service" + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_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::Bigquery::Migration::V2::MigrationService::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_migration_subtask_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.migration_subtask_path project: "value0", location: "value1", workflow: "value2", subtask: "value3" + assert_equal "projects/value0/locations/value1/workflows/value2/subtasks/value3", path + end + end + + def test_migration_workflow_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.migration_workflow_path project: "value0", location: "value1", workflow: "value2" + assert_equal "projects/value0/locations/value1/workflows/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb new file mode 100644 index 000000000000..80f02da8615f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb @@ -0,0 +1,487 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service/rest" + + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_create_migration_workflow + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + migration_workflow = {} + + create_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_create_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_migration_workflow_client_stub.call_count + end + end + end + + def test_get_migration_workflow + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_migration_workflow({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_migration_workflow name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_migration_workflow({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_migration_workflow_client_stub.call_count + end + end + end + + def test_list_migration_workflows + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + + list_migration_workflows_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_workflows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_migration_workflows_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows({ parent: parent, read_mask: read_mask, 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_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows_client_stub.call_count + end + end + end + + def test_delete_migration_workflow + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_delete_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_migration_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_migration_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_migration_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_migration_workflow_client_stub.call_count + end + end + end + + def test_start_migration_workflow + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_start_migration_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_migration_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_migration_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_migration_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_migration_workflow_client_stub.call_count + end + end + end + + def test_get_migration_subtask + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + read_mask = {} + + get_migration_subtask_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_subtask_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_migration_subtask_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_migration_subtask({ name: name, read_mask: read_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_migration_subtask name: name, read_mask: read_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_migration_subtask({ name: name, read_mask: read_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_migration_subtask_client_stub.call_count + end + end + end + + def test_list_migration_subtasks + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + read_mask = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_migration_subtasks_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_subtasks_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_migration_subtasks_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks parent: parent, read_mask: read_mask, 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_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks_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::Bigquery::Migration::V2::MigrationService::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::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb new file mode 100644 index 000000000000..6e5729ddc0c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb @@ -0,0 +1,540 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/migration/v2/migration_service_pb" +require "google/cloud/bigquery/migration/v2/migration_service" + +class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_create_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" + migration_workflow = {} + + create_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow), request["migration_workflow"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_migration_workflow_client_stub.call_rpc_count + end + end + + def test_get_migration_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" + read_mask = {} + + get_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_migration_workflow({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_migration_workflow name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_migration_workflow({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_migration_workflow_client_stub.call_rpc_count + end + end + + def test_list_migration_workflows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.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" + read_mask = {} + page_size = 42 + page_token = "hello world" + + list_migration_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_migration_workflows, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_migration_workflows_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_migration_workflows({ parent: parent, read_mask: read_mask, 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_migration_workflows parent: parent, read_mask: read_mask, 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_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows({ parent: parent, read_mask: read_mask, 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_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows_client_stub.call_rpc_count + end + end + + def test_delete_migration_workflow + # 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_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_migration_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_migration_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_migration_workflow({ 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_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.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_migration_workflow_client_stub.call_rpc_count + end + end + + def test_start_migration_workflow + # 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" + + start_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_migration_workflow, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_migration_workflow_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_migration_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_migration_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_migration_workflow({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.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, start_migration_workflow_client_stub.call_rpc_count + end + end + + def test_get_migration_subtask + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.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" + read_mask = {} + + get_migration_subtask_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_migration_subtask, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_migration_subtask_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_migration_subtask({ name: name, read_mask: read_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_migration_subtask name: name, read_mask: read_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_migration_subtask({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_migration_subtask_client_stub.call_rpc_count + end + end + + def test_list_migration_subtasks + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.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" + read_mask = {} + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_migration_subtasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_migration_subtasks, name + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] + 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_migration_subtasks_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks parent: parent, read_mask: read_mask, 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_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks_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::Bigquery::Migration::V2::MigrationService::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::Bigquery::Migration::V2::MigrationService::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::Bigquery::Migration::V2::MigrationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json new file mode 100644 index 000000000000..a2ae9c6f27bd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigqueryreservation.googleapis.com", + "api_shortname": "bigqueryreservation", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest", + "distribution_name": "google-cloud-bigquery-reservation-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigqueryreservation", + "name_pretty": "BigQuery Reservation V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/reference/reservations", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BIGQUERY_RESERVATION", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/reservations", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml new file mode 100644 index 000000000000..9001cc0bde65 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-reservation-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-bigquery-reservation-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts new file mode 100644 index 000000000000..9fa1700ac9d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Reservation 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-bigquery-reservation-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..0b1eacbc181a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-reservation-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-bigquery-reservation-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/bigquery/reservation/v1" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/reservation/v1" + +::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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-bigquery-reservation-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/bigquery/reservation/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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-bigquery-reservation-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md new file mode 100644 index 000000000000..38259ede0f03 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Reservation V1 API + +A service to modify your BigQuery reservations. + +The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Reservation V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-reservation](https://rubygems.org/gems/google-cloud-bigquery-reservation). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-reservation-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/bigqueryreservation.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/reservation/v1" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new +request = ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new # (request fields as keyword arguments...) +response = client.create_reservation request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/reservations) +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/bigquery/reservation/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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-bigquery-reservation`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-reservation-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-bigquery-reservation`. +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-bigquery-reservation-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-bigquery-reservation-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile new file mode 100644 index 000000000000..9f80b229812a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BIGQUERY_RESERVATION_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BIGQUERY_RESERVATION_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 BIGQUERY_RESERVATION_TEST_PROJECT=test123 BIGQUERY_RESERVATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BIGQUERY_RESERVATION_PROJECT"] = project + ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] = project + ENV["BIGQUERY_RESERVATION_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-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-reservation-v1" + header "google-cloud-bigquery-reservation-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-reservation-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json new file mode 100644 index 000000000000..effdec3d98a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.reservation.v1", + "libraryPackage": "::Google::Cloud::Bigquery::Reservation::V1", + "services": { + "ReservationService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client", + "rpcs": { + "CreateReservation": { + "methods": [ + "create_reservation" + ] + }, + "ListReservations": { + "methods": [ + "list_reservations" + ] + }, + "GetReservation": { + "methods": [ + "get_reservation" + ] + }, + "DeleteReservation": { + "methods": [ + "delete_reservation" + ] + }, + "UpdateReservation": { + "methods": [ + "update_reservation" + ] + }, + "FailoverReservation": { + "methods": [ + "failover_reservation" + ] + }, + "CreateCapacityCommitment": { + "methods": [ + "create_capacity_commitment" + ] + }, + "ListCapacityCommitments": { + "methods": [ + "list_capacity_commitments" + ] + }, + "GetCapacityCommitment": { + "methods": [ + "get_capacity_commitment" + ] + }, + "DeleteCapacityCommitment": { + "methods": [ + "delete_capacity_commitment" + ] + }, + "UpdateCapacityCommitment": { + "methods": [ + "update_capacity_commitment" + ] + }, + "SplitCapacityCommitment": { + "methods": [ + "split_capacity_commitment" + ] + }, + "MergeCapacityCommitments": { + "methods": [ + "merge_capacity_commitments" + ] + }, + "CreateAssignment": { + "methods": [ + "create_assignment" + ] + }, + "ListAssignments": { + "methods": [ + "list_assignments" + ] + }, + "DeleteAssignment": { + "methods": [ + "delete_assignment" + ] + }, + "SearchAssignments": { + "methods": [ + "search_assignments" + ] + }, + "SearchAllAssignments": { + "methods": [ + "search_all_assignments" + ] + }, + "MoveAssignment": { + "methods": [ + "move_assignment" + ] + }, + "UpdateAssignment": { + "methods": [ + "update_assignment" + ] + }, + "GetBiReservation": { + "methods": [ + "get_bi_reservation" + ] + }, + "UpdateBiReservation": { + "methods": [ + "update_bi_reservation" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "CreateReservationGroup": { + "methods": [ + "create_reservation_group" + ] + }, + "GetReservationGroup": { + "methods": [ + "get_reservation_group" + ] + }, + "DeleteReservationGroup": { + "methods": [ + "delete_reservation_group" + ] + }, + "ListReservationGroups": { + "methods": [ + "list_reservation_groups" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec new file mode 100644 index 000000000000..fe569f8caaa4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/reservation/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-reservation-v1" + gem.version = Google::Cloud::Bigquery::Reservation::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details." + gem.summary = "A service to modify your BigQuery reservations." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb new file mode 100644 index 000000000000..2ad2aa32f13c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-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/bigquery/reservation/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb new file mode 100644 index 000000000000..155fb2af6d91 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/reservation/v1/reservation_service" +require "google/cloud/bigquery/reservation/v1/version" + +module Google + module Cloud + module Bigquery + module Reservation + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/reservation/v1" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/bigquery/reservation/v1" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/reservation/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb new file mode 100644 index 000000000000..79aaffc28b87 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/reservation/v1/reservation.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/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n6google/cloud/bigquery/reservation/v1/reservation.proto\x12$google.cloud.bigquery.reservation.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xfc\x0c\n\x0bReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\rslot_capacity\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11ignore_idle_slots\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\tautoscale\x18\x07 \x01(\x0b\x32;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xe0\x41\x01\x12\x18\n\x0b\x63oncurrency\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\rcreation_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\"\n\x16multi_region_auxiliary\x18\x0e \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x11 \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x43\n\x10primary_location\x18\x12 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x12secondary_location\x18\x13 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!locations.googleapis.com/Location\x12L\n\x19original_primary_location\x18\x14 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\tmax_slots\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12X\n\x0cscaling_mode\x18\x16 \x01(\x0e\x32=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x17 \x03(\x0b\x32=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x11reservation_group\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x64\n\x12replication_status\x18\x18 \x01(\x0b\x32\x43.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xe0\x41\x03\x12V\n\x11scheduling_policy\x18\x1b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\x1a?\n\tAutoscale\x12\x1a\n\rcurrent_slots\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\xf8\x01\n\x11ReplicationStatus\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x38\n\x0flast_error_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x15last_replication_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x18soft_failover_start_time\x18\x04 \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\"c\n\x0bScalingMode\x12\x1c\n\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41UTOSCALE_ONLY\x10\x01\x12\x13\n\x0fIDLE_SLOTS_ONLY\x10\x02\x12\r\n\tALL_SLOTS\x10\x03:w\xea\x41t\n.bigqueryreservation.googleapis.com/Reservation\x12\x42projects/{project}/locations/{location}/reservations/{reservation}B\x0c\n\n_max_slots\"l\n\x10SchedulingPolicy\x12\x1d\n\x0b\x63oncurrency\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1b\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_concurrencyB\x0c\n\n_max_slots\"\xd5\x01\n\x10ReservationGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xad\x01\xea\x41\xa9\x01\n3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xaa\x08\n\x12\x43\x61pacityCommitment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nslot_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12Z\n\x04plan\x18\x03 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xe0\x41\x03\x12>\n\x15\x63ommitment_start_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13\x63ommitment_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x0e\x66\x61ilure_status\x18\x07 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x62\n\x0crenewal_plan\x18\x08 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12\"\n\x16multi_region_auxiliary\x18\n \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x0c \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x19\n\x0cis_flat_rate\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\"\xca\x01\n\x0e\x43ommitmentPlan\x12\x1f\n\x1b\x43OMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46LEX\x10\x03\x12\x16\n\x0e\x46LEX_FLAT_RATE\x10\x07\x1a\x02\x08\x01\x12\r\n\x05TRIAL\x10\x05\x1a\x02\x08\x01\x12\x0b\n\x07MONTHLY\x10\x02\x12\x19\n\x11MONTHLY_FLAT_RATE\x10\x08\x1a\x02\x08\x01\x12\n\n\x06\x41NNUAL\x10\x04\x12\x18\n\x10\x41NNUAL_FLAT_RATE\x10\t\x1a\x02\x08\x01\x12\x0e\n\nTHREE_YEAR\x10\n\x12\x08\n\x04NONE\x10\x06\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x8e\x01\xea\x41\x8a\x01\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xc2\x01\n\x18\x43reateReservationRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\n\x0ereservation_id\x18\x02 \x01(\t\x12\x46\n\x0breservation\x18\x03 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\n\x17ListReservationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"|\n\x18ListReservationsResponse\x12G\n\x0creservations\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x15GetReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"`\n\x18\x44\x65leteReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\n\x18UpdateReservationRequest\x12\x46\n\x0breservation\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb2\x01\n\x1a\x46\x61iloverReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\x12N\n\rfailover_mode\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xe0\x41\x01\"\xe7\x01\n\x1d\x43reateReservationGroupRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12!\n\x14reservation_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x11reservation_group\x18\x03 \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xe0\x41\x02\"g\n\x1aGetReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\n\x1cListReservationGroupsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1dListReservationGroupsResponse\x12R\n\x12reservation_groups\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1d\x44\x65leteReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\n\x1f\x43reateCapacityCommitmentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12U\n\x13\x63\x61pacity_commitment\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\n$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1e\n\x16\x63\x61pacity_commitment_id\x18\x05 \x01(\t\"\x96\x01\n\x1eListCapacityCommitmentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x92\x01\n\x1fListCapacityCommitmentsResponse\x12V\n\x14\x63\x61pacity_commitments\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x1cGetCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\"}\n\x1f\x44\x65leteCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\xa9\x01\n\x1fUpdateCapacityCommitmentRequest\x12U\n\x13\x63\x61pacity_commitment\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x81\x01\n\x1eSplitCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\n\nslot_count\x18\x02 \x01(\x03\"\xb4\x01\n\x1fSplitCapacityCommitmentResponse\x12G\n\x05\x66irst\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\n\x06second\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xb3\x01\n\x1fMergeCapacityCommitmentsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x1f\n\x17\x63\x61pacity_commitment_ids\x18\x02 \x03(\t\x12#\n\x16\x63\x61pacity_commitment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x06\n\nAssignment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x61ssignee\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12O\n\x08job_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xe0\x41\x01\x12J\n\x05state\x18\x06 \x01(\x0e\x32\x36.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xe0\x41\x03\x12(\n\x19\x65nable_gemini_in_bigquery\x18\n \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12V\n\x11scheduling_policy\x18\x0b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\"\xdc\x01\n\x07JobType\x12\x18\n\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08PIPELINE\x10\x01\x12\t\n\x05QUERY\x10\x02\x12\x0f\n\x0bML_EXTERNAL\x10\x03\x12\x0e\n\nBACKGROUND\x10\x04\x12\x0e\n\nCONTINUOUS\x10\x06\x12\"\n\x1e\x42\x41\x43KGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12$\n BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\n\x1f\x42\x41\x43KGROUND_SEARCH_INDEX_REFRESH\x10\t\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:\xa9\x01\xea\x41\xa5\x01\n-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0b\x61ssignments2\nassignment\"\xbd\x01\n\x17\x43reateAssignmentRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x44\n\nassignment\x18\x02 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\n\rassignment_id\x18\x04 \x01(\t\"\x86\x01\n\x16ListAssignmentsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17\x44\x65leteAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\"\x8b\x01\n\x18SearchAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8e\x01\n\x1bSearchAllAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"{\n\x19SearchAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x1cSearchAllAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbf\x01\n\x15MoveAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\x12J\n\x0e\x64\x65stination_id\x18\x03 \x01(\tB2\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\n\rassignment_id\x18\x05 \x01(\t\"\x90\x01\n\x17UpdateAssignmentRequest\x12\x44\n\nassignment\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Y\n\x0eTableReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08table_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xae\x02\n\rBiReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04size\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12S\n\x10preferred_tables\x18\x05 \x03(\x0b\x32\x34.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xe0\x41\x01:l\xea\x41i\n0bigqueryreservation.googleapis.com/BiReservation\x12\x35projects/{project}/locations/{location}/biReservation\"a\n\x17GetBiReservationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0bigqueryreservation.googleapis.com/BiReservation\"\x9a\x01\n\x1aUpdateBiReservationRequest\x12K\n\x0e\x62i_reservation\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.reservation.v1.BiReservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03*A\n\x0c\x46\x61iloverMode\x12\x1d\n\x19\x46\x41ILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SOFT\x10\x01\x12\x08\n\x04HARD\x10\x02\x32\xa3\x36\n\x12ReservationService\x12\xf1\x01\n\x11\x43reateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"i\xda\x41!parent,reservation,reservation_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0breservation\x12\xd4\x01\n\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1a>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/reservations\x12\xc1\x01\n\x0eGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/reservations/*}\x12\xac\x01\n\x11\x44\x65leteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xf3\x01\n\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"k\xda\x41\x17reservation,update_mask\x82\xd3\xe4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\nassignment\x12\xdf\x01\n\x0fListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1a=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xb8\x01\n\x10\x44\x65leteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xe5\x01\n\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1a?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xee\x01\n\x14SearchAllAssignments\x12\x41.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1a\x42.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xe5\x01\n\x0eMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"d\xda\x41\x13name,destination_id\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xfb\x01\n\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"v\xda\x41\x16\x61ssignment,update_mask\x82\xd3\xe4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\nassignment\x12\xc6\x01\n\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\n\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\"s\xda\x41\x1a\x62i_reservation,update_mask\x82\xd3\xe4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0e\x62i_reservation\x12\xf4\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xa8\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x96\x01\x12\x41/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xb5\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x9c\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9b\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xaf\x01\x82\xd3\xe4\x93\x02\xa8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xe7\x01\n\x16\x43reateReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xd5\x01\n\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xbb\x01\n\x16\x44\x65leteReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xe8\x01\n\x15ListReservationGroups\x12\x42.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1a\x43.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/reservationGroups\x1a\x7f\xca\x41\"bigqueryreservation.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xd8\x01\n(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xaa\x02$Google.Cloud.BigQuery.Reservation.V1\xca\x02$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + Reservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation").msgclass + Reservation::Autoscale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.Autoscale").msgclass + Reservation::ReplicationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus").msgclass + Reservation::ScalingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ScalingMode").enummodule + SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SchedulingPolicy").msgclass + ReservationGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ReservationGroup").msgclass + CapacityCommitment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment").msgclass + CapacityCommitment::CommitmentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan").enummodule + CapacityCommitment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.State").enummodule + CreateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationRequest").msgclass + ListReservationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsRequest").msgclass + ListReservationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsResponse").msgclass + GetReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationRequest").msgclass + DeleteReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationRequest").msgclass + UpdateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateReservationRequest").msgclass + FailoverReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverReservationRequest").msgclass + CreateReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest").msgclass + GetReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationGroupRequest").msgclass + ListReservationGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest").msgclass + ListReservationGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse").msgclass + DeleteReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest").msgclass + CreateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest").msgclass + ListCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest").msgclass + ListCapacityCommitmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse").msgclass + GetCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest").msgclass + DeleteCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest").msgclass + UpdateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest").msgclass + SplitCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest").msgclass + SplitCapacityCommitmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse").msgclass + MergeCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest").msgclass + Assignment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment").msgclass + Assignment::JobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.JobType").enummodule + Assignment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.State").enummodule + CreateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateAssignmentRequest").msgclass + ListAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsRequest").msgclass + ListAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsResponse").msgclass + DeleteAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest").msgclass + SearchAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest").msgclass + SearchAllAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest").msgclass + SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass + SearchAllAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse").msgclass + MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass + UpdateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest").msgclass + TableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.TableReference").msgclass + BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass + GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass + UpdateBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest").msgclass + Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Edition").enummodule + FailoverMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverMode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb new file mode 100644 index 000000000000..2f3df98d3356 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/reservation/v1/version" + +require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" +require "google/cloud/bigquery/reservation/v1/reservation_service/paths" +require "google/cloud/bigquery/reservation/v1/reservation_service/client" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + ## + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/reservation/v1/reservation_service" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module ReservationService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "reservation_service", "helpers.rb" +require "google/cloud/bigquery/reservation/v1/reservation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb new file mode 100644 index 000000000000..720a35605537 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb @@ -0,0 +1,3514 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/reservation/v1/reservation_pb" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + ## + # Client for the ReservationService service. + # + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reservation_service_stub + + ## + # Configure the ReservationService Client class. + # + # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReservationService clients + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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", "Bigquery", "Reservation", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_reservation.timeout = 300.0 + + default_config.rpcs.list_reservations.timeout = 300.0 + default_config.rpcs.list_reservations.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_reservation.timeout = 300.0 + default_config.rpcs.get_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_reservation.timeout = 300.0 + default_config.rpcs.delete_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_reservation.timeout = 300.0 + + default_config.rpcs.failover_reservation.timeout = 300.0 + + default_config.rpcs.create_capacity_commitment.timeout = 300.0 + + default_config.rpcs.list_capacity_commitments.timeout = 300.0 + default_config.rpcs.list_capacity_commitments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_capacity_commitment.timeout = 300.0 + default_config.rpcs.get_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_capacity_commitment.timeout = 300.0 + default_config.rpcs.delete_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_capacity_commitment.timeout = 300.0 + + default_config.rpcs.split_capacity_commitment.timeout = 300.0 + + default_config.rpcs.merge_capacity_commitments.timeout = 300.0 + + default_config.rpcs.create_assignment.timeout = 300.0 + + default_config.rpcs.list_assignments.timeout = 300.0 + default_config.rpcs.list_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_assignment.timeout = 300.0 + default_config.rpcs.delete_assignment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_assignments.timeout = 300.0 + default_config.rpcs.search_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.move_assignment.timeout = 300.0 + + default_config.rpcs.get_bi_reservation.timeout = 300.0 + default_config.rpcs.get_bi_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_bi_reservation.timeout = 300.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReservationService 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::Bigquery::Reservation::V1::ReservationService::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 + @reservation_service_stub.universe_domain + end + + ## + # Create a new ReservationService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReservationService 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/bigquery/reservation/v1/reservation_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 + + @reservation_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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 + ) + + @reservation_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reservation_service_stub.logger + end + + # Service calls + + ## + # Creates a new reservation resource. + # + # @overload create_reservation(request, options = nil) + # Pass arguments to `create_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(parent: nil, reservation_id: nil, reservation: nil) + # Pass arguments to `create_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_id [::String] + # The reservation ID. It must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Definition of the new reservation to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new + # + # # Call the create_reservation method. + # result = client.create_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def create_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservations for the project in the specified location. + # + # @overload list_reservations(request, options = nil) + # Pass arguments to `list_reservations` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservations` via keyword arguments. Note that at + # least one keyword argument is 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 resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new + # + # # Call the list_reservations method. + # result = client.list_reservations 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::Bigquery::Reservation::V1::Reservation. + # p item + # end + # + def list_reservations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest + + # Converts hash 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_reservations.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::Bigquery::Reservation::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_reservations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reservations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_reservations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservations, 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 information about the reservation. + # + # @overload get_reservation(request, options = nil) + # Pass arguments to `get_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(name: nil) + # Pass arguments to `get_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new + # + # # Call the get_reservation method. + # result = client.get_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def get_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation(request, options = nil) + # Pass arguments to `delete_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(name: nil) + # Pass arguments to `delete_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new + # + # # Call the delete_reservation method. + # result = client.delete_reservation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_reservation, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing reservation resource. + # + # @overload update_reservation(request, options = nil) + # Pass arguments to `update_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(reservation: nil, update_mask: nil) + # Pass arguments to `update_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Content of the reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new + # + # # Call the update_reservation method. + # result = client.update_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def update_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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.reservation&.name + header_params["reservation.name"] = request.reservation.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_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_reservation, 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 + + ## + # Fail over a reservation to the secondary location. The operation should be + # done in the current secondary location, which will be promoted to the + # new primary location for the reservation. + # Attempting to failover a reservation in the current primary location will + # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload failover_reservation(request, options = nil) + # Pass arguments to `failover_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload failover_reservation(name: nil, failover_mode: nil) + # Pass arguments to `failover_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the reservation to failover. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] + # Optional. A parameter that determines how writes that are pending + # replication are handled after a failover is initiated. If not specified, + # HARD failover mode is used by default. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new + # + # # Call the failover_reservation method. + # result = client.failover_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def failover_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest + + # Converts hash 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.failover_reservation.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::Bigquery::Reservation::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.failover_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.failover_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :failover_reservation, 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 capacity commitment resource. + # + # @overload create_capacity_commitment(request, options = nil) + # Pass arguments to `create_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) + # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to create. + # @param enforce_single_admin_project_per_org [::Boolean] + # If true, fail the request if another project in the organization has a + # capacity commitment. + # @param capacity_commitment_id [::String] + # The optional capacity commitment ID. Capacity commitment name will be + # generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # NOTE: this ID won't be kept if the capacity commitment is split or merged. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new + # + # # Call the create_capacity_commitment method. + # result = client.create_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def create_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the capacity commitments for the admin project. + # + # @overload list_capacity_commitments(request, options = nil) + # Pass arguments to `list_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new + # + # # Call the list_capacity_commitments method. + # result = client.list_capacity_commitments 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::Bigquery::Reservation::V1::CapacityCommitment. + # p item + # end + # + def list_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest + + # Converts hash 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_capacity_commitments.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::Bigquery::Reservation::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_capacity_commitments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_capacity_commitments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, 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 information about the capacity commitment. + # + # @overload get_capacity_commitment(request, options = nil) + # Pass arguments to `get_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil) + # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the capacity commitment to retrieve. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new + # + # # Call the get_capacity_commitment method. + # result = client.get_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def get_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a capacity commitment. Attempting to delete capacity commitment + # before its commitment_end_time will fail with the error code + # `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload delete_capacity_commitment(request, options = nil) + # Pass arguments to `delete_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil, force: nil) + # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the capacity commitment to delete. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @param force [::Boolean] + # Can be used to force delete commitments even if assignments exist. Deleting + # commitments with assignments may cause queries to fail if they no longer + # have access to slots. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new + # + # # Call the delete_capacity_commitment method. + # result = client.delete_capacity_commitment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_capacity_commitment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing capacity commitment. + # + # Only `plan` and `renewal_plan` fields can be updated. + # + # Plan can only be changed to a plan of a longer commitment period. + # Attempting to change to a plan with shorter commitment period will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload update_capacity_commitment(request, options = nil) + # Pass arguments to `update_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(capacity_commitment: nil, update_mask: nil) + # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new + # + # # Call the update_capacity_commitment method. + # result = client.update_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def update_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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.capacity_commitment&.name + header_params["capacity_commitment.name"] = request.capacity_commitment.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_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_capacity_commitment, 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 + + ## + # Splits capacity commitment to two commitments of the same plan and + # `commitment_end_time`. + # + # A common use case is to enable downgrading commitments. + # + # For example, in order to downgrade from 10000 slots to 8000, you might + # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + # you delete the first one after the commitment end time passes. + # + # @overload split_capacity_commitment(request, options = nil) + # Pass arguments to `split_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload split_capacity_commitment(name: nil, slot_count: nil) + # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name e.g.,: + # `projects/myproject/locations/US/capacityCommitments/123` + # @param slot_count [::Integer] + # Number of slots in the capacity commitment after the split. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new + # + # # Call the split_capacity_commitment method. + # result = client.split_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. + # p result + # + def split_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest + + # Converts hash 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.split_capacity_commitment.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::Bigquery::Reservation::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.split_capacity_commitment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.split_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :split_capacity_commitment, 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 + + ## + # Merges capacity commitments of the same plan into a single commitment. + # + # The resulting capacity commitment has the greater commitment_end_time + # out of the to-be-merged capacity commitments. + # + # Attempting to merge capacity commitments of different plan will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload merge_capacity_commitments(request, options = nil) + # Pass arguments to `merge_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) + # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is 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] + # Parent resource that identifies admin project and location e.g., + # `projects/myproject/locations/us` + # @param capacity_commitment_ids [::Array<::String>] + # Ids of capacity commitments to merge. + # These capacity commitments must exist under admin project and location + # specified in the parent. + # ID is the last portion of capacity commitment name e.g., 'abc' for + # projects/myproject/locations/US/capacityCommitments/abc + # @param capacity_commitment_id [::String] + # Optional. The optional resulting capacity commitment ID. Capacity + # commitment name will be generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new + # + # # Call the merge_capacity_commitments method. + # result = client.merge_capacity_commitments request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def merge_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest + + # Converts hash 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.merge_capacity_commitments.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::Bigquery::Reservation::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.merge_capacity_commitments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :merge_capacity_commitments, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an assignment object which allows the given project to submit jobs + # of a certain type using slots from the specified reservation. + # + # Currently a + # resource (project, folder, organization) can only have one assignment per + # each (job_type, location) combination, and that reservation will be used + # for all jobs of the matching type. + # + # Different assignments can be created on different levels of the + # projects, folders or organization hierarchy. During query execution, + # the assignment is looked up at the project, folder and organization levels + # in that order. The first assignment found is applied to the query. + # + # When creating assignments, it does not matter if other assignments exist at + # higher levels. + # + # Example: + # + # * The organization `organizationA` contains two projects, `project1` + # and `project2`. + # * Assignments for all three entities (`organizationA`, `project1`, and + # `project2`) could all be created and mapped to the same or different + # reservations. + # + # "None" assignments represent an absence of the assignment. Projects + # assigned to None use on-demand pricing. To create a "None" assignment, use + # "none" as a reservation_id in the parent. Example parent: + # `projects/myproject/locations/US/reservations/none`. + # + # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + # 'bigquery.admin' permissions on the project using the reservation + # and the project that owns this reservation. + # + # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + # does not match location of the reservation. + # + # @overload create_assignment(request, options = nil) + # Pass arguments to `create_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignment(parent: nil, assignment: nil, assignment_id: nil) + # Pass arguments to `create_assignment` via keyword arguments. Note that at + # least one keyword argument is 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 resource name of the assignment + # E.g. `projects/myproject/locations/US/reservations/team1-prod` + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Assignment resource to create. + # @param assignment_id [::String] + # The optional assignment ID. Assignment name will be generated automatically + # if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # Max length is 64 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new + # + # # Call the create_assignment method. + # result = client.create_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def create_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest + + # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_assignment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists assignments. + # + # Only explicitly created assignments will be returned. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, ListAssignments will just return the above two assignments + # for reservation `res1`, and no expansion/merge will happen. + # + # The wildcard "-" can be used for + # reservations in the request. In that case all assignments belongs to the + # specified project and location will be listed. + # + # **Note** "-" cannot be used for projects nor locations. + # + # @overload list_assignments(request, options = nil) + # Pass arguments to `list_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_assignments` via keyword arguments. Note that at + # least one keyword argument is 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 resource name e.g.: + # + # `projects/myproject/locations/US/reservations/team1-prod` + # + # Or: + # + # `projects/myproject/locations/US/reservations/-` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new + # + # # Call the list_assignments method. + # result = client.list_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def list_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest + + # Converts hash 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_assignments.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::Bigquery::Reservation::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_assignments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_assignments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_assignments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a assignment. No expansion will happen. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, deletion of the `` assignment won't + # affect the other assignment ``. After said deletion, + # queries from `project1` will still use `res1` while queries from + # `project2` will switch to use on-demand mode. + # + # @overload delete_assignment(request, options = nil) + # Pass arguments to `delete_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignment(name: nil) + # Pass arguments to `delete_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new + # + # # Call the delete_assignment method. + # result = client.delete_assignment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest + + # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_assignment, 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 + + ## + # Deprecated: Looks up assignments for a specified resource for a particular + # region. If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # **Note** "-" cannot be used for projects + # nor locations. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload search_assignments(request, options = nil) + # Pass arguments to `search_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the admin project(containing project and + # location), e.g.: + # `projects/myproject/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new + # + # # Call the search_assignments method. + # result = client.search_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest + + # Converts hash 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.search_assignments.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::Bigquery::Reservation::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.search_assignments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :search_assignments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_assignments, 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 + + ## + # Looks up assignments for a specified resource for a particular region. + # If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # @overload search_all_assignments(request, options = nil) + # Pass arguments to `search_all_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_all_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name with location (project name could be the + # wildcard '-'), e.g.: + # `projects/-/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new + # + # # Call the search_all_assignments method. + # result = client.search_all_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_all_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest + + # Converts hash 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.search_all_assignments.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::Bigquery::Reservation::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.search_all_assignments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_all_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :search_all_assignments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, 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 + + ## + # Moves an assignment under a new reservation. + # + # This differs from removing an existing assignment and recreating a new one + # by providing a transactional change that ensures an assignee always has an + # associated reservation. + # + # @overload move_assignment(request, options = nil) + # Pass arguments to `move_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) + # Pass arguments to `move_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the assignment, + # e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @param destination_id [::String] + # The new reservation ID, e.g.: + # `projects/myotherproject/locations/US/reservations/team2-prod` + # @param assignment_id [::String] + # The optional assignment ID. A new assignment name is generated if this + # field is empty. + # + # This field can contain only lowercase alphanumeric characters or dashes. + # Max length is 64 characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new + # + # # Call the move_assignment method. + # result = client.move_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def move_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest + + # Converts hash 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.move_assignment.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::Bigquery::Reservation::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.move_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.move_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :move_assignment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing assignment. + # + # Only the `priority` field can be updated. + # + # @overload update_assignment(request, options = nil) + # Pass arguments to `update_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignment(assignment: nil, update_mask: nil) + # Pass arguments to `update_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Content of the assignment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new + # + # # Call the update_assignment method. + # result = client.update_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def update_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest + + # Converts hash 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_assignment.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::Bigquery::Reservation::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.assignment&.name + header_params["assignment.name"] = request.assignment.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_assignment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_assignment, 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 + + ## + # Retrieves a BI reservation. + # + # @overload get_bi_reservation(request, options = nil) + # Pass arguments to `get_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_bi_reservation(name: nil) + # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested reservation, for example: + # `projects/{project_id}/locations/{location_id}/biReservation` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new + # + # # Call the get_bi_reservation method. + # result = client.get_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def get_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest + + # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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_bi_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_bi_reservation, 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 BI reservation. + # + # Only fields specified in the `field_mask` are updated. + # + # A singleton BI reservation always exists with default size 0. + # In order to reserve BI capacity it needs to be updated to an amount + # greater than 0. In order to release BI capacity reservation size + # must be set to 0. + # + # @overload update_bi_reservation(request, options = nil) + # Pass arguments to `update_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_bi_reservation(bi_reservation: nil, update_mask: nil) + # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] + # A reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A list of fields to be updated in this request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new + # + # # Call the update_bi_reservation method. + # result = client.update_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def update_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest + + # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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.bi_reservation&.name + header_params["bi_reservation.name"] = request.bi_reservation.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_bi_reservation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :update_bi_reservation, 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 the access control policy for a resource. + # May return: + # + # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + # permission to view it. + # * An empty policy if the resource exists but doesn't have a set policy. + # + # Supported resources are: + # - Reservations + # - ReservationAssignments + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.getIamPolicy` to get policies on + # reservations. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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.resource + header_params["resource"] = request.resource + 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_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets an access control policy for a resource. Replaces any existing + # policy. + # + # Supported resources are: + # - Reservations + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.setIamPolicy` to set policies on + # reservations. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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.resource + header_params["resource"] = request.resource + 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.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets your permissions on a resource. Returns an empty set of permissions if + # the resource doesn't exist. + # + # Supported resources are: + # - Reservations + # + # No Google IAM permissions are required to call this method. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Bigquery::Reservation::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.resource + header_params["resource"] = request.resource + 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.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :test_iam_permissions, 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 reservation group. + # + # @overload create_reservation_group(request, options = nil) + # Pass arguments to `create_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) + # Pass arguments to `create_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_group_id [::String] + # Required. The reservation group ID. It must only contain lower case + # alphanumeric characters or dashes. It must start with a letter and must not + # end with a dash. Its maximum length is 64 characters. + # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] + # Required. New Reservation Group to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new + # + # # Call the create_reservation_group method. + # result = client.create_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def create_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest + + # Converts hash 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_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :create_reservation_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the reservation group. + # + # @overload get_reservation_group(request, options = nil) + # Pass arguments to `get_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_group(name: nil) + # Pass arguments to `get_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new + # + # # Call the get_reservation_group method. + # result = client.get_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def get_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest + + # Converts hash 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_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :get_reservation_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation_group(request, options = nil) + # Pass arguments to `delete_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_group(name: nil) + # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new + # + # # Call the delete_reservation_group method. + # result = client.delete_reservation_group request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest + + # Converts hash 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_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :delete_reservation_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservation groups for the project in the specified location. + # + # @overload list_reservation_groups(request, options = nil) + # Pass arguments to `list_reservation_groups` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new + # + # # Call the list_reservation_groups method. + # result = client.list_reservation_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p item + # end + # + def list_reservation_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest + + # Converts hash 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_reservation_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reservation_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.call_rpc :list_reservation_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ReservationService API. + # + # This class represents the configuration for ReservationService, + # 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::Bigquery::Reservation::V1::ReservationService::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 + # # create_reservation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.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::Bigquery::Reservation::V1::ReservationService::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 = "bigqueryreservation.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 ReservationService 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 `create_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation + ## + # RPC-specific configuration for `list_reservations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservations + ## + # RPC-specific configuration for `get_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation + ## + # RPC-specific configuration for `delete_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation + ## + # RPC-specific configuration for `update_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reservation + ## + # RPC-specific configuration for `failover_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :failover_reservation + ## + # RPC-specific configuration for `create_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_capacity_commitment + ## + # RPC-specific configuration for `list_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_capacity_commitments + ## + # RPC-specific configuration for `get_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_capacity_commitment + ## + # RPC-specific configuration for `delete_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_capacity_commitment + ## + # RPC-specific configuration for `update_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_capacity_commitment + ## + # RPC-specific configuration for `split_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :split_capacity_commitment + ## + # RPC-specific configuration for `merge_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_capacity_commitments + ## + # RPC-specific configuration for `create_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_assignment + ## + # RPC-specific configuration for `list_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assignments + ## + # RPC-specific configuration for `delete_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_assignment + ## + # RPC-specific configuration for `search_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_assignments + ## + # RPC-specific configuration for `search_all_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_assignments + ## + # RPC-specific configuration for `move_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :move_assignment + ## + # RPC-specific configuration for `update_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_assignment + ## + # RPC-specific configuration for `get_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_bi_reservation + ## + # RPC-specific configuration for `update_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_bi_reservation + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation_group + ## + # RPC-specific configuration for `get_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation_group + ## + # RPC-specific configuration for `delete_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation_group + ## + # RPC-specific configuration for `list_reservation_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservation_groups + + # @private + def initialize parent_rpcs = nil + create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation + @create_reservation = ::Gapic::Config::Method.new create_reservation_config + list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations + @list_reservations = ::Gapic::Config::Method.new list_reservations_config + get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation + @get_reservation = ::Gapic::Config::Method.new get_reservation_config + delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation + @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config + update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation + @update_reservation = ::Gapic::Config::Method.new update_reservation_config + failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation + @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config + create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment + @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config + list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments + @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config + get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment + @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config + delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment + @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config + update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment + @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config + split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment + @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config + merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments + @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config + create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment + @create_assignment = ::Gapic::Config::Method.new create_assignment_config + list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments + @list_assignments = ::Gapic::Config::Method.new list_assignments_config + delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment + @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config + search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments + @search_assignments = ::Gapic::Config::Method.new search_assignments_config + search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments + @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config + move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment + @move_assignment = ::Gapic::Config::Method.new move_assignment_config + update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment + @update_assignment = ::Gapic::Config::Method.new update_assignment_config + get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation + @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config + update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation + @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group + @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config + get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group + @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config + delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group + @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config + list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups + @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb new file mode 100644 index 000000000000..a7158a1de8b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + # Credentials for the ReservationService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BIGQUERY_RESERVATION_CREDENTIALS", + "BIGQUERY_RESERVATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGQUERY_RESERVATION_CREDENTIALS_JSON", + "BIGQUERY_RESERVATION_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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb new file mode 100644 index 000000000000..24dc5bcf219f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb @@ -0,0 +1,147 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Reservation + module V1 + module ReservationService + # Path helper methods for the ReservationService API. + module Paths + ## + # Create a fully-qualified Assignment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}` + # + # @param project [String] + # @param location [String] + # @param reservation [String] + # @param assignment [String] + # + # @return [::String] + def assignment_path project:, location:, reservation:, assignment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "reservation cannot contain /" if reservation.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reservations/#{reservation}/assignments/#{assignment}" + end + + ## + # Create a fully-qualified BiReservation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/biReservation` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def bi_reservation_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/biReservation" + end + + ## + # Create a fully-qualified CapacityCommitment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}` + # + # @param project [String] + # @param location [String] + # @param capacity_commitment [String] + # + # @return [::String] + def capacity_commitment_path project:, location:, capacity_commitment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/capacityCommitments/#{capacity_commitment}" + 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 Reservation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reservations/{reservation}` + # + # @param project [String] + # @param location [String] + # @param reservation [String] + # + # @return [::String] + def reservation_path project:, location:, reservation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reservations/#{reservation}" + end + + ## + # Create a fully-qualified ReservationGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/reservationGroups/{reservation_group}` + # + # @param project [String] + # @param location [String] + # @param reservation_group [String] + # + # @return [::String] + def reservation_group_path project:, location:, reservation_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/reservationGroups/#{reservation_group}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb new file mode 100644 index 000000000000..41e991c06c3e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/reservation/v1/version" + +require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" +require "google/cloud/bigquery/reservation/v1/reservation_service/paths" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest/client" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + ## + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module ReservationService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb new file mode 100644 index 000000000000..c9a1182a3f66 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb @@ -0,0 +1,3266 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/reservation/v1/reservation_pb" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + module Rest + ## + # REST client for the ReservationService service. + # + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reservation_service_stub + + ## + # Configure the ReservationService Client class. + # + # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReservationService clients + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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", "Bigquery", "Reservation", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_reservation.timeout = 300.0 + + default_config.rpcs.list_reservations.timeout = 300.0 + default_config.rpcs.list_reservations.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_reservation.timeout = 300.0 + default_config.rpcs.get_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_reservation.timeout = 300.0 + default_config.rpcs.delete_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_reservation.timeout = 300.0 + + default_config.rpcs.failover_reservation.timeout = 300.0 + + default_config.rpcs.create_capacity_commitment.timeout = 300.0 + + default_config.rpcs.list_capacity_commitments.timeout = 300.0 + default_config.rpcs.list_capacity_commitments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_capacity_commitment.timeout = 300.0 + default_config.rpcs.get_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_capacity_commitment.timeout = 300.0 + default_config.rpcs.delete_capacity_commitment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_capacity_commitment.timeout = 300.0 + + default_config.rpcs.split_capacity_commitment.timeout = 300.0 + + default_config.rpcs.merge_capacity_commitments.timeout = 300.0 + + default_config.rpcs.create_assignment.timeout = 300.0 + + default_config.rpcs.list_assignments.timeout = 300.0 + default_config.rpcs.list_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_assignment.timeout = 300.0 + default_config.rpcs.delete_assignment.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_assignments.timeout = 300.0 + default_config.rpcs.search_assignments.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.move_assignment.timeout = 300.0 + + default_config.rpcs.get_bi_reservation.timeout = 300.0 + default_config.rpcs.get_bi_reservation.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_bi_reservation.timeout = 300.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReservationService 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::Bigquery::Reservation::V1::ReservationService::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 + @reservation_service_stub.universe_domain + end + + ## + # Create a new ReservationService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReservationService 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 + + @reservation_service_stub = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @reservation_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reservation_service_stub.logger + end + + # Service calls + + ## + # Creates a new reservation resource. + # + # @overload create_reservation(request, options = nil) + # Pass arguments to `create_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(parent: nil, reservation_id: nil, reservation: nil) + # Pass arguments to `create_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_id [::String] + # The reservation ID. It must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Definition of the new reservation to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new + # + # # Call the create_reservation method. + # result = client.create_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def create_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservations for the project in the specified location. + # + # @overload list_reservations(request, options = nil) + # Pass arguments to `list_reservations` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservations` via keyword arguments. Note that at + # least one keyword argument is 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 resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new + # + # # Call the list_reservations method. + # result = client.list_reservations 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::Bigquery::Reservation::V1::Reservation. + # p item + # end + # + def list_reservations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest + + # Converts hash 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_reservations.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::Bigquery::Reservation::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_reservations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reservations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_reservations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservations, "reservations", 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 information about the reservation. + # + # @overload get_reservation(request, options = nil) + # Pass arguments to `get_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(name: nil) + # Pass arguments to `get_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new + # + # # Call the get_reservation method. + # result = client.get_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def get_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation(request, options = nil) + # Pass arguments to `delete_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(name: nil) + # Pass arguments to `delete_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new + # + # # Call the delete_reservation method. + # result = client.delete_reservation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_reservation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing reservation resource. + # + # @overload update_reservation(request, options = nil) + # Pass arguments to `update_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation(reservation: nil, update_mask: nil) + # Pass arguments to `update_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] + # Content of the reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new + # + # # Call the update_reservation method. + # result = client.update_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def update_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest + + # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_reservation 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 + + ## + # Fail over a reservation to the secondary location. The operation should be + # done in the current secondary location, which will be promoted to the + # new primary location for the reservation. + # Attempting to failover a reservation in the current primary location will + # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload failover_reservation(request, options = nil) + # Pass arguments to `failover_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload failover_reservation(name: nil, failover_mode: nil) + # Pass arguments to `failover_reservation` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the reservation to failover. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] + # Optional. A parameter that determines how writes that are pending + # replication are handled after a failover is initiated. If not specified, + # HARD failover mode is used by default. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new + # + # # Call the failover_reservation method. + # result = client.failover_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + # p result + # + def failover_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest + + # Converts hash 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.failover_reservation.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::Bigquery::Reservation::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.failover_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.failover_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.failover_reservation 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 capacity commitment resource. + # + # @overload create_capacity_commitment(request, options = nil) + # Pass arguments to `create_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) + # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to create. + # @param enforce_single_admin_project_per_org [::Boolean] + # If true, fail the request if another project in the organization has a + # capacity commitment. + # @param capacity_commitment_id [::String] + # The optional capacity commitment ID. Capacity commitment name will be + # generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # NOTE: this ID won't be kept if the capacity commitment is split or merged. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new + # + # # Call the create_capacity_commitment method. + # result = client.create_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def create_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the capacity commitments for the admin project. + # + # @overload list_capacity_commitments(request, options = nil) + # Pass arguments to `list_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new + # + # # Call the list_capacity_commitments method. + # result = client.list_capacity_commitments 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::Bigquery::Reservation::V1::CapacityCommitment. + # p item + # end + # + def list_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest + + # Converts hash 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_capacity_commitments.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::Bigquery::Reservation::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_capacity_commitments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_capacity_commitments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, "capacity_commitments", 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 information about the capacity commitment. + # + # @overload get_capacity_commitment(request, options = nil) + # Pass arguments to `get_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil) + # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the capacity commitment to retrieve. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new + # + # # Call the get_capacity_commitment method. + # result = client.get_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def get_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a capacity commitment. Attempting to delete capacity commitment + # before its commitment_end_time will fail with the error code + # `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload delete_capacity_commitment(request, options = nil) + # Pass arguments to `delete_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil, force: nil) + # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is 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. Resource name of the capacity commitment to delete. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @param force [::Boolean] + # Can be used to force delete commitments even if assignments exist. Deleting + # commitments with assignments may cause queries to fail if they no longer + # have access to slots. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new + # + # # Call the delete_capacity_commitment method. + # result = client.delete_capacity_commitment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_capacity_commitment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing capacity commitment. + # + # Only `plan` and `renewal_plan` fields can be updated. + # + # Plan can only be changed to a plan of a longer commitment period. + # Attempting to change to a plan with shorter commitment period will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload update_capacity_commitment(request, options = nil) + # Pass arguments to `update_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_capacity_commitment(capacity_commitment: nil, update_mask: nil) + # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] + # Content of the capacity commitment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new + # + # # Call the update_capacity_commitment method. + # result = client.update_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def update_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest + + # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_capacity_commitment 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 + + ## + # Splits capacity commitment to two commitments of the same plan and + # `commitment_end_time`. + # + # A common use case is to enable downgrading commitments. + # + # For example, in order to downgrade from 10000 slots to 8000, you might + # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + # you delete the first one after the commitment end time passes. + # + # @overload split_capacity_commitment(request, options = nil) + # Pass arguments to `split_capacity_commitment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload split_capacity_commitment(name: nil, slot_count: nil) + # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name e.g.,: + # `projects/myproject/locations/US/capacityCommitments/123` + # @param slot_count [::Integer] + # Number of slots in the capacity commitment after the split. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new + # + # # Call the split_capacity_commitment method. + # result = client.split_capacity_commitment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. + # p result + # + def split_capacity_commitment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest + + # Converts hash 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.split_capacity_commitment.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::Bigquery::Reservation::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.split_capacity_commitment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.split_capacity_commitment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.split_capacity_commitment 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 + + ## + # Merges capacity commitments of the same plan into a single commitment. + # + # The resulting capacity commitment has the greater commitment_end_time + # out of the to-be-merged capacity commitments. + # + # Attempting to merge capacity commitments of different plan will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + # + # @overload merge_capacity_commitments(request, options = nil) + # Pass arguments to `merge_capacity_commitments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) + # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at + # least one keyword argument is 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] + # Parent resource that identifies admin project and location e.g., + # `projects/myproject/locations/us` + # @param capacity_commitment_ids [::Array<::String>] + # Ids of capacity commitments to merge. + # These capacity commitments must exist under admin project and location + # specified in the parent. + # ID is the last portion of capacity commitment name e.g., 'abc' for + # projects/myproject/locations/US/capacityCommitments/abc + # @param capacity_commitment_id [::String] + # Optional. The optional resulting capacity commitment ID. Capacity + # commitment name will be generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new + # + # # Call the merge_capacity_commitments method. + # result = client.merge_capacity_commitments request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + # p result + # + def merge_capacity_commitments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest + + # Converts hash 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.merge_capacity_commitments.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::Bigquery::Reservation::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.merge_capacity_commitments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.merge_capacity_commitments request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an assignment object which allows the given project to submit jobs + # of a certain type using slots from the specified reservation. + # + # Currently a + # resource (project, folder, organization) can only have one assignment per + # each (job_type, location) combination, and that reservation will be used + # for all jobs of the matching type. + # + # Different assignments can be created on different levels of the + # projects, folders or organization hierarchy. During query execution, + # the assignment is looked up at the project, folder and organization levels + # in that order. The first assignment found is applied to the query. + # + # When creating assignments, it does not matter if other assignments exist at + # higher levels. + # + # Example: + # + # * The organization `organizationA` contains two projects, `project1` + # and `project2`. + # * Assignments for all three entities (`organizationA`, `project1`, and + # `project2`) could all be created and mapped to the same or different + # reservations. + # + # "None" assignments represent an absence of the assignment. Projects + # assigned to None use on-demand pricing. To create a "None" assignment, use + # "none" as a reservation_id in the parent. Example parent: + # `projects/myproject/locations/US/reservations/none`. + # + # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + # 'bigquery.admin' permissions on the project using the reservation + # and the project that owns this reservation. + # + # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + # does not match location of the reservation. + # + # @overload create_assignment(request, options = nil) + # Pass arguments to `create_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignment(parent: nil, assignment: nil, assignment_id: nil) + # Pass arguments to `create_assignment` via keyword arguments. Note that at + # least one keyword argument is 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 resource name of the assignment + # E.g. `projects/myproject/locations/US/reservations/team1-prod` + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Assignment resource to create. + # @param assignment_id [::String] + # The optional assignment ID. Assignment name will be generated automatically + # if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # Max length is 64 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new + # + # # Call the create_assignment method. + # result = client.create_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def create_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest + + # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_assignment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists assignments. + # + # Only explicitly created assignments will be returned. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, ListAssignments will just return the above two assignments + # for reservation `res1`, and no expansion/merge will happen. + # + # The wildcard "-" can be used for + # reservations in the request. In that case all assignments belongs to the + # specified project and location will be listed. + # + # **Note** "-" cannot be used for projects nor locations. + # + # @overload list_assignments(request, options = nil) + # Pass arguments to `list_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_assignments` via keyword arguments. Note that at + # least one keyword argument is 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 resource name e.g.: + # + # `projects/myproject/locations/US/reservations/team1-prod` + # + # Or: + # + # `projects/myproject/locations/US/reservations/-` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new + # + # # Call the list_assignments method. + # result = client.list_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def list_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest + + # Converts hash 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_assignments.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::Bigquery::Reservation::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_assignments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_assignments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_assignments, "assignments", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a assignment. No expansion will happen. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, deletion of the `` assignment won't + # affect the other assignment ``. After said deletion, + # queries from `project1` will still use `res1` while queries from + # `project2` will switch to use on-demand mode. + # + # @overload delete_assignment(request, options = nil) + # Pass arguments to `delete_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignment(name: nil) + # Pass arguments to `delete_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource, e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new + # + # # Call the delete_assignment method. + # result = client.delete_assignment request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest + + # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_assignment 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 + + ## + # Deprecated: Looks up assignments for a specified resource for a particular + # region. If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # **Note** "-" cannot be used for projects + # nor locations. + # + # @overload search_assignments(request, options = nil) + # Pass arguments to `search_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the admin project(containing project and + # location), e.g.: + # `projects/myproject/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new + # + # # Call the search_assignments method. + # result = client.search_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest + + # Converts hash 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.search_assignments.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::Bigquery::Reservation::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.search_assignments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.search_assignments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_assignments, "assignments", 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 + + ## + # Looks up assignments for a specified resource for a particular region. + # If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # @overload search_all_assignments(request, options = nil) + # Pass arguments to `search_all_assignments` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) + # Pass arguments to `search_all_assignments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name with location (project name could be the + # wildcard '-'), e.g.: + # `projects/-/locations/US`. + # @param query [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new + # + # # Call the search_all_assignments method. + # result = client.search_all_assignments 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::Bigquery::Reservation::V1::Assignment. + # p item + # end + # + def search_all_assignments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest + + # Converts hash 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.search_all_assignments.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::Bigquery::Reservation::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.search_all_assignments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_all_assignments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.search_all_assignments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, "assignments", 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 + + ## + # Moves an assignment under a new reservation. + # + # This differs from removing an existing assignment and recreating a new one + # by providing a transactional change that ensures an assignee always has an + # associated reservation. + # + # @overload move_assignment(request, options = nil) + # Pass arguments to `move_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) + # Pass arguments to `move_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the assignment, + # e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @param destination_id [::String] + # The new reservation ID, e.g.: + # `projects/myotherproject/locations/US/reservations/team2-prod` + # @param assignment_id [::String] + # The optional assignment ID. A new assignment name is generated if this + # field is empty. + # + # This field can contain only lowercase alphanumeric characters or dashes. + # Max length is 64 characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new + # + # # Call the move_assignment method. + # result = client.move_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def move_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest + + # Converts hash 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.move_assignment.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::Bigquery::Reservation::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.move_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.move_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.move_assignment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing assignment. + # + # Only the `priority` field can be updated. + # + # @overload update_assignment(request, options = nil) + # Pass arguments to `update_assignment` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_assignment(assignment: nil, update_mask: nil) + # Pass arguments to `update_assignment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] + # Content of the assignment to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Standard field mask for the set of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new + # + # # Call the update_assignment method. + # result = client.update_assignment request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + # p result + # + def update_assignment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest + + # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_assignment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_assignment 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 + + ## + # Retrieves a BI reservation. + # + # @overload get_bi_reservation(request, options = nil) + # Pass arguments to `get_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_bi_reservation(name: nil) + # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested reservation, for example: + # `projects/{project_id}/locations/{location_id}/biReservation` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new + # + # # Call the get_bi_reservation method. + # result = client.get_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def get_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest + + # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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_bi_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_bi_reservation 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 BI reservation. + # + # Only fields specified in the `field_mask` are updated. + # + # A singleton BI reservation always exists with default size 0. + # In order to reserve BI capacity it needs to be updated to an amount + # greater than 0. In order to release BI capacity reservation size + # must be set to 0. + # + # @overload update_bi_reservation(request, options = nil) + # Pass arguments to `update_bi_reservation` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_bi_reservation(bi_reservation: nil, update_mask: nil) + # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] + # A reservation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A list of fields to be updated in this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new + # + # # Call the update_bi_reservation method. + # result = client.update_bi_reservation request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + # p result + # + def update_bi_reservation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest + + # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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_bi_reservation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_bi_reservation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.update_bi_reservation 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 the access control policy for a resource. + # May return: + # + # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + # permission to view it. + # * An empty policy if the resource exists but doesn't have a set policy. + # + # Supported resources are: + # - Reservations + # - ReservationAssignments + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.getIamPolicy` to get policies on + # reservations. + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets an access control policy for a resource. Replaces any existing + # policy. + # + # Supported resources are: + # - Reservations + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.setIamPolicy` to set policies on + # reservations. + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets your permissions on a resource. Returns an empty set of permissions if + # the resource doesn't exist. + # + # Supported resources are: + # - Reservations + # + # No Google IAM permissions are required to call this method. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Bigquery::Reservation::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.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.test_iam_permissions 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 reservation group. + # + # @overload create_reservation_group(request, options = nil) + # Pass arguments to `create_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) + # Pass arguments to `create_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @param reservation_group_id [::String] + # Required. The reservation group ID. It must only contain lower case + # alphanumeric characters or dashes. It must start with a letter and must not + # end with a dash. Its maximum length is 64 characters. + # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] + # Required. New Reservation Group to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new + # + # # Call the create_reservation_group method. + # result = client.create_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def create_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest + + # Converts hash 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_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.create_reservation_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns information about the reservation group. + # + # @overload get_reservation_group(request, options = nil) + # Pass arguments to `get_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_group(name: nil) + # Pass arguments to `get_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new + # + # # Call the get_reservation_group method. + # result = client.get_reservation_group request + # + # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p result + # + def get_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest + + # Converts hash 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_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.get_reservation_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + # + # @overload delete_reservation_group(request, options = nil) + # Pass arguments to `delete_reservation_group` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_group(name: nil) + # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new + # + # # Call the delete_reservation_group method. + # result = client.delete_reservation_group request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_reservation_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest + + # Converts hash 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_reservation_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_reservation_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.delete_reservation_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all the reservation groups for the project in the specified location. + # + # @overload list_reservation_groups(request, options = nil) + # Pass arguments to `list_reservation_groups` via a request object, either of type + # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reservation_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @param page_size [::Integer] + # The maximum number of items to return per page. + # @param page_token [::String] + # The next_page_token value returned from a previous List request, if any. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/reservation/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new + # + # # Call the list_reservation_groups method. + # result = client.list_reservation_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + # p item + # end + # + def list_reservation_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest + + # Converts hash 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_reservation_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reservation_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reservation_service_stub.list_reservation_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, "reservation_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the ReservationService REST API. + # + # This class represents the configuration for ReservationService 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::Bigquery::Reservation::V1::ReservationService::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 + # # create_reservation to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_reservation.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 = "bigqueryreservation.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 ReservationService 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 `create_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation + ## + # RPC-specific configuration for `list_reservations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservations + ## + # RPC-specific configuration for `get_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation + ## + # RPC-specific configuration for `delete_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation + ## + # RPC-specific configuration for `update_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reservation + ## + # RPC-specific configuration for `failover_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :failover_reservation + ## + # RPC-specific configuration for `create_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_capacity_commitment + ## + # RPC-specific configuration for `list_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_capacity_commitments + ## + # RPC-specific configuration for `get_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_capacity_commitment + ## + # RPC-specific configuration for `delete_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_capacity_commitment + ## + # RPC-specific configuration for `update_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_capacity_commitment + ## + # RPC-specific configuration for `split_capacity_commitment` + # @return [::Gapic::Config::Method] + # + attr_reader :split_capacity_commitment + ## + # RPC-specific configuration for `merge_capacity_commitments` + # @return [::Gapic::Config::Method] + # + attr_reader :merge_capacity_commitments + ## + # RPC-specific configuration for `create_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_assignment + ## + # RPC-specific configuration for `list_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_assignments + ## + # RPC-specific configuration for `delete_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_assignment + ## + # RPC-specific configuration for `search_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_assignments + ## + # RPC-specific configuration for `search_all_assignments` + # @return [::Gapic::Config::Method] + # + attr_reader :search_all_assignments + ## + # RPC-specific configuration for `move_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :move_assignment + ## + # RPC-specific configuration for `update_assignment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_assignment + ## + # RPC-specific configuration for `get_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_bi_reservation + ## + # RPC-specific configuration for `update_bi_reservation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_bi_reservation + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `create_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reservation_group + ## + # RPC-specific configuration for `get_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reservation_group + ## + # RPC-specific configuration for `delete_reservation_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_reservation_group + ## + # RPC-specific configuration for `list_reservation_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reservation_groups + + # @private + def initialize parent_rpcs = nil + create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation + @create_reservation = ::Gapic::Config::Method.new create_reservation_config + list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations + @list_reservations = ::Gapic::Config::Method.new list_reservations_config + get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation + @get_reservation = ::Gapic::Config::Method.new get_reservation_config + delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation + @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config + update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation + @update_reservation = ::Gapic::Config::Method.new update_reservation_config + failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation + @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config + create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment + @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config + list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments + @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config + get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment + @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config + delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment + @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config + update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment + @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config + split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment + @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config + merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments + @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config + create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment + @create_assignment = ::Gapic::Config::Method.new create_assignment_config + list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments + @list_assignments = ::Gapic::Config::Method.new list_assignments_config + delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment + @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config + search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments + @search_assignments = ::Gapic::Config::Method.new search_assignments_config + search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments + @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config + move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment + @move_assignment = ::Gapic::Config::Method.new move_assignment_config + update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment + @update_assignment = ::Gapic::Config::Method.new update_assignment_config + get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation + @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config + update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation + @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group + @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config + get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group + @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config + delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group + @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config + list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups + @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb new file mode 100644 index 000000000000..546513e1180a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb @@ -0,0 +1,1889 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/reservation/v1/reservation_pb" + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + module Rest + ## + # REST service stub for the ReservationService 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 create_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] + # 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::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def create_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_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_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_reservations REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] + # 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::Bigquery::Reservation::V1::ListReservationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse] + # A result object deserialized from the server's reply + def list_reservations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reservations_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_reservations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.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_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] + # 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::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def get_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_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_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] + # 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_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_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_reservation", + 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 update_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] + # 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::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def update_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_reservation_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_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the failover_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] + # 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::Bigquery::Reservation::V1::Reservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # A result object deserialized from the server's reply + def failover_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_failover_reservation_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: "failover_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] + # 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::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def create_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_capacity_commitment_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_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] + # 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::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] + # A result object deserialized from the server's reply + def list_capacity_commitments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_capacity_commitments_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_capacity_commitments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.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_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] + # 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::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def get_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_capacity_commitment_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_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] + # 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_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_capacity_commitment_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_capacity_commitment", + 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 update_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] + # 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::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def update_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_capacity_commitment_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_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the split_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] + # 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::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] + # A result object deserialized from the server's reply + def split_capacity_commitment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_split_capacity_commitment_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: "split_capacity_commitment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the merge_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] + # 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::Bigquery::Reservation::V1::CapacityCommitment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # A result object deserialized from the server's reply + def merge_capacity_commitments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_merge_capacity_commitments_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: "merge_capacity_commitments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] + # 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::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # A result object deserialized from the server's reply + def create_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_assignment_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_assignment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] + # 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::Bigquery::Reservation::V1::ListAssignmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse] + # A result object deserialized from the server's reply + def list_assignments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_assignments_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_assignments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.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_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] + # 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_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_assignment_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_assignment", + 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 search_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] + # 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::Bigquery::Reservation::V1::SearchAssignmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse] + # A result object deserialized from the server's reply + def search_assignments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_assignments_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: "search_assignments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the search_all_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] + # 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::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] + # A result object deserialized from the server's reply + def search_all_assignments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_all_assignments_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: "search_all_assignments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the move_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] + # 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::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # A result object deserialized from the server's reply + def move_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_move_assignment_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: "move_assignment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] + # 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::Bigquery::Reservation::V1::Assignment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # A result object deserialized from the server's reply + def update_assignment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_assignment_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_assignment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] + # 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::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # A result object deserialized from the server's reply + def get_bi_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_bi_reservation_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_bi_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] + # 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::Bigquery::Reservation::V1::BiReservation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # A result object deserialized from the server's reply + def update_bi_reservation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_bi_reservation_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_bi_reservation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # 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::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.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_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] + # 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::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # A result object deserialized from the server's reply + def create_reservation_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_reservation_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] + # 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::Bigquery::Reservation::V1::ReservationGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # A result object deserialized from the server's reply + def get_reservation_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_reservation_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] + # 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_reservation_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_reservation_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_reservation_groups REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] + # 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::Bigquery::Reservation::V1::ListReservationGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse] + # A result object deserialized from the server's reply + def list_reservation_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reservation_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_reservation_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.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_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] + # 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_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/reservations", + body: "reservation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reservations REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] + # 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_reservations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/reservations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] + # 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_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] + # 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_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] + # 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_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{reservation.name}", + body: "reservation", + matches: [ + ["reservation.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the failover_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_failover_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:failoverReservation", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] + # 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_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/capacityCommitments", + body: "capacity_commitment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] + # 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_capacity_commitments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/capacityCommitments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] + # 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_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] + # 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_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] + # 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_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{capacity_commitment.name}", + body: "capacity_commitment", + matches: [ + ["capacity_commitment.name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the split_capacity_commitment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_split_capacity_commitment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:split", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the merge_capacity_commitments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_merge_capacity_commitments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/capacityCommitments:merge", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] + # 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_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/assignments", + body: "assignment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] + # 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_assignments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/assignments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] + # 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_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_assignments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:searchAssignments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_all_assignments REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_search_all_assignments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:searchAllAssignments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the move_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_move_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:move", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_assignment REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] + # 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_assignment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{assignment.name}", + body: "assignment", + matches: [ + ["assignment.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] + # 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_bi_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_bi_reservation REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] + # 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_bi_reservation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{bi_reservation.name}", + body: "bi_reservation", + matches: [ + ["bi_reservation.name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] + # 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_reservation_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/reservationGroups", + body: "reservation_group", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] + # 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_reservation_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_reservation_group REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] + # 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_reservation_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reservation_groups REST call + # + # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] + # 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_reservation_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/reservationGroups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb new file mode 100644 index 000000000000..4f6d5bcb42f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb @@ -0,0 +1,297 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/reservation/v1/reservation.proto for package 'google.cloud.bigquery.reservation.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigquery/reservation/v1/reservation_pb' + +module Google + module Cloud + module Bigquery + module Reservation + module V1 + module ReservationService + # This API allows users to manage their BigQuery reservations. + # + # A reservation provides computational resource guarantees, in the form of + # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a + # unit of computational power in BigQuery, and serves as the basic unit of + # parallelism. In a scan of a multi-partitioned table, a single slot operates + # on a single partition of the table. A reservation resource exists as a child + # resource of the admin project and location, e.g.: + # `projects/myproject/locations/US/reservations/reservationName`. + # + # A capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. A capacity + # commitment resource exists as a child resource of the admin project and + # location, e.g.: + # `projects/myproject/locations/US/capacityCommitments/id`. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.reservation.v1.ReservationService' + + # Creates a new reservation resource. + rpc :CreateReservation, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Lists all the reservations for the project in the specified location. + rpc :ListReservations, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse + # Returns information about the reservation. + rpc :GetReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + rpc :DeleteReservation, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Google::Protobuf::Empty + # Updates an existing reservation resource. + rpc :UpdateReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Fail over a reservation to the secondary location. The operation should be + # done in the current secondary location, which will be promoted to the + # new primary location for the reservation. + # Attempting to failover a reservation in the current primary location will + # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc :FailoverReservation, ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation + # Creates a new capacity commitment resource. + rpc :CreateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Lists all the capacity commitments for the admin project. + rpc :ListCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse + # Returns information about the capacity commitment. + rpc :GetCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Deletes a capacity commitment. Attempting to delete capacity commitment + # before its commitment_end_time will fail with the error code + # `google.rpc.Code.FAILED_PRECONDITION`. + rpc :DeleteCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Google::Protobuf::Empty + # Updates an existing capacity commitment. + # + # Only `plan` and `renewal_plan` fields can be updated. + # + # Plan can only be changed to a plan of a longer commitment period. + # Attempting to change to a plan with shorter commitment period will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc :UpdateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Splits capacity commitment to two commitments of the same plan and + # `commitment_end_time`. + # + # A common use case is to enable downgrading commitments. + # + # For example, in order to downgrade from 10000 slots to 8000, you might + # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, + # you delete the first one after the commitment end time passes. + rpc :SplitCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse + # Merges capacity commitments of the same plan into a single commitment. + # + # The resulting capacity commitment has the greater commitment_end_time + # out of the to-be-merged capacity commitments. + # + # Attempting to merge capacity commitments of different plan will fail + # with the error code `google.rpc.Code.FAILED_PRECONDITION`. + rpc :MergeCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment + # Creates an assignment object which allows the given project to submit jobs + # of a certain type using slots from the specified reservation. + # + # Currently a + # resource (project, folder, organization) can only have one assignment per + # each (job_type, location) combination, and that reservation will be used + # for all jobs of the matching type. + # + # Different assignments can be created on different levels of the + # projects, folders or organization hierarchy. During query execution, + # the assignment is looked up at the project, folder and organization levels + # in that order. The first assignment found is applied to the query. + # + # When creating assignments, it does not matter if other assignments exist at + # higher levels. + # + # Example: + # + # * The organization `organizationA` contains two projects, `project1` + # and `project2`. + # * Assignments for all three entities (`organizationA`, `project1`, and + # `project2`) could all be created and mapped to the same or different + # reservations. + # + # "None" assignments represent an absence of the assignment. Projects + # assigned to None use on-demand pricing. To create a "None" assignment, use + # "none" as a reservation_id in the parent. Example parent: + # `projects/myproject/locations/US/reservations/none`. + # + # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have + # 'bigquery.admin' permissions on the project using the reservation + # and the project that owns this reservation. + # + # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment + # does not match location of the reservation. + rpc :CreateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment + # Lists assignments. + # + # Only explicitly created assignments will be returned. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, ListAssignments will just return the above two assignments + # for reservation `res1`, and no expansion/merge will happen. + # + # The wildcard "-" can be used for + # reservations in the request. In that case all assignments belongs to the + # specified project and location will be listed. + # + # **Note** "-" cannot be used for projects nor locations. + rpc :ListAssignments, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse + # Deletes a assignment. No expansion will happen. + # + # Example: + # + # * Organization `organizationA` contains two projects, `project1` and + # `project2`. + # * Reservation `res1` exists and was created previously. + # * CreateAssignment was used previously to define the following + # associations between entities and reservations: `` + # and `` + # + # In this example, deletion of the `` assignment won't + # affect the other assignment ``. After said deletion, + # queries from `project1` will still use `res1` while queries from + # `project2` will switch to use on-demand mode. + rpc :DeleteAssignment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Google::Protobuf::Empty + # Deprecated: Looks up assignments for a specified resource for a particular + # region. If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + # + # **Note** "-" cannot be used for projects + # nor locations. + rpc :SearchAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse + # Looks up assignments for a specified resource for a particular region. + # If the request is about a project: + # + # 1. Assignments created on the project will be returned if they exist. + # 2. Otherwise assignments created on the closest ancestor will be + # returned. + # 3. Assignments for different JobTypes will all be returned. + # + # The same logic applies if the request is about a folder. + # + # If the request is about an organization, then assignments created on the + # organization will be returned (organization doesn't have ancestors). + # + # Comparing to ListAssignments, there are some behavior + # differences: + # + # 1. permission on the assignee will be verified in this API. + # 2. Hierarchy lookup (project->folder->organization) happens in this API. + # 3. Parent here is `projects/*/locations/*`, instead of + # `projects/*/locations/*reservations/*`. + rpc :SearchAllAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse + # Moves an assignment under a new reservation. + # + # This differs from removing an existing assignment and recreating a new one + # by providing a transactional change that ensures an assignee always has an + # associated reservation. + rpc :MoveAssignment, ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment + # Updates an existing assignment. + # + # Only the `priority` field can be updated. + rpc :UpdateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment + # Retrieves a BI reservation. + rpc :GetBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation + # Updates a BI reservation. + # + # Only fields specified in the `field_mask` are updated. + # + # A singleton BI reservation always exists with default size 0. + # In order to reserve BI capacity it needs to be updated to an amount + # greater than 0. In order to release BI capacity reservation size + # must be set to 0. + rpc :UpdateBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation + # Gets the access control policy for a resource. + # May return: + # + # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the + # permission to view it. + # * An empty policy if the resource exists but doesn't have a set policy. + # + # Supported resources are: + # - Reservations + # - ReservationAssignments + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.getIamPolicy` to get policies on + # reservations. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets an access control policy for a resource. Replaces any existing + # policy. + # + # Supported resources are: + # - Reservations + # + # To call this method, you must have the following Google IAM permissions: + # + # - `bigqueryreservation.reservations.setIamPolicy` to set policies on + # reservations. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets your permissions on a resource. Returns an empty set of permissions if + # the resource doesn't exist. + # + # Supported resources are: + # - Reservations + # + # No Google IAM permissions are required to call this method. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Creates a new reservation group. + rpc :CreateReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup + # Returns information about the reservation group. + rpc :GetReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup + # Deletes a reservation. + # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has + # assignments. + rpc :DeleteReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Google::Protobuf::Empty + # Lists all the reservation groups for the project in the specified location. + rpc :ListReservationGroups, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb new file mode 100644 index 000000000000..bb32a525c996 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/reservation/v1/reservation_service/rest" +require "google/cloud/bigquery/reservation/v1/version" + +module Google + module Cloud + module Bigquery + module Reservation + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/bigquery/reservation/v1/rest" + # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb new file mode 100644 index 000000000000..be5b8808b160 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Reservation + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md new file mode 100644 index 000000000000..dcf8e9f79d59 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Reservation 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-bigquery-reservation-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb new file mode 100644 index 000000000000..f2fa903c333e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb @@ -0,0 +1,1190 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Reservation + module V1 + # A reservation is a mechanism used to guarantee slots to users. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the reservation, e.g., + # `projects/*/locations/*/reservations/team1-prod`. + # The reservation_id must only contain lower case alphanumeric characters or + # dashes. It must start with a letter and must not end with a dash. Its + # maximum length is 64 characters. + # @!attribute [rw] slot_capacity + # @return [::Integer] + # Optional. Baseline slots available to this reservation. A slot is a unit of + # computational power in BigQuery, and serves as the unit of parallelism. + # + # Queries using this reservation might use more slots during runtime if + # ignore_idle_slots is set to false, or autoscaling is enabled. + # + # The total slot_capacity of the reservation and its siblings + # may exceed the total slot_count of capacity commitments. In that case, the + # exceeding slots will be charged with the autoscale SKU. You can increase + # the number of baseline slots in a reservation every few minutes. If you + # want to decrease your baseline slots, you are limited to once an hour if + # you have recently changed your baseline slot capacity and your baseline + # slots exceed your committed slots. Otherwise, you can decrease your + # baseline slots every few minutes. + # @!attribute [rw] ignore_idle_slots + # @return [::Boolean] + # Optional. If false, any query or pipeline job using this reservation will + # use idle slots from other reservations within the same admin project. If + # true, a query or pipeline job using this reservation will execute with the + # slot capacity specified in the slot_capacity field at most. + # @!attribute [rw] autoscale + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::Autoscale] + # Optional. The configuration parameters for the auto scaling feature. + # @!attribute [rw] concurrency + # @return [::Integer] + # Optional. Job concurrency target which sets a soft upper bound on the + # number of jobs that can run concurrently in this reservation. This is a + # soft target due to asynchronous nature of the system and various + # optimizations for small queries. Default value is 0 which means that + # concurrency target will be automatically computed by the system. NOTE: this + # field is exposed as target job concurrency in the Information Schema, DDL + # and BigQuery CLI. + # @!attribute [r] creation_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation time of the reservation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the reservation. + # @!attribute [rw] multi_region_auxiliary + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Applicable only for reservations located within one of the BigQuery + # multi-regions (US or EU). + # + # If set to true, this reservation is placed in the organization's + # secondary region which is designated for disaster recovery purposes. + # If false, this reservation is placed in the organization's default region. + # + # NOTE: this is a preview feature. Project must be allow-listed in order to + # set this field. + # @!attribute [rw] edition + # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] + # Optional. Edition of the reservation. + # @!attribute [r] primary_location + # @return [::String] + # Output only. The current location of the reservation's primary replica. + # This field is only set for reservations using the managed disaster recovery + # feature. + # @!attribute [rw] secondary_location + # @return [::String] + # Optional. The current location of the reservation's secondary replica. This + # field is only set for reservations using the managed disaster recovery + # feature. Users can set this in create reservation calls + # to create a failover reservation or in update reservation calls to convert + # a non-failover reservation to a failover reservation(or vice versa). + # @!attribute [r] original_primary_location + # @return [::String] + # Output only. The location where the reservation was originally created. + # This is set only during the failover reservation's creation. All billing + # charges for the failover reservation will be applied to this location. + # @!attribute [rw] max_slots + # @return [::Integer] + # Optional. The overall max slots for the reservation, covering slot_capacity + # (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. + # If present, the reservation won't use more than the specified number of + # slots, even if there is demand and supply (from idle slots). + # NOTE: capping a reservation's idle slot usage is best effort and its + # usage may exceed the max_slots value. However, in terms of + # autoscale.current_slots (which accounts for the additional added slots), it + # will never exceed the max_slots - baseline. + # + # + # This field must be set together with the scaling_mode enum value, + # otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + # + # If the max_slots and scaling_mode are set, the autoscale or + # autoscale.max_slots field must be unset. Otherwise the request will be + # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the + # autoscale field may still be in the output. The autopscale.max_slots will + # always show as 0 and the autoscaler.current_slots will represent the + # current slots from autoscaler excluding idle slots. + # For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, + # then in the output, the autoscaler.max_slots will be 0 and the + # autoscaler.current_slots may be any value between 0 and 1000. + # + # If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 + # and idle slots usage is 200, then in the output, the autoscaler.max_slots + # will be 0 and the autoscaler.current_slots will not be higher than 700. + # + # If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the + # output, the autoscaler field will be null. + # + # If the max_slots and scaling_mode are set, then the ignore_idle_slots field + # must be aligned with the scaling_mode enum value.(See details in + # ScalingMode comments). Otherwise the request will be rejected with + # error code `google.rpc.Code.INVALID_ARGUMENT`. + # + # Please note, the max_slots is for user to manage the part of slots greater + # than the baseline. Therefore, we don't allow users to set max_slots smaller + # or equal to the baseline as it will not be meaningful. If the field is + # present and slot_capacity>=max_slots, requests will be rejected with error + # code `google.rpc.Code.INVALID_ARGUMENT`. + # + # Please note that if max_slots is set to 0, we will treat it as unset. + # Customers can set max_slots to 0 and set scaling_mode to + # SCALING_MODE_UNSPECIFIED to disable the max_slots feature. + # @!attribute [rw] scaling_mode + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ScalingMode] + # Optional. The scaling mode for the reservation. + # If the field is present but max_slots is not present, requests will be + # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. The labels associated with this reservation. You can use these + # to organize and group your reservations. + # You can set this property when you create or update a reservation. + # @!attribute [rw] reservation_group + # @return [::String] + # Optional. The reservation group that this reservation belongs to. + # You can set this property when you create or update a reservation. + # Reservations do not need to belong to a reservation group. + # Format: + # projects/\\{project}/locations/\\{location}/reservationGroups/\\{reservation_group} + # or just \\{reservation_group} + # @!attribute [r] replication_status + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ReplicationStatus] + # Output only. The Disaster Recovery(DR) replication status of the + # reservation. This is only available for the primary replicas of DR/failover + # reservations and provides information about the both the staleness of the + # secondary and the last error encountered while trying to replicate changes + # from the primary to the secondary. If this field is blank, it means that + # the reservation is either not a DR reservation or the reservation is a DR + # secondary or that any replication operations on the reservation have + # succeeded. + # @!attribute [rw] scheduling_policy + # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] + # Optional. The scheduling policy to use for jobs and queries running under + # this reservation. The scheduling policy controls how the reservation's + # resources are distributed. + # + # This feature is not yet generally available. + class Reservation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Auto scaling settings. + # @!attribute [r] current_slots + # @return [::Integer] + # Output only. The slot capacity added to this reservation when autoscale + # happens. Will be between [0, max_slots]. Note: after users reduce + # max_slots, it may take a while before it can be propagated, so + # current_slots may stay in the original value and could be larger than + # max_slots for that brief period (less than one minute) + # @!attribute [rw] max_slots + # @return [::Integer] + # Optional. Number of slots to be scaled when needed. + class Autoscale + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Disaster Recovery(DR) replication status of the reservation. + # @!attribute [r] error + # @return [::Google::Rpc::Status] + # Output only. The last error encountered while trying to replicate changes + # from the primary to the secondary. This field is only available if the + # replication has not succeeded since. + # @!attribute [r] last_error_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the last error was encountered while + # trying to replicate changes from the primary to the secondary. This field + # is only available if the replication has not succeeded since. + # @!attribute [r] last_replication_time + # @return [::Google::Protobuf::Timestamp] + # Output only. A timestamp corresponding to the last change on the primary + # that was successfully replicated to the secondary. + # @!attribute [r] soft_failover_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which a soft failover for the reservation and + # its associated datasets was initiated. After this field is set, all + # subsequent changes to the reservation will be rejected unless a hard + # failover overrides this operation. This field will be cleared once the + # failover is complete. + class ReplicationStatus + 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 + + # The scaling mode for the reservation. This enum determines how the + # reservation scales up and down. + module ScalingMode + # Default value of ScalingMode. + SCALING_MODE_UNSPECIFIED = 0 + + # The reservation will scale up only using slots from autoscaling. It will + # not use any idle slots even if there may be some available. The upper + # limit that autoscaling can scale up to will be max_slots - baseline. + # For example, if max_slots is 1000, baseline is 200 and customer sets + # ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 + # slots and no idle slots will be used. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # true. Otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + AUTOSCALE_ONLY = 1 + + # The reservation will scale up using only idle slots contributed by + # other reservations or from unassigned commitments. If no idle slots are + # available it will not scale up further. If the idle slots which it is + # using are reclaimed by the contributing reservation(s) it may be forced + # to scale down. The max idle slots the reservation can be max_slots - + # baseline capacity. For example, if max_slots is 1000, baseline is 200 and + # customer sets ScalingMode to IDLE_SLOTS_ONLY, + # 1. if there are 1000 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline and 800 idle + # slots. + # 2. if there are 500 idle slots available in other reservations, the + # reservation will scale up to 700 slots with 200 baseline and 300 idle + # slots. + # Please note, in this mode, the reservation might not be able to scale up + # to max_slots. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # false. Otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + IDLE_SLOTS_ONLY = 2 + + # The reservation will scale up using all slots available to it. It will + # use idle slots contributed by other reservations or from unassigned + # commitments first. If no idle slots are available it will scale up using + # autoscaling. For example, if max_slots is 1000, baseline is 200 and + # customer sets ScalingMode to ALL_SLOTS, + # 1. if there are 800 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline and 800 idle + # slots. + # 2. if there are 500 idle slots available in other reservations, the + # reservation will scale up to 1000 slots with 200 baseline, 500 idle + # slots and 300 autoscaling slots. + # 3. if there are no idle slots available in other reservations, it will + # scale up to 1000 slots with 200 baseline and 800 autoscaling slots. + # + # Please note, in this mode, the ignore_idle_slots field must be set to + # false. Otherwise the request will be rejected with error code + # `google.rpc.Code.INVALID_ARGUMENT`. + ALL_SLOTS = 3 + end + end + + # The scheduling policy controls how a reservation's resources are distributed. + # @!attribute [rw] concurrency + # @return [::Integer] + # Optional. If present and > 0, the reservation will attempt to limit the + # concurrency of jobs running for any particular project within it to the + # given value. + # + # This feature is not yet generally available. + # @!attribute [rw] max_slots + # @return [::Integer] + # Optional. If present and > 0, the reservation will attempt to limit the + # slot consumption of queries running for any particular project within it to + # the given value. + # + # This feature is not yet generally available. + class SchedulingPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reservation group is a container for reservations. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the reservation group, e.g., + # `projects/*/locations/*/reservationGroups/team1-prod`. + # The reservation_group_id must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end with a + # dash. Its maximum length is 64 characters. + class ReservationGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Capacity commitment is a way to purchase compute capacity for BigQuery jobs + # (in the form of slots) with some committed period of usage. Annual + # commitments renew by default. Commitments can be removed after their + # commitment end time passes. + # + # In order to remove annual commitment, its plan needs to be changed + # to monthly or flex first. + # + # A capacity commitment resource exists as a child resource of the admin + # project. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the capacity commitment, e.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # The commitment_id must only contain lower case alphanumeric characters or + # dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @!attribute [rw] slot_count + # @return [::Integer] + # Optional. Number of slots in this commitment. + # @!attribute [rw] plan + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] + # Optional. Capacity commitment commitment plan. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::State] + # Output only. State of the commitment. + # @!attribute [r] commitment_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start of the current commitment period. It is applicable + # only for ACTIVE capacity commitments. Note after the commitment is renewed, + # commitment_start_time won't be changed. It refers to the start time of the + # original commitment. + # @!attribute [r] commitment_end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The end of the current commitment period. It is applicable + # only for ACTIVE capacity commitments. Note after renewal, + # commitment_end_time is the time the renewed commitment expires. So itwould + # be at a time after commitment_start_time + committed period, because we + # don't change commitment_start_time , + # @!attribute [r] failure_status + # @return [::Google::Rpc::Status] + # Output only. For FAILED commitment plan, provides the reason of failure. + # @!attribute [rw] renewal_plan + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] + # Optional. The plan this capacity commitment is converted to after + # commitment_end_time passes. Once the plan is changed, committed period is + # extended according to commitment plan. Only applicable for ANNUAL and TRIAL + # commitments. + # @!attribute [rw] multi_region_auxiliary + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Applicable only for commitments located within one of the BigQuery + # multi-regions (US or EU). + # + # If set to true, this commitment is placed in the organization's + # secondary region which is designated for disaster recovery purposes. + # If false, this commitment is placed in the organization's default region. + # + # NOTE: this is a preview feature. Project must be allow-listed in order to + # set this field. + # @!attribute [rw] edition + # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] + # Optional. Edition of the capacity commitment. + # @!attribute [r] is_flat_rate + # @return [::Boolean] + # Output only. If true, the commitment is a flat-rate commitment, otherwise, + # it's an edition commitment. + class CapacityCommitment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Commitment plan defines the current committed period. Capacity commitment + # cannot be deleted during it's committed period. + module CommitmentPlan + # Invalid plan value. Requests with this value will be rejected with + # error code `google.rpc.Code.INVALID_ARGUMENT`. + COMMITMENT_PLAN_UNSPECIFIED = 0 + + # Flex commitments have committed period of 1 minute after becoming ACTIVE. + # After that, they are not in a committed period anymore and can be removed + # any time. + FLEX = 3 + + # Same as FLEX, should only be used if flat-rate commitments are still + # available. + FLEX_FLAT_RATE = 7 + + # Trial commitments have a committed period of 182 days after becoming + # ACTIVE. After that, they are converted to a new commitment based on the + # `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so + # that it can be deleted right after committed period ends. + TRIAL = 5 + + # Monthly commitments have a committed period of 30 days after becoming + # ACTIVE. After that, they are not in a committed period anymore and can be + # removed any time. + MONTHLY = 2 + + # Same as MONTHLY, should only be used if flat-rate commitments are still + # available. + MONTHLY_FLAT_RATE = 8 + + # Annual commitments have a committed period of 365 days after becoming + # ACTIVE. After that they are converted to a new commitment based on the + # renewal_plan. + ANNUAL = 4 + + # Same as ANNUAL, should only be used if flat-rate commitments are still + # available. + ANNUAL_FLAT_RATE = 9 + + # 3-year commitments have a committed period of 1095(3 * 365) days after + # becoming ACTIVE. After that they are converted to a new commitment based + # on the renewal_plan. + THREE_YEAR = 10 + + # Should only be used for `renewal_plan` and is only meaningful if + # edition is specified to values other than EDITION_UNSPECIFIED. Otherwise + # CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will + # be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the + # renewal_plan is NONE, capacity commitment will be removed at the end of + # its commitment period. + NONE = 6 + end + + # Capacity commitment can either become ACTIVE right away or transition + # from PENDING to ACTIVE or FAILED. + module State + # Invalid state value. + STATE_UNSPECIFIED = 0 + + # Capacity commitment is pending provisioning. Pending capacity commitment + # does not contribute to the project's slot_capacity. + PENDING = 1 + + # Once slots are provisioned, capacity commitment becomes active. + # slot_count is added to the project's slot_capacity. + ACTIVE = 2 + + # Capacity commitment is failed to be activated by the backend. + FAILED = 3 + end + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation ReservationService.CreateReservation}. + # @!attribute [rw] parent + # @return [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] reservation_id + # @return [::String] + # The reservation ID. It must only contain lower case alphanumeric + # characters or dashes. It must start with a letter and must not end + # with a dash. Its maximum length is 64 characters. + # @!attribute [rw] reservation + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # Definition of the new reservation to create. + class CreateReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListReservationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. + # @!attribute [rw] reservations + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] + # List of reservations visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListReservationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation ReservationService.GetReservation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + class GetReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation ReservationService.DeleteReservation}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation to retrieve. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + class DeleteReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation ReservationService.UpdateReservation}. + # @!attribute [rw] reservation + # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] + # Content of the reservation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for ReservationService.FailoverReservation. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation to failover. E.g., + # `projects/myproject/locations/US/reservations/team1-prod` + # @!attribute [rw] failover_mode + # @return [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] + # Optional. A parameter that determines how writes that are pending + # replication are handled after a failover is initiated. If not specified, + # HARD failover mode is used by default. + class FailoverReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group ReservationService.CreateReservationGroup}. + # @!attribute [rw] parent + # @return [::String] + # Required. Project, location. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] reservation_group_id + # @return [::String] + # Required. The reservation group ID. It must only contain lower case + # alphanumeric characters or dashes. It must start with a letter and must not + # end with a dash. Its maximum length is 64 characters. + # @!attribute [rw] reservation_group + # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] + # Required. New Reservation Group to create. + class CreateReservationGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group ReservationService.GetReservationGroup}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + class GetReservationGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name containing project and location, e.g.: + # `projects/myproject/locations/US` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListReservationGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. + # @!attribute [rw] reservation_groups + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] + # List of reservations visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListReservationGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group ReservationService.DeleteReservationGroup}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the reservation group to retrieve. E.g., + # `projects/myproject/locations/US/reservationGroups/team1-prod` + class DeleteReservationGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment ReservationService.CreateCapacityCommitment}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] capacity_commitment + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # Content of the capacity commitment to create. + # @!attribute [rw] enforce_single_admin_project_per_org + # @return [::Boolean] + # If true, fail the request if another project in the organization has a + # capacity commitment. + # @!attribute [rw] capacity_commitment_id + # @return [::String] + # The optional capacity commitment ID. Capacity commitment name will be + # generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + # NOTE: this ID won't be kept if the capacity commitment is split or merged. + class CreateCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. + # @!attribute [rw] parent + # @return [::String] + # Required. Resource name of the parent reservation. E.g., + # `projects/myproject/locations/US` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListCapacityCommitmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. + # @!attribute [rw] capacity_commitments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] + # List of capacity commitments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListCapacityCommitmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment ReservationService.GetCapacityCommitment}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the capacity commitment to retrieve. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + class GetCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment ReservationService.DeleteCapacityCommitment}. + # @!attribute [rw] name + # @return [::String] + # Required. Resource name of the capacity commitment to delete. E.g., + # `projects/myproject/locations/US/capacityCommitments/123` + # @!attribute [rw] force + # @return [::Boolean] + # Can be used to force delete commitments even if assignments exist. Deleting + # commitments with assignments may cause queries to fail if they no longer + # have access to slots. + class DeleteCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment ReservationService.UpdateCapacityCommitment}. + # @!attribute [rw] capacity_commitment + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # Content of the capacity commitment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name e.g.,: + # `projects/myproject/locations/US/capacityCommitments/123` + # @!attribute [rw] slot_count + # @return [::Integer] + # Number of slots in the capacity commitment after the split. + class SplitCapacityCommitmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. + # @!attribute [rw] first + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # First capacity commitment, result of a split. + # @!attribute [rw] second + # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] + # Second capacity commitment, result of a split. + class SplitCapacityCommitmentResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments ReservationService.MergeCapacityCommitments}. + # @!attribute [rw] parent + # @return [::String] + # Parent resource that identifies admin project and location e.g., + # `projects/myproject/locations/us` + # @!attribute [rw] capacity_commitment_ids + # @return [::Array<::String>] + # Ids of capacity commitments to merge. + # These capacity commitments must exist under admin project and location + # specified in the parent. + # ID is the last portion of capacity commitment name e.g., 'abc' for + # projects/myproject/locations/US/capacityCommitments/abc + # @!attribute [rw] capacity_commitment_id + # @return [::String] + # Optional. The optional resulting capacity commitment ID. Capacity + # commitment name will be generated automatically if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # The first and last character cannot be a dash. Max length is 64 characters. + class MergeCapacityCommitmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An assignment allows a project to submit jobs + # of a certain type using slots from the specified reservation. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the resource. E.g.: + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. + # The assignment_id must only contain lower case alphanumeric characters or + # dashes and the max length is 64 characters. + # @!attribute [rw] assignee + # @return [::String] + # Optional. The resource which will use the reservation. E.g. + # `projects/myproject`, `folders/123`, or `organizations/456`. + # @!attribute [rw] job_type + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType] + # Optional. Which type of jobs will use the reservation. + # @!attribute [r] state + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::State] + # Output only. State of the assignment. + # @!attribute [rw] enable_gemini_in_bigquery + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Optional. Deprecated: "Gemini in BigQuery" is now available by + # default for all BigQuery editions and should not be explicitly set. + # Controls if "Gemini in BigQuery" + # (https://cloud.google.com/gemini/docs/bigquery/overview) features should be + # enabled for this reservation assignment. + # @!attribute [rw] scheduling_policy + # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] + # Optional. The scheduling policy to use for jobs and queries of this + # assignee when running under the associated reservation. The scheduling + # policy controls how the reservation's resources are distributed. This + # overrides the default scheduling policy specified on the reservation. + # + # This feature is not yet generally available. + class Assignment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of job, which could be specified when using the reservation. + module JobType + # Invalid type. Requests with this value will be rejected with + # error code `google.rpc.Code.INVALID_ARGUMENT`. + JOB_TYPE_UNSPECIFIED = 0 + + # Pipeline (load/export) jobs from the project will use the reservation. + PIPELINE = 1 + + # Query jobs from the project will use the reservation. + QUERY = 2 + + # BigQuery ML jobs that use services external to BigQuery for model + # training. These jobs will not utilize idle slots from other reservations. + ML_EXTERNAL = 3 + + # Background jobs that BigQuery runs for the customers in the background. + BACKGROUND = 4 + + # Continuous SQL jobs will use this reservation. Reservations with + # continuous assignments cannot be mixed with non-continuous assignments. + CONTINUOUS = 6 + + # Finer granularity background jobs for capturing changes in a source + # database and streaming them into BigQuery. Reservations with this job + # type take priority over a default BACKGROUND reservation assignment (if + # it exists). + BACKGROUND_CHANGE_DATA_CAPTURE = 7 + + # Finer granularity background jobs for refreshing cached metadata for + # BigQuery tables. Reservations with this job type take priority over a + # default BACKGROUND reservation assignment (if it exists). + BACKGROUND_COLUMN_METADATA_INDEX = 8 + + # Finer granularity background jobs for refreshing search indexes upon + # BigQuery table columns. Reservations with this job type + # take priority over a default BACKGROUND reservation assignment (if it + # exists). + BACKGROUND_SEARCH_INDEX_REFRESH = 9 + end + + # Assignment will remain in PENDING state if no active capacity commitment is + # present. It will become ACTIVE when some capacity commitment becomes + # active. + module State + # Invalid state value. + STATE_UNSPECIFIED = 0 + + # Queries from assignee will be executed as on-demand, if related + # assignment is pending. + PENDING = 1 + + # Assignment is ready. + ACTIVE = 2 + end + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment ReservationService.CreateAssignment}. + # Note: "bigquery.reservationAssignments.create" permission is required on the + # related assignee. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name of the assignment + # E.g. `projects/myproject/locations/US/reservations/team1-prod` + # @!attribute [rw] assignment + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # Assignment resource to create. + # @!attribute [rw] assignment_id + # @return [::String] + # The optional assignment ID. Assignment name will be generated automatically + # if this field is empty. + # This field must only contain lower case alphanumeric characters or dashes. + # Max length is 64 characters. + class CreateAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name e.g.: + # + # `projects/myproject/locations/US/reservations/team1-prod` + # + # Or: + # + # `projects/myproject/locations/US/reservations/-` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class ListAssignmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. + # @!attribute [rw] assignments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # List of assignments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class ListAssignmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment ReservationService.DeleteAssignment}. + # Note: "bigquery.reservationAssignments.delete" permission is required on the + # related assignee. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource, e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + class DeleteAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. + # Note: "bigquery.reservationAssignments.search" permission is required on the + # related assignee. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the admin project(containing project and + # location), e.g.: + # `projects/myproject/locations/US`. + # @!attribute [rw] query + # @return [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class SearchAssignmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. + # Note: "bigquery.reservationAssignments.search" permission is required on the + # related assignee. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name with location (project name could be the + # wildcard '-'), e.g.: + # `projects/-/locations/US`. + # @!attribute [rw] query + # @return [::String] + # Please specify resource name as assignee in the query. + # + # Examples: + # + # * `assignee=projects/myproject` + # * `assignee=folders/123` + # * `assignee=organizations/456` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return per page. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value returned from a previous List request, if any. + class SearchAllAssignmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. + # @!attribute [rw] assignments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # List of assignments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class SearchAssignmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. + # @!attribute [rw] assignments + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] + # List of assignments visible to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to retrieve the next page of results, or empty if there are no + # more results in the list. + class SearchAllAssignmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment ReservationService.MoveAssignment}. + # + # **Note**: "bigquery.reservationAssignments.create" permission is required on + # the destination_id. + # + # **Note**: "bigquery.reservationAssignments.create" and + # "bigquery.reservationAssignments.delete" permission are required on the + # related assignee. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the assignment, + # e.g. + # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` + # @!attribute [rw] destination_id + # @return [::String] + # The new reservation ID, e.g.: + # `projects/myotherproject/locations/US/reservations/team2-prod` + # @!attribute [rw] assignment_id + # @return [::String] + # The optional assignment ID. A new assignment name is generated if this + # field is empty. + # + # This field can contain only lowercase alphanumeric characters or dashes. + # Max length is 64 characters. + class MoveAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment ReservationService.UpdateAssignment}. + # @!attribute [rw] assignment + # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] + # Content of the assignment to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Standard field mask for the set of fields to be updated. + class UpdateAssignmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fully qualified reference to BigQuery table. + # Internally stored as google.cloud.bi.v1.BqTableReference. + # @!attribute [rw] project_id + # @return [::String] + # Optional. The assigned project ID of the project. + # @!attribute [rw] dataset_id + # @return [::String] + # Optional. The ID of the dataset in the above project. + # @!attribute [rw] table_id + # @return [::String] + # Optional. The ID of the table in the above dataset. + class TableReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a BI Reservation. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the singleton BI reservation. + # Reservation names have the form + # `projects/{project_id}/locations/{location_id}/biReservation`. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a reservation. + # @!attribute [rw] size + # @return [::Integer] + # Optional. Size of a reservation, in bytes. + # @!attribute [rw] preferred_tables + # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::TableReference>] + # Optional. Preferred tables to use BI capacity for. + class BiReservation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a singleton BI reservation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested reservation, for example: + # `projects/{project_id}/locations/{location_id}/biReservation` + class GetBiReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a BI reservation. + # @!attribute [rw] bi_reservation + # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] + # A reservation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # A list of fields to be updated in this request. + class UpdateBiReservationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of editions. + # Different features and behaviors are provided to different editions + # Capacity commitments and reservations are linked to editions. + module Edition + # Default value, which will be treated as ENTERPRISE. + EDITION_UNSPECIFIED = 0 + + # Standard edition. + STANDARD = 1 + + # Enterprise edition. + ENTERPRISE = 2 + + # Enterprise Plus edition. + ENTERPRISE_PLUS = 3 + end + + # The failover mode when a user initiates a failover on a reservation + # determines how writes that are pending replication are handled after the + # failover is initiated. + module FailoverMode + # Invalid value. + FAILOVER_MODE_UNSPECIFIED = 0 + + # When customers initiate a soft failover, BigQuery will wait until all + # committed writes are replicated to the secondary. This mode requires both + # regions to be available for the failover to succeed and prevents data loss. + SOFT = 1 + + # When customers initiate a hard failover, BigQuery will not wait until all + # committed writes are replicated to the secondary. There can be data loss + # for hard failover. + HARD = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile new file mode 100644 index 000000000000..d0e18bc92cd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1", path: "../" +else + gem "google-cloud-bigquery-reservation-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-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb new file mode 100644 index 000000000000..521034bd4bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.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 bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_assignment. +# +def create_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new + + # Call the create_assignment method. + result = client.create_assignment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb new file mode 100644 index 000000000000..009f27435599 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment. +# +def create_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new + + # Call the create_capacity_commitment method. + result = client.create_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb new file mode 100644 index 000000000000..085d3fc69e50 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.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 bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_reservation. +# +def create_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new + + # Call the create_reservation method. + result = client.create_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb new file mode 100644 index 000000000000..bce27da2456d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the create_reservation_group call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group. +# +def create_reservation_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new + + # Call the create_reservation_group method. + result = client.create_reservation_group request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb new file mode 100644 index 000000000000..bcd9a3be93fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.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 bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment. +# +def delete_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new + + # Call the delete_assignment method. + result = client.delete_assignment request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb new file mode 100644 index 000000000000..b0c78a4fd165 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment. +# +def delete_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new + + # Call the delete_capacity_commitment method. + result = client.delete_capacity_commitment request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb new file mode 100644 index 000000000000..d8bac2d9baf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.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 bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation. +# +def delete_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new + + # Call the delete_reservation method. + result = client.delete_reservation request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb new file mode 100644 index 000000000000..fe6838172e60 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the delete_reservation_group call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group. +# +def delete_reservation_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new + + # Call the delete_reservation_group method. + result = client.delete_reservation_group request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb new file mode 100644 index 000000000000..80443f502d44 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.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 bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the failover_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation. +# +def failover_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new + + # Call the failover_reservation method. + result = client.failover_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb new file mode 100644 index 000000000000..2b549c493903 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.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 bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_bi_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation. +# +def get_bi_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new + + # Call the get_bi_reservation method. + result = client.get_bi_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb new file mode 100644 index 000000000000..bf907ad51799 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment. +# +def get_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new + + # Call the get_capacity_commitment method. + result = client.get_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb new file mode 100644 index 000000000000..e3861739e77e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_iam_policy call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb new file mode 100644 index 000000000000..accd2421609b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.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 bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_reservation. +# +def get_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new + + # Call the get_reservation method. + result = client.get_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb new file mode 100644 index 000000000000..0c3d3ef808b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the get_reservation_group call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group. +# +def get_reservation_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new + + # Call the get_reservation_group method. + result = client.get_reservation_group request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb new file mode 100644 index 000000000000..f1f669f1ff95 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.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 bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_assignments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_assignments. +# +def list_assignments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new + + # Call the list_assignments method. + result = client.list_assignments 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::Bigquery::Reservation::V1::Assignment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb new file mode 100644 index 000000000000..bcfb6bd8ea92 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.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 bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_capacity_commitments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments. +# +def list_capacity_commitments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new + + # Call the list_capacity_commitments method. + result = client.list_capacity_commitments 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::Bigquery::Reservation::V1::CapacityCommitment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb new file mode 100644 index 000000000000..f06ea8557380 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_reservation_groups call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups. +# +def list_reservation_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new + + # Call the list_reservation_groups method. + result = client.list_reservation_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb new file mode 100644 index 000000000000..a33941e64425 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.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 bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the list_reservations call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_reservations. +# +def list_reservations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new + + # Call the list_reservations method. + result = client.list_reservations 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::Bigquery::Reservation::V1::Reservation. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb new file mode 100644 index 000000000000..e613421e5c07 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.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 bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the merge_capacity_commitments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments. +# +def merge_capacity_commitments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new + + # Call the merge_capacity_commitments method. + result = client.merge_capacity_commitments request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb new file mode 100644 index 000000000000..bfde018b1dbe --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.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 bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the move_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#move_assignment. +# +def move_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new + + # Call the move_assignment method. + result = client.move_assignment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb new file mode 100644 index 000000000000..b44239d089c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.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 bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the search_all_assignments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments. +# +def search_all_assignments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new + + # Call the search_all_assignments method. + result = client.search_all_assignments 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::Bigquery::Reservation::V1::Assignment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb new file mode 100644 index 000000000000..de534b544c70 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.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 bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the search_assignments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#search_assignments. +# +def search_assignments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new + + # Call the search_assignments method. + result = client.search_assignments 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::Bigquery::Reservation::V1::Assignment. + p item + end +end +# [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb new file mode 100644 index 000000000000..87068c26b062 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the set_iam_policy call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb new file mode 100644 index 000000000000..d162341ed27b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the split_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment. +# +def split_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new + + # Call the split_capacity_commitment method. + result = client.split_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb new file mode 100644 index 000000000000..a178dceda953 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.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 bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the test_iam_permissions call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb new file mode 100644 index 000000000000..6f60f2e93e93 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.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 bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_assignment. +# +def update_assignment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new + + # Call the update_assignment method. + result = client.update_assignment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb new file mode 100644 index 000000000000..c3b37b5568d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.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 bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_bi_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation. +# +def update_bi_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new + + # Call the update_bi_reservation method. + result = client.update_bi_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb new file mode 100644 index 000000000000..47aea627cc66 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment. +# +def update_capacity_commitment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new + + # Call the update_capacity_commitment method. + result = client.update_capacity_commitment request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb new file mode 100644 index 000000000000..a607011a6c50 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.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 bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] +require "google/cloud/bigquery/reservation/v1" + +## +# Snippet for the update_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_reservation. +# +def update_reservation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new + + # Call the update_reservation method. + result = client.update_reservation request + + # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. + p result +end +# [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json new file mode 100644 index 000000000000..9c975b868826 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json @@ -0,0 +1,1175 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-reservation-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.reservation.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync", + "title": "Snippet for the create_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation.", + "file": "reservation_service/create_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservations_sync", + "title": "Snippet for the list_reservations call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations.", + "file": "reservation_service/list_reservations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reservations", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListReservations", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservations", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservation_sync", + "title": "Snippet for the get_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation.", + "file": "reservation_service/get_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync", + "title": "Snippet for the delete_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation.", + "file": "reservation_service/delete_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync", + "title": "Snippet for the update_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation.", + "file": "reservation_service/update_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync", + "title": "Snippet for the failover_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation.", + "file": "reservation_service/failover_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "failover_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "FailoverReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.FailoverReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync", + "title": "Snippet for the create_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment.", + "file": "reservation_service/create_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync", + "title": "Snippet for the list_capacity_commitments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments.", + "file": "reservation_service/list_capacity_commitments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_capacity_commitments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListCapacityCommitments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListCapacityCommitments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync", + "title": "Snippet for the get_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment.", + "file": "reservation_service/get_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync", + "title": "Snippet for the delete_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment.", + "file": "reservation_service/delete_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync", + "title": "Snippet for the update_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment.", + "file": "reservation_service/update_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync", + "title": "Snippet for the split_capacity_commitment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment.", + "file": "reservation_service/split_capacity_commitment.rb", + "language": "RUBY", + "client_method": { + "short_name": "split_capacity_commitment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SplitCapacityCommitment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SplitCapacityCommitment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync", + "title": "Snippet for the merge_capacity_commitments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments.", + "file": "reservation_service/merge_capacity_commitments.rb", + "language": "RUBY", + "client_method": { + "short_name": "merge_capacity_commitments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "MergeCapacityCommitments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MergeCapacityCommitments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync", + "title": "Snippet for the create_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment.", + "file": "reservation_service/create_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync", + "title": "Snippet for the list_assignments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments.", + "file": "reservation_service/list_assignments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_assignments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListAssignments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListAssignments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync", + "title": "Snippet for the delete_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment.", + "file": "reservation_service/delete_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync", + "title": "Snippet for the search_assignments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments.", + "file": "reservation_service/search_assignments.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_assignments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SearchAssignments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAssignments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync", + "title": "Snippet for the search_all_assignments call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments.", + "file": "reservation_service/search_all_assignments.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_all_assignments", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SearchAllAssignments", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAllAssignments", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync", + "title": "Snippet for the move_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment.", + "file": "reservation_service/move_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "MoveAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MoveAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync", + "title": "Snippet for the update_assignment call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment.", + "file": "reservation_service/update_assignment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_assignment", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateAssignment", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateAssignment", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync", + "title": "Snippet for the get_bi_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation.", + "file": "reservation_service/get_bi_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_bi_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetBiReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetBiReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync", + "title": "Snippet for the update_bi_reservation call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation.", + "file": "reservation_service/update_bi_reservation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_bi_reservation", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "UpdateBiReservation", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateBiReservation", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy.", + "file": "reservation_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetIamPolicy", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy.", + "file": "reservation_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SetIamPolicy", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions.", + "file": "reservation_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.TestIamPermissions", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync", + "title": "Snippet for the create_reservation_group call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group.", + "file": "reservation_service/create_reservation_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reservation_group", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "CreateReservationGroup", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservationGroup", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync", + "title": "Snippet for the get_reservation_group call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group.", + "file": "reservation_service/get_reservation_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reservation_group", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "GetReservationGroup", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservationGroup", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync", + "title": "Snippet for the delete_reservation_group call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group.", + "file": "reservation_service/delete_reservation_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_reservation_group", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "DeleteReservationGroup", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservationGroup", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync", + "title": "Snippet for the list_reservation_groups call in the ReservationService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups.", + "file": "reservation_service/list_reservation_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reservation_groups", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse", + "client": { + "short_name": "ReservationService::Client", + "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" + }, + "method": { + "short_name": "ListReservationGroups", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservationGroups", + "service": { + "short_name": "ReservationService", + "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb new file mode 100644 index 000000000000..f56e3454b155 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/reservation/v1/reservation_service" + +class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_assignment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.assignment_path project: "value0", location: "value1", reservation: "value2", assignment: "value3" + assert_equal "projects/value0/locations/value1/reservations/value2/assignments/value3", path + end + end + + def test_bi_reservation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.bi_reservation_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/biReservation", path + end + end + + def test_capacity_commitment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.capacity_commitment_path project: "value0", location: "value1", capacity_commitment: "value2" + assert_equal "projects/value0/locations/value1/capacityCommitments/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::Bigquery::Reservation::V1::ReservationService::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_reservation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reservation_path project: "value0", location: "value1", reservation: "value2" + assert_equal "projects/value0/locations/value1/reservations/value2", path + end + end + + def test_reservation_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reservation_group_path project: "value0", location: "value1", reservation_group: "value2" + assert_equal "projects/value0/locations/value1/reservationGroups/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb new file mode 100644 index 000000000000..21f817016c51 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb @@ -0,0 +1,1703 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/reservation/v1/reservation_pb" +require "google/cloud/bigquery/reservation/v1/reservation_service/rest" + + +class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_create_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reservation_id = "hello world" + reservation = {} + + create_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reservation_client_stub.call_count + end + end + end + + def test_list_reservations + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.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_reservations_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reservations_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_reservations({ 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_reservations 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_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations({ 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_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations_client_stub.call_count + end + end + end + + def test_get_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_reservation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_reservation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_reservation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reservation_client_stub.call_count + end + end + end + + def test_delete_reservation + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_reservation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_reservation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_reservation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_reservation_client_stub.call_count + end + end + end + + def test_update_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + reservation = {} + update_mask = {} + + update_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_reservation({ reservation: reservation, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_reservation reservation: reservation, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_reservation({ reservation: reservation, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_reservation_client_stub.call_count + end + end + end + + def test_failover_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + failover_mode = :FAILOVER_MODE_UNSPECIFIED + + failover_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_failover_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, failover_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.failover_reservation({ name: name, failover_mode: failover_mode }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.failover_reservation name: name, failover_mode: failover_mode do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.failover_reservation({ name: name, failover_mode: failover_mode }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, failover_reservation_client_stub.call_count + end + end + end + + def test_create_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + capacity_commitment = {} + enforce_single_admin_project_per_org = true + capacity_commitment_id = "hello world" + + create_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_capacity_commitment_client_stub.call_count + end + end + end + + def test_list_capacity_commitments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.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_capacity_commitments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_capacity_commitments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_capacity_commitments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_capacity_commitments({ 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_capacity_commitments 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_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments({ 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_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments_client_stub.call_count + end + end + end + + def test_get_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_capacity_commitment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_capacity_commitment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_capacity_commitment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_capacity_commitment_client_stub.call_count + end + end + end + + def test_delete_capacity_commitment + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_capacity_commitment({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_capacity_commitment name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_capacity_commitment({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_capacity_commitment_client_stub.call_count + end + end + end + + def test_update_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + capacity_commitment = {} + update_mask = {} + + update_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_capacity_commitment_client_stub.call_count + end + end + end + + def test_split_capacity_commitment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + slot_count = 42 + + split_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_split_capacity_commitment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, split_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.split_capacity_commitment({ name: name, slot_count: slot_count }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.split_capacity_commitment name: name, slot_count: slot_count do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.split_capacity_commitment({ name: name, slot_count: slot_count }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, split_capacity_commitment_client_stub.call_count + end + end + end + + def test_merge_capacity_commitments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + capacity_commitment_ids = ["hello world"] + capacity_commitment_id = "hello world" + + merge_capacity_commitments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_merge_capacity_commitments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, merge_capacity_commitments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, merge_capacity_commitments_client_stub.call_count + end + end + end + + def test_create_assignment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + assignment = {} + assignment_id = "hello world" + + create_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_assignment_client_stub.call_count + end + end + end + + def test_list_assignments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.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_assignments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_assignments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_assignments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_assignments({ 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_assignments 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_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments({ 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_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments_client_stub.call_count + end + end + end + + def test_delete_assignment + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_assignment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_assignment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_assignment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_assignment_client_stub.call_count + end + end + end + + def test_search_assignments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_assignments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_assignments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_assignments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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.search_assignments({ parent: parent, query: query, 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.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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, search_assignments_client_stub.call_count + end + end + end + + def test_search_all_assignments + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_all_assignments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_all_assignments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_all_assignments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_all_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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.search_all_assignments({ parent: parent, query: query, 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.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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, search_all_assignments_client_stub.call_count + end + end + end + + def test_move_assignment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_id = "hello world" + assignment_id = "hello world" + + move_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_move_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, move_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, move_assignment_client_stub.call_count + end + end + end + + def test_update_assignment + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + assignment = {} + update_mask = {} + + update_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_assignment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_assignment({ assignment: assignment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_assignment assignment: assignment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_assignment({ assignment: assignment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_assignment_client_stub.call_count + end + end + end + + def test_get_bi_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_bi_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_bi_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_bi_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_bi_reservation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_bi_reservation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_bi_reservation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_bi_reservation_client_stub.call_count + end + end + end + + def test_update_bi_reservation + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + bi_reservation = {} + update_mask = {} + + update_bi_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_bi_reservation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_bi_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_bi_reservation_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_create_reservation_group + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reservation_group_id = "hello world" + reservation_group = {} + + create_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reservation_group_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reservation_group_client_stub.call_count + end + end + end + + def test_get_reservation_group + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reservation_group_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_reservation_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_reservation_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_reservation_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reservation_group_client_stub.call_count + end + end + end + + def test_delete_reservation_group + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_reservation_group_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_reservation_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_reservation_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_reservation_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_reservation_group_client_stub.call_count + end + end + end + + def test_list_reservation_groups + # Create test objects. + client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.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_reservation_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservation_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reservation_groups_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb new file mode 100644 index 000000000000..89c81559cdec --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb @@ -0,0 +1,1892 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/reservation/v1/reservation_pb" +require "google/cloud/bigquery/reservation/v1/reservation_service" + +class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_create_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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" + reservation_id = "hello world" + reservation = {} + + create_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["reservation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reservation_client_stub.call_rpc_count + end + end + + def test_list_reservations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.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_reservations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reservations, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, 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_reservations_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_reservations({ 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_reservations 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_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations({ 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_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations_client_stub.call_rpc_count + end + end + + def test_get_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_reservation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_reservation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_reservation({ 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_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.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_reservation_client_stub.call_rpc_count + end + end + + def test_delete_reservation + # 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_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_reservation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_reservation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_reservation({ 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_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.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_reservation_client_stub.call_rpc_count + end + end + + def test_update_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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. + reservation = {} + update_mask = {} + + update_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_reservation({ reservation: reservation, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_reservation reservation: reservation, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_reservation({ reservation: reservation, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_reservation_client_stub.call_rpc_count + end + end + + def test_failover_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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" + failover_mode = :FAILOVER_MODE_UNSPECIFIED + + failover_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :failover_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, request + assert_equal "hello world", request["name"] + assert_equal :FAILOVER_MODE_UNSPECIFIED, request["failover_mode"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, failover_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.failover_reservation({ name: name, failover_mode: failover_mode }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.failover_reservation name: name, failover_mode: failover_mode do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.failover_reservation({ name: name, failover_mode: failover_mode }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, failover_reservation_client_stub.call_rpc_count + end + end + + def test_create_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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" + capacity_commitment = {} + enforce_single_admin_project_per_org = true + capacity_commitment_id = "hello world" + + create_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] + assert_equal true, request["enforce_single_admin_project_per_org"] + assert_equal "hello world", request["capacity_commitment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_list_capacity_commitments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.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_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_capacity_commitments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, 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_capacity_commitments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_capacity_commitments({ 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_capacity_commitments 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_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments({ 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_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments_client_stub.call_rpc_count + end + end + + def test_get_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_capacity_commitment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_capacity_commitment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_capacity_commitment({ 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_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.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_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_delete_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_capacity_commitment({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_capacity_commitment name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_capacity_commitment({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_update_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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. + capacity_commitment = {} + update_mask = {} + + update_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_split_capacity_commitment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.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" + slot_count = 42 + + split_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :split_capacity_commitment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["slot_count"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, split_capacity_commitment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.split_capacity_commitment({ name: name, slot_count: slot_count }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.split_capacity_commitment name: name, slot_count: slot_count do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.split_capacity_commitment({ name: name, slot_count: slot_count }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, split_capacity_commitment_client_stub.call_rpc_count + end + end + + def test_merge_capacity_commitments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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" + capacity_commitment_ids = ["hello world"] + capacity_commitment_id = "hello world" + + merge_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :merge_capacity_commitments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["capacity_commitment_ids"] + assert_equal "hello world", request["capacity_commitment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, merge_capacity_commitments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, merge_capacity_commitments_client_stub.call_rpc_count + end + end + + def test_create_assignment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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" + assignment = {} + assignment_id = "hello world" + + create_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] + assert_equal "hello world", request["assignment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_assignment_client_stub.call_rpc_count + end + end + + def test_list_assignments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.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_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_assignments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, 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_assignments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_assignments({ 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_assignments 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_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments({ 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_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments_client_stub.call_rpc_count + end + end + + def test_delete_assignment + # 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_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_assignment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_assignment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_assignment({ 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_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.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_assignment_client_stub.call_rpc_count + end + end + + def test_search_assignments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.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" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_assignments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_assignments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_assignments({ parent: parent, query: query, 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.search_assignments parent: parent, query: query, 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.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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.search_assignments({ parent: parent, query: query, 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.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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, search_assignments_client_stub.call_rpc_count + end + end + + def test_search_all_assignments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.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" + query = "hello world" + page_size = 42 + page_token = "hello world" + + search_all_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_all_assignments, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["query"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_all_assignments_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_all_assignments({ parent: parent, query: query, 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.search_all_assignments parent: parent, query: query, 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.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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.search_all_assignments({ parent: parent, query: query, 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.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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, search_all_assignments_client_stub.call_rpc_count + end + end + + def test_move_assignment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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" + destination_id = "hello world" + assignment_id = "hello world" + + move_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :move_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["destination_id"] + assert_equal "hello world", request["assignment_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, move_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, move_assignment_client_stub.call_rpc_count + end + end + + def test_update_assignment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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. + assignment = {} + update_mask = {} + + update_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_assignment, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_assignment_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_assignment({ assignment: assignment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_assignment assignment: assignment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_assignment({ assignment: assignment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_assignment_client_stub.call_rpc_count + end + end + + def test_get_bi_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_bi_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_bi_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_bi_reservation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_bi_reservation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_bi_reservation({ 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_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.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_bi_reservation_client_stub.call_rpc_count + end + end + + def test_update_bi_reservation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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. + bi_reservation = {} + update_mask = {} + + update_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_bi_reservation, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::BiReservation), request["bi_reservation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_bi_reservation_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_bi_reservation_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_create_reservation_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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" + reservation_group_id = "hello world" + reservation_group = {} + + create_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reservation_group, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["reservation_group_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup), request["reservation_group"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reservation_group_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reservation_group_client_stub.call_rpc_count + end + end + + def test_get_reservation_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reservation_group, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reservation_group_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_reservation_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_reservation_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_reservation_group({ 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_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.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_reservation_group_client_stub.call_rpc_count + end + end + + def test_delete_reservation_group + # 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_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_reservation_group, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_reservation_group_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_reservation_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_reservation_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_reservation_group({ 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_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.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_reservation_group_client_stub.call_rpc_count + end + end + + def test_list_reservation_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.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_reservation_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reservation_groups, name + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, 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_reservation_groups_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json new file mode 100644 index 000000000000..8cb93992c598 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigquerystorage.googleapis.com", + "api_shortname": "bigquerystorage", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest", + "distribution_name": "google-cloud-bigquery-storage-v1", + "is_cloud": true, + "language": "ruby", + "name": "bigquerystorage", + "name_pretty": "BigQuery Storage V1 API", + "product_documentation": "https://cloud.google.com/bigquery/docs/reference/storage", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BIGQUERY_STORAGE", + "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/storage", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml new file mode 100644 index 000000000000..bb0c68b12d1c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigquery-storage-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-bigquery-storage-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts new file mode 100644 index 000000000000..1a833c85dd93 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="BigQuery Storage 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-bigquery-storage-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8f8f40a73a32 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigquery-storage-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-bigquery-storage-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/bigquery/storage/v1" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigquery/storage/v1" + +::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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-bigquery-storage-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/bigquery/storage/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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-bigquery-storage-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md new file mode 100644 index 000000000000..a4e83ff627c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the BigQuery Storage V1 API + +API Client library for the BigQuery Storage V1 API + +The BigQuery Storage API provides fast access to BigQuery managed storage. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the BigQuery Storage V1 API. Most users should consider using +the main client gem, +[google-cloud-bigquery-storage](https://rubygems.org/gems/google-cloud-bigquery-storage). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigquery-storage-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/bigquerystorage.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigquery/storage/v1" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new +request = ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new # (request fields as keyword arguments...) +response = client.create_read_session request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/storage) +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/bigquery/storage/v1" +require "logger" + +client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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-bigquery-storage`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigquery-storage-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-bigquery-storage`. +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-bigquery-storage-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-bigquery-storage-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile new file mode 100644 index 000000000000..6b7aba3e8219 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BIGQUERY_STORAGE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BIGQUERY_STORAGE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BIGQUERY_STORAGE_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 BIGQUERY_STORAGE_TEST_PROJECT=test123 BIGQUERY_STORAGE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigquery/storage/v1/big_query_read/credentials" + ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BIGQUERY_STORAGE_PROJECT"] = project + ENV["BIGQUERY_STORAGE_TEST_PROJECT"] = project + ENV["BIGQUERY_STORAGE_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-bigquery-storage-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-bigquery-storage-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-bigquery-storage-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-bigquery-storage-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigquery-storage-v1" + header "google-cloud-bigquery-storage-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigquery-storage-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigquery-storage-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-bigquery-storage-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-bigquery-storage-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-bigquery-storage-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json new file mode 100644 index 000000000000..0de72ac153d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json @@ -0,0 +1,72 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.bigquery.storage.v1", + "libraryPackage": "::Google::Cloud::Bigquery::Storage::V1", + "services": { + "BigQueryRead": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client", + "rpcs": { + "CreateReadSession": { + "methods": [ + "create_read_session" + ] + }, + "ReadRows": { + "methods": [ + "read_rows" + ] + }, + "SplitReadStream": { + "methods": [ + "split_read_stream" + ] + } + } + } + } + }, + "BigQueryWrite": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client", + "rpcs": { + "CreateWriteStream": { + "methods": [ + "create_write_stream" + ] + }, + "AppendRows": { + "methods": [ + "append_rows" + ] + }, + "GetWriteStream": { + "methods": [ + "get_write_stream" + ] + }, + "FinalizeWriteStream": { + "methods": [ + "finalize_write_stream" + ] + }, + "BatchCommitWriteStreams": { + "methods": [ + "batch_commit_write_streams" + ] + }, + "FlushRows": { + "methods": [ + "flush_rows" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec new file mode 100644 index 000000000000..176e51102b6d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigquery/storage/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigquery-storage-v1" + gem.version = Google::Cloud::Bigquery::Storage::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details." + gem.summary = "API Client library for the BigQuery Storage 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb new file mode 100644 index 000000000000..78e6f6aa0b72 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-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/bigquery/storage/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb new file mode 100644 index 000000000000..7275f890346f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigquery/storage/v1/big_query_read" +require "google/cloud/bigquery/storage/v1/big_query_write" +require "google/cloud/bigquery/storage/v1/version" + +module Google + module Cloud + module Bigquery + module Storage + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigquery/storage/v1" + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/bigquery/storage/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb new file mode 100644 index 000000000000..edcabf45ec84 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/annotations.proto + +require 'google/protobuf' + +require 'google/protobuf/descriptor_pb' + + +descriptor_data = "\n2google/cloud/bigquery/storage/v1/annotations.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto:9\n\x0b\x63olumn_name\x12\x1d.google.protobuf.FieldOptions\x18\xb5\xc3\xf7\xd8\x01 \x01(\t\x88\x01\x01\x42\xc0\x01\n$com.google.cloud.bigquery.storage.v1B\x10\x41nnotationsProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb new file mode 100644 index 000000000000..049c42b43216 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/arrow.proto + +require 'google/protobuf' + + +descriptor_data = "\n,google/cloud/bigquery/storage/v1/arrow.proto\x12 google.cloud.bigquery.storage.v1\"(\n\x0b\x41rrowSchema\x12\x19\n\x11serialized_schema\x18\x01 \x01(\x0c\"J\n\x10\x41rrowRecordBatch\x12\x1f\n\x17serialized_record_batch\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xec\x03\n\x19\x41rrowSerializationOptions\x12h\n\x12\x62uffer_compression\x18\x02 \x01(\x0e\x32L.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec\x12v\n\x19picos_timestamp_precision\x18\x03 \x01(\x0e\x32S.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision\"H\n\x10\x43ompressionCodec\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\r\n\tLZ4_FRAME\x10\x01\x12\x08\n\x04ZSTD\x10\x02\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nArrowProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ArrowSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSchema").msgclass + ArrowRecordBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowRecordBatch").msgclass + ArrowSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions").msgclass + ArrowSerializationOptions::CompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec").enummodule + ArrowSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb new file mode 100644 index 000000000000..bc982922603b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/avro.proto + +require 'google/protobuf' + + +descriptor_data = "\n+google/cloud/bigquery/storage/v1/avro.proto\x12 google.cloud.bigquery.storage.v1\"\x1c\n\nAvroSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\"A\n\x08\x41vroRows\x12\x1e\n\x16serialized_binary_rows\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xdd\x02\n\x18\x41vroSerializationOptions\x12%\n\x1d\x65nable_display_name_attribute\x18\x01 \x01(\x08\x12u\n\x19picos_timestamp_precision\x18\x02 \x01(\x0e\x32R.google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xb9\x01\n$com.google.cloud.bigquery.storage.v1B\tAvroProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + AvroSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSchema").msgclass + AvroRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroRows").msgclass + AvroSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions").msgclass + AvroSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb new file mode 100644 index 000000000000..a3ea0d4c2ac9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/storage/v1/version" + +require "google/cloud/bigquery/storage/v1/big_query_read/credentials" +require "google/cloud/bigquery/storage/v1/big_query_read/paths" +require "google/cloud/bigquery/storage/v1/big_query_read/client" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ## + # BigQuery Read API. + # + # The Read API can be used to read data from BigQuery. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/storage/v1/big_query_read" + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + module BigQueryRead + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "big_query_read", "helpers.rb" +require "google/cloud/bigquery/storage/v1/big_query_read/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb new file mode 100644 index 000000000000..be9b5072efaf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb @@ -0,0 +1,750 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/storage/v1/storage_pb" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryRead + ## + # Client for the BigQueryRead service. + # + # BigQuery Read API. + # + # The Read API can be used to read data from BigQuery. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :big_query_read_stub + + ## + # Configure the BigQueryRead Client class. + # + # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BigQueryRead clients + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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", "Bigquery", "Storage", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_read_session.timeout = 600.0 + default_config.rpcs.create_read_session.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.read_rows.timeout = 86_400.0 + default_config.rpcs.read_rows.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.split_read_stream.timeout = 600.0 + default_config.rpcs.split_read_stream.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::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 + @big_query_read_stub.universe_domain + end + + ## + # Create a new BigQueryRead client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BigQueryRead 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/bigquery/storage/v1/storage_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 + + @big_query_read_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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 + ) + + @big_query_read_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @big_query_read_stub.logger + end + + # Service calls + + ## + # Creates a new read session. A read session divides the contents of a + # BigQuery table into one or more streams, which can then be used to read + # data from the table. The read session also specifies properties of the + # data to be read, such as a list of columns or a push-down filter describing + # the rows to be returned. + # + # A particular row can be read by at most one stream. When the caller has + # reached the end of each stream in the session, then all the data in the + # table has been read. + # + # Data is assigned to each stream such that roughly the same number of + # rows can be read from each stream. Because the server-side unit for + # assigning data is collections of rows, the API does not guarantee that + # each stream will return the same number or rows. Additionally, the + # limits are enforced based on the number of pre-filtered rows, so some + # filters can lead to lopsided assignments. + # + # Read sessions automatically expire 6 hours after they are created and do + # not require manual clean-up by the caller. + # + # @overload create_read_session(request, options = nil) + # Pass arguments to `create_read_session` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_read_session(parent: nil, read_session: nil, max_stream_count: nil, preferred_min_stream_count: nil) + # Pass arguments to `create_read_session` via keyword arguments. Note that at + # least one keyword argument is 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 request project that owns the session, in the form of + # `projects/{project_id}`. + # @param read_session [::Google::Cloud::Bigquery::Storage::V1::ReadSession, ::Hash] + # Required. Session to be created. + # @param max_stream_count [::Integer] + # Max initial number of streams. If unset or zero, the server will + # provide a value of streams so as to produce reasonable throughput. Must be + # non-negative. The number of streams may be lower than the requested number, + # depending on the amount parallelism that is reasonable for the table. + # There is a default system max limit of 1,000. + # + # This must be greater than or equal to preferred_min_stream_count. + # Typically, clients should either leave this unset to let the system to + # determine an upper bound OR set this a size for the maximum "units of work" + # it can gracefully handle. + # @param preferred_min_stream_count [::Integer] + # The minimum preferred stream count. This parameter can be used to inform + # the service that there is a desired lower bound on the number of streams. + # This is typically a target parallelism of the client (e.g. a Spark + # cluster with N-workers would set this to a low multiple of N to ensure + # good cluster utilization). + # + # The system will make a best effort to provide at least this number of + # streams, but in some cases might provide less. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::ReadSession] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new + # + # # Call the create_read_session method. + # result = client.create_read_session request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. + # p result + # + def create_read_session request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest + + # Converts hash 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_read_session.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::Bigquery::Storage::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.read_session&.table + header_params["read_session.table"] = request.read_session.table + 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_read_session.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_read_session.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_read_stub.call_rpc :create_read_session, 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 + + ## + # Reads rows from the stream in the format prescribed by the ReadSession. + # Each response contains one or more table rows, up to a maximum of 128 MB + # per response; read requests which attempt to read individual rows larger + # than 128 MB will fail. + # + # Each request also returns a set of stream statistics reflecting the current + # state of the stream. + # + # @overload read_rows(request, options = nil) + # Pass arguments to `read_rows` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload read_rows(read_stream: nil, offset: nil) + # Pass arguments to `read_rows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param read_stream [::String] + # Required. Stream to read rows from. + # @param offset [::Integer] + # The offset requested must be less than the last row read from Read. + # Requesting a larger offset is undefined. If not specified, start reading + # from offset zero. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new + # + # # Call the read_rows method to start streaming. + # output = client.read_rows request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse + # output.each do |current_response| + # p current_response + # end + # + def read_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest + + # Converts hash 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.read_rows.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::Bigquery::Storage::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.read_stream + header_params["read_stream"] = request.read_stream + 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.read_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.read_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_read_stub.call_rpc :read_rows, 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 + + ## + # Splits a given `ReadStream` into two `ReadStream` objects. These + # `ReadStream` objects are referred to as the primary and the residual + # streams of the split. The original `ReadStream` can still be read from in + # the same manner as before. Both of the returned `ReadStream` objects can + # also be read from, and the rows returned by both child streams will be + # the same as the rows read from the original stream. + # + # Moreover, the two child streams will be allocated back-to-back in the + # original `ReadStream`. Concretely, it is guaranteed that for streams + # original, primary, and residual, that original[0-j] = primary[0-j] and + # original[j-n] = residual[0-m] once the streams have been read to + # completion. + # + # @overload split_read_stream(request, options = nil) + # Pass arguments to `split_read_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload split_read_stream(name: nil, fraction: nil) + # Pass arguments to `split_read_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the stream to split. + # @param fraction [::Float] + # A value in the range (0.0, 1.0) that specifies the fractional point at + # which the original stream should be split. The actual split point is + # evaluated on pre-filtered rows, so if a filter is provided, then there is + # no guarantee that the division of the rows between the new child streams + # will be proportional to this fractional value. Additionally, because the + # server-side unit for assigning data is collections of rows, this fraction + # will always map to a data storage boundary on the server side. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new + # + # # Call the split_read_stream method. + # result = client.split_read_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. + # p result + # + def split_read_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest + + # Converts hash 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.split_read_stream.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::Bigquery::Storage::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.split_read_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.split_read_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_read_stub.call_rpc :split_read_stream, 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 BigQueryRead API. + # + # This class represents the configuration for BigQueryRead, + # 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::Bigquery::Storage::V1::BigQueryRead::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 + # # create_read_session to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_read_session.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_read_session.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::Bigquery::Storage::V1::BigQueryRead::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 = "bigquerystorage.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 BigQueryRead 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 `create_read_session` + # @return [::Gapic::Config::Method] + # + attr_reader :create_read_session + ## + # RPC-specific configuration for `read_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :read_rows + ## + # RPC-specific configuration for `split_read_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :split_read_stream + + # @private + def initialize parent_rpcs = nil + create_read_session_config = parent_rpcs.create_read_session if parent_rpcs.respond_to? :create_read_session + @create_read_session = ::Gapic::Config::Method.new create_read_session_config + read_rows_config = parent_rpcs.read_rows if parent_rpcs.respond_to? :read_rows + @read_rows = ::Gapic::Config::Method.new read_rows_config + split_read_stream_config = parent_rpcs.split_read_stream if parent_rpcs.respond_to? :split_read_stream + @split_read_stream = ::Gapic::Config::Method.new split_read_stream_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb new file mode 100644 index 000000000000..4011779342be --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryRead + # Credentials for the BigQueryRead API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BIGQUERY_STORAGE_CREDENTIALS", + "BIGQUERY_STORAGE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGQUERY_STORAGE_CREDENTIALS_JSON", + "BIGQUERY_STORAGE_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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb new file mode 100644 index 000000000000..6d1133365b75 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Storage + module V1 + module BigQueryRead + # Path helper methods for the BigQueryRead API. + module Paths + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified ReadSession resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sessions/{session}` + # + # @param project [String] + # @param location [String] + # @param session [String] + # + # @return [::String] + def read_session_path project:, location:, session: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sessions/#{session}" + end + + ## + # Create a fully-qualified ReadStream resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sessions/{session}/streams/{stream}` + # + # @param project [String] + # @param location [String] + # @param session [String] + # @param stream [String] + # + # @return [::String] + def read_stream_path project:, location:, session:, stream: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sessions/#{session}/streams/#{stream}" + end + + ## + # Create a fully-qualified Table resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # + # @return [::String] + def table_path project:, dataset:, table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb new file mode 100644 index 000000000000..aeb7c756898f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/bigquery/storage/v1/version" + +require "google/cloud/bigquery/storage/v1/big_query_write/credentials" +require "google/cloud/bigquery/storage/v1/big_query_write/paths" +require "google/cloud/bigquery/storage/v1/big_query_write/client" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ## + # BigQuery Write API. + # + # The Write API can be used to write data to BigQuery. + # + # For supplementary information about the Write API, see: + # https://cloud.google.com/bigquery/docs/write-api + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigquery/storage/v1/big_query_write" + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + module BigQueryWrite + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "big_query_write", "helpers.rb" +require "google/cloud/bigquery/storage/v1/big_query_write/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb new file mode 100644 index 000000000000..3f27679805b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb @@ -0,0 +1,1026 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/storage/v1/storage_pb" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryWrite + ## + # Client for the BigQueryWrite service. + # + # BigQuery Write API. + # + # The Write API can be used to write data to BigQuery. + # + # For supplementary information about the Write API, see: + # https://cloud.google.com/bigquery/docs/write-api + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :big_query_write_stub + + ## + # Configure the BigQueryWrite Client class. + # + # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BigQueryWrite clients + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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", "Bigquery", "Storage", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_write_stream.timeout = 1200.0 + default_config.rpcs.create_write_stream.retry_policy = { + initial_delay: 10.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.append_rows.timeout = 86_400.0 + default_config.rpcs.append_rows.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_write_stream.timeout = 600.0 + default_config.rpcs.get_write_stream.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.finalize_write_stream.timeout = 600.0 + default_config.rpcs.finalize_write_stream.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.batch_commit_write_streams.timeout = 600.0 + default_config.rpcs.batch_commit_write_streams.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config.rpcs.flush_rows.timeout = 600.0 + default_config.rpcs.flush_rows.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::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 + @big_query_write_stub.universe_domain + end + + ## + # Create a new BigQueryWrite client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BigQueryWrite 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/bigquery/storage/v1/storage_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 + + @big_query_write_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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 + ) + + @big_query_write_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @big_query_write_stub.logger + end + + # Service calls + + ## + # Creates a write stream to the given table. + # Additionally, every table has a special stream named '_default' + # to which data can be written. This stream doesn't need to be created using + # CreateWriteStream. It is a stream that can be used simultaneously by any + # number of clients. Data written to this stream is considered committed as + # soon as an acknowledgement is received. + # + # @overload create_write_stream(request, options = nil) + # Pass arguments to `create_write_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_write_stream(parent: nil, write_stream: nil) + # Pass arguments to `create_write_stream` via keyword arguments. Note that at + # least one keyword argument is 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. Reference to the table to which the stream belongs, in the format + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @param write_stream [::Google::Cloud::Bigquery::Storage::V1::WriteStream, ::Hash] + # Required. Stream to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new + # + # # Call the create_write_stream method. + # result = client.create_write_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + # p result + # + def create_write_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest + + # Converts hash 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_write_stream.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::Bigquery::Storage::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_write_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_write_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :create_write_stream, 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 + + ## + # Appends data to the given stream. + # + # If `offset` is specified, the `offset` is checked against the end of + # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an + # attempt is made to append to an offset beyond the current end of the stream + # or `ALREADY_EXISTS` if user provides an `offset` that has already been + # written to. User can retry with adjusted offset within the same RPC + # connection. If `offset` is not specified, append happens at the end of the + # stream. + # + # The response contains an optional offset at which the append + # happened. No offset information will be returned for appends to a + # default stream. + # + # Responses are received in the same order in which requests are sent. + # There will be one response for each successful inserted request. Responses + # may optionally embed error information if the originating AppendRequest was + # not successfully processed. + # + # The specifics of when successfully appended data is made visible to the + # table are governed by the type of stream: + # + # * For COMMITTED streams (which includes the default stream), data is + # visible immediately upon successful append. + # + # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` + # rpc which advances a cursor to a newer offset in the stream. + # + # * For PENDING streams, data is not made visible until the stream itself is + # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly + # committed via the `BatchCommitWriteStreams` rpc. + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, ::Hash>] + # An enumerable of {::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the append_rows method to start streaming. + # output = client.append_rows input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse + # output.each do |current_response| + # p current_response + # end + # + def append_rows request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest + end + + # Converts hash 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.append_rows.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::Bigquery::Storage::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.append_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.append_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :append_rows, 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 information about a write stream. + # + # @overload get_write_stream(request, options = nil) + # Pass arguments to `get_write_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_write_stream(name: nil, view: nil) + # Pass arguments to `get_write_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the stream to get, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # @param view [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] + # Indicates whether to get full or partial view of the WriteStream. If + # not set, view returned will be basic. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new + # + # # Call the get_write_stream method. + # result = client.get_write_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + # p result + # + def get_write_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest + + # Converts hash 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_write_stream.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::Bigquery::Storage::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_write_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_write_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :get_write_stream, 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 + + ## + # Finalize a write stream so that no new data can be appended to the + # stream. Finalize is not supported on the '_default' stream. + # + # @overload finalize_write_stream(request, options = nil) + # Pass arguments to `finalize_write_stream` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload finalize_write_stream(name: nil) + # Pass arguments to `finalize_write_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the stream to finalize, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new + # + # # Call the finalize_write_stream method. + # result = client.finalize_write_stream request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. + # p result + # + def finalize_write_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest + + # Converts hash 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.finalize_write_stream.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::Bigquery::Storage::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.finalize_write_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.finalize_write_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :finalize_write_stream, 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 + + ## + # Atomically commits a group of `PENDING` streams that belong to the same + # `parent` table. + # + # Streams must be finalized before commit and cannot be committed multiple + # times. Once a stream is committed, data in the stream becomes available + # for read operations. + # + # @overload batch_commit_write_streams(request, options = nil) + # Pass arguments to `batch_commit_write_streams` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_commit_write_streams(parent: nil, write_streams: nil) + # Pass arguments to `batch_commit_write_streams` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent table that all the streams should belong to, in the form + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @param write_streams [::Array<::String>] + # Required. The group of streams that will be committed atomically. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new + # + # # Call the batch_commit_write_streams method. + # result = client.batch_commit_write_streams request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. + # p result + # + def batch_commit_write_streams request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest + + # Converts hash 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.batch_commit_write_streams.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::Bigquery::Storage::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.batch_commit_write_streams.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_commit_write_streams.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :batch_commit_write_streams, 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 + + ## + # Flushes rows to a BUFFERED stream. + # + # If users are appending rows to BUFFERED stream, flush operation is + # required in order for the rows to become available for reading. A + # Flush operation flushes up to any previously flushed offset in a BUFFERED + # stream, to the offset specified in the request. + # + # Flush is not supported on the _default stream, since it is not BUFFERED. + # + # @overload flush_rows(request, options = nil) + # Pass arguments to `flush_rows` via a request object, either of type + # {::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload flush_rows(write_stream: nil, offset: nil) + # Pass arguments to `flush_rows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param write_stream [::String] + # Required. The stream that is the target of the flush operation. + # @param offset [::Google::Protobuf::Int64Value, ::Hash] + # Ending offset of the flush operation. Rows before this offset(including + # this offset) will be flushed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigquery/storage/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new + # + # # Call the flush_rows method. + # result = client.flush_rows request + # + # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. + # p result + # + def flush_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest + + # Converts hash 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.flush_rows.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::Bigquery::Storage::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.write_stream + header_params["write_stream"] = request.write_stream + 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.flush_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.flush_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @big_query_write_stub.call_rpc :flush_rows, 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 BigQueryWrite API. + # + # This class represents the configuration for BigQueryWrite, + # 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::Bigquery::Storage::V1::BigQueryWrite::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 + # # create_write_stream to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_write_stream.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_write_stream.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::Bigquery::Storage::V1::BigQueryWrite::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 = "bigquerystorage.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 BigQueryWrite 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 `create_write_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :create_write_stream + ## + # RPC-specific configuration for `append_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :append_rows + ## + # RPC-specific configuration for `get_write_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :get_write_stream + ## + # RPC-specific configuration for `finalize_write_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :finalize_write_stream + ## + # RPC-specific configuration for `batch_commit_write_streams` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_commit_write_streams + ## + # RPC-specific configuration for `flush_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :flush_rows + + # @private + def initialize parent_rpcs = nil + create_write_stream_config = parent_rpcs.create_write_stream if parent_rpcs.respond_to? :create_write_stream + @create_write_stream = ::Gapic::Config::Method.new create_write_stream_config + append_rows_config = parent_rpcs.append_rows if parent_rpcs.respond_to? :append_rows + @append_rows = ::Gapic::Config::Method.new append_rows_config + get_write_stream_config = parent_rpcs.get_write_stream if parent_rpcs.respond_to? :get_write_stream + @get_write_stream = ::Gapic::Config::Method.new get_write_stream_config + finalize_write_stream_config = parent_rpcs.finalize_write_stream if parent_rpcs.respond_to? :finalize_write_stream + @finalize_write_stream = ::Gapic::Config::Method.new finalize_write_stream_config + batch_commit_write_streams_config = parent_rpcs.batch_commit_write_streams if parent_rpcs.respond_to? :batch_commit_write_streams + @batch_commit_write_streams = ::Gapic::Config::Method.new batch_commit_write_streams_config + flush_rows_config = parent_rpcs.flush_rows if parent_rpcs.respond_to? :flush_rows + @flush_rows = ::Gapic::Config::Method.new flush_rows_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb new file mode 100644 index 000000000000..882a98244bb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryWrite + # Credentials for the BigQueryWrite API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/bigquery.insertdata", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BIGQUERY_STORAGE_CREDENTIALS", + "BIGQUERY_STORAGE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGQUERY_STORAGE_CREDENTIALS_JSON", + "BIGQUERY_STORAGE_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 +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb new file mode 100644 index 000000000000..e907c52fd001 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryWrite + # Path helper methods for the BigQueryWrite API. + module Paths + ## + # Create a fully-qualified Table resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # + # @return [::String] + def table_path project:, dataset:, table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}" + end + + ## + # Create a fully-qualified WriteStream resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}` + # + # @param project [String] + # @param dataset [String] + # @param table [String] + # @param stream [String] + # + # @return [::String] + def write_stream_path project:, dataset:, table:, stream: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" + raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" + + "projects/#{project}/datasets/#{dataset}/tables/#{table}/streams/#{stream}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb new file mode 100644 index 000000000000..6d9356041918 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/protobuf.proto + +require 'google/protobuf' + +require 'google/protobuf/descriptor_pb' + + +descriptor_data = "\n/google/cloud/bigquery/storage/v1/protobuf.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto\"I\n\x0bProtoSchema\x12:\n\x10proto_descriptor\x18\x01 \x01(\x0b\x32 .google.protobuf.DescriptorProto\"$\n\tProtoRows\x12\x17\n\x0fserialized_rows\x18\x01 \x03(\x0c\x42\xbd\x01\n$com.google.cloud.bigquery.storage.v1B\rProtoBufProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ProtoSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoSchema").msgclass + ProtoRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoRows").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb new file mode 100644 index 000000000000..4dbee16c83bc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/storage.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/bigquery/storage/v1/arrow_pb' +require 'google/cloud/bigquery/storage/v1/avro_pb' +require 'google/cloud/bigquery/storage/v1/protobuf_pb' +require 'google/cloud/bigquery/storage/v1/stream_pb' +require 'google/cloud/bigquery/storage/v1/table_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.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/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a/google/cloud/bigquery/storage/v1/protobuf.proto\x1a-google/cloud/bigquery/storage/v1/stream.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xe7\x01\n\x18\x43reateReadSessionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x0cread_session\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xe0\x41\x02\x12\x18\n\x10max_stream_count\x18\x03 \x01(\x05\x12\"\n\x1apreferred_min_stream_count\x18\x04 \x01(\x05\"i\n\x0fReadRowsRequest\x12\x46\n\x0bread_stream\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x0e\n\x06offset\x18\x02 \x01(\x03\")\n\rThrottleState\x12\x18\n\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\n\x0bStreamStats\x12H\n\x08progress\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1a>\n\x08Progress\x12\x19\n\x11\x61t_response_start\x18\x01 \x01(\x01\x12\x17\n\x0f\x61t_response_end\x18\x02 \x01(\x01\"\xac\x04\n\x10ReadRowsResponse\x12?\n\tavro_rows\x18\x03 \x01(\x0b\x32*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\n\x12\x61rrow_record_batch\x18\x04 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\n\trow_count\x18\x06 \x01(\x03\x12<\n\x05stats\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.StreamStats\x12G\n\x0ethrottle_state\x18\x05 \x01(\x0b\x32/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\n\x0b\x61vro_schema\x18\x07 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x01\x12J\n\x0c\x61rrow_schema\x18\x08 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x01\x12(\n\x16uncompressed_byte_size\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04rowsB\x08\n\x06schemaB\x19\n\x17_uncompressed_byte_size\"k\n\x16SplitReadStreamRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x10\n\x08\x66raction\x18\x02 \x01(\x01\"\xa7\x01\n\x17SplitReadStreamResponse\x12\x44\n\x0eprimary_stream\x18\x01 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\x12\x46\n\x10remainder_stream\x18\x02 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\"\x9b\x01\n\x18\x43reateWriteStreamRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12H\n\x0cwrite_stream\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xe0\x41\x02\"\xf8\x08\n\x11\x41ppendRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12S\n\nproto_rows\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\n\narrow_rows\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\n\x08trace_id\x18\x06 \x01(\t\x12{\n\x1dmissing_value_interpretations\x18\x07 \x03(\x0b\x32T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\n$default_missing_value_interpretation\x18\x08 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xe0\x41\x01\x1a\x93\x01\n\tArrowData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\n\x04rows\x18\x02 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1a\x8c\x01\n\tProtoData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ProtoSchema\x12\x39\n\x04rows\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.storage.v1.ProtoRows\x1a\x92\x01\n MissingValueInterpretationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x02\x38\x01\"m\n\x1aMissingValueInterpretation\x12,\n(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0e\n\nNULL_VALUE\x10\x01\x12\x11\n\rDEFAULT_VALUE\x10\x02\x42\x06\n\x04rows\"\xfb\x02\n\x12\x41ppendRowsResponse\x12Z\n\rappend_result\x18\x01 \x01(\x0b\x32\x41.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x45\n\x0eupdated_schema\x18\x03 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchema\x12>\n\nrow_errors\x18\x04 \x03(\x0b\x32*.google.cloud.bigquery.storage.v1.RowError\x12\x14\n\x0cwrite_stream\x18\x05 \x01(\t\x1a;\n\x0c\x41ppendResult\x12+\n\x06offset\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\n\n\x08response\"\x9a\x01\n\x15GetWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12?\n\x04view\x18\x03 \x01(\x0e\x32\x31.google.cloud.bigquery.storage.v1.WriteStreamView\"s\n\x1e\x42\x61tchCommitWriteStreamsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12\x1a\n\rwrite_streams\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x99\x01\n\x1f\x42\x61tchCommitWriteStreamsResponse\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\rstream_errors\x18\x02 \x03(\x0b\x32..google.cloud.bigquery.storage.v1.StorageError\"^\n\x1a\x46inalizeWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\"0\n\x1b\x46inalizeWriteStreamResponse\x12\x11\n\trow_count\x18\x01 \x01(\x03\"\x89\x01\n\x10\x46lushRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"#\n\x11\x46lushRowsResponse\x12\x0e\n\x06offset\x18\x01 \x01(\x03\"\xa4\x04\n\x0cStorageError\x12M\n\x04\x63ode\x18\x01 \x01(\x0e\x32?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\x9d\x03\n\x10StorageErrorCode\x12\"\n\x1eSTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fTABLE_NOT_FOUND\x10\x01\x12\x1c\n\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\n\x10STREAM_NOT_FOUND\x10\x03\x12\x17\n\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\n\x14INVALID_STREAM_STATE\x10\x05\x12\x14\n\x10STREAM_FINALIZED\x10\x06\x12 \n\x1cSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\n\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\n\x13OFFSET_OUT_OF_RANGE\x10\t\x12\x15\n\x11\x43MEK_NOT_PROVIDED\x10\n\x12\x19\n\x15INVALID_CMEK_PROVIDED\x10\x0b\x12\x19\n\x15\x43MEK_ENCRYPTION_ERROR\x10\x0c\x12\x15\n\x11KMS_SERVICE_ERROR\x10\r\x12\x19\n\x15KMS_PERMISSION_DENIED\x10\x0e\"\xb3\x01\n\x08RowError\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x45\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0f\n\x07message\x18\x03 \x01(\t\"@\n\x0cRowErrorCode\x12\x1e\n\x1aROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IELDS_ERROR\x10\x01\x32\x92\x06\n\x0c\x42igQueryRead\x12\xe9\x01\n\x11\x43reateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1a-.google.cloud.bigquery.storage.v1.ReadSession\"i\xda\x41$parent,read_session,max_stream_count\x82\xd3\xe4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xcf\x01\n\x08ReadRows\x12\x31.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1a\x32.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xda\x41\x12read_stream,offset\x82\xd3\xe4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xc6\x01\n\x0fSplitReadStream\x12\x38.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1a\x39.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1a{\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xbc\x0b\n\rBigQueryWrite\x12\xd7\x01\n\x11\x43reateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"W\xda\x41\x13parent,write_stream\x82\xd3\xe4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0cwrite_stream\x12\xd2\x01\n\nAppendRows\x12\x33.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1a\x34.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x01\x30\x01\x12\xbf\x01\n\x0eGetWriteStream\x12\x37.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xd9\x01\n\x13\x46inalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1a=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xdc\x01\n\x17\x42\x61tchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1a\x41.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xcb\x01\n\tFlushRows\x12\x32.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1a\x33.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1a\xb0\x01\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\n$com.google.cloud.bigquery.storage.v1B\x0cStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + CreateReadSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateReadSessionRequest").msgclass + ReadRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsRequest").msgclass + ThrottleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ThrottleState").msgclass + StreamStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats").msgclass + StreamStats::Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats.Progress").msgclass + ReadRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsResponse").msgclass + SplitReadStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamRequest").msgclass + SplitReadStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamResponse").msgclass + CreateWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateWriteStreamRequest").msgclass + AppendRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest").msgclass + AppendRowsRequest::ArrowData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData").msgclass + AppendRowsRequest::ProtoData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData").msgclass + AppendRowsRequest::MissingValueInterpretation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation").enummodule + AppendRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse").msgclass + AppendRowsResponse::AppendResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult").msgclass + GetWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.GetWriteStreamRequest").msgclass + BatchCommitWriteStreamsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest").msgclass + BatchCommitWriteStreamsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse").msgclass + FinalizeWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest").msgclass + FinalizeWriteStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse").msgclass + FlushRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsRequest").msgclass + FlushRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsResponse").msgclass + StorageError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError").msgclass + StorageError::StorageErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode").enummodule + RowError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError").msgclass + RowError::RowErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError.RowErrorCode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb new file mode 100644 index 000000000000..5fdee674034c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb @@ -0,0 +1,167 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/bigquery/storage/v1/storage.proto for package 'google.cloud.bigquery.storage.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigquery/storage/v1/storage_pb' + +module Google + module Cloud + module Bigquery + module Storage + module V1 + module BigQueryRead + # BigQuery Read API. + # + # The Read API can be used to read data from BigQuery. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryRead' + + # Creates a new read session. A read session divides the contents of a + # BigQuery table into one or more streams, which can then be used to read + # data from the table. The read session also specifies properties of the + # data to be read, such as a list of columns or a push-down filter describing + # the rows to be returned. + # + # A particular row can be read by at most one stream. When the caller has + # reached the end of each stream in the session, then all the data in the + # table has been read. + # + # Data is assigned to each stream such that roughly the same number of + # rows can be read from each stream. Because the server-side unit for + # assigning data is collections of rows, the API does not guarantee that + # each stream will return the same number or rows. Additionally, the + # limits are enforced based on the number of pre-filtered rows, so some + # filters can lead to lopsided assignments. + # + # Read sessions automatically expire 6 hours after they are created and do + # not require manual clean-up by the caller. + rpc :CreateReadSession, ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Google::Cloud::Bigquery::Storage::V1::ReadSession + # Reads rows from the stream in the format prescribed by the ReadSession. + # Each response contains one or more table rows, up to a maximum of 128 MB + # per response; read requests which attempt to read individual rows larger + # than 128 MB will fail. + # + # Each request also returns a set of stream statistics reflecting the current + # state of the stream. + rpc :ReadRows, ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, stream(::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse) + # Splits a given `ReadStream` into two `ReadStream` objects. These + # `ReadStream` objects are referred to as the primary and the residual + # streams of the split. The original `ReadStream` can still be read from in + # the same manner as before. Both of the returned `ReadStream` objects can + # also be read from, and the rows returned by both child streams will be + # the same as the rows read from the original stream. + # + # Moreover, the two child streams will be allocated back-to-back in the + # original `ReadStream`. Concretely, it is guaranteed that for streams + # original, primary, and residual, that original[0-j] = primary[0-j] and + # original[j-n] = residual[0-m] once the streams have been read to + # completion. + rpc :SplitReadStream, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse + end + + Stub = Service.rpc_stub_class + end + module BigQueryWrite + # BigQuery Write API. + # + # The Write API can be used to write data to BigQuery. + # + # For supplementary information about the Write API, see: + # https://cloud.google.com/bigquery/docs/write-api + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryWrite' + + # Creates a write stream to the given table. + # Additionally, every table has a special stream named '_default' + # to which data can be written. This stream doesn't need to be created using + # CreateWriteStream. It is a stream that can be used simultaneously by any + # number of clients. Data written to this stream is considered committed as + # soon as an acknowledgement is received. + rpc :CreateWriteStream, ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream + # Appends data to the given stream. + # + # If `offset` is specified, the `offset` is checked against the end of + # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an + # attempt is made to append to an offset beyond the current end of the stream + # or `ALREADY_EXISTS` if user provides an `offset` that has already been + # written to. User can retry with adjusted offset within the same RPC + # connection. If `offset` is not specified, append happens at the end of the + # stream. + # + # The response contains an optional offset at which the append + # happened. No offset information will be returned for appends to a + # default stream. + # + # Responses are received in the same order in which requests are sent. + # There will be one response for each successful inserted request. Responses + # may optionally embed error information if the originating AppendRequest was + # not successfully processed. + # + # The specifics of when successfully appended data is made visible to the + # table are governed by the type of stream: + # + # * For COMMITTED streams (which includes the default stream), data is + # visible immediately upon successful append. + # + # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` + # rpc which advances a cursor to a newer offset in the stream. + # + # * For PENDING streams, data is not made visible until the stream itself is + # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly + # committed via the `BatchCommitWriteStreams` rpc. + rpc :AppendRows, stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest), stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse) + # Gets information about a write stream. + rpc :GetWriteStream, ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream + # Finalize a write stream so that no new data can be appended to the + # stream. Finalize is not supported on the '_default' stream. + rpc :FinalizeWriteStream, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse + # Atomically commits a group of `PENDING` streams that belong to the same + # `parent` table. + # + # Streams must be finalized before commit and cannot be committed multiple + # times. Once a stream is committed, data in the stream becomes available + # for read operations. + rpc :BatchCommitWriteStreams, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse + # Flushes rows to a BUFFERED stream. + # + # If users are appending rows to BUFFERED stream, flush operation is + # required in order for the rows to become available for reading. A + # Flush operation flushes up to any previously flushed offset in a BUFFERED + # stream, to the offset specified in the request. + # + # Flush is not supported on the _default stream, since it is not BUFFERED. + rpc :FlushRows, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb new file mode 100644 index 000000000000..ab4d8b662d0b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/stream.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/bigquery/storage/v1/arrow_pb' +require 'google/cloud/bigquery/storage/v1/avro_pb' +require 'google/cloud/bigquery/storage/v1/table_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/bigquery/storage/v1/stream.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc3\x0c\n\x0bReadSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x0b\x64\x61ta_format\x18\x03 \x01(\x0e\x32,.google.cloud.bigquery.storage.v1.DataFormatB\x03\xe0\x41\x05\x12H\n\x0b\x61vro_schema\x18\x04 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x00\x12J\n\x0c\x61rrow_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x00\x12\x34\n\x05table\x18\x06 \x01(\tB%\xe0\x41\x05\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12Z\n\x0ftable_modifiers\x18\x07 \x01(\x0b\x32<.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersB\x03\xe0\x41\x01\x12Y\n\x0cread_options\x18\x08 \x01(\x0b\x32>.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsB\x03\xe0\x41\x01\x12\x42\n\x07streams\x18\n \x03(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStreamB\x03\xe0\x41\x03\x12*\n\x1d\x65stimated_total_bytes_scanned\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12/\n\"estimated_total_physical_file_size\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x65stimated_row_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08trace_id\x18\r \x01(\tB\x03\xe0\x41\x01\x1a\x43\n\x0eTableModifiers\x12\x31\n\rsnapshot_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x89\x05\n\x10TableReadOptions\x12\x17\n\x0fselected_fields\x18\x01 \x03(\t\x12\x17\n\x0frow_restriction\x18\x02 \x01(\t\x12g\n\x1b\x61rrow_serialization_options\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xe0\x41\x01H\x00\x12\x65\n\x1a\x61vro_serialization_options\x18\x04 \x01(\x0b\x32:.google.cloud.bigquery.storage.v1.AvroSerializationOptionsB\x03\xe0\x41\x01H\x00\x12#\n\x11sample_percentage\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x85\x01\n\x1aresponse_compression_codec\x18\x06 \x01(\x0e\x32W.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodecB\x03\xe0\x41\x01H\x02\x88\x01\x01\"j\n\x18ResponseCompressionCodec\x12*\n&RESPONSE_COMPRESSION_CODEC_UNSPECIFIED\x10\x00\x12\"\n\x1eRESPONSE_COMPRESSION_CODEC_LZ4\x10\x02\x42%\n#output_format_serialization_optionsB\x14\n\x12_sample_percentageB\x1d\n\x1b_response_compression_codec:k\xea\x41h\n*bigquerystorage.googleapis.com/ReadSession\x12:projects/{project}/locations/{location}/sessions/{session}B\x08\n\x06schema\"\x9c\x01\n\nReadStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03:{\xea\x41x\n)bigquerystorage.googleapis.com/ReadStream\x12Kprojects/{project}/locations/{location}/sessions/{session}/streams/{stream}\"\xfb\x04\n\x0bWriteStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.storage.v1.WriteStream.TypeB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63ommit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0ctable_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchemaB\x03\xe0\x41\x03\x12P\n\nwrite_mode\x18\x07 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.WriteStream.WriteModeB\x03\xe0\x41\x05\x12\x15\n\x08location\x18\x08 \x01(\tB\x03\xe0\x41\x03\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOMMITTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0c\n\x08\x42UFFERED\x10\x03\"3\n\tWriteMode\x12\x1a\n\x16WRITE_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06INSERT\x10\x01:v\xea\x41s\n*bigquerystorage.googleapis.com/WriteStream\x12\x45projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}*>\n\nDataFormat\x12\x1b\n\x17\x44\x41TA_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41VRO\x10\x01\x12\t\n\x05\x41RROW\x10\x02*I\n\x0fWriteStreamView\x12!\n\x1dWRITE_STREAM_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xbb\x01\n$com.google.cloud.bigquery.storage.v1B\x0bStreamProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + ReadSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession").msgclass + ReadSession::TableModifiers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableModifiers").msgclass + ReadSession::TableReadOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions").msgclass + ReadSession::TableReadOptions::ResponseCompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec").enummodule + ReadStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadStream").msgclass + WriteStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream").msgclass + WriteStream::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.Type").enummodule + WriteStream::WriteMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.WriteMode").enummodule + DataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.DataFormat").enummodule + WriteStreamView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStreamView").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb new file mode 100644 index 000000000000..2550b8886063 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/bigquery/storage/v1/table.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n,google/cloud/bigquery/storage/v1/table.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/wrappers.proto\"Q\n\x0bTableSchema\x12\x42\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchema\"\xbc\x07\n\x10TableFieldSchema\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\x12J\n\x04mode\x18\x03 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.ModeB\x03\xe0\x41\x01\x12G\n\x06\x66ields\x18\x04 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchemaB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmax_length\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tprecision\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05scale\x18\t \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18\x64\x65\x66\x61ult_value_expression\x18\n \x01(\tB\x03\xe0\x41\x01\x12=\n\x13timestamp_precision\x18\x1b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\x12\x64\n\x12range_element_type\x18\x0b \x01(\x0b\x32\x43.google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementTypeB\x03\xe0\x41\x01\x1a^\n\x10\x46ieldElementType\x12J\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\"\xe0\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRUCT\x10\x04\x12\t\n\x05\x42YTES\x10\x05\x12\x08\n\x04\x42OOL\x10\x06\x12\r\n\tTIMESTAMP\x10\x07\x12\x08\n\x04\x44\x41TE\x10\x08\x12\x08\n\x04TIME\x10\t\x12\x0c\n\x08\x44\x41TETIME\x10\n\x12\r\n\tGEOGRAPHY\x10\x0b\x12\x0b\n\x07NUMERIC\x10\x0c\x12\x0e\n\nBIGNUMERIC\x10\r\x12\x0c\n\x08INTERVAL\x10\x0e\x12\x08\n\x04JSON\x10\x0f\x12\t\n\x05RANGE\x10\x10\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08NULLABLE\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nTableProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigquery + module Storage + module V1 + TableSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableSchema").msgclass + TableFieldSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema").msgclass + TableFieldSchema::FieldElementType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType").msgclass + TableFieldSchema::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Type").enummodule + TableFieldSchema::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Mode").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb new file mode 100644 index 000000000000..6f9c0d00974c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Storage + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md new file mode 100644 index 000000000000..3d8a2a34b334 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# BigQuery Storage 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-bigquery-storage-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb new file mode 100644 index 000000000000..a3dc9a444a1f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Storage + module V1 + # Arrow schema as specified in + # https://arrow.apache.org/docs/python/api/datatypes.html + # and serialized to bytes using IPC: + # https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc + # + # See code samples on how this message can be deserialized. + # @!attribute [rw] serialized_schema + # @return [::String] + # IPC serialized Arrow schema. + class ArrowSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Arrow RecordBatch. + # @!attribute [rw] serialized_record_batch + # @return [::String] + # IPC-serialized Arrow RecordBatch. + # @!attribute [rw] row_count + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # [Deprecated] The count of rows in `serialized_record_batch`. + # Please use the format-independent ReadRowsResponse.row_count instead. + class ArrowRecordBatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains options specific to Arrow Serialization. + # @!attribute [rw] buffer_compression + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::CompressionCodec] + # The compression codec to use for Arrow buffers in serialized record + # batches. + # @!attribute [rw] picos_timestamp_precision + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::PicosTimestampPrecision] + # Optional. Set timestamp precision option. If not set, the default precision + # is microseconds. + class ArrowSerializationOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Compression codec's supported by Arrow. + module CompressionCodec + # If unspecified no compression will be used. + COMPRESSION_UNSPECIFIED = 0 + + # LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) + LZ4_FRAME = 1 + + # Zstandard compression. + ZSTD = 2 + end + + # The precision of the timestamp value in the Avro message. This precision + # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. + module PicosTimestampPrecision + # Unspecified timestamp precision. The default precision is microseconds. + PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 + + # Timestamp values returned by Read API will be truncated to microsecond + # level precision. The value will be encoded as Arrow TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_MICROS = 1 + + # Timestamp values returned by Read API will be truncated to nanosecond + # level precision. The value will be encoded as Arrow TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_NANOS = 2 + + # Read API will return full precision picosecond value. The value will be + # encoded as a string which conforms to ISO 8601 format. + TIMESTAMP_PRECISION_PICOS = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb new file mode 100644 index 000000000000..8d583439b10a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # Avro schema. + # @!attribute [rw] schema + # @return [::String] + # Json serialized schema, as described at + # https://avro.apache.org/docs/1.8.1/spec.html. + class AvroSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Avro rows. + # @!attribute [rw] serialized_binary_rows + # @return [::String] + # Binary serialized rows in a block. + # @!attribute [rw] row_count + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # [Deprecated] The count of rows in the returning block. + # Please use the format-independent ReadRowsResponse.row_count instead. + class AvroRows + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains options specific to Avro Serialization. + # @!attribute [rw] enable_display_name_attribute + # @return [::Boolean] + # Enable displayName attribute in Avro schema. + # + # The Avro specification requires field names to be alphanumeric. By + # default, in cases when column names do not conform to these requirements + # (e.g. non-ascii unicode codepoints) and Avro is requested as an output + # format, the CreateReadSession call will fail. + # + # Setting this field to true, populates avro field names with a placeholder + # value and populates a "displayName" attribute for every avro field with the + # original column name. + # @!attribute [rw] picos_timestamp_precision + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions::PicosTimestampPrecision] + # Optional. Set timestamp precision option. If not set, the default precision + # is microseconds. + class AvroSerializationOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The precision of the timestamp value in the Avro message. This precision + # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. + module PicosTimestampPrecision + # Unspecified timestamp precision. The default precision is microseconds. + PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 + + # Timestamp values returned by Read API will be truncated to microsecond + # level precision. The value will be encoded as Avro TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_MICROS = 1 + + # Timestamp values returned by Read API will be truncated to nanosecond + # level precision. The value will be encoded as Avro TIMESTAMP type in a + # 64 bit integer. + TIMESTAMP_PRECISION_NANOS = 2 + + # Read API will return full precision picosecond value. The value will be + # encoded as a string which conforms to ISO 8601 format. + TIMESTAMP_PRECISION_PICOS = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb new file mode 100644 index 000000000000..eb0828eb038c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigquery + module Storage + module V1 + # ProtoSchema describes the schema of the serialized protocol buffer data rows. + # @!attribute [rw] proto_descriptor + # @return [::Google::Protobuf::DescriptorProto] + # Descriptor for input message. The provided descriptor must be self + # contained, such that data rows sent can be fully decoded using only the + # single descriptor. For data rows that are compositions of multiple + # independent messages, this means the descriptor may need to be transformed + # to only use nested types: + # https://developers.google.com/protocol-buffers/docs/proto#nested + # + # For additional information for how proto types and values map onto BigQuery + # see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + class ProtoSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] serialized_rows + # @return [::Array<::String>] + # A sequence of rows serialized as a Protocol Buffer. + # + # See https://developers.google.com/protocol-buffers/docs/overview for more + # information on deserializing this field. + class ProtoRows + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb new file mode 100644 index 000000000000..8b6b4f65fa0c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb @@ -0,0 +1,618 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Storage + module V1 + # Request message for `CreateReadSession`. + # @!attribute [rw] parent + # @return [::String] + # Required. The request project that owns the session, in the form of + # `projects/{project_id}`. + # @!attribute [rw] read_session + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] + # Required. Session to be created. + # @!attribute [rw] max_stream_count + # @return [::Integer] + # Max initial number of streams. If unset or zero, the server will + # provide a value of streams so as to produce reasonable throughput. Must be + # non-negative. The number of streams may be lower than the requested number, + # depending on the amount parallelism that is reasonable for the table. + # There is a default system max limit of 1,000. + # + # This must be greater than or equal to preferred_min_stream_count. + # Typically, clients should either leave this unset to let the system to + # determine an upper bound OR set this a size for the maximum "units of work" + # it can gracefully handle. + # @!attribute [rw] preferred_min_stream_count + # @return [::Integer] + # The minimum preferred stream count. This parameter can be used to inform + # the service that there is a desired lower bound on the number of streams. + # This is typically a target parallelism of the client (e.g. a Spark + # cluster with N-workers would set this to a low multiple of N to ensure + # good cluster utilization). + # + # The system will make a best effort to provide at least this number of + # streams, but in some cases might provide less. + class CreateReadSessionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `ReadRows`. + # @!attribute [rw] read_stream + # @return [::String] + # Required. Stream to read rows from. + # @!attribute [rw] offset + # @return [::Integer] + # The offset requested must be less than the last row read from Read. + # Requesting a larger offset is undefined. If not specified, start reading + # from offset zero. + class ReadRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information on if the current connection is being throttled. + # @!attribute [rw] throttle_percent + # @return [::Integer] + # How much this connection is being throttled. Zero means no throttling, + # 100 means fully throttled. + class ThrottleState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Estimated stream statistics for a given read Stream. + # @!attribute [rw] progress + # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats::Progress] + # Represents the progress of the current stream. + class StreamStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] at_response_start + # @return [::Float] + # The fraction of rows assigned to the stream that have been processed by + # the server so far, not including the rows in the current response + # message. + # + # This value, along with `at_response_end`, can be used to interpolate + # the progress made as the rows in the message are being processed using + # the following formula: `at_response_start + (at_response_end - + # at_response_start) * rows_processed_from_response / rows_in_response`. + # + # Note that if a filter is provided, the `at_response_end` value of the + # previous response may not necessarily be equal to the + # `at_response_start` value of the current response. + # @!attribute [rw] at_response_end + # @return [::Float] + # Similar to `at_response_start`, except that this value includes the + # rows in the current response. + class Progress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response from calling `ReadRows` may include row data, progress and + # throttling information. + # @!attribute [rw] avro_rows + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroRows] + # Serialized row data in AVRO format. + # + # Note: The following fields are mutually exclusive: `avro_rows`, `arrow_record_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] arrow_record_batch + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] + # Serialized row data in Arrow RecordBatch format. + # + # Note: The following fields are mutually exclusive: `arrow_record_batch`, `avro_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row_count + # @return [::Integer] + # Number of serialized rows in the rows block. + # @!attribute [rw] stats + # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats] + # Statistics for the stream. + # @!attribute [rw] throttle_state + # @return [::Google::Cloud::Bigquery::Storage::V1::ThrottleState] + # Throttling state. If unset, the latest response still describes + # the current throttling status. + # @!attribute [r] avro_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] + # Output only. Avro schema. + # + # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] arrow_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] + # Output only. Arrow schema. + # + # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] uncompressed_byte_size + # @return [::Integer] + # Optional. If the row data in this ReadRowsResponse is compressed, then + # uncompressed byte size is the original size of the uncompressed row data. + # If it is set to a value greater than 0, then decompress into a buffer of + # size uncompressed_byte_size using the compression codec that was requested + # during session creation time and which is specified in + # TableReadOptions.response_compression_codec in ReadSession. + # This value is not set if no response_compression_codec was not requested + # and it is -1 if the requested compression would not have reduced the size + # of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + # behavior described here https://github.com/apache/arrow/issues/15102 where + # the uncompressed length may be set to -1 to indicate that the data that + # follows is not compressed, which can be useful for cases where compression + # does not yield appreciable savings. When uncompressed_byte_size is not + # greater than 0, the client should skip decompression. + class ReadRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `SplitReadStream`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the stream to split. + # @!attribute [rw] fraction + # @return [::Float] + # A value in the range (0.0, 1.0) that specifies the fractional point at + # which the original stream should be split. The actual split point is + # evaluated on pre-filtered rows, so if a filter is provided, then there is + # no guarantee that the division of the rows between the new child streams + # will be proportional to this fractional value. Additionally, because the + # server-side unit for assigning data is collections of rows, this fraction + # will always map to a data storage boundary on the server side. + class SplitReadStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `SplitReadStream`. + # @!attribute [rw] primary_stream + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] + # Primary stream, which contains the beginning portion of + # |original_stream|. An empty value indicates that the original stream can no + # longer be split. + # @!attribute [rw] remainder_stream + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] + # Remainder stream, which contains the tail of |original_stream|. An empty + # value indicates that the original stream can no longer be split. + class SplitReadStreamResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `CreateWriteStream`. + # @!attribute [rw] parent + # @return [::String] + # Required. Reference to the table to which the stream belongs, in the format + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @!attribute [rw] write_stream + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] + # Required. Stream to be created. + class CreateWriteStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `AppendRows`. + # + # Because AppendRows is a bidirectional streaming RPC, certain parts of the + # AppendRowsRequest need only be specified for the first request before + # switching table destinations. You can also switch table destinations within + # the same connection for the default stream. + # + # The size of a single AppendRowsRequest must be less than 10 MB in size. + # Requests larger than this return an error, typically `INVALID_ARGUMENT`. + # @!attribute [rw] write_stream + # @return [::String] + # Required. The write_stream identifies the append operation. It must be + # provided in the following scenarios: + # + # * In the first request to an AppendRows connection. + # + # * In all subsequent requests to an AppendRows connection, if you use the + # same connection to write to multiple tables or change the input schema for + # default streams. + # + # For explicitly created write streams, the format is: + # + # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + # + # For the special default stream, the format is: + # + # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + # + # An example of a possible sequence of requests with write_stream fields + # within a single connection: + # + # * r1: \\{write_stream: stream_name_1} + # + # * r2: \\{write_stream: /*omit*/} + # + # * r3: \\{write_stream: /*omit*/} + # + # * r4: \\{write_stream: stream_name_2} + # + # * r5: \\{write_stream: stream_name_2} + # + # The destination changed in request_4, so the write_stream field must be + # populated in all subsequent requests in this stream. + # @!attribute [rw] offset + # @return [::Google::Protobuf::Int64Value] + # If present, the write is only performed if the next append offset is same + # as the provided value. If not present, the write is performed at the + # current end of stream. Specifying a value for this field is not allowed + # when calling AppendRows for the '_default' stream. + # @!attribute [rw] proto_rows + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData] + # Rows in proto format. + # + # Note: The following fields are mutually exclusive: `proto_rows`, `arrow_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] arrow_rows + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData] + # Rows in arrow format. + # + # Note: The following fields are mutually exclusive: `arrow_rows`, `proto_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] trace_id + # @return [::String] + # Id set by client to annotate its identity. Only initial request setting is + # respected. + # @!attribute [rw] missing_value_interpretations + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation}] + # A map to indicate how to interpret missing value for some fields. Missing + # values are fields present in user schema but missing in rows. The key is + # the field name. The value is the interpretation of missing values for the + # field. + # + # For example, a map \\{'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + # missing values in field foo are interpreted as NULL, all missing values in + # field bar are interpreted as the default value of field bar in table + # schema. + # + # If a field is not in this map and has missing values, the missing values + # in this field are interpreted as NULL. + # + # This field only applies to the current request, it won't affect other + # requests on the connection. + # + # Currently, field name can only be top-level column name, can't be a struct + # field path like 'foo.bar'. + # @!attribute [rw] default_missing_value_interpretation + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] + # Optional. Default missing value interpretation for all columns in the + # table. When a value is specified on an `AppendRowsRequest`, it is applied + # to all requests from that point forward, until a subsequent + # `AppendRowsRequest` sets it to a different value. + # `missing_value_interpretation` can override + # `default_missing_value_interpretation`. For example, if you want to write + # `NULL` instead of using default values for some columns, you can set + # `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + # time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + class AppendRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Arrow schema and data. + # @!attribute [rw] writer_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] + # Optional. Arrow Schema used to serialize the data. + # @!attribute [rw] rows + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] + # Required. Serialized row data in Arrow format. + class ArrowData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ProtoData contains the data rows and schema when constructing append + # requests. + # @!attribute [rw] writer_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoSchema] + # Optional. The protocol buffer schema used to serialize the data. Provide + # this value whenever: + # + # * You send the first request of an RPC connection. + # + # * You change the input schema. + # + # * You specify a new destination table. + # @!attribute [rw] rows + # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoRows] + # Required. Serialized row data in protobuf message format. + # Currently, the backend expects the serialized rows to adhere to + # proto2 semantics when appending rows, particularly with respect to + # how default values are encoded. + class ProtoData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] + class MissingValueInterpretationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An enum to indicate how to interpret missing values of fields that are + # present in user schema but missing in rows. A missing value can represent a + # NULL or a column default value defined in BigQuery table schema. + module MissingValueInterpretation + # Invalid missing value interpretation. Requests with this value will be + # rejected. + MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0 + + # Missing value is interpreted as NULL. + NULL_VALUE = 1 + + # Missing value is interpreted as column default value if declared in the + # table schema, NULL otherwise. + DEFAULT_VALUE = 2 + end + end + + # Response message for `AppendRows`. + # @!attribute [rw] append_result + # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse::AppendResult] + # Result if the append is successful. + # + # Note: The following fields are mutually exclusive: `append_result`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # Error returned when problems were encountered. If present, + # it indicates rows were not accepted into the system. + # Users can retry or continue with other append requests within the + # same connection. + # + # Additional information about error signalling: + # + # ALREADY_EXISTS: Happens when an append specified an offset, and the + # backend already has received data at this offset. Typically encountered + # in retry scenarios, and can be ignored. + # + # OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + # the current end of the stream. + # + # INVALID_ARGUMENT: Indicates a malformed request or data. + # + # ABORTED: Request processing is aborted because of prior failures. The + # request can be retried if previous failure is addressed. + # + # INTERNAL: Indicates server side error(s) that can be retried. + # + # Note: The following fields are mutually exclusive: `error`, `append_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] updated_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] + # If backend detects a schema update, pass it to user so that user can + # use it to input new type of message. It will be empty when no schema + # updates have occurred. + # @!attribute [rw] row_errors + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::RowError>] + # If a request failed due to corrupted rows, no rows in the batch will be + # appended. The API will return row level error info, so that the caller can + # remove the bad rows and retry the request. + # @!attribute [rw] write_stream + # @return [::String] + # The target of the append operation. Matches the write_stream in the + # corresponding request. + class AppendRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # AppendResult is returned for successful append requests. + # @!attribute [rw] offset + # @return [::Google::Protobuf::Int64Value] + # The row offset at which the last append occurred. The offset will not be + # set if appending using default streams. + class AppendResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for `GetWriteStreamRequest`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the stream to get, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # @!attribute [rw] view + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] + # Indicates whether to get full or partial view of the WriteStream. If + # not set, view returned will be basic. + class GetWriteStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `BatchCommitWriteStreams`. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent table that all the streams should belong to, in the form + # of `projects/{project}/datasets/{dataset}/tables/{table}`. + # @!attribute [rw] write_streams + # @return [::Array<::String>] + # Required. The group of streams that will be committed atomically. + class BatchCommitWriteStreamsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `BatchCommitWriteStreams`. + # @!attribute [rw] commit_time + # @return [::Google::Protobuf::Timestamp] + # The time at which streams were committed in microseconds granularity. + # This field will only exist when there are no stream errors. + # **Note** if this field is not set, it means the commit was not successful. + # @!attribute [rw] stream_errors + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::StorageError>] + # Stream level error if commit failed. Only streams with error will be in + # the list. + # If empty, there is no error and all streams are committed successfully. + # If non empty, certain streams have errors and ZERO stream is committed due + # to atomicity guarantee. + class BatchCommitWriteStreamsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for invoking `FinalizeWriteStream`. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the stream to finalize, in the form of + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + class FinalizeWriteStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `FinalizeWriteStream`. + # @!attribute [rw] row_count + # @return [::Integer] + # Number of rows in the finalized stream. + class FinalizeWriteStreamResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `FlushRows`. + # @!attribute [rw] write_stream + # @return [::String] + # Required. The stream that is the target of the flush operation. + # @!attribute [rw] offset + # @return [::Google::Protobuf::Int64Value] + # Ending offset of the flush operation. Rows before this offset(including + # this offset) will be flushed. + class FlushRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Respond message for `FlushRows`. + # @!attribute [rw] offset + # @return [::Integer] + # The rows before this offset (including this offset) are flushed. + class FlushRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Structured custom BigQuery Storage error message. The error can be attached + # as error details in the returned rpc Status. In particular, the use of error + # codes allows more structured error handling, and reduces the need to evaluate + # unstructured error text strings. + # @!attribute [rw] code + # @return [::Google::Cloud::Bigquery::Storage::V1::StorageError::StorageErrorCode] + # BigQuery Storage specific error code. + # @!attribute [rw] entity + # @return [::String] + # Name of the failed entity. + # @!attribute [rw] error_message + # @return [::String] + # Message that describes the error. + class StorageError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error code for `StorageError`. + module StorageErrorCode + # Default error. + STORAGE_ERROR_CODE_UNSPECIFIED = 0 + + # Table is not found in the system. + TABLE_NOT_FOUND = 1 + + # Stream is already committed. + STREAM_ALREADY_COMMITTED = 2 + + # Stream is not found. + STREAM_NOT_FOUND = 3 + + # Invalid Stream type. + # For example, you try to commit a stream that is not pending. + INVALID_STREAM_TYPE = 4 + + # Invalid Stream state. + # For example, you try to commit a stream that is not finalized or is + # garbaged. + INVALID_STREAM_STATE = 5 + + # Stream is finalized. + STREAM_FINALIZED = 6 + + # There is a schema mismatch and it is caused by user schema has extra + # field than bigquery schema. + SCHEMA_MISMATCH_EXTRA_FIELDS = 7 + + # Offset already exists. + OFFSET_ALREADY_EXISTS = 8 + + # Offset out of range. + OFFSET_OUT_OF_RANGE = 9 + + # Customer-managed encryption key (CMEK) not provided for CMEK-enabled + # data. + CMEK_NOT_PROVIDED = 10 + + # Customer-managed encryption key (CMEK) was incorrectly provided. + INVALID_CMEK_PROVIDED = 11 + + # There is an encryption error while using customer-managed encryption key. + CMEK_ENCRYPTION_ERROR = 12 + + # Key Management Service (KMS) service returned an error, which can be + # retried. + KMS_SERVICE_ERROR = 13 + + # Permission denied while using customer-managed encryption key. + KMS_PERMISSION_DENIED = 14 + end + end + + # The message that presents row level error info in a request. + # @!attribute [rw] index + # @return [::Integer] + # Index of the malformed row in the request. + # @!attribute [rw] code + # @return [::Google::Cloud::Bigquery::Storage::V1::RowError::RowErrorCode] + # Structured error reason for a row error. + # @!attribute [rw] message + # @return [::String] + # Description of the issue encountered when processing the row. + class RowError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error code for `RowError`. + module RowErrorCode + # Default error. + ROW_ERROR_CODE_UNSPECIFIED = 0 + + # One or more fields in the row has errors. + FIELDS_ERROR = 1 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb new file mode 100644 index 000000000000..a9d8230c0a6c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb @@ -0,0 +1,321 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Storage + module V1 + # Information about the ReadSession. + # @!attribute [r] name + # @return [::String] + # Output only. Unique identifier for the session, in the form + # `projects/{project_id}/locations/{location}/sessions/{session_id}`. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which the session becomes invalid. After this time, + # subsequent requests to read this Session will return errors. The + # expire_time is automatically assigned and currently cannot be specified or + # updated. + # @!attribute [rw] data_format + # @return [::Google::Cloud::Bigquery::Storage::V1::DataFormat] + # Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + # supported. + # @!attribute [r] avro_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] + # Output only. Avro schema. + # + # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] arrow_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] + # Output only. Arrow schema. + # + # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] table + # @return [::String] + # Immutable. Table that this ReadSession is reading from, in the form + # `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + # @!attribute [rw] table_modifiers + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableModifiers] + # Optional. Any modifiers which are applied when reading from the specified + # table. + # @!attribute [rw] read_options + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions] + # Optional. Read options for this session (e.g. column selection, filters). + # @!attribute [r] streams + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::ReadStream>] + # Output only. A list of streams created with the session. + # + # At least one stream is created with the session. In the future, larger + # request_stream_count values *may* result in this list being unpopulated, + # in that case, the user will need to use a List method to get the streams + # instead, which is not yet available. + # @!attribute [r] estimated_total_bytes_scanned + # @return [::Integer] + # Output only. An estimate on the number of bytes this session will scan when + # all streams are completely consumed. This estimate is based on + # metadata from the table which might be incomplete or stale. + # @!attribute [r] estimated_total_physical_file_size + # @return [::Integer] + # Output only. A pre-projected estimate of the total physical size of files + # (in bytes) that this session will scan when all streams are consumed. This + # estimate is independent of the selected columns and can be based on + # incomplete or stale metadata from the table. This field is only set for + # BigLake tables. + # @!attribute [r] estimated_row_count + # @return [::Integer] + # Output only. An estimate on the number of rows present in this session's + # streams. This estimate is based on metadata from the table which might be + # incomplete or stale. + # @!attribute [rw] trace_id + # @return [::String] + # Optional. ID set by client to annotate a session identity. This does not + # need to be strictly unique, but instead the same ID should be used to group + # logically connected sessions (e.g. All using the same ID for all sessions + # needed to complete a Spark SQL query is reasonable). + # + # Maximum length is 256 bytes. + class ReadSession + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional attributes when reading a table. + # @!attribute [rw] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # The snapshot time of the table. If not set, interpreted as now. + class TableModifiers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options dictating how we read a table. + # @!attribute [rw] selected_fields + # @return [::Array<::String>] + # Optional. The names of the fields in the table to be returned. If no + # field names are specified, then all fields in the table are returned. + # + # Nested fields -- the child elements of a STRUCT field -- can be selected + # individually using their fully-qualified names, and will be returned as + # record fields containing only the selected nested fields. If a STRUCT + # field is specified in the selected fields list, all of the child elements + # will be returned. + # + # As an example, consider a table with the following schema: + # + # { + # "name": "struct_field", + # "type": "RECORD", + # "mode": "NULLABLE", + # "fields": [ + # { + # "name": "string_field1", + # "type": "STRING", + # . "mode": "NULLABLE" + # }, + # { + # "name": "string_field2", + # "type": "STRING", + # "mode": "NULLABLE" + # } + # ] + # } + # + # Specifying "struct_field" in the selected fields list will result in a + # read session schema with the following logical structure: + # + # struct_field { + # string_field1 + # string_field2 + # } + # + # Specifying "struct_field.string_field1" in the selected fields list will + # result in a read session schema with the following logical structure: + # + # struct_field { + # string_field1 + # } + # + # The order of the fields in the read session schema is derived from the + # table schema and does not correspond to the order in which the fields are + # specified in this list. + # @!attribute [rw] row_restriction + # @return [::String] + # SQL text filtering statement, similar to a WHERE clause in a query. + # Aggregates are not supported. + # + # Examples: "int_field > 5" + # "date_field = CAST('2014-9-27' as DATE)" + # "nullable_field is not NULL" + # "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + # "numeric_field BETWEEN 1.0 AND 5.0" + # + # Restricted to a maximum length for 1 MB. + # @!attribute [rw] arrow_serialization_options + # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions] + # Optional. Options specific to the Apache Arrow output format. + # + # Note: The following fields are mutually exclusive: `arrow_serialization_options`, `avro_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] avro_serialization_options + # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions] + # Optional. Options specific to the Apache Avro output format + # + # Note: The following fields are mutually exclusive: `avro_serialization_options`, `arrow_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sample_percentage + # @return [::Float] + # Optional. Specifies a table sampling percentage. Specifically, the query + # planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + # sampling percentage is applied at the data block granularity. It will + # randomly choose for each data block whether to read the rows in that data + # block. For more details, see + # https://cloud.google.com/bigquery/docs/table-sampling) + # @!attribute [rw] response_compression_codec + # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions::ResponseCompressionCodec] + # Optional. Set response_compression_codec when creating a read session to + # enable application-level compression of ReadRows responses. + class TableReadOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies which compression codec to attempt on the entire serialized + # response payload (either Arrow record batch or Avro rows). This is + # not to be confused with the Apache Arrow native compression codecs + # specified in ArrowSerializationOptions. For performance reasons, when + # creating a read session requesting Arrow responses, setting both native + # Arrow compression and application-level response compression will not be + # allowed - choose, at most, one kind of compression. + module ResponseCompressionCodec + # Default is no compression. + RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0 + + # Use raw LZ4 compression. + RESPONSE_COMPRESSION_CODEC_LZ4 = 2 + end + end + end + + # Information about a single stream that gets data out of the storage system. + # Most of the information about `ReadStream` instances is aggregated, making + # `ReadStream` lightweight. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the stream, in the form + # `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + class ReadStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about a single stream that gets data inside the storage system. + # @!attribute [r] name + # @return [::String] + # Output only. Name of the stream, in the form + # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::Type] + # Immutable. Type of the stream. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Create time of the stream. For the _default stream, this is + # the creation_time of the table. + # @!attribute [r] commit_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Commit time of the stream. + # If a stream is of `COMMITTED` type, then it will have a commit_time same as + # `create_time`. If the stream is of `PENDING` type, empty commit_time + # means it is not committed. + # @!attribute [r] table_schema + # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] + # Output only. The schema of the destination table. It is only returned in + # `CreateWriteStream` response. Caller should generate data that's + # compatible with this schema to send in initial `AppendRowsRequest`. + # The table schema could go out of date during the life time of the stream. + # @!attribute [rw] write_mode + # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::WriteMode] + # Immutable. Mode of the stream. + # @!attribute [r] location + # @return [::String] + # Output only. The geographic location where the stream's dataset resides. + # See https://cloud.google.com/bigquery/docs/locations for supported + # locations. + class WriteStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type enum of the stream. + module Type + # Unknown type. + TYPE_UNSPECIFIED = 0 + + # Data will commit automatically and appear as soon as the write is + # acknowledged. + COMMITTED = 1 + + # Data is invisible until the stream is committed. + PENDING = 2 + + # Data is only visible up to the offset to which it was flushed. + BUFFERED = 3 + end + + # Mode enum of the stream. + module WriteMode + # Unknown type. + WRITE_MODE_UNSPECIFIED = 0 + + # Insert new records into the table. + # It is the default value if customers do not specify it. + INSERT = 1 + end + end + + # Data format for input or output data. + module DataFormat + # Data format is unspecified. + DATA_FORMAT_UNSPECIFIED = 0 + + # Avro is a standard open source row based file format. + # See https://avro.apache.org/ for more details. + AVRO = 1 + + # Arrow is a standard open source column-based message format. + # See https://arrow.apache.org/ for more details. + ARROW = 2 + end + + # WriteStreamView is a view enum that controls what details about a write + # stream should be returned. + module WriteStreamView + # The default / unset value. + WRITE_STREAM_VIEW_UNSPECIFIED = 0 + + # The BASIC projection returns basic metadata about a write stream. The + # basic view does not include schema information. This is the default view + # returned by GetWriteStream. + BASIC = 1 + + # The FULL projection returns all available write stream metadata, including + # the schema. CreateWriteStream returns the full projection of write stream + # metadata. + FULL = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb new file mode 100644 index 000000000000..a014f79dc9d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigquery + module Storage + module V1 + # Schema of a table. This schema is a subset of + # google.cloud.bigquery.v2.TableSchema containing information necessary to + # generate valid message to write to BigQuery. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] + # Describes the fields in a table. + class TableSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TableFieldSchema defines a single field/column within a table schema. + # @!attribute [rw] name + # @return [::String] + # Required. The field name. The name must contain only letters (a-z, A-Z), + # numbers (0-9), or underscores (_), and must start with a letter or + # underscore. The maximum length is 128 characters. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] + # Required. The field data type. + # @!attribute [rw] mode + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Mode] + # Optional. The field mode. The default value is NULLABLE. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] + # Optional. Describes the nested schema fields if the type property is set to + # STRUCT. + # @!attribute [rw] description + # @return [::String] + # Optional. The field description. The maximum length is 1,024 characters. + # @!attribute [rw] max_length + # @return [::Integer] + # Optional. Maximum length of values of this field for STRINGS or BYTES. + # + # If max_length is not specified, no maximum length constraint is imposed + # on this field. + # + # If type = "STRING", then max_length represents the maximum UTF-8 + # length of strings in this field. + # + # If type = "BYTES", then max_length represents the maximum number of + # bytes in this field. + # + # It is invalid to set this field if type is not "STRING" or "BYTES". + # @!attribute [rw] precision + # @return [::Integer] + # Optional. Precision (maximum number of total digits in base 10) and scale + # (maximum number of digits in the fractional part in base 10) constraints + # for values of this field for NUMERIC or BIGNUMERIC. + # + # It is invalid to set precision or scale if type is not "NUMERIC" or + # "BIGNUMERIC". + # + # If precision and scale are not specified, no value range constraint is + # imposed on this field insofar as values are permitted by the type. + # + # Values of this NUMERIC or BIGNUMERIC field must be in this range when: + # + # * Precision (P) and scale (S) are specified: + # [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + # * Precision (P) is specified but not scale (and thus scale is + # interpreted to be equal to zero): + # [-10^P + 1, 10^P - 1]. + # + # Acceptable values for precision and scale if both are specified: + # + # * If type = "NUMERIC": + # 1 <= precision - scale <= 29 and 0 <= scale <= 9. + # * If type = "BIGNUMERIC": + # 1 <= precision - scale <= 38 and 0 <= scale <= 38. + # + # Acceptable values for precision if only precision is specified but not + # scale (and thus scale is interpreted to be equal to zero): + # + # * If type = "NUMERIC": 1 <= precision <= 29. + # * If type = "BIGNUMERIC": 1 <= precision <= 38. + # + # If scale is specified but not precision, then it is invalid. + # @!attribute [rw] scale + # @return [::Integer] + # Optional. See documentation for precision. + # @!attribute [rw] default_value_expression + # @return [::String] + # Optional. A SQL expression to specify the [default value] + # (https://cloud.google.com/bigquery/docs/default-values) for this field. + # @!attribute [rw] timestamp_precision + # @return [::Google::Protobuf::Int64Value] + # Optional. Precision (maximum number of total digits in base 10) for seconds + # of TIMESTAMP type. + # + # Possible values include: + # + # * 6 (Default, for TIMESTAMP type with microsecond precision) + # * 12 (For TIMESTAMP type with picosecond precision) + # @!attribute [rw] range_element_type + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::FieldElementType] + # Optional. The subtype of the RANGE, if the type of this field is RANGE. If + # the type is RANGE, this field is required. Possible values for the field + # element type of a RANGE include: + # * DATE + # * DATETIME + # * TIMESTAMP + class TableFieldSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the type of a field element. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] + # Required. The type of a field element. + class FieldElementType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module Type + # Illegal value + TYPE_UNSPECIFIED = 0 + + # 64K, UTF8 + STRING = 1 + + # 64-bit signed + INT64 = 2 + + # 64-bit IEEE floating point + DOUBLE = 3 + + # Aggregate type + STRUCT = 4 + + # 64K, Binary + BYTES = 5 + + # 2-valued + BOOL = 6 + + # 64-bit signed usec since UTC epoch + TIMESTAMP = 7 + + # Civil date - Year, Month, Day + DATE = 8 + + # Civil time - Hour, Minute, Second, Microseconds + TIME = 9 + + # Combination of civil date and civil time + DATETIME = 10 + + # Geography object + GEOGRAPHY = 11 + + # Numeric value + NUMERIC = 12 + + # BigNumeric value + BIGNUMERIC = 13 + + # Interval + INTERVAL = 14 + + # JSON, String + JSON = 15 + + # RANGE + RANGE = 16 + end + + module Mode + # Illegal value + MODE_UNSPECIFIED = 0 + + NULLABLE = 1 + + REQUIRED = 2 + + REPEATED = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile new file mode 100644 index 000000000000..3ec30152a26d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1", path: "../" +else + gem "google-cloud-bigquery-storage-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-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb new file mode 100644 index 000000000000..97d4edfc8251 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.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 bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the create_read_session call in the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session. +# +def create_read_session + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new + + # Call the create_read_session method. + result = client.create_read_session request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. + p result +end +# [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb new file mode 100644 index 000000000000..a10ecf50c1c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the read_rows call in the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::Client#read_rows. +# +def read_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new + + # Call the read_rows method to start streaming. + output = client.read_rows request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse + output.each do |current_response| + p current_response + end +end +# [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb new file mode 100644 index 000000000000..f0a8033cec49 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.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 bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the split_read_stream call in the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream. +# +def split_read_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new + + # Call the split_read_stream method. + result = client.split_read_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb new file mode 100644 index 000000000000..291fbc8d14ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the append_rows call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows. +# +def append_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the append_rows method to start streaming. + output = client.append_rows input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse + output.each do |current_response| + p current_response + end +end +# [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb new file mode 100644 index 000000000000..c7e6925c2f99 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.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 bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the batch_commit_write_streams call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams. +# +def batch_commit_write_streams + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new + + # Call the batch_commit_write_streams method. + result = client.batch_commit_write_streams request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb new file mode 100644 index 000000000000..ad3883cf57b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.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 bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the create_write_stream call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream. +# +def create_write_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new + + # Call the create_write_stream method. + result = client.create_write_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb new file mode 100644 index 000000000000..a8f857e48124 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.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 bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the finalize_write_stream call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream. +# +def finalize_write_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new + + # Call the finalize_write_stream method. + result = client.finalize_write_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb new file mode 100644 index 000000000000..47533a19a759 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.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 bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the flush_rows call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows. +# +def flush_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new + + # Call the flush_rows method. + result = client.flush_rows request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb new file mode 100644 index 000000000000..a30ea12d7684 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.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 bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] +require "google/cloud/bigquery/storage/v1" + +## +# Snippet for the get_write_stream call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream. +# +def get_write_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new + + # Call the get_write_stream method. + result = client.get_write_stream request + + # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. + p result +end +# [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json new file mode 100644 index 000000000000..b6c6f418de1d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json @@ -0,0 +1,375 @@ +{ + "client_library": { + "name": "google-cloud-bigquery-storage-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.bigquery.storage.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync", + "title": "Snippet for the create_read_session call in the BigQueryRead service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session.", + "file": "big_query_read/create_read_session.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_read_session", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadSession", + "client": { + "short_name": "BigQueryRead::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" + }, + "method": { + "short_name": "CreateReadSession", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.CreateReadSession", + "service": { + "short_name": "BigQueryRead", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync", + "title": "Snippet for the read_rows call in the BigQueryRead service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows.", + "file": "big_query_read/read_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "read_rows", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse", + "client": { + "short_name": "BigQueryRead::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" + }, + "method": { + "short_name": "ReadRows", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.ReadRows", + "service": { + "short_name": "BigQueryRead", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync", + "title": "Snippet for the split_read_stream call in the BigQueryRead service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream.", + "file": "big_query_read/split_read_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "split_read_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse", + "client": { + "short_name": "BigQueryRead::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" + }, + "method": { + "short_name": "SplitReadStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.SplitReadStream", + "service": { + "short_name": "BigQueryRead", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync", + "title": "Snippet for the create_write_stream call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream.", + "file": "big_query_write/create_write_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_write_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "CreateWriteStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.CreateWriteStream", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync", + "title": "Snippet for the append_rows call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows.", + "file": "big_query_write/append_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "append_rows", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "AppendRows", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync", + "title": "Snippet for the get_write_stream call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream.", + "file": "big_query_write/get_write_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_write_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "GetWriteStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.GetWriteStream", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync", + "title": "Snippet for the finalize_write_stream call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream.", + "file": "big_query_write/finalize_write_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "finalize_write_stream", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "FinalizeWriteStream", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FinalizeWriteStream", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync", + "title": "Snippet for the batch_commit_write_streams call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams.", + "file": "big_query_write/batch_commit_write_streams.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_commit_write_streams", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "BatchCommitWriteStreams", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.BatchCommitWriteStreams", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync", + "title": "Snippet for the flush_rows call in the BigQueryWrite service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows.", + "file": "big_query_write/flush_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "flush_rows", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse", + "client": { + "short_name": "BigQueryWrite::Client", + "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" + }, + "method": { + "short_name": "FlushRows", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FlushRows", + "service": { + "short_name": "BigQueryWrite", + "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" + } + } + }, + "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-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb new file mode 100644 index 000000000000..87827e1ac024 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/storage/v1/big_query_read" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_read_session_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.read_session_path project: "value0", location: "value1", session: "value2" + assert_equal "projects/value0/locations/value1/sessions/value2", path + end + end + + def test_read_stream_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.read_stream_path project: "value0", location: "value1", session: "value2", stream: "value3" + assert_equal "projects/value0/locations/value1/sessions/value2/streams/value3", path + end + end + + def test_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_path project: "value0", dataset: "value1", table: "value2" + assert_equal "projects/value0/datasets/value1/tables/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb new file mode 100644 index 000000000000..72e2c0ad909b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb @@ -0,0 +1,303 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/storage/v1/storage_pb" +require "google/cloud/bigquery/storage/v1/big_query_read" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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_create_read_session + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadSession.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" + read_session = {} + max_stream_count = 42 + preferred_min_stream_count = 42 + + create_read_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_read_session, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ReadSession), request["read_session"] + assert_equal 42, request["max_stream_count"] + assert_equal 42, request["preferred_min_stream_count"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_read_session_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_read_session parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_read_session ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_read_session(::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_read_session_client_stub.call_rpc_count + end + end + + def test_read_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse.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 server streaming method. + read_stream = "hello world" + offset = 42 + + read_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :read_rows, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, request + assert_equal "hello world", request["read_stream"] + assert_equal 42, request["offset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, read_rows_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.read_rows({ read_stream: read_stream, offset: offset }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.read_rows read_stream: read_stream, offset: offset do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.read_rows ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.read_rows({ read_stream: read_stream, offset: offset }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.read_rows(::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, read_rows_client_stub.call_rpc_count + end + end + + def test_split_read_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse.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" + fraction = 3.5 + + split_read_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :split_read_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, request + assert_equal "hello world", request["name"] + assert_equal 3.5, request["fraction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, split_read_stream_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.split_read_stream({ name: name, fraction: fraction }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.split_read_stream name: name, fraction: fraction do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.split_read_stream ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.split_read_stream({ name: name, fraction: fraction }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.split_read_stream(::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, split_read_stream_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::Bigquery::Storage::V1::BigQueryRead::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::Bigquery::Storage::V1::BigQueryRead::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::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb new file mode 100644 index 000000000000..aeeebb7c4e2d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/storage/v1/big_query_write" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_path project: "value0", dataset: "value1", table: "value2" + assert_equal "projects/value0/datasets/value1/tables/value2", path + end + end + + def test_write_stream_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.write_stream_path project: "value0", dataset: "value1", table: "value2", stream: "value3" + assert_equal "projects/value0/datasets/value1/tables/value2/streams/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb new file mode 100644 index 000000000000..2bcf14410d85 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb @@ -0,0 +1,501 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigquery/storage/v1/storage_pb" +require "google/cloud/bigquery/storage/v1/big_query_write" + +class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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_create_write_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.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" + write_stream = {} + + create_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_write_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::WriteStream), request["write_stream"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_write_stream_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_write_stream({ parent: parent, write_stream: write_stream }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_write_stream parent: parent, write_stream: write_stream do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_write_stream ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_write_stream({ parent: parent, write_stream: write_stream }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_write_stream(::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_write_stream_client_stub.call_rpc_count + end + end + + def test_append_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse.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 bidi streaming method. + write_stream = "hello world" + offset = {} + proto_rows = {} + trace_id = "hello world" + missing_value_interpretations = {} + default_missing_value_interpretation = :MISSING_VALUE_INTERPRETATION_UNSPECIFIED + + append_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :append_rows, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, append_rows_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + enum_input = [request_hash, request_proto].to_enum + client.append_rows enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + stream_input = Gapic::StreamInput.new + client.append_rows stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + enum_input = [request_hash, request_proto].to_enum + client.append_rows enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } + request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation + stream_input = Gapic::StreamInput.new + client.append_rows stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, append_rows_client_stub.call_rpc_count + append_rows_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, r + assert_equal "hello world", r["write_stream"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), r["offset"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData), r["proto_rows"] + assert_equal :proto_rows, r.rows + assert_equal "hello world", r["trace_id"] + assert_equal({}, r["missing_value_interpretations"].to_h) + assert_equal :MISSING_VALUE_INTERPRETATION_UNSPECIFIED, r["default_missing_value_interpretation"] + end + end + end + end + + def test_get_write_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :WRITE_STREAM_VIEW_UNSPECIFIED + + get_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_write_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, request + assert_equal "hello world", request["name"] + assert_equal :WRITE_STREAM_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_write_stream_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_write_stream({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_write_stream name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_write_stream ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_write_stream({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_write_stream(::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_write_stream_client_stub.call_rpc_count + end + end + + def test_finalize_write_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse.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" + + finalize_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :finalize_write_stream, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, finalize_write_stream_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.finalize_write_stream({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.finalize_write_stream name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.finalize_write_stream ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.finalize_write_stream({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.finalize_write_stream(::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.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, finalize_write_stream_client_stub.call_rpc_count + end + end + + def test_batch_commit_write_streams + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse.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" + write_streams = ["hello world"] + + batch_commit_write_streams_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_commit_write_streams, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, request + assert_equal "hello world", request["parent"] + assert_equal ["hello world"], request["write_streams"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_commit_write_streams_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_commit_write_streams({ parent: parent, write_streams: write_streams }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_commit_write_streams parent: parent, write_streams: write_streams do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_commit_write_streams ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_commit_write_streams({ parent: parent, write_streams: write_streams }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_commit_write_streams(::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_commit_write_streams_client_stub.call_rpc_count + end + end + + def test_flush_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse.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. + write_stream = "hello world" + offset = {} + + flush_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :flush_rows, name + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, request + assert_equal "hello world", request["write_stream"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), request["offset"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, flush_rows_client_stub do + # Create client + client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.flush_rows({ write_stream: write_stream, offset: offset }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.flush_rows write_stream: write_stream, offset: offset do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.flush_rows ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.flush_rows({ write_stream: write_stream, offset: offset }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.flush_rows(::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, flush_rows_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::Bigquery::Storage::V1::BigQueryWrite::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::Bigquery::Storage::V1::BigQueryWrite::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::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/.gitignore b/owl-bot-staging/google-cloud-bigtable-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/.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-bigtable-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigtable-v2/.repo-metadata.json new file mode 100644 index 000000000000..67418624d820 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "bigtable.googleapis.com", + "api_shortname": "bigtable", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigtable-v2/latest", + "distribution_name": "google-cloud-bigtable-v2", + "is_cloud": true, + "language": "ruby", + "name": "bigtable", + "name_pretty": "Cloud Bigtable V2 API", + "product_documentation": "https://cloud.google.com/bigtable", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Bigtable is a fully managed, scalable NoSQL database service for large analytical and operational workloads. Note that google-cloud-bigtable-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigtable instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BIGTABLE", + "ruby-cloud-product-url": "https://cloud.google.com/bigtable", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml new file mode 100644 index 000000000000..c6789d42c34e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-bigtable-v2.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-bigtable-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/.toys.rb b/owl-bot-staging/google-cloud-bigtable-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/.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-bigtable-v2/.yardopts b/owl-bot-staging/google-cloud-bigtable-v2/.yardopts new file mode 100644 index 000000000000..93d06e2682af --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Bigtable V2 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-bigtable-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigtable-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..2deb52845e7f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-bigtable-v2 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-bigtable-v2 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/bigtable/v2" + +client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/bigtable/v2" + +::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Bigtable::V2::Bigtable::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-bigtable-v2 +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/bigtable/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Bigtable::V2::Bigtable::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-bigtable-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigtable-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-bigtable-v2/Gemfile b/owl-bot-staging/google-cloud-bigtable-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigtable-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/README.md b/owl-bot-staging/google-cloud-bigtable-v2/README.md new file mode 100644 index 000000000000..534ab3ad36cb --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Bigtable V2 API + +API for reading and writing the contents of Bigtable tables associated with a Google Cloud project. + +Cloud Bigtable is a fully managed, scalable NoSQL database service for large analytical and operational workloads. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Bigtable V2 API. Most users should consider using +the main client gem, +[google-cloud-bigtable](https://rubygems.org/gems/google-cloud-bigtable). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-bigtable-v2 +``` + +## 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/bigtable.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/bigtable/v2" + +client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new +request = ::Google::Cloud::Bigtable::V2::ReadRowsRequest.new # (request fields as keyword arguments...) +response = client.read_rows request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigtable-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/bigtable) +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/bigtable/v2" +require "logger" + +client = ::Google::Cloud::Bigtable::V2::Bigtable::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-bigtable`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-bigtable-v2`. +_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-bigtable`. +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-bigtable-v2`. + +### 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-bigtable-v2/Rakefile b/owl-bot-staging/google-cloud-bigtable-v2/Rakefile new file mode 100644 index 000000000000..58adcace76f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BIGTABLE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BIGTABLE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BIGTABLE_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 BIGTABLE_TEST_PROJECT=test123 BIGTABLE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/bigtable/v2/bigtable/credentials" + ::Google::Cloud::Bigtable::V2::Bigtable::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BIGTABLE_PROJECT"] = project + ENV["BIGTABLE_TEST_PROJECT"] = project + ENV["BIGTABLE_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-bigtable-v2 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-bigtable-v2 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-bigtable-v2 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-bigtable-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-bigtable-v2" + header "google-cloud-bigtable-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-bigtable-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-bigtable-v2 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-bigtable-v2 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-bigtable-v2 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-bigtable-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigtable-v2/gapic_metadata.json new file mode 100644 index 000000000000..a72e2b5f2bcd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.bigtable.v2", + "libraryPackage": "::Google::Cloud::Bigtable::V2", + "services": { + "Bigtable": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Bigtable::V2::Bigtable::Client", + "rpcs": { + "ReadRows": { + "methods": [ + "read_rows" + ] + }, + "SampleRowKeys": { + "methods": [ + "sample_row_keys" + ] + }, + "MutateRow": { + "methods": [ + "mutate_row" + ] + }, + "MutateRows": { + "methods": [ + "mutate_rows" + ] + }, + "CheckAndMutateRow": { + "methods": [ + "check_and_mutate_row" + ] + }, + "PingAndWarm": { + "methods": [ + "ping_and_warm" + ] + }, + "ReadModifyWriteRow": { + "methods": [ + "read_modify_write_row" + ] + }, + "GenerateInitialChangeStreamPartitions": { + "methods": [ + "generate_initial_change_stream_partitions" + ] + }, + "ReadChangeStream": { + "methods": [ + "read_change_stream" + ] + }, + "PrepareQuery": { + "methods": [ + "prepare_query" + ] + }, + "ExecuteQuery": { + "methods": [ + "execute_query" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec b/owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec new file mode 100644 index 000000000000..33e81bd31fe0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/bigtable/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-bigtable-v2" + gem.version = Google::Cloud::Bigtable::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Bigtable is a fully managed, scalable NoSQL database service for large analytical and operational workloads. Note that google-cloud-bigtable-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigtable instead. See the readme for more details." + gem.summary = "API for reading and writing the contents of Bigtable tables associated with a Google Cloud project." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.rb new file mode 100644 index 000000000000..4f16a2e6aaab --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.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/bigtable/v2" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb new file mode 100644 index 000000000000..f42bd06554dd --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/bigtable/v2/bigtable.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/api/routing_pb' +require 'google/bigtable/v2/data_pb' +require 'google/bigtable/v2/request_stats_pb' +require 'google/bigtable/v2/types_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\xbf\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x08 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\x13\n\x11MutateRowResponse\"\x88\x03\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1a\x84\x01\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xdb\'\n\x08\x42igtable\x12\xd5\x04\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\xfb\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\xf1\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*ZU\"P/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xd3\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12:\n\x16materialized_view_name\x12 {name=projects/*/instances/*}/**0\x01\x12\xea\x04\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x81\x04\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\xf7\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeysZW\x12U/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xd3\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12:\n\x16materialized_view_name\x12 {name=projects/*/instances/*}/**0\x01\x12\xe9\x03\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\x8e\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xdc\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\xfc\x02\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**0\x01\x12\xdd\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\xea\x03\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\x8e\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\x98\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigtable + module V2 + ReadRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsRequest").msgclass + ReadRowsRequest::RequestStatsView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsRequest.RequestStatsView").enummodule + ReadRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsResponse").msgclass + ReadRowsResponse::CellChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsResponse.CellChunk").msgclass + SampleRowKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.SampleRowKeysRequest").msgclass + SampleRowKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.SampleRowKeysResponse").msgclass + MutateRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowRequest").msgclass + MutateRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowResponse").msgclass + MutateRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsRequest").msgclass + MutateRowsRequest::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsRequest.Entry").msgclass + MutateRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsResponse").msgclass + MutateRowsResponse::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsResponse.Entry").msgclass + RateLimitInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RateLimitInfo").msgclass + CheckAndMutateRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.CheckAndMutateRowRequest").msgclass + CheckAndMutateRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.CheckAndMutateRowResponse").msgclass + PingAndWarmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PingAndWarmRequest").msgclass + PingAndWarmResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PingAndWarmResponse").msgclass + ReadModifyWriteRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRowRequest").msgclass + ReadModifyWriteRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRowResponse").msgclass + GenerateInitialChangeStreamPartitionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest").msgclass + GenerateInitialChangeStreamPartitionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse").msgclass + ReadChangeStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamRequest").msgclass + ReadChangeStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse").msgclass + ReadChangeStreamResponse::MutationChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.MutationChunk").msgclass + ReadChangeStreamResponse::MutationChunk::ChunkInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo").msgclass + ReadChangeStreamResponse::DataChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.DataChange").msgclass + ReadChangeStreamResponse::DataChange::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type").enummodule + ReadChangeStreamResponse::Heartbeat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.Heartbeat").msgclass + ReadChangeStreamResponse::CloseStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.CloseStream").msgclass + ExecuteQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ExecuteQueryRequest").msgclass + ExecuteQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ExecuteQueryResponse").msgclass + PrepareQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PrepareQueryRequest").msgclass + PrepareQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PrepareQueryResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb new file mode 100644 index 000000000000..dc36d1c5f9b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb @@ -0,0 +1,86 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/bigtable/v2/bigtable.proto for package 'Google.Cloud.Bigtable.V2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/bigtable/v2/bigtable_pb' + +module Google + module Cloud + module Bigtable + module V2 + module Bigtable + # Service for reading from and writing to existing Bigtable tables. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.bigtable.v2.Bigtable' + + # Streams back the contents of all requested rows in key order, optionally + # applying the same Reader filter to each. Depending on their size, + # rows and cells may be broken up across multiple responses, but + # atomicity of each row will still be preserved. See the + # ReadRowsResponse documentation for details. + rpc :ReadRows, ::Google::Cloud::Bigtable::V2::ReadRowsRequest, stream(::Google::Cloud::Bigtable::V2::ReadRowsResponse) + # Returns a sample of row keys in the table. The returned row keys will + # delimit contiguous sections of the table of approximately equal size, + # which can be used to break up the data for distributed tasks like + # mapreduces. + rpc :SampleRowKeys, ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest, stream(::Google::Cloud::Bigtable::V2::SampleRowKeysResponse) + # Mutates a row atomically. Cells already present in the row are left + # unchanged unless explicitly changed by `mutation`. + rpc :MutateRow, ::Google::Cloud::Bigtable::V2::MutateRowRequest, ::Google::Cloud::Bigtable::V2::MutateRowResponse + # Mutates multiple rows in a batch. Each individual row is mutated + # atomically as in MutateRow, but the entire batch is not executed + # atomically. + rpc :MutateRows, ::Google::Cloud::Bigtable::V2::MutateRowsRequest, stream(::Google::Cloud::Bigtable::V2::MutateRowsResponse) + # Mutates a row atomically based on the output of a predicate Reader filter. + rpc :CheckAndMutateRow, ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest, ::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse + # Warm up associated instance metadata for this connection. + # This call is not required but may be useful for connection keep-alive. + rpc :PingAndWarm, ::Google::Cloud::Bigtable::V2::PingAndWarmRequest, ::Google::Cloud::Bigtable::V2::PingAndWarmResponse + # Modifies a row atomically on the server. The method reads the latest + # existing timestamp and value from the specified columns and writes a new + # entry based on pre-defined read/modify/write rules. The new value for the + # timestamp is the greater of the existing timestamp or the current server + # time. The method returns the new contents of all modified cells. + rpc :ReadModifyWriteRow, ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest, ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse + # Returns the current list of partitions that make up the table's + # change stream. The union of partitions will cover the entire keyspace. + # Partitions can be read with `ReadChangeStream`. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. + rpc :GenerateInitialChangeStreamPartitions, ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest, stream(::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse) + # Reads changes from a table's change stream. Changes will + # reflect both user-initiated mutations and mutations that are caused by + # garbage collection. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. + rpc :ReadChangeStream, ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest, stream(::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse) + # Prepares a GoogleSQL query for execution on a particular Bigtable instance. + rpc :PrepareQuery, ::Google::Cloud::Bigtable::V2::PrepareQueryRequest, ::Google::Cloud::Bigtable::V2::PrepareQueryResponse + # Executes a SQL query against a particular Bigtable instance. + rpc :ExecuteQuery, ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest, stream(::Google::Cloud::Bigtable::V2::ExecuteQueryResponse) + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb new file mode 100644 index 000000000000..94d19a4d19ee --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/bigtable/v2/data.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/bigtable/v2/types_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' + + +descriptor_data = "\n\x1dgoogle/bigtable/v2/data.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"@\n\x03Row\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12,\n\x08\x66\x61milies\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Family\"C\n\x06\x46\x61mily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Column\"D\n\x06\x43olumn\x12\x11\n\tqualifier\x18\x01 \x01(\x0c\x12\'\n\x05\x63\x65lls\x18\x02 \x03(\x0b\x32\x18.google.bigtable.v2.Cell\"?\n\x04\x43\x65ll\x12\x18\n\x10timestamp_micros\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x0e\n\x06labels\x18\x03 \x03(\t\"\xf4\x02\n\x05Value\x12&\n\x04type\x18\x07 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x13\n\traw_value\x18\x08 \x01(\x0cH\x00\x12\x1e\n\x14raw_timestamp_micros\x18\t \x01(\x03H\x00\x12\x15\n\x0b\x62ytes_value\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x13\n\tint_value\x18\x06 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\n \x01(\x08H\x00\x12\x15\n\x0b\x66loat_value\x18\x0b \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\'\n\ndate_value\x18\r \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x35\n\x0b\x61rray_value\x18\x04 \x01(\x0b\x32\x1e.google.bigtable.v2.ArrayValueH\x00\x42\x06\n\x04kind\"7\n\nArrayValue\x12)\n\x06values\x18\x01 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"\x8a\x01\n\x08RowRange\x12\x1a\n\x10start_key_closed\x18\x01 \x01(\x0cH\x00\x12\x18\n\x0estart_key_open\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0c\x65nd_key_open\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_key_closed\x18\x04 \x01(\x0cH\x01\x42\x0b\n\tstart_keyB\t\n\x07\x65nd_key\"L\n\x06RowSet\x12\x10\n\x08row_keys\x18\x01 \x03(\x0c\x12\x30\n\nrow_ranges\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.RowRange\"\xc6\x01\n\x0b\x43olumnRange\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12 \n\x16start_qualifier_closed\x18\x02 \x01(\x0cH\x00\x12\x1e\n\x14start_qualifier_open\x18\x03 \x01(\x0cH\x00\x12\x1e\n\x14\x65nd_qualifier_closed\x18\x04 \x01(\x0cH\x01\x12\x1c\n\x12\x65nd_qualifier_open\x18\x05 \x01(\x0cH\x01\x42\x11\n\x0fstart_qualifierB\x0f\n\rend_qualifier\"N\n\x0eTimestampRange\x12\x1e\n\x16start_timestamp_micros\x18\x01 \x01(\x03\x12\x1c\n\x14\x65nd_timestamp_micros\x18\x02 \x01(\x03\"\x98\x01\n\nValueRange\x12\x1c\n\x12start_value_closed\x18\x01 \x01(\x0cH\x00\x12\x1a\n\x10start_value_open\x18\x02 \x01(\x0cH\x00\x12\x1a\n\x10\x65nd_value_closed\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_value_open\x18\x04 \x01(\x0cH\x01\x42\r\n\x0bstart_valueB\x0b\n\tend_value\"\xdf\x08\n\tRowFilter\x12\x34\n\x05\x63hain\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.RowFilter.ChainH\x00\x12>\n\ninterleave\x18\x02 \x01(\x0b\x32(.google.bigtable.v2.RowFilter.InterleaveH\x00\x12<\n\tcondition\x18\x03 \x01(\x0b\x32\'.google.bigtable.v2.RowFilter.ConditionH\x00\x12\x0e\n\x04sink\x18\x10 \x01(\x08H\x00\x12\x19\n\x0fpass_all_filter\x18\x11 \x01(\x08H\x00\x12\x1a\n\x10\x62lock_all_filter\x18\x12 \x01(\x08H\x00\x12\x1e\n\x14row_key_regex_filter\x18\x04 \x01(\x0cH\x00\x12\x1b\n\x11row_sample_filter\x18\x0e \x01(\x01H\x00\x12\"\n\x18\x66\x61mily_name_regex_filter\x18\x05 \x01(\tH\x00\x12\'\n\x1d\x63olumn_qualifier_regex_filter\x18\x06 \x01(\x0cH\x00\x12>\n\x13\x63olumn_range_filter\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.ColumnRangeH\x00\x12\x44\n\x16timestamp_range_filter\x18\x08 \x01(\x0b\x32\".google.bigtable.v2.TimestampRangeH\x00\x12\x1c\n\x12value_regex_filter\x18\t \x01(\x0cH\x00\x12<\n\x12value_range_filter\x18\x0f \x01(\x0b\x32\x1e.google.bigtable.v2.ValueRangeH\x00\x12%\n\x1b\x63\x65lls_per_row_offset_filter\x18\n \x01(\x05H\x00\x12$\n\x1a\x63\x65lls_per_row_limit_filter\x18\x0b \x01(\x05H\x00\x12\'\n\x1d\x63\x65lls_per_column_limit_filter\x18\x0c \x01(\x05H\x00\x12!\n\x17strip_value_transformer\x18\r \x01(\x08H\x00\x12!\n\x17\x61pply_label_transformer\x18\x13 \x01(\tH\x00\x1a\x37\n\x05\x43hain\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a<\n\nInterleave\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a\xad\x01\n\tCondition\x12\x37\n\x10predicate_filter\x18\x01 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x32\n\x0btrue_filter\x18\x02 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x33\n\x0c\x66\x61lse_filter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilterB\x08\n\x06\x66ilter\"\xad\x08\n\x08Mutation\x12\x38\n\x08set_cell\x18\x01 \x01(\x0b\x32$.google.bigtable.v2.Mutation.SetCellH\x00\x12=\n\x0b\x61\x64\x64_to_cell\x18\x05 \x01(\x0b\x32&.google.bigtable.v2.Mutation.AddToCellH\x00\x12\x41\n\rmerge_to_cell\x18\x06 \x01(\x0b\x32(.google.bigtable.v2.Mutation.MergeToCellH\x00\x12K\n\x12\x64\x65lete_from_column\x18\x02 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromColumnH\x00\x12K\n\x12\x64\x65lete_from_family\x18\x03 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromFamilyH\x00\x12\x45\n\x0f\x64\x65lete_from_row\x18\x04 \x01(\x0b\x32*.google.bigtable.v2.Mutation.DeleteFromRowH\x00\x1a\x61\n\x07SetCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x18\n\x10timestamp_micros\x18\x03 \x01(\x03\x12\r\n\x05value\x18\x04 \x01(\x0c\x1a\xad\x01\n\tAddToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1a\xaf\x01\n\x0bMergeToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1ay\n\x10\x44\x65leteFromColumn\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x36\n\ntime_range\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.TimestampRange\x1a\'\n\x10\x44\x65leteFromFamily\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x1a\x0f\n\rDeleteFromRowB\n\n\x08mutation\"\x80\x01\n\x13ReadModifyWriteRule\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x16\n\x0c\x61ppend_value\x18\x03 \x01(\x0cH\x00\x12\x1a\n\x10increment_amount\x18\x04 \x01(\x03H\x00\x42\x06\n\x04rule\"B\n\x0fStreamPartition\x12/\n\trow_range\x18\x01 \x01(\x0b\x32\x1c.google.bigtable.v2.RowRange\"W\n\x18StreamContinuationTokens\x12;\n\x06tokens\x18\x01 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\"`\n\x17StreamContinuationToken\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\r\n\x05token\x18\x02 \x01(\t\"\r\n\x0bProtoFormat\"F\n\x0e\x43olumnMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\"B\n\x0bProtoSchema\x12\x33\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\".google.bigtable.v2.ColumnMetadata\"V\n\x11ResultSetMetadata\x12\x37\n\x0cproto_schema\x18\x01 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoSchemaH\x00\x42\x08\n\x06schema\"6\n\tProtoRows\x12)\n\x06values\x18\x02 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"$\n\x0eProtoRowsBatch\x12\x12\n\nbatch_data\x18\x01 \x01(\x0c\"\xd5\x01\n\x10PartialResultSet\x12>\n\x10proto_rows_batch\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.ProtoRowsBatchH\x00\x12\x1b\n\x0e\x62\x61tch_checksum\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x14\n\x0cresume_token\x18\x05 \x01(\x0c\x12\r\n\x05reset\x18\x07 \x01(\x08\x12\x1c\n\x14\x65stimated_batch_size\x18\x04 \x01(\x05\x42\x0e\n\x0cpartial_rowsB\x11\n\x0f_batch_checksum\"L\n\x0bIdempotency\x12\r\n\x05token\x18\x01 \x01(\x0c\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xb3\x01\n\x16\x63om.google.bigtable.v2B\tDataProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigtable + module V2 + Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Row").msgclass + Family = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Family").msgclass + Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Column").msgclass + Cell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Cell").msgclass + Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Value").msgclass + ArrayValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ArrayValue").msgclass + RowRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowRange").msgclass + RowSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowSet").msgclass + ColumnRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ColumnRange").msgclass + TimestampRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.TimestampRange").msgclass + ValueRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ValueRange").msgclass + RowFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter").msgclass + RowFilter::Chain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter.Chain").msgclass + RowFilter::Interleave = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter.Interleave").msgclass + RowFilter::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter.Condition").msgclass + Mutation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation").msgclass + Mutation::SetCell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.SetCell").msgclass + Mutation::AddToCell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.AddToCell").msgclass + Mutation::MergeToCell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.MergeToCell").msgclass + Mutation::DeleteFromColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.DeleteFromColumn").msgclass + Mutation::DeleteFromFamily = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.DeleteFromFamily").msgclass + Mutation::DeleteFromRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.DeleteFromRow").msgclass + ReadModifyWriteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRule").msgclass + StreamPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.StreamPartition").msgclass + StreamContinuationTokens = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.StreamContinuationTokens").msgclass + StreamContinuationToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.StreamContinuationToken").msgclass + ProtoFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoFormat").msgclass + ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ColumnMetadata").msgclass + ProtoSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoSchema").msgclass + ResultSetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ResultSetMetadata").msgclass + ProtoRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoRows").msgclass + ProtoRowsBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoRowsBatch").msgclass + PartialResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PartialResultSet").msgclass + Idempotency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Idempotency").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb new file mode 100644 index 000000000000..9ac6658f8006 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/bigtable/v2/feature_flags.proto + +require 'google/protobuf' + + +descriptor_data = "\n&google/bigtable/v2/feature_flags.proto\x12\x12google.bigtable.v2\"\xb1\x02\n\x0c\x46\x65\x61tureFlags\x12\x15\n\rreverse_scans\x18\x01 \x01(\x08\x12\x1e\n\x16mutate_rows_rate_limit\x18\x03 \x01(\x08\x12\x1f\n\x17mutate_rows_rate_limit2\x18\x05 \x01(\x08\x12\"\n\x1alast_scanned_row_responses\x18\x04 \x01(\x08\x12\x16\n\x0erouting_cookie\x18\x06 \x01(\x08\x12\x12\n\nretry_info\x18\x07 \x01(\x08\x12#\n\x1b\x63lient_side_metrics_enabled\x18\x08 \x01(\x08\x12 \n\x18traffic_director_enabled\x18\t \x01(\x08\x12\x1f\n\x17\x64irect_access_requested\x18\n \x01(\x08\x12\x11\n\tpeer_info\x18\x0b \x01(\x08\x42\xbb\x01\n\x16\x63om.google.bigtable.v2B\x11\x46\x65\x61tureFlagsProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigtable + module V2 + FeatureFlags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.FeatureFlags").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb new file mode 100644 index 000000000000..8d46d3c4d318 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/bigtable/v2/peer_info.proto + +require 'google/protobuf' + + +descriptor_data = "\n\"google/bigtable/v2/peer_info.proto\x12\x12google.bigtable.v2\"\xfa\x03\n\x08PeerInfo\x12\x1a\n\x12google_frontend_id\x18\x01 \x01(\x03\x12\x1f\n\x17\x61pplication_frontend_id\x18\x02 \x01(\x03\x12!\n\x19\x61pplication_frontend_zone\x18\x03 \x01(\t\x12$\n\x1c\x61pplication_frontend_subzone\x18\x04 \x01(\t\x12\x42\n\x0etransport_type\x18\x05 \x01(\x0e\x32*.google.bigtable.v2.PeerInfo.TransportType\"\xa3\x02\n\rTransportType\x12\x1a\n\x16TRANSPORT_TYPE_UNKNOWN\x10\x00\x12\x1b\n\x17TRANSPORT_TYPE_EXTERNAL\x10\x01\x12\x1d\n\x19TRANSPORT_TYPE_CLOUD_PATH\x10\x02\x12 \n\x1cTRANSPORT_TYPE_DIRECT_ACCESS\x10\x03\x12\"\n\x1eTRANSPORT_TYPE_SESSION_UNKNOWN\x10\x04\x12#\n\x1fTRANSPORT_TYPE_SESSION_EXTERNAL\x10\x05\x12%\n!TRANSPORT_TYPE_SESSION_CLOUD_PATH\x10\x06\x12(\n$TRANSPORT_TYPE_SESSION_DIRECT_ACCESS\x10\x07\x42\xb7\x01\n\x16\x63om.google.bigtable.v2B\rPeerInfoProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigtable + module V2 + PeerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PeerInfo").msgclass + PeerInfo::TransportType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PeerInfo.TransportType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb new file mode 100644 index 000000000000..e9a78aa5a088 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/bigtable/v2/request_stats.proto + +require 'google/protobuf' + +require 'google/protobuf/duration_pb' + + +descriptor_data = "\n&google/bigtable/v2/request_stats.proto\x12\x12google.bigtable.v2\x1a\x1egoogle/protobuf/duration.proto\"\x82\x01\n\x12ReadIterationStats\x12\x17\n\x0frows_seen_count\x18\x01 \x01(\x03\x12\x1b\n\x13rows_returned_count\x18\x02 \x01(\x03\x12\x18\n\x10\x63\x65lls_seen_count\x18\x03 \x01(\x03\x12\x1c\n\x14\x63\x65lls_returned_count\x18\x04 \x01(\x03\"Q\n\x13RequestLatencyStats\x12:\n\x17\x66rontend_server_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xa1\x01\n\x11\x46ullReadStatsView\x12\x44\n\x14read_iteration_stats\x18\x01 \x01(\x0b\x32&.google.bigtable.v2.ReadIterationStats\x12\x46\n\x15request_latency_stats\x18\x02 \x01(\x0b\x32\'.google.bigtable.v2.RequestLatencyStats\"c\n\x0cRequestStats\x12\x45\n\x14\x66ull_read_stats_view\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.FullReadStatsViewH\x00\x42\x0c\n\nstats_viewB\xbb\x01\n\x16\x63om.google.bigtable.v2B\x11RequestStatsProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigtable + module V2 + ReadIterationStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadIterationStats").msgclass + RequestLatencyStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RequestLatencyStats").msgclass + FullReadStatsView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.FullReadStatsView").msgclass + RequestStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RequestStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb new file mode 100644 index 000000000000..633ab031729e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/bigtable/v2/response_params.proto + +require 'google/protobuf' + + +descriptor_data = "\n(google/bigtable/v2/response_params.proto\x12\x12google.bigtable.v2\"z\n\x0eResponseParams\x12\x14\n\x07zone_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ncluster_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06\x61\x66\x65_id\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\n\n\x08_zone_idB\r\n\x0b_cluster_idB\t\n\x07_afe_idB\xbd\x01\n\x16\x63om.google.bigtable.v2B\x13ResponseParamsProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigtable + module V2 + ResponseParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ResponseParams").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb new file mode 100644 index 000000000000..e55552c774fe --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/bigtable/v2/types.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n\x1egoogle/bigtable/v2/types.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\"\x87\x18\n\x04Type\x12\x34\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesH\x00\x12\x36\n\x0bstring_type\x18\x02 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StringH\x00\x12\x34\n\nint64_type\x18\x05 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.Int64H\x00\x12\x38\n\x0c\x66loat32_type\x18\x0c \x01(\x0b\x32 .google.bigtable.v2.Type.Float32H\x00\x12\x38\n\x0c\x66loat64_type\x18\t \x01(\x0b\x32 .google.bigtable.v2.Type.Float64H\x00\x12\x32\n\tbool_type\x18\x08 \x01(\x0b\x32\x1d.google.bigtable.v2.Type.BoolH\x00\x12<\n\x0etimestamp_type\x18\n \x01(\x0b\x32\".google.bigtable.v2.Type.TimestampH\x00\x12\x32\n\tdate_type\x18\x0b \x01(\x0b\x32\x1d.google.bigtable.v2.Type.DateH\x00\x12<\n\x0e\x61ggregate_type\x18\x06 \x01(\x0b\x32\".google.bigtable.v2.Type.AggregateH\x00\x12\x36\n\x0bstruct_type\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StructH\x00\x12\x34\n\narray_type\x18\x03 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.ArrayH\x00\x12\x30\n\x08map_type\x18\x04 \x01(\x0b\x32\x1c.google.bigtable.v2.Type.MapH\x00\x12\x34\n\nproto_type\x18\r \x01(\x0b\x32\x1e.google.bigtable.v2.Type.ProtoH\x00\x12\x32\n\tenum_type\x18\x0e \x01(\x0b\x32\x1d.google.bigtable.v2.Type.EnumH\x00\x1a\xb3\x01\n\x05\x42ytes\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Bytes.Encoding\x1ao\n\x08\x45ncoding\x12:\n\x03raw\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.Type.Bytes.Encoding.RawH\x00\x1a\x1b\n\x03Raw\x12\x14\n\x0c\x65scape_nulls\x18\x01 \x01(\x08\x42\n\n\x08\x65ncoding\x1a\xa7\x02\n\x06String\x12:\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32(.google.bigtable.v2.Type.String.Encoding\x1a\xe0\x01\n\x08\x45ncoding\x12H\n\x08utf8_raw\x18\x01 \x01(\x0b\x32\x30.google.bigtable.v2.Type.String.Encoding.Utf8RawB\x02\x18\x01H\x00\x12H\n\nutf8_bytes\x18\x02 \x01(\x0b\x32\x32.google.bigtable.v2.Type.String.Encoding.Utf8BytesH\x00\x1a\r\n\x07Utf8Raw:\x02\x18\x01\x1a%\n\tUtf8Bytes\x12\x18\n\x10null_escape_char\x18\x01 \x01(\tB\n\n\x08\x65ncoding\x1a\xe5\x02\n\x05Int64\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Int64.Encoding\x1a\xa0\x02\n\x08\x45ncoding\x12R\n\x10\x62ig_endian_bytes\x18\x01 \x01(\x0b\x32\x36.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesH\x00\x12V\n\x12ordered_code_bytes\x18\x02 \x01(\x0b\x32\x38.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesH\x00\x1aH\n\x0e\x42igEndianBytes\x12\x36\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesB\x02\x18\x01\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a\x06\n\x04\x42ool\x1a\t\n\x07\x46loat32\x1a\t\n\x07\x46loat64\x1a\xa8\x01\n\tTimestamp\x12=\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.Type.Timestamp.Encoding\x1a\\\n\x08\x45ncoding\x12\x44\n\x11unix_micros_int64\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Int64.EncodingH\x00\x42\n\n\x08\x65ncoding\x1a\x06\n\x04\x44\x61te\x1a\x95\x04\n\x06Struct\x12\x35\n\x06\x66ields\x18\x01 \x03(\x0b\x32%.google.bigtable.v2.Type.Struct.Field\x12:\n\x08\x65ncoding\x18\x02 \x01(\x0b\x32(.google.bigtable.v2.Type.Struct.Encoding\x1a\x43\n\x05\x46ield\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\xd2\x02\n\x08\x45ncoding\x12G\n\tsingleton\x18\x01 \x01(\x0b\x32\x32.google.bigtable.v2.Type.Struct.Encoding.SingletonH\x00\x12R\n\x0f\x64\x65limited_bytes\x18\x02 \x01(\x0b\x32\x37.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesH\x00\x12W\n\x12ordered_code_bytes\x18\x03 \x01(\x0b\x32\x39.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesH\x00\x1a\x0b\n\tSingleton\x1a#\n\x0e\x44\x65limitedBytes\x12\x11\n\tdelimiter\x18\x01 \x01(\x0c\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a\x37\n\x05Proto\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x14\n\x0cmessage_name\x18\x02 \x01(\t\x1a\x33\n\x04\x45num\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x11\n\tenum_name\x18\x02 \x01(\t\x1a\x37\n\x05\x41rray\x12.\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a_\n\x03Map\x12*\n\x08key_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12,\n\nvalue_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\xb7\x03\n\tAggregate\x12,\n\ninput_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x31\n\nstate_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.TypeB\x03\xe0\x41\x03\x12\x35\n\x03sum\x18\x04 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.SumH\x00\x12_\n\x12hllpp_unique_count\x18\x05 \x01(\x0b\x32\x41.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountH\x00\x12\x35\n\x03max\x18\x06 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MaxH\x00\x12\x35\n\x03min\x18\x07 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MinH\x00\x1a\x05\n\x03Sum\x1a\x05\n\x03Max\x1a\x05\n\x03Min\x1a \n\x1eHyperLogLogPlusPlusUniqueCountB\x0c\n\naggregatorB\x06\n\x04kindB\xb4\x01\n\x16\x63om.google.bigtable.v2B\nTypesProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Bigtable + module V2 + Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type").msgclass + Type::Bytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bytes").msgclass + Type::Bytes::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bytes.Encoding").msgclass + Type::Bytes::Encoding::Raw = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bytes.Encoding.Raw").msgclass + Type::String = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String").msgclass + Type::String::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String.Encoding").msgclass + Type::String::Encoding::Utf8Raw = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String.Encoding.Utf8Raw").msgclass + Type::String::Encoding::Utf8Bytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String.Encoding.Utf8Bytes").msgclass + Type::Int64 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64").msgclass + Type::Int64::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64.Encoding").msgclass + Type::Int64::Encoding::BigEndianBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes").msgclass + Type::Int64::Encoding::OrderedCodeBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes").msgclass + Type::Bool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bool").msgclass + Type::Float32 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Float32").msgclass + Type::Float64 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Float64").msgclass + Type::Timestamp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Timestamp").msgclass + Type::Timestamp::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Timestamp.Encoding").msgclass + Type::Date = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Date").msgclass + Type::Struct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct").msgclass + Type::Struct::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Field").msgclass + Type::Struct::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding").msgclass + Type::Struct::Encoding::Singleton = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding.Singleton").msgclass + Type::Struct::Encoding::DelimitedBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes").msgclass + Type::Struct::Encoding::OrderedCodeBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes").msgclass + Type::Proto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Proto").msgclass + Type::Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Enum").msgclass + Type::Array = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Array").msgclass + Type::Map = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Map").msgclass + Type::Aggregate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate").msgclass + Type::Aggregate::Sum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.Sum").msgclass + Type::Aggregate::Max = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.Max").msgclass + Type::Aggregate::Min = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.Min").msgclass + Type::Aggregate::HyperLogLogPlusPlusUniqueCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb new file mode 100644 index 000000000000..a38244a77770 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/bigtable/v2/bigtable" +require "google/cloud/bigtable/v2/version" + +module Google + module Cloud + module Bigtable + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/bigtable/v2" + # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/bigtable/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb new file mode 100644 index 000000000000..f7e9d3337d0b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigtable/v2/version" + +require "google/cloud/bigtable/v2/bigtable/credentials" +require "google/cloud/bigtable/v2/bigtable/paths" +require "google/cloud/bigtable/v2/bigtable/client" + +module Google + module Cloud + module Bigtable + module V2 + ## + # Service for reading from and writing to existing Bigtable tables. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/bigtable/v2/bigtable" + # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + module Bigtable + end + end + end + end +end + +helper_path = ::File.join __dir__, "bigtable", "helpers.rb" +require "google/cloud/bigtable/v2/bigtable/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb new file mode 100644 index 000000000000..3892f835ca57 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb @@ -0,0 +1,1820 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigtable/v2/bigtable_pb" + +module Google + module Cloud + module Bigtable + module V2 + module Bigtable + ## + # Client for the Bigtable service. + # + # Service for reading from and writing to existing Bigtable tables. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "bigtable.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :bigtable_stub + + ## + # Configure the Bigtable Client class. + # + # See {::Google::Cloud::Bigtable::V2::Bigtable::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Bigtable clients + # ::Google::Cloud::Bigtable::V2::Bigtable::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", "Bigtable", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.read_rows.timeout = 43_200.0 + + default_config.rpcs.sample_row_keys.timeout = 60.0 + + default_config.rpcs.mutate_row.timeout = 60.0 + default_config.rpcs.mutate_row.retry_policy = { + initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4] + } + + default_config.rpcs.mutate_rows.timeout = 600.0 + + default_config.rpcs.check_and_mutate_row.timeout = 20.0 + + default_config.rpcs.read_modify_write_row.timeout = 20.0 + + default_config.rpcs.generate_initial_change_stream_partitions.timeout = 60.0 + + default_config.rpcs.read_change_stream.timeout = 43_200.0 + + default_config.rpcs.execute_query.timeout = 43_200.0 + default_config.rpcs.execute_query.retry_policy = { + initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Bigtable 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::Bigtable::V2::Bigtable::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 + @bigtable_stub.universe_domain + end + + ## + # Create a new Bigtable client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Bigtable 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/bigtable/v2/bigtable_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 + + @bigtable_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Bigtable::V2::Bigtable::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 + ) + + @bigtable_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @bigtable_stub.logger + end + + # Service calls + + ## + # Streams back the contents of all requested rows in key order, optionally + # applying the same Reader filter to each. Depending on their size, + # rows and cells may be broken up across multiple responses, but + # atomicity of each row will still be preserved. See the + # ReadRowsResponse documentation for details. + # + # @overload read_rows(request, options = nil) + # Pass arguments to `read_rows` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::ReadRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::ReadRowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload read_rows(table_name: nil, authorized_view_name: nil, materialized_view_name: nil, app_profile_id: nil, rows: nil, filter: nil, rows_limit: nil, request_stats_view: nil, reversed: nil) + # Pass arguments to `read_rows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Optional. The unique name of the table from which to read. + # + # Values are of the form + # `projects//instances//tables/`. + # @param authorized_view_name [::String] + # Optional. The unique name of the AuthorizedView from which to read. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @param materialized_view_name [::String] + # Optional. The unique name of the MaterializedView from which to read. + # + # Values are of the form + # `projects//instances//materializedViews/`. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @param rows [::Google::Cloud::Bigtable::V2::RowSet, ::Hash] + # The row keys and/or ranges to read sequentially. If not specified, reads + # from all rows. + # @param filter [::Google::Cloud::Bigtable::V2::RowFilter, ::Hash] + # The filter to apply to the contents of the specified row(s). If unset, + # reads the entirety of each row. + # @param rows_limit [::Integer] + # The read will stop after committing to N rows' worth of results. The + # default (zero) is to return all results. + # @param request_stats_view [::Google::Cloud::Bigtable::V2::ReadRowsRequest::RequestStatsView] + # The view into RequestStats, as described above. + # @param reversed [::Boolean] + # Experimental API - Please note that this API is currently experimental + # and can change in the future. + # + # Return rows in lexiographical descending order of the row keys. The row + # contents will not be affected by this flag. + # + # Example result set: + # + # [ + # {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + # {key: "k1", "f:col1": "v2", "f:col2": "v2"} + # ] + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::ReadRowsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigtable::V2::ReadRowsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::ReadRowsRequest.new + # + # # Call the read_rows method to start streaming. + # output = client.read_rows request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigtable::V2::ReadRowsResponse + # output.each do |current_response| + # p current_response + # end + # + def read_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ReadRowsRequest + + # Converts hash 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.read_rows.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::Bigtable::V2::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.table_name && + %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) + header_params["table_name"] = request.table_name + end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + if request.materialized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+)(?:/.*)?$}.match request.materialized_view_name + if regex_match + header_params["name"] = regex_match["name".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.read_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.read_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :read_rows, 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 + + ## + # Returns a sample of row keys in the table. The returned row keys will + # delimit contiguous sections of the table of approximately equal size, + # which can be used to break up the data for distributed tasks like + # mapreduces. + # + # @overload sample_row_keys(request, options = nil) + # Pass arguments to `sample_row_keys` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::SampleRowKeysRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::SampleRowKeysRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload sample_row_keys(table_name: nil, authorized_view_name: nil, materialized_view_name: nil, app_profile_id: nil) + # Pass arguments to `sample_row_keys` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Optional. The unique name of the table from which to sample row keys. + # + # Values are of the form + # `projects//instances//tables/
`. + # @param authorized_view_name [::String] + # Optional. The unique name of the AuthorizedView from which to sample row + # keys. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @param materialized_view_name [::String] + # Optional. The unique name of the MaterializedView from which to read. + # + # Values are of the form + # `projects//instances//materializedViews/`. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::SampleRowKeysResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigtable::V2::SampleRowKeysResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new + # + # # Call the sample_row_keys method to start streaming. + # output = client.sample_row_keys request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse + # output.each do |current_response| + # p current_response + # end + # + def sample_row_keys request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest + + # Converts hash 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.sample_row_keys.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::Bigtable::V2::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.table_name && + %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) + header_params["table_name"] = request.table_name + end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + if request.materialized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+)(?:/.*)?$}.match request.materialized_view_name + if regex_match + header_params["name"] = regex_match["name".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.sample_row_keys.timeout, + metadata: metadata, + retry_policy: @config.rpcs.sample_row_keys.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :sample_row_keys, 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 + + ## + # Mutates a row atomically. Cells already present in the row are left + # unchanged unless explicitly changed by `mutation`. + # + # @overload mutate_row(request, options = nil) + # Pass arguments to `mutate_row` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::MutateRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::MutateRowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, mutations: nil, idempotency: nil) + # Pass arguments to `mutate_row` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Optional. The unique name of the table to which the mutation should be + # applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @param authorized_view_name [::String] + # Optional. The unique name of the AuthorizedView to which the mutation + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @param row_key [::String] + # Required. The key of the row to which the mutation should be applied. + # @param mutations [::Array<::Google::Cloud::Bigtable::V2::Mutation, ::Hash>] + # Required. Changes to be atomically applied to the specified row. Entries + # are applied in order, meaning that earlier mutations can be masked by later + # ones. Must contain at least one entry and at most 100000. + # @param idempotency [::Google::Cloud::Bigtable::V2::Idempotency, ::Hash] + # If set consistently across retries, prevents this mutation from being + # double applied to aggregate column families within a 15m window. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigtable::V2::MutateRowResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigtable::V2::MutateRowResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::MutateRowRequest.new + # + # # Call the mutate_row method. + # result = client.mutate_row request + # + # # The returned object is of type Google::Cloud::Bigtable::V2::MutateRowResponse. + # p result + # + def mutate_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::MutateRowRequest + + # Converts hash 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.mutate_row.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::Bigtable::V2::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.table_name && + %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) + header_params["table_name"] = request.table_name + end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :mutate_row, 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 + + ## + # Mutates multiple rows in a batch. Each individual row is mutated + # atomically as in MutateRow, but the entire batch is not executed + # atomically. + # + # @overload mutate_rows(request, options = nil) + # Pass arguments to `mutate_rows` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::MutateRowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::MutateRowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload mutate_rows(table_name: nil, authorized_view_name: nil, app_profile_id: nil, entries: nil) + # Pass arguments to `mutate_rows` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Optional. The unique name of the table to which the mutations should be + # applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @param authorized_view_name [::String] + # Optional. The unique name of the AuthorizedView to which the mutations + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @param entries [::Array<::Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry, ::Hash>] + # Required. The row keys and corresponding mutations to be applied in bulk. + # Each entry is applied as an atomic mutation, but the entries may be + # applied in arbitrary order (even between entries for the same row). + # At least one entry must be specified, and in total the entries can + # contain at most 100000 mutations. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::MutateRowsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigtable::V2::MutateRowsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::MutateRowsRequest.new + # + # # Call the mutate_rows method to start streaming. + # output = client.mutate_rows request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigtable::V2::MutateRowsResponse + # output.each do |current_response| + # p current_response + # end + # + def mutate_rows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::MutateRowsRequest + + # Converts hash 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.mutate_rows.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::Bigtable::V2::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.table_name && + %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) + header_params["table_name"] = request.table_name + end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.mutate_rows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.mutate_rows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :mutate_rows, 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 + + ## + # Mutates a row atomically based on the output of a predicate Reader filter. + # + # @overload check_and_mutate_row(request, options = nil) + # Pass arguments to `check_and_mutate_row` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload check_and_mutate_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, predicate_filter: nil, true_mutations: nil, false_mutations: nil) + # Pass arguments to `check_and_mutate_row` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Optional. The unique name of the table to which the conditional mutation + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @param authorized_view_name [::String] + # Optional. The unique name of the AuthorizedView to which the conditional + # mutation should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @param row_key [::String] + # Required. The key of the row to which the conditional mutation should be + # applied. + # @param predicate_filter [::Google::Cloud::Bigtable::V2::RowFilter, ::Hash] + # The filter to be applied to the contents of the specified row. Depending + # on whether or not any results are yielded, either `true_mutations` or + # `false_mutations` will be executed. If unset, checks that the row contains + # any values at all. + # @param true_mutations [::Array<::Google::Cloud::Bigtable::V2::Mutation, ::Hash>] + # Changes to be atomically applied to the specified row if `predicate_filter` + # yields at least one cell when applied to `row_key`. Entries are applied in + # order, meaning that earlier mutations can be masked by later ones. + # Must contain at least one entry if `false_mutations` is empty, and at most + # 100000. + # @param false_mutations [::Array<::Google::Cloud::Bigtable::V2::Mutation, ::Hash>] + # Changes to be atomically applied to the specified row if `predicate_filter` + # does not yield any cells when applied to `row_key`. Entries are applied in + # order, meaning that earlier mutations can be masked by later ones. + # Must contain at least one entry if `true_mutations` is empty, and at most + # 100000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new + # + # # Call the check_and_mutate_row method. + # result = client.check_and_mutate_row request + # + # # The returned object is of type Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse. + # p result + # + def check_and_mutate_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest + + # Converts hash 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.check_and_mutate_row.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::Bigtable::V2::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.table_name && + %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) + header_params["table_name"] = request.table_name + end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.check_and_mutate_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.check_and_mutate_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :check_and_mutate_row, 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 + + ## + # Warm up associated instance metadata for this connection. + # This call is not required but may be useful for connection keep-alive. + # + # @overload ping_and_warm(request, options = nil) + # Pass arguments to `ping_and_warm` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::PingAndWarmRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::PingAndWarmRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload ping_and_warm(name: nil, app_profile_id: nil) + # Pass arguments to `ping_and_warm` via keyword arguments. Note that at + # least one keyword argument is 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 unique name of the instance to check permissions for as well + # as respond. Values are of the form + # `projects//instances/`. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigtable::V2::PingAndWarmResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigtable::V2::PingAndWarmResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::PingAndWarmRequest.new + # + # # Call the ping_and_warm method. + # result = client.ping_and_warm request + # + # # The returned object is of type Google::Cloud::Bigtable::V2::PingAndWarmResponse. + # p result + # + def ping_and_warm request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::PingAndWarmRequest + + # Converts hash 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.ping_and_warm.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::Bigtable::V2::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 && + %r{^projects/[^/]+/instances/[^/]+/?$}.match?(request.name) + header_params["name"] = request.name + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.ping_and_warm.timeout, + metadata: metadata, + retry_policy: @config.rpcs.ping_and_warm.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :ping_and_warm, 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 + + ## + # Modifies a row atomically on the server. The method reads the latest + # existing timestamp and value from the specified columns and writes a new + # entry based on pre-defined read/modify/write rules. The new value for the + # timestamp is the greater of the existing timestamp or the current server + # time. The method returns the new contents of all modified cells. + # + # @overload read_modify_write_row(request, options = nil) + # Pass arguments to `read_modify_write_row` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload read_modify_write_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, rules: nil) + # Pass arguments to `read_modify_write_row` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Optional. The unique name of the table to which the read/modify/write rules + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @param authorized_view_name [::String] + # Optional. The unique name of the AuthorizedView to which the + # read/modify/write rules should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @param row_key [::String] + # Required. The key of the row to which the read/modify/write rules should be + # applied. + # @param rules [::Array<::Google::Cloud::Bigtable::V2::ReadModifyWriteRule, ::Hash>] + # Required. Rules specifying how the specified row's contents are to be + # transformed into writes. Entries are applied in order, meaning that earlier + # rules will affect the results of later ones. At least one entry must be + # specified, and there can be at most 100000 rules. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new + # + # # Call the read_modify_write_row method. + # result = client.read_modify_write_row request + # + # # The returned object is of type Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse. + # p result + # + def read_modify_write_row request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest + + # Converts hash 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.read_modify_write_row.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::Bigtable::V2::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.table_name && + %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) + header_params["table_name"] = request.table_name + end + if request.authorized_view_name + regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name + if regex_match + header_params["table_name"] = regex_match["table_name".to_s] + end + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.read_modify_write_row.timeout, + metadata: metadata, + retry_policy: @config.rpcs.read_modify_write_row.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :read_modify_write_row, 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 + + ## + # Returns the current list of partitions that make up the table's + # change stream. The union of partitions will cover the entire keyspace. + # Partitions can be read with `ReadChangeStream`. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. + # + # @overload generate_initial_change_stream_partitions(request, options = nil) + # Pass arguments to `generate_initial_change_stream_partitions` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_initial_change_stream_partitions(table_name: nil, app_profile_id: nil) + # Pass arguments to `generate_initial_change_stream_partitions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Required. The unique name of the table from which to get change stream + # partitions. Values are of the form + # `projects//instances//tables/
`. + # Change streaming must be enabled on the table. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # Single cluster routing must be configured on the profile. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new + # + # # Call the generate_initial_change_stream_partitions method to start streaming. + # output = client.generate_initial_change_stream_partitions request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse + # output.each do |current_response| + # p current_response + # end + # + def generate_initial_change_stream_partitions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest + + # Converts hash 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_initial_change_stream_partitions.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::Bigtable::V2::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.table_name + header_params["table_name"] = request.table_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_initial_change_stream_partitions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_initial_change_stream_partitions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :generate_initial_change_stream_partitions, 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 + + ## + # Reads changes from a table's change stream. Changes will + # reflect both user-initiated mutations and mutations that are caused by + # garbage collection. + # NOTE: This API is only intended to be used by Apache Beam BigtableIO. + # + # @overload read_change_stream(request, options = nil) + # Pass arguments to `read_change_stream` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload read_change_stream(table_name: nil, app_profile_id: nil, partition: nil, start_time: nil, continuation_tokens: nil, end_time: nil, heartbeat_duration: nil) + # Pass arguments to `read_change_stream` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param table_name [::String] + # Required. The unique name of the table from which to read a change stream. + # Values are of the form + # `projects//instances//tables/
`. + # Change streaming must be enabled on the table. + # @param app_profile_id [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # Single cluster routing must be configured on the profile. + # @param partition [::Google::Cloud::Bigtable::V2::StreamPartition, ::Hash] + # The partition to read changes from. + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Start reading the stream at the specified timestamp. This timestamp must + # be within the change stream retention period, less than or equal to the + # current time, and after change stream creation, whichever is greater. + # This value is inclusive and will be truncated to microsecond granularity. + # + # Note: The following parameters are mutually exclusive: `start_time`, `continuation_tokens`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param continuation_tokens [::Google::Cloud::Bigtable::V2::StreamContinuationTokens, ::Hash] + # Tokens that describe how to resume reading a stream where reading + # previously left off. If specified, changes will be read starting at the + # the position. Tokens are delivered on the stream as part of `Heartbeat` + # and `CloseStream` messages. + # + # If a single token is provided, the token's partition must exactly match + # the request's partition. If multiple tokens are provided, as in the case + # of a partition merge, the union of the token partitions must exactly + # cover the request's partition. Otherwise, INVALID_ARGUMENT will be + # returned. + # + # Note: The following parameters are mutually exclusive: `continuation_tokens`, `start_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # If specified, OK will be returned when the stream advances beyond + # this time. Otherwise, changes will be continuously delivered on the stream. + # This value is inclusive and will be truncated to microsecond granularity. + # @param heartbeat_duration [::Google::Protobuf::Duration, ::Hash] + # If specified, the duration between `Heartbeat` messages on the stream. + # Otherwise, defaults to 5 seconds. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new + # + # # Call the read_change_stream method to start streaming. + # output = client.read_change_stream request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse + # output.each do |current_response| + # p current_response + # end + # + def read_change_stream request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest + + # Converts hash 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.read_change_stream.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::Bigtable::V2::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.table_name + header_params["table_name"] = request.table_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.read_change_stream.timeout, + metadata: metadata, + retry_policy: @config.rpcs.read_change_stream.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :read_change_stream, 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 + + ## + # Prepares a GoogleSQL query for execution on a particular Bigtable instance. + # + # @overload prepare_query(request, options = nil) + # Pass arguments to `prepare_query` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::PrepareQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::PrepareQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload prepare_query(instance_name: nil, app_profile_id: nil, query: nil, proto_format: nil, param_types: nil) + # Pass arguments to `prepare_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance_name [::String] + # Required. The unique name of the instance against which the query should be + # executed. + # Values are of the form `projects//instances/` + # @param app_profile_id [::String] + # Optional. This value specifies routing for preparing the query. Note that + # this `app_profile_id` is only used for preparing the query. The actual + # query execution will use the app profile specified in the + # `ExecuteQueryRequest`. If not specified, the `default` application profile + # will be used. + # @param query [::String] + # Required. The query string. + # @param proto_format [::Google::Cloud::Bigtable::V2::ProtoFormat, ::Hash] + # Protocol buffer format as described by ProtoSchema and ProtoRows + # messages. + # @param param_types [::Hash{::String => ::Google::Cloud::Bigtable::V2::Type, ::Hash}] + # Required. `param_types` is a map of parameter identifier strings to their + # `Type`s. + # + # In query string, a parameter placeholder consists of the + # `@` character followed by the parameter name (for example, `@firstName`) in + # the query string. + # + # For example, if param_types["firstName"] = Bytes then @firstName will be a + # query parameter of type Bytes. The specific `Value` to be used for the + # query execution must be sent in `ExecuteQueryRequest` in the `params` map. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Bigtable::V2::PrepareQueryResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Bigtable::V2::PrepareQueryResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::PrepareQueryRequest.new + # + # # Call the prepare_query method. + # result = client.prepare_query request + # + # # The returned object is of type Google::Cloud::Bigtable::V2::PrepareQueryResponse. + # p result + # + def prepare_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::PrepareQueryRequest + + # Converts hash 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.prepare_query.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::Bigtable::V2::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.instance_name && + %r{^projects/[^/]+/instances/[^/]+/?$}.match?(request.instance_name) + header_params["name"] = request.instance_name + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.prepare_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.prepare_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :prepare_query, 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 + + ## + # Executes a SQL query against a particular Bigtable instance. + # + # @overload execute_query(request, options = nil) + # Pass arguments to `execute_query` via a request object, either of type + # {::Google::Cloud::Bigtable::V2::ExecuteQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Bigtable::V2::ExecuteQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload execute_query(instance_name: nil, app_profile_id: nil, query: nil, prepared_query: nil, proto_format: nil, resume_token: nil, params: nil) + # Pass arguments to `execute_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param instance_name [::String] + # Required. The unique name of the instance against which the query should be + # executed. + # Values are of the form `projects//instances/` + # @param app_profile_id [::String] + # Optional. This value specifies routing for replication. If not specified, + # the `default` application profile will be used. + # @param query [::String] + # Required. The query string. + # + # Exactly one of `query` and `prepared_query` is required. Setting both + # or neither is an `INVALID_ARGUMENT`. + # @param prepared_query [::String] + # A prepared query that was returned from `PrepareQueryResponse`. + # + # Exactly one of `query` and `prepared_query` is required. Setting both + # or neither is an `INVALID_ARGUMENT`. + # + # Setting this field also places restrictions on several other fields: + # - `data_format` must be empty. + # - `validate_only` must be false. + # - `params` must match the `param_types` set in the `PrepareQueryRequest`. + # @param proto_format [::Google::Cloud::Bigtable::V2::ProtoFormat, ::Hash] + # Protocol buffer format as described by ProtoSchema and ProtoRows + # messages. + # @param resume_token [::String] + # Optional. If this request is resuming a previously interrupted query + # execution, `resume_token` should be copied from the last + # PartialResultSet yielded before the interruption. Doing this + # enables the query execution to resume where the last one left + # off. + # The rest of the request parameters must exactly match the + # request that yielded this token. Otherwise the request will fail. + # @param params [::Hash{::String => ::Google::Cloud::Bigtable::V2::Value, ::Hash}] + # Required. params contains string type keys and Bigtable type values that + # bind to placeholders in the query string. In query string, a parameter + # placeholder consists of the + # `@` character followed by the parameter name (for example, `@firstName`) in + # the query string. + # + # For example, if + # `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + # then `@firstName` will be replaced with googlesql bytes value "foo" in the + # query string during query evaluation. + # + # If `Value.kind` is not set, the value is treated as a NULL value of the + # given type. For example, if + # `params["firstName"] = type {string_type {}}` + # then `@firstName` will be replaced with googlesql null string. + # + # If `query` is set, any empty `Value.type` in the map will be rejected with + # `INVALID_ARGUMENT`. + # + # If `prepared_query` is set, any empty `Value.type` in the map will be + # inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + # `Value.type` must match the corresponding `param_types` entry, or be + # rejected with `INVALID_ARGUMENT`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::ExecuteQueryResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Bigtable::V2::ExecuteQueryResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/bigtable/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new + # + # # Call the execute_query method to start streaming. + # output = client.execute_query request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse + # output.each do |current_response| + # p current_response + # end + # + def execute_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest + + # Converts hash 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.execute_query.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::Bigtable::V2::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.instance_name && + %r{^projects/[^/]+/instances/[^/]+/?$}.match?(request.instance_name) + header_params["name"] = request.instance_name + end + if request.app_profile_id && !request.app_profile_id.empty? + header_params["app_profile_id"] = request.app_profile_id + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.execute_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @bigtable_stub.call_rpc :execute_query, 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 Bigtable API. + # + # This class represents the configuration for Bigtable, + # 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::Bigtable::V2::Bigtable::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 + # # read_rows to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.read_rows.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.read_rows.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::Bigtable::V2::Bigtable::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 = "bigtable.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 Bigtable 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 `read_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :read_rows + ## + # RPC-specific configuration for `sample_row_keys` + # @return [::Gapic::Config::Method] + # + attr_reader :sample_row_keys + ## + # RPC-specific configuration for `mutate_row` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_row + ## + # RPC-specific configuration for `mutate_rows` + # @return [::Gapic::Config::Method] + # + attr_reader :mutate_rows + ## + # RPC-specific configuration for `check_and_mutate_row` + # @return [::Gapic::Config::Method] + # + attr_reader :check_and_mutate_row + ## + # RPC-specific configuration for `ping_and_warm` + # @return [::Gapic::Config::Method] + # + attr_reader :ping_and_warm + ## + # RPC-specific configuration for `read_modify_write_row` + # @return [::Gapic::Config::Method] + # + attr_reader :read_modify_write_row + ## + # RPC-specific configuration for `generate_initial_change_stream_partitions` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_initial_change_stream_partitions + ## + # RPC-specific configuration for `read_change_stream` + # @return [::Gapic::Config::Method] + # + attr_reader :read_change_stream + ## + # RPC-specific configuration for `prepare_query` + # @return [::Gapic::Config::Method] + # + attr_reader :prepare_query + ## + # RPC-specific configuration for `execute_query` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_query + + # @private + def initialize parent_rpcs = nil + read_rows_config = parent_rpcs.read_rows if parent_rpcs.respond_to? :read_rows + @read_rows = ::Gapic::Config::Method.new read_rows_config + sample_row_keys_config = parent_rpcs.sample_row_keys if parent_rpcs.respond_to? :sample_row_keys + @sample_row_keys = ::Gapic::Config::Method.new sample_row_keys_config + mutate_row_config = parent_rpcs.mutate_row if parent_rpcs.respond_to? :mutate_row + @mutate_row = ::Gapic::Config::Method.new mutate_row_config + mutate_rows_config = parent_rpcs.mutate_rows if parent_rpcs.respond_to? :mutate_rows + @mutate_rows = ::Gapic::Config::Method.new mutate_rows_config + check_and_mutate_row_config = parent_rpcs.check_and_mutate_row if parent_rpcs.respond_to? :check_and_mutate_row + @check_and_mutate_row = ::Gapic::Config::Method.new check_and_mutate_row_config + ping_and_warm_config = parent_rpcs.ping_and_warm if parent_rpcs.respond_to? :ping_and_warm + @ping_and_warm = ::Gapic::Config::Method.new ping_and_warm_config + read_modify_write_row_config = parent_rpcs.read_modify_write_row if parent_rpcs.respond_to? :read_modify_write_row + @read_modify_write_row = ::Gapic::Config::Method.new read_modify_write_row_config + generate_initial_change_stream_partitions_config = parent_rpcs.generate_initial_change_stream_partitions if parent_rpcs.respond_to? :generate_initial_change_stream_partitions + @generate_initial_change_stream_partitions = ::Gapic::Config::Method.new generate_initial_change_stream_partitions_config + read_change_stream_config = parent_rpcs.read_change_stream if parent_rpcs.respond_to? :read_change_stream + @read_change_stream = ::Gapic::Config::Method.new read_change_stream_config + prepare_query_config = parent_rpcs.prepare_query if parent_rpcs.respond_to? :prepare_query + @prepare_query = ::Gapic::Config::Method.new prepare_query_config + execute_query_config = parent_rpcs.execute_query if parent_rpcs.respond_to? :execute_query + @execute_query = ::Gapic::Config::Method.new execute_query_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb new file mode 100644 index 000000000000..d211adfc3c1c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Bigtable + module V2 + module Bigtable + # Credentials for the Bigtable API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/bigtable.data", + "https://www.googleapis.com/auth/bigtable.data.readonly", + "https://www.googleapis.com/auth/cloud-bigtable.data", + "https://www.googleapis.com/auth/cloud-bigtable.data.readonly", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + self.env_vars = [ + "BIGTABLE_CREDENTIALS", + "BIGTABLE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BIGTABLE_CREDENTIALS_JSON", + "BIGTABLE_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-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb new file mode 100644 index 000000000000..4a3c0a760166 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb @@ -0,0 +1,109 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigtable + module V2 + module Bigtable + # Path helper methods for the Bigtable API. + module Paths + ## + # Create a fully-qualified AuthorizedView resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` + # + # @param project [String] + # @param instance [String] + # @param table [String] + # @param authorized_view [String] + # + # @return [::String] + def authorized_view_path project:, instance:, table:, authorized_view: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/tables/#{table}/authorizedViews/#{authorized_view}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}` + # + # @param project [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/instances/#{instance}" + end + + ## + # Create a fully-qualified MaterializedView resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/materializedViews/{materialized_view}` + # + # @param project [String] + # @param instance [String] + # @param materialized_view [String] + # + # @return [::String] + def materialized_view_path project:, instance:, materialized_view: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/materializedViews/#{materialized_view}" + end + + ## + # Create a fully-qualified Table resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/instances/{instance}/tables/{table}` + # + # @param project [String] + # @param instance [String] + # @param table [String] + # + # @return [::String] + def table_path project:, instance:, table: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/instances/#{instance}/tables/#{table}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb new file mode 100644 index 000000000000..4e494b427bcf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/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 Bigtable + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md new file mode 100644 index 000000000000..3f339667be2d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Bigtable V2 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-bigtable-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/
` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb new file mode 100644 index 000000000000..b90f060b8eb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb @@ -0,0 +1,940 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigtable + module V2 + # Request message for Bigtable.ReadRows. + # @!attribute [rw] table_name + # @return [::String] + # Optional. The unique name of the table from which to read. + # + # Values are of the form + # `projects//instances//tables/
`. + # @!attribute [rw] authorized_view_name + # @return [::String] + # Optional. The unique name of the AuthorizedView from which to read. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @!attribute [rw] materialized_view_name + # @return [::String] + # Optional. The unique name of the MaterializedView from which to read. + # + # Values are of the form + # `projects//instances//materializedViews/`. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @!attribute [rw] rows + # @return [::Google::Cloud::Bigtable::V2::RowSet] + # The row keys and/or ranges to read sequentially. If not specified, reads + # from all rows. + # @!attribute [rw] filter + # @return [::Google::Cloud::Bigtable::V2::RowFilter] + # The filter to apply to the contents of the specified row(s). If unset, + # reads the entirety of each row. + # @!attribute [rw] rows_limit + # @return [::Integer] + # The read will stop after committing to N rows' worth of results. The + # default (zero) is to return all results. + # @!attribute [rw] request_stats_view + # @return [::Google::Cloud::Bigtable::V2::ReadRowsRequest::RequestStatsView] + # The view into RequestStats, as described above. + # @!attribute [rw] reversed + # @return [::Boolean] + # Experimental API - Please note that this API is currently experimental + # and can change in the future. + # + # Return rows in lexiographical descending order of the row keys. The row + # contents will not be affected by this flag. + # + # Example result set: + # + # [ + # {key: "k2", "f:col1": "v1", "f:col2": "v1"}, + # {key: "k1", "f:col1": "v2", "f:col2": "v2"} + # ] + class ReadRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The desired view into RequestStats that should be returned in the response. + # + # See also: RequestStats message. + module RequestStatsView + # The default / unset value. The API will default to the NONE option below. + REQUEST_STATS_VIEW_UNSPECIFIED = 0 + + # Do not include any RequestStats in the response. This will leave the + # RequestStats embedded message unset in the response. + REQUEST_STATS_NONE = 1 + + # Include the full set of available RequestStats in the response, + # applicable to this read. + REQUEST_STATS_FULL = 2 + end + end + + # Response message for Bigtable.ReadRows. + # @!attribute [rw] chunks + # @return [::Array<::Google::Cloud::Bigtable::V2::ReadRowsResponse::CellChunk>] + # A collection of a row's contents as part of the read request. + # @!attribute [rw] last_scanned_row_key + # @return [::String] + # Optionally the server might return the row key of the last row it + # has scanned. The client can use this to construct a more + # efficient retry request if needed: any row keys or portions of + # ranges less than this row key can be dropped from the request. + # This is primarily useful for cases where the server has read a + # lot of data that was filtered out since the last committed row + # key, allowing the client to skip that work on a retry. + # @!attribute [rw] request_stats + # @return [::Google::Cloud::Bigtable::V2::RequestStats] + # If requested, return enhanced query performance statistics. The field + # request_stats is empty in a streamed response unless the ReadRowsResponse + # message contains request_stats in the last message of the stream. Always + # returned when requested, even when the read request returns an empty + # response. + class ReadRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies a piece of a row's contents returned as part of the read + # response stream. + # @!attribute [rw] row_key + # @return [::String] + # The row key for this chunk of data. If the row key is empty, + # this CellChunk is a continuation of the same row as the previous + # CellChunk in the response stream, even if that CellChunk was in a + # previous ReadRowsResponse message. + # @!attribute [rw] family_name + # @return [::Google::Protobuf::StringValue] + # The column family name for this chunk of data. If this message + # is not present this CellChunk is a continuation of the same column + # family as the previous CellChunk. The empty string can occur as a + # column family name in a response so clients must check + # explicitly for the presence of this message, not just for + # `family_name.value` being non-empty. + # @!attribute [rw] qualifier + # @return [::Google::Protobuf::BytesValue] + # The column qualifier for this chunk of data. If this message + # is not present, this CellChunk is a continuation of the same column + # as the previous CellChunk. Column qualifiers may be empty so + # clients must check for the presence of this message, not just + # for `qualifier.value` being non-empty. + # @!attribute [rw] timestamp_micros + # @return [::Integer] + # The cell's stored timestamp, which also uniquely identifies it + # within its column. Values are always expressed in + # microseconds, but individual tables may set a coarser + # granularity to further restrict the allowed values. For + # example, a table which specifies millisecond granularity will + # only allow values of `timestamp_micros` which are multiples of + # 1000. Timestamps are only set in the first CellChunk per cell + # (for cells split into multiple chunks). + # @!attribute [rw] labels + # @return [::Array<::String>] + # Labels applied to the cell by a + # {::Google::Cloud::Bigtable::V2::RowFilter RowFilter}. Labels are only set + # on the first CellChunk per cell. + # @!attribute [rw] value + # @return [::String] + # The value stored in the cell. Cell values can be split across + # multiple CellChunks. In that case only the value field will be + # set in CellChunks after the first: the timestamp and labels + # will only be present in the first CellChunk, even if the first + # CellChunk came in a previous ReadRowsResponse. + # @!attribute [rw] value_size + # @return [::Integer] + # If this CellChunk is part of a chunked cell value and this is + # not the final chunk of that cell, value_size will be set to the + # total length of the cell value. The client can use this size + # to pre-allocate memory to hold the full cell value. + # @!attribute [rw] reset_row + # @return [::Boolean] + # Indicates that the client should drop all previous chunks for + # `row_key`, as it will be re-read from the beginning. + # + # Note: The following fields are mutually exclusive: `reset_row`, `commit_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] commit_row + # @return [::Boolean] + # Indicates that the client can safely process all previous chunks for + # `row_key`, as its data has been fully read. + # + # Note: The following fields are mutually exclusive: `commit_row`, `reset_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CellChunk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for Bigtable.SampleRowKeys. + # @!attribute [rw] table_name + # @return [::String] + # Optional. The unique name of the table from which to sample row keys. + # + # Values are of the form + # `projects//instances//tables/
`. + # @!attribute [rw] authorized_view_name + # @return [::String] + # Optional. The unique name of the AuthorizedView from which to sample row + # keys. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @!attribute [rw] materialized_view_name + # @return [::String] + # Optional. The unique name of the MaterializedView from which to read. + # + # Values are of the form + # `projects//instances//materializedViews/`. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + class SampleRowKeysRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for Bigtable.SampleRowKeys. + # @!attribute [rw] row_key + # @return [::String] + # Sorted streamed sequence of sample row keys in the table. The table might + # have contents before the first row key in the list and after the last one, + # but a key containing the empty string indicates "end of table" and will be + # the last response given, if present. + # Note that row keys in this list may not have ever been written to or read + # from, and users should therefore not make any assumptions about the row key + # structure that are specific to their use case. + # @!attribute [rw] offset_bytes + # @return [::Integer] + # Approximate total storage space used by all rows in the table which precede + # `row_key`. Buffering the contents of all rows between two subsequent + # samples would require space roughly equal to the difference in their + # `offset_bytes` fields. + class SampleRowKeysResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for Bigtable.MutateRow. + # @!attribute [rw] table_name + # @return [::String] + # Optional. The unique name of the table to which the mutation should be + # applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @!attribute [rw] authorized_view_name + # @return [::String] + # Optional. The unique name of the AuthorizedView to which the mutation + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @!attribute [rw] row_key + # @return [::String] + # Required. The key of the row to which the mutation should be applied. + # @!attribute [rw] mutations + # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] + # Required. Changes to be atomically applied to the specified row. Entries + # are applied in order, meaning that earlier mutations can be masked by later + # ones. Must contain at least one entry and at most 100000. + # @!attribute [rw] idempotency + # @return [::Google::Cloud::Bigtable::V2::Idempotency] + # If set consistently across retries, prevents this mutation from being + # double applied to aggregate column families within a 15m window. + class MutateRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for Bigtable.MutateRow. + class MutateRowResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for BigtableService.MutateRows. + # @!attribute [rw] table_name + # @return [::String] + # Optional. The unique name of the table to which the mutations should be + # applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @!attribute [rw] authorized_view_name + # @return [::String] + # Optional. The unique name of the AuthorizedView to which the mutations + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry>] + # Required. The row keys and corresponding mutations to be applied in bulk. + # Each entry is applied as an atomic mutation, but the entries may be + # applied in arbitrary order (even between entries for the same row). + # At least one entry must be specified, and in total the entries can + # contain at most 100000 mutations. + class MutateRowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A mutation for a given row. + # @!attribute [rw] row_key + # @return [::String] + # The key of the row to which the `mutations` should be applied. + # @!attribute [rw] mutations + # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] + # Required. Changes to be atomically applied to the specified row. + # Mutations are applied in order, meaning that earlier mutations can be + # masked by later ones. You must specify at least one mutation. + # @!attribute [rw] idempotency + # @return [::Google::Cloud::Bigtable::V2::Idempotency] + # If set consistently across retries, prevents this mutation from being + # double applied to aggregate column families within a 15m window. + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for BigtableService.MutateRows. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry>] + # One or more results for Entries from the batch request. + # @!attribute [rw] rate_limit_info + # @return [::Google::Cloud::Bigtable::V2::RateLimitInfo] + # Information about how client should limit the rate (QPS). Primirily used by + # supported official Cloud Bigtable clients. If unset, the rate limit info is + # not provided by the server. + class MutateRowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The result of applying a passed mutation in the original request. + # @!attribute [rw] index + # @return [::Integer] + # The index into the original request's `entries` list of the Entry + # for which a result is being reported. + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # The result of the request Entry identified by `index`. + # Depending on how requests are batched during execution, it is possible + # for one Entry to fail due to an error with another Entry. In the event + # that this occurs, the same error will be reported for both entries. + class Entry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Information about how client should adjust the load to Bigtable. + # @!attribute [rw] period + # @return [::Google::Protobuf::Duration] + # Time that clients should wait before adjusting the target rate again. + # If clients adjust rate too frequently, the impact of the previous + # adjustment may not have been taken into account and may + # over-throttle or under-throttle. If clients adjust rate too slowly, they + # will not be responsive to load changes on server side, and may + # over-throttle or under-throttle. + # @!attribute [rw] factor + # @return [::Float] + # If it has been at least one `period` since the last load adjustment, the + # client should multiply the current load by this value to get the new target + # load. For example, if the current load is 100 and `factor` is 0.8, the new + # target load should be 80. After adjusting, the client should ignore + # `factor` until another `period` has passed. + # + # The client can measure its load using any unit that's comparable over time. + # For example, QPS can be used as long as each request involves a similar + # amount of work. + class RateLimitInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for Bigtable.CheckAndMutateRow. + # @!attribute [rw] table_name + # @return [::String] + # Optional. The unique name of the table to which the conditional mutation + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @!attribute [rw] authorized_view_name + # @return [::String] + # Optional. The unique name of the AuthorizedView to which the conditional + # mutation should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @!attribute [rw] row_key + # @return [::String] + # Required. The key of the row to which the conditional mutation should be + # applied. + # @!attribute [rw] predicate_filter + # @return [::Google::Cloud::Bigtable::V2::RowFilter] + # The filter to be applied to the contents of the specified row. Depending + # on whether or not any results are yielded, either `true_mutations` or + # `false_mutations` will be executed. If unset, checks that the row contains + # any values at all. + # @!attribute [rw] true_mutations + # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] + # Changes to be atomically applied to the specified row if `predicate_filter` + # yields at least one cell when applied to `row_key`. Entries are applied in + # order, meaning that earlier mutations can be masked by later ones. + # Must contain at least one entry if `false_mutations` is empty, and at most + # 100000. + # @!attribute [rw] false_mutations + # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] + # Changes to be atomically applied to the specified row if `predicate_filter` + # does not yield any cells when applied to `row_key`. Entries are applied in + # order, meaning that earlier mutations can be masked by later ones. + # Must contain at least one entry if `true_mutations` is empty, and at most + # 100000. + class CheckAndMutateRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for Bigtable.CheckAndMutateRow. + # @!attribute [rw] predicate_matched + # @return [::Boolean] + # Whether or not the request's `predicate_filter` yielded any results for + # the specified row. + class CheckAndMutateRowResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for client connection keep-alive and warming. + # @!attribute [rw] name + # @return [::String] + # Required. The unique name of the instance to check permissions for as well + # as respond. Values are of the form + # `projects//instances/`. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + class PingAndWarmRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for Bigtable.PingAndWarm connection keepalive and warming. + class PingAndWarmResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for Bigtable.ReadModifyWriteRow. + # @!attribute [rw] table_name + # @return [::String] + # Optional. The unique name of the table to which the read/modify/write rules + # should be applied. + # + # Values are of the form + # `projects//instances//tables/
`. + # @!attribute [rw] authorized_view_name + # @return [::String] + # Optional. The unique name of the AuthorizedView to which the + # read/modify/write rules should be applied. + # + # Values are of the form + # `projects//instances//tables/
/authorizedViews/`. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # @!attribute [rw] row_key + # @return [::String] + # Required. The key of the row to which the read/modify/write rules should be + # applied. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Bigtable::V2::ReadModifyWriteRule>] + # Required. Rules specifying how the specified row's contents are to be + # transformed into writes. Entries are applied in order, meaning that earlier + # rules will affect the results of later ones. At least one entry must be + # specified, and there can be at most 100000 rules. + class ReadModifyWriteRowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for Bigtable.ReadModifyWriteRow. + # @!attribute [rw] row + # @return [::Google::Cloud::Bigtable::V2::Row] + # A Row containing the new contents of all cells modified by the request. + class ReadModifyWriteRowResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NOTE: This API is intended to be used by Apache Beam BigtableIO. + # Request message for Bigtable.GenerateInitialChangeStreamPartitions. + # @!attribute [rw] table_name + # @return [::String] + # Required. The unique name of the table from which to get change stream + # partitions. Values are of the form + # `projects//instances//tables/
`. + # Change streaming must be enabled on the table. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # Single cluster routing must be configured on the profile. + class GenerateInitialChangeStreamPartitionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NOTE: This API is intended to be used by Apache Beam BigtableIO. + # Response message for Bigtable.GenerateInitialChangeStreamPartitions. + # @!attribute [rw] partition + # @return [::Google::Cloud::Bigtable::V2::StreamPartition] + # A partition of the change stream. + class GenerateInitialChangeStreamPartitionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NOTE: This API is intended to be used by Apache Beam BigtableIO. + # Request message for Bigtable.ReadChangeStream. + # @!attribute [rw] table_name + # @return [::String] + # Required. The unique name of the table from which to read a change stream. + # Values are of the form + # `projects//instances//tables/
`. + # Change streaming must be enabled on the table. + # @!attribute [rw] app_profile_id + # @return [::String] + # This value specifies routing for replication. If not specified, the + # "default" application profile will be used. + # Single cluster routing must be configured on the profile. + # @!attribute [rw] partition + # @return [::Google::Cloud::Bigtable::V2::StreamPartition] + # The partition to read changes from. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start reading the stream at the specified timestamp. This timestamp must + # be within the change stream retention period, less than or equal to the + # current time, and after change stream creation, whichever is greater. + # This value is inclusive and will be truncated to microsecond granularity. + # + # Note: The following fields are mutually exclusive: `start_time`, `continuation_tokens`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] continuation_tokens + # @return [::Google::Cloud::Bigtable::V2::StreamContinuationTokens] + # Tokens that describe how to resume reading a stream where reading + # previously left off. If specified, changes will be read starting at the + # the position. Tokens are delivered on the stream as part of `Heartbeat` + # and `CloseStream` messages. + # + # If a single token is provided, the token's partition must exactly match + # the request's partition. If multiple tokens are provided, as in the case + # of a partition merge, the union of the token partitions must exactly + # cover the request's partition. Otherwise, INVALID_ARGUMENT will be + # returned. + # + # Note: The following fields are mutually exclusive: `continuation_tokens`, `start_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # If specified, OK will be returned when the stream advances beyond + # this time. Otherwise, changes will be continuously delivered on the stream. + # This value is inclusive and will be truncated to microsecond granularity. + # @!attribute [rw] heartbeat_duration + # @return [::Google::Protobuf::Duration] + # If specified, the duration between `Heartbeat` messages on the stream. + # Otherwise, defaults to 5 seconds. + class ReadChangeStreamRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NOTE: This API is intended to be used by Apache Beam BigtableIO. + # Response message for Bigtable.ReadChangeStream. + # @!attribute [rw] data_change + # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::DataChange] + # A mutation to the partition. + # + # Note: The following fields are mutually exclusive: `data_change`, `heartbeat`, `close_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] heartbeat + # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::Heartbeat] + # A periodic heartbeat message. + # + # Note: The following fields are mutually exclusive: `heartbeat`, `data_change`, `close_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] close_stream + # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::CloseStream] + # An indication that the stream should be closed. + # + # Note: The following fields are mutually exclusive: `close_stream`, `data_change`, `heartbeat`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ReadChangeStreamResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A partial or complete mutation. + # @!attribute [rw] chunk_info + # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::MutationChunk::ChunkInfo] + # If set, then the mutation is a `SetCell` with a chunked value across + # multiple messages. + # @!attribute [rw] mutation + # @return [::Google::Cloud::Bigtable::V2::Mutation] + # If this is a continuation of a chunked message (`chunked_value_offset` > + # 0), ignore all fields except the `SetCell`'s value and merge it with + # the previous message by concatenating the value fields. + class MutationChunk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the chunking of this mutation. + # Only `SetCell` mutations can be chunked, and all chunks for a `SetCell` + # will be delivered contiguously with no other mutation types interleaved. + # @!attribute [rw] chunked_value_size + # @return [::Integer] + # The total value size of all the chunks that make up the `SetCell`. + # @!attribute [rw] chunked_value_offset + # @return [::Integer] + # The byte offset of this chunk into the total value size of the + # mutation. + # @!attribute [rw] last_chunk + # @return [::Boolean] + # When true, this is the last chunk of a chunked `SetCell`. + class ChunkInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A message corresponding to one or more mutations to the partition + # being streamed. A single logical `DataChange` message may also be split + # across a sequence of multiple individual messages. Messages other than + # the first in a sequence will only have the `type` and `chunks` fields + # populated, with the final message in the sequence also containing `done` + # set to true. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::DataChange::Type] + # The type of the mutation. + # @!attribute [rw] source_cluster_id + # @return [::String] + # The cluster where the mutation was applied. + # Not set when `type` is `GARBAGE_COLLECTION`. + # @!attribute [rw] row_key + # @return [::String] + # The row key for all mutations that are part of this `DataChange`. + # If the `DataChange` is chunked across multiple messages, then this field + # will only be set for the first message. + # @!attribute [rw] commit_timestamp + # @return [::Google::Protobuf::Timestamp] + # The timestamp at which the mutation was applied on the Bigtable server. + # @!attribute [rw] tiebreaker + # @return [::Integer] + # A value that lets stream consumers reconstruct Bigtable's + # conflict resolution semantics. + # https://cloud.google.com/bigtable/docs/writes#conflict-resolution + # In the event that the same row key, column family, column qualifier, + # timestamp are modified on different clusters at the same + # `commit_timestamp`, the mutation with the larger `tiebreaker` will be the + # one chosen for the eventually consistent state of the system. + # @!attribute [rw] chunks + # @return [::Array<::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::MutationChunk>] + # The mutations associated with this change to the partition. + # May contain complete mutations or chunks of a multi-message chunked + # `DataChange` record. + # @!attribute [rw] done + # @return [::Boolean] + # When true, indicates that the entire `DataChange` has been read + # and the client can safely process the message. + # @!attribute [rw] token + # @return [::String] + # An encoded position for this stream's partition to restart reading from. + # This token is for the StreamPartition from the request. + # @!attribute [rw] estimated_low_watermark + # @return [::Google::Protobuf::Timestamp] + # An estimate of the commit timestamp that is usually lower than or equal + # to any timestamp for a record that will be delivered in the future on the + # stream. It is possible that, under particular circumstances that a future + # record has a timestamp that is lower than a previously seen timestamp. + # For an example usage see + # https://beam.apache.org/documentation/basics/#watermarks + class DataChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of mutation. + module Type + # The type is unspecified. + TYPE_UNSPECIFIED = 0 + + # A user-initiated mutation. + USER = 1 + + # A system-initiated mutation as part of garbage collection. + # https://cloud.google.com/bigtable/docs/garbage-collection + GARBAGE_COLLECTION = 2 + + # This is a continuation of a multi-message change. + CONTINUATION = 3 + end + end + + # A periodic message with information that can be used to checkpoint + # the state of a stream. + # @!attribute [rw] continuation_token + # @return [::Google::Cloud::Bigtable::V2::StreamContinuationToken] + # A token that can be provided to a subsequent `ReadChangeStream` call + # to pick up reading at the current stream position. + # @!attribute [rw] estimated_low_watermark + # @return [::Google::Protobuf::Timestamp] + # An estimate of the commit timestamp that is usually lower than or equal + # to any timestamp for a record that will be delivered in the future on the + # stream. It is possible that, under particular circumstances that a future + # record has a timestamp that is lower than a previously seen timestamp. + # For an example usage see + # https://beam.apache.org/documentation/basics/#watermarks + class Heartbeat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message indicating that the client should stop reading from the stream. + # If status is OK and `continuation_tokens` & `new_partitions` are empty, the + # stream has finished (for example if there was an `end_time` specified). + # If `continuation_tokens` & `new_partitions` are present, then a change in + # partitioning requires the client to open a new stream for each token to + # resume reading. Example: + # + # [B, D) ends + # | + # v + # new_partitions: [A, C) [C, E) + # continuation_tokens.partitions: [B,C) [C,D) + # ^---^ ^---^ + # ^ ^ + # | | + # | StreamContinuationToken 2 + # | + # StreamContinuationToken 1 + # + # To read the new partition [A,C), supply the continuation tokens whose + # ranges cover the new partition, for example ContinuationToken[A,B) & + # ContinuationToken[B,C). + # @!attribute [rw] status + # @return [::Google::Rpc::Status] + # The status of the stream. + # @!attribute [rw] continuation_tokens + # @return [::Array<::Google::Cloud::Bigtable::V2::StreamContinuationToken>] + # If non-empty, contains the information needed to resume reading their + # associated partitions. + # @!attribute [rw] new_partitions + # @return [::Array<::Google::Cloud::Bigtable::V2::StreamPartition>] + # If non-empty, contains the new partitions to start reading from, which + # are related to but not necessarily identical to the partitions for the + # above `continuation_tokens`. + class CloseStream + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request message for Bigtable.ExecuteQuery + # @!attribute [rw] instance_name + # @return [::String] + # Required. The unique name of the instance against which the query should be + # executed. + # Values are of the form `projects//instances/` + # @!attribute [rw] app_profile_id + # @return [::String] + # Optional. This value specifies routing for replication. If not specified, + # the `default` application profile will be used. + # @!attribute [rw] query + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Required. The query string. + # + # Exactly one of `query` and `prepared_query` is required. Setting both + # or neither is an `INVALID_ARGUMENT`. + # @!attribute [rw] prepared_query + # @return [::String] + # A prepared query that was returned from `PrepareQueryResponse`. + # + # Exactly one of `query` and `prepared_query` is required. Setting both + # or neither is an `INVALID_ARGUMENT`. + # + # Setting this field also places restrictions on several other fields: + # - `data_format` must be empty. + # - `validate_only` must be false. + # - `params` must match the `param_types` set in the `PrepareQueryRequest`. + # @!attribute [rw] proto_format + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Bigtable::V2::ProtoFormat] + # Protocol buffer format as described by ProtoSchema and ProtoRows + # messages. + # @!attribute [rw] resume_token + # @return [::String] + # Optional. If this request is resuming a previously interrupted query + # execution, `resume_token` should be copied from the last + # PartialResultSet yielded before the interruption. Doing this + # enables the query execution to resume where the last one left + # off. + # The rest of the request parameters must exactly match the + # request that yielded this token. Otherwise the request will fail. + # @!attribute [rw] params + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigtable::V2::Value}] + # Required. params contains string type keys and Bigtable type values that + # bind to placeholders in the query string. In query string, a parameter + # placeholder consists of the + # `@` character followed by the parameter name (for example, `@firstName`) in + # the query string. + # + # For example, if + # `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` + # then `@firstName` will be replaced with googlesql bytes value "foo" in the + # query string during query evaluation. + # + # If `Value.kind` is not set, the value is treated as a NULL value of the + # given type. For example, if + # `params["firstName"] = type {string_type {}}` + # then `@firstName` will be replaced with googlesql null string. + # + # If `query` is set, any empty `Value.type` in the map will be rejected with + # `INVALID_ARGUMENT`. + # + # If `prepared_query` is set, any empty `Value.type` in the map will be + # inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty + # `Value.type` must match the corresponding `param_types` entry, or be + # rejected with `INVALID_ARGUMENT`. + class ExecuteQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigtable::V2::Value] + class ParamsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for Bigtable.ExecuteQuery + # @!attribute [rw] metadata + # @return [::Google::Cloud::Bigtable::V2::ResultSetMetadata] + # Structure of rows in this response stream. The first (and only the first) + # response streamed from the server will be of this type. + # + # Note: The following fields are mutually exclusive: `metadata`, `results`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] results + # @return [::Google::Cloud::Bigtable::V2::PartialResultSet] + # A partial result set with row data potentially including additional + # instructions on how recent past and future partial responses should be + # interpreted. + # + # Note: The following fields are mutually exclusive: `results`, `metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExecuteQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for Bigtable.PrepareQuery + # @!attribute [rw] instance_name + # @return [::String] + # Required. The unique name of the instance against which the query should be + # executed. + # Values are of the form `projects//instances/` + # @!attribute [rw] app_profile_id + # @return [::String] + # Optional. This value specifies routing for preparing the query. Note that + # this `app_profile_id` is only used for preparing the query. The actual + # query execution will use the app profile specified in the + # `ExecuteQueryRequest`. If not specified, the `default` application profile + # will be used. + # @!attribute [rw] query + # @return [::String] + # Required. The query string. + # @!attribute [rw] proto_format + # @return [::Google::Cloud::Bigtable::V2::ProtoFormat] + # Protocol buffer format as described by ProtoSchema and ProtoRows + # messages. + # @!attribute [rw] param_types + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigtable::V2::Type}] + # Required. `param_types` is a map of parameter identifier strings to their + # `Type`s. + # + # In query string, a parameter placeholder consists of the + # `@` character followed by the parameter name (for example, `@firstName`) in + # the query string. + # + # For example, if param_types["firstName"] = Bytes then @firstName will be a + # query parameter of type Bytes. The specific `Value` to be used for the + # query execution must be sent in `ExecuteQueryRequest` in the `params` map. + class PrepareQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Bigtable::V2::Type] + class ParamTypesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Response message for Bigtable.PrepareQueryResponse + # @!attribute [rw] metadata + # @return [::Google::Cloud::Bigtable::V2::ResultSetMetadata] + # Structure of rows in the response stream of `ExecuteQueryResponse` for the + # returned `prepared_query`. + # @!attribute [rw] prepared_query + # @return [::String] + # A serialized prepared query. Clients should treat this as an opaque + # blob of bytes to send in `ExecuteQueryRequest`. + # @!attribute [rw] valid_until + # @return [::Google::Protobuf::Timestamp] + # The time at which the prepared query token becomes invalid. + # A token may become invalid early due to changes in the data being read, but + # it provides a guideline to refresh query plans asynchronously. + class PrepareQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb new file mode 100644 index 000000000000..5279c4c00f72 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb @@ -0,0 +1,997 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigtable + module V2 + # Specifies the complete (requested) contents of a single row of a table. + # Rows which exceed 256MiB in size cannot be read in full. + # @!attribute [rw] key + # @return [::String] + # The unique key which identifies this row within its table. This is the same + # key that's used to identify the row in, for example, a MutateRowRequest. + # May contain any non-empty byte string up to 4KiB in length. + # @!attribute [rw] families + # @return [::Array<::Google::Cloud::Bigtable::V2::Family>] + # May be empty, but only if the entire row is empty. + # The mutual ordering of column families is not specified. + class Row + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies (some of) the contents of a single row/column family intersection + # of a table. + # @!attribute [rw] name + # @return [::String] + # The unique key which identifies this family within its row. This is the + # same key that's used to identify the family in, for example, a RowFilter + # which sets its "family_name_regex_filter" field. + # Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may + # produce cells in a sentinel family with an empty name. + # Must be no greater than 64 characters in length. + # @!attribute [rw] columns + # @return [::Array<::Google::Cloud::Bigtable::V2::Column>] + # Must not be empty. Sorted in order of increasing "qualifier". + class Family + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies (some of) the contents of a single row/column intersection of a + # table. + # @!attribute [rw] qualifier + # @return [::String] + # The unique key which identifies this column within its family. This is the + # same key that's used to identify the column in, for example, a RowFilter + # which sets its `column_qualifier_regex_filter` field. + # May contain any byte string, including the empty string, up to 16kiB in + # length. + # @!attribute [rw] cells + # @return [::Array<::Google::Cloud::Bigtable::V2::Cell>] + # Must not be empty. Sorted in order of decreasing "timestamp_micros". + class Column + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies (some of) the contents of a single row/column/timestamp of a table. + # @!attribute [rw] timestamp_micros + # @return [::Integer] + # The cell's stored timestamp, which also uniquely identifies it within + # its column. + # Values are always expressed in microseconds, but individual tables may set + # a coarser granularity to further restrict the allowed values. For + # example, a table which specifies millisecond granularity will only allow + # values of `timestamp_micros` which are multiples of 1000. + # @!attribute [rw] value + # @return [::String] + # The value stored in the cell. + # May contain any byte string, including the empty string, up to 100MiB in + # length. + # @!attribute [rw] labels + # @return [::Array<::String>] + # Labels applied to the cell by a {::Google::Cloud::Bigtable::V2::RowFilter RowFilter}. + class Cell + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `Value` represents a dynamically typed value. + # The typed fields in `Value` are used as a transport encoding for the actual + # value (which may be of a more complex type). See the documentation of the + # `Type` message for more details. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigtable::V2::Type] + # The verified `Type` of this `Value`, if it cannot be inferred. + # + # Read results will never specify the encoding for `type` since the value + # will already have been decoded by the server. Furthermore, the `type` will + # be omitted entirely if it can be inferred from a previous response. The + # exact semantics for inferring `type` will vary, and are therefore + # documented separately for each read method. + # + # When using composite types (Struct, Array, Map) only the outermost `Value` + # will specify the `type`. This top-level `type` will define the types for + # any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. + # If a nested `Value` provides a `type` on write, the request will be + # rejected with INVALID_ARGUMENT. + # @!attribute [rw] raw_value + # @return [::String] + # Represents a raw byte sequence with no type information. + # The `type` field must be omitted. + # + # Note: The following fields are mutually exclusive: `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] raw_timestamp_micros + # @return [::Integer] + # Represents a raw cell timestamp with no type information. + # The `type` field must be omitted. + # + # Note: The following fields are mutually exclusive: `raw_timestamp_micros`, `raw_value`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bytes_value + # @return [::String] + # Represents a typed value transported as a byte sequence. + # + # Note: The following fields are mutually exclusive: `bytes_value`, `raw_value`, `raw_timestamp_micros`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a typed value transported as a string. + # + # Note: The following fields are mutually exclusive: `string_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int_value + # @return [::Integer] + # Represents a typed value transported as an integer. + # + # Note: The following fields are mutually exclusive: `int_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a typed value transported as a boolean. + # + # Note: The following fields are mutually exclusive: `bool_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] float_value + # @return [::Float] + # Represents a typed value transported as a floating point number. + # Does not support NaN or infinities. + # + # Note: The following fields are mutually exclusive: `float_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_value + # @return [::Google::Protobuf::Timestamp] + # Represents a typed value transported as a timestamp. + # + # Note: The following fields are mutually exclusive: `timestamp_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_value + # @return [::Google::Type::Date] + # Represents a typed value transported as a date. + # + # Note: The following fields are mutually exclusive: `date_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] array_value + # @return [::Google::Cloud::Bigtable::V2::ArrayValue] + # Represents a typed value transported as a sequence of values. + # To differentiate between `Struct`, `Array`, and `Map`, the outermost + # `Value` must provide an explicit `type` on write. This `type` will + # apply recursively to the nested `Struct` fields, `Array` elements, + # or `Map` key/value pairs, which *must not* supply their own `type`. + # + # Note: The following fields are mutually exclusive: `array_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ArrayValue` is an ordered list of `Value`. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Bigtable::V2::Value>] + # The ordered elements in the array. + class ArrayValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a contiguous range of rows. + # @!attribute [rw] start_key_closed + # @return [::String] + # Used when giving an inclusive lower bound for the range. + # + # Note: The following fields are mutually exclusive: `start_key_closed`, `start_key_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] start_key_open + # @return [::String] + # Used when giving an exclusive lower bound for the range. + # + # Note: The following fields are mutually exclusive: `start_key_open`, `start_key_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_key_open + # @return [::String] + # Used when giving an exclusive upper bound for the range. + # + # Note: The following fields are mutually exclusive: `end_key_open`, `end_key_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_key_closed + # @return [::String] + # Used when giving an inclusive upper bound for the range. + # + # Note: The following fields are mutually exclusive: `end_key_closed`, `end_key_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RowRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a non-contiguous set of rows. + # @!attribute [rw] row_keys + # @return [::Array<::String>] + # Single rows included in the set. + # @!attribute [rw] row_ranges + # @return [::Array<::Google::Cloud::Bigtable::V2::RowRange>] + # Contiguous row ranges included in the set. + class RowSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a contiguous range of columns within a single column family. + # The range spans from <column_family>:<start_qualifier> to + # <column_family>:<end_qualifier>, where both bounds can be either + # inclusive or exclusive. + # @!attribute [rw] family_name + # @return [::String] + # The name of the column family within which this range falls. + # @!attribute [rw] start_qualifier_closed + # @return [::String] + # Used when giving an inclusive lower bound for the range. + # + # Note: The following fields are mutually exclusive: `start_qualifier_closed`, `start_qualifier_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] start_qualifier_open + # @return [::String] + # Used when giving an exclusive lower bound for the range. + # + # Note: The following fields are mutually exclusive: `start_qualifier_open`, `start_qualifier_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_qualifier_closed + # @return [::String] + # Used when giving an inclusive upper bound for the range. + # + # Note: The following fields are mutually exclusive: `end_qualifier_closed`, `end_qualifier_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_qualifier_open + # @return [::String] + # Used when giving an exclusive upper bound for the range. + # + # Note: The following fields are mutually exclusive: `end_qualifier_open`, `end_qualifier_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ColumnRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specified a contiguous range of microsecond timestamps. + # @!attribute [rw] start_timestamp_micros + # @return [::Integer] + # Inclusive lower bound. If left empty, interpreted as 0. + # @!attribute [rw] end_timestamp_micros + # @return [::Integer] + # Exclusive upper bound. If left empty, interpreted as infinity. + class TimestampRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a contiguous range of raw byte values. + # @!attribute [rw] start_value_closed + # @return [::String] + # Used when giving an inclusive lower bound for the range. + # + # Note: The following fields are mutually exclusive: `start_value_closed`, `start_value_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] start_value_open + # @return [::String] + # Used when giving an exclusive lower bound for the range. + # + # Note: The following fields are mutually exclusive: `start_value_open`, `start_value_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_value_closed + # @return [::String] + # Used when giving an inclusive upper bound for the range. + # + # Note: The following fields are mutually exclusive: `end_value_closed`, `end_value_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] end_value_open + # @return [::String] + # Used when giving an exclusive upper bound for the range. + # + # Note: The following fields are mutually exclusive: `end_value_open`, `end_value_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ValueRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Takes a row as input and produces an alternate view of the row based on + # specified rules. For example, a RowFilter might trim down a row to include + # just the cells from columns matching a given regular expression, or might + # return all the cells of a row but not their values. More complicated filters + # can be composed out of these components to express requests such as, "within + # every column of a particular family, give just the two most recent cells + # which are older than timestamp X." + # + # There are two broad categories of RowFilters (true filters and transformers), + # as well as two ways to compose simple filters into more complex ones + # (chains and interleaves). They work as follows: + # + # * True filters alter the input row by excluding some of its cells wholesale + # from the output row. An example of a true filter is the `value_regex_filter`, + # which excludes cells whose values don't match the specified pattern. All + # regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax) + # in raw byte mode (RE2::Latin1), and are evaluated as full matches. An + # important point to keep in mind is that `RE2(.)` is equivalent by default to + # `RE2([^\n])`, meaning that it does not match newlines. When attempting to + # match an arbitrary byte, you should therefore use the escape sequence `\C`, + # which may need to be further escaped as `\\C` in your client language. + # + # * Transformers alter the input row by changing the values of some of its + # cells in the output, without excluding them completely. Currently, the only + # supported transformer is the `strip_value_transformer`, which replaces every + # cell's value with the empty string. + # + # * Chains and interleaves are described in more detail in the + # RowFilter.Chain and RowFilter.Interleave documentation. + # + # The total serialized size of a RowFilter message must not + # exceed 20480 bytes, and RowFilters may not be nested within each other + # (in Chains or Interleaves) to a depth of more than 20. + # @!attribute [rw] chain + # @return [::Google::Cloud::Bigtable::V2::RowFilter::Chain] + # Applies several RowFilters to the data in sequence, progressively + # narrowing the results. + # + # Note: The following fields are mutually exclusive: `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] interleave + # @return [::Google::Cloud::Bigtable::V2::RowFilter::Interleave] + # Applies several RowFilters to the data in parallel and combines the + # results. + # + # Note: The following fields are mutually exclusive: `interleave`, `chain`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] condition + # @return [::Google::Cloud::Bigtable::V2::RowFilter::Condition] + # Applies one of two possible RowFilters to the data based on the output of + # a predicate RowFilter. + # + # Note: The following fields are mutually exclusive: `condition`, `chain`, `interleave`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sink + # @return [::Boolean] + # ADVANCED USE ONLY. + # Hook for introspection into the RowFilter. Outputs all cells directly to + # the output of the read rather than to any parent filter. Consider the + # following example: + # + # Chain( + # FamilyRegex("A"), + # Interleave( + # All(), + # Chain(Label("foo"), Sink()) + # ), + # QualifierRegex("B") + # ) + # + # A,A,1,w + # A,B,2,x + # B,B,4,z + # | + # FamilyRegex("A") + # | + # A,A,1,w + # A,B,2,x + # | + # +------------+-------------+ + # | | + # All() Label(foo) + # | | + # A,A,1,w A,A,1,w,labels:[foo] + # A,B,2,x A,B,2,x,labels:[foo] + # | | + # | Sink() --------------+ + # | | | + # +------------+ x------+ A,A,1,w,labels:[foo] + # | A,B,2,x,labels:[foo] + # A,A,1,w | + # A,B,2,x | + # | | + # QualifierRegex("B") | + # | | + # A,B,2,x | + # | | + # +--------------------------------+ + # | + # A,A,1,w,labels:[foo] + # A,B,2,x,labels:[foo] // could be switched + # A,B,2,x // could be switched + # + # Despite being excluded by the qualifier filter, a copy of every cell + # that reaches the sink is present in the final result. + # + # As with an {::Google::Cloud::Bigtable::V2::RowFilter::Interleave Interleave}, + # duplicate cells are possible, and appear in an unspecified mutual order. + # In this case we have a duplicate with column "A:B" and timestamp 2, + # because one copy passed through the all filter while the other was + # passed through the label and sink. Note that one copy has label "foo", + # while the other does not. + # + # Cannot be used within the `predicate_filter`, `true_filter`, or + # `false_filter` of a {::Google::Cloud::Bigtable::V2::RowFilter::Condition Condition}. + # + # Note: The following fields are mutually exclusive: `sink`, `chain`, `interleave`, `condition`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pass_all_filter + # @return [::Boolean] + # Matches all cells, regardless of input. Functionally equivalent to + # leaving `filter` unset, but included for completeness. + # + # Note: The following fields are mutually exclusive: `pass_all_filter`, `chain`, `interleave`, `condition`, `sink`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] block_all_filter + # @return [::Boolean] + # Does not match any cells, regardless of input. Useful for temporarily + # disabling just part of a filter. + # + # Note: The following fields are mutually exclusive: `block_all_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row_key_regex_filter + # @return [::String] + # Matches only cells from rows whose keys satisfy the given RE2 regex. In + # other words, passes through the entire row when the key matches, and + # otherwise produces an empty row. + # Note that, since row keys can contain arbitrary bytes, the `\C` escape + # sequence must be used if a true wildcard is desired. The `.` character + # will not match the new line character `\n`, which may be present in a + # binary key. + # + # Note: The following fields are mutually exclusive: `row_key_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] row_sample_filter + # @return [::Float] + # Matches all cells from a row with probability p, and matches no cells + # from the row with probability 1-p. + # + # Note: The following fields are mutually exclusive: `row_sample_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] family_name_regex_filter + # @return [::String] + # Matches only cells from columns whose families satisfy the given RE2 + # regex. For technical reasons, the regex must not contain the `:` + # character, even if it is not being used as a literal. + # Note that, since column families cannot contain the new line character + # `\n`, it is sufficient to use `.` as a full wildcard when matching + # column family names. + # + # Note: The following fields are mutually exclusive: `family_name_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column_qualifier_regex_filter + # @return [::String] + # Matches only cells from columns whose qualifiers satisfy the given RE2 + # regex. + # Note that, since column qualifiers can contain arbitrary bytes, the `\C` + # escape sequence must be used if a true wildcard is desired. The `.` + # character will not match the new line character `\n`, which may be + # present in a binary qualifier. + # + # Note: The following fields are mutually exclusive: `column_qualifier_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] column_range_filter + # @return [::Google::Cloud::Bigtable::V2::ColumnRange] + # Matches only cells from columns within the given range. + # + # Note: The following fields are mutually exclusive: `column_range_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_range_filter + # @return [::Google::Cloud::Bigtable::V2::TimestampRange] + # Matches only cells with timestamps within the given range. + # + # Note: The following fields are mutually exclusive: `timestamp_range_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value_regex_filter + # @return [::String] + # Matches only cells with values that satisfy the given regular expression. + # Note that, since cell values can contain arbitrary bytes, the `\C` escape + # sequence must be used if a true wildcard is desired. The `.` character + # will not match the new line character `\n`, which may be present in a + # binary value. + # + # Note: The following fields are mutually exclusive: `value_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] value_range_filter + # @return [::Google::Cloud::Bigtable::V2::ValueRange] + # Matches only cells with values that fall within the given range. + # + # Note: The following fields are mutually exclusive: `value_range_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cells_per_row_offset_filter + # @return [::Integer] + # Skips the first N cells of each row, matching all subsequent cells. + # If duplicate cells are present, as is possible when using an Interleave, + # each copy of the cell is counted separately. + # + # Note: The following fields are mutually exclusive: `cells_per_row_offset_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cells_per_row_limit_filter + # @return [::Integer] + # Matches only the first N cells of each row. + # If duplicate cells are present, as is possible when using an Interleave, + # each copy of the cell is counted separately. + # + # Note: The following fields are mutually exclusive: `cells_per_row_limit_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cells_per_column_limit_filter + # @return [::Integer] + # Matches only the most recent N cells within each column. For example, + # if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, + # skip all earlier cells in `foo:bar`, and then begin matching again in + # column `foo:bar2`. + # If duplicate cells are present, as is possible when using an Interleave, + # each copy of the cell is counted separately. + # + # Note: The following fields are mutually exclusive: `cells_per_column_limit_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] strip_value_transformer + # @return [::Boolean] + # Replaces each cell's value with the empty string. + # + # Note: The following fields are mutually exclusive: `strip_value_transformer`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] apply_label_transformer + # @return [::String] + # Applies the given label to all cells in the output row. This allows + # the client to determine which results were produced from which part of + # the filter. + # + # Values must be at most 15 characters in length, and match the RE2 + # pattern `[a-z0-9\\-]+` + # + # Due to a technical limitation, it is not currently possible to apply + # multiple labels to a cell. As a result, a Chain may have no more than + # one sub-filter which contains a `apply_label_transformer`. It is okay for + # an Interleave to contain multiple `apply_label_transformers`, as they + # will be applied to separate copies of the input. This may be relaxed in + # the future. + # + # Note: The following fields are mutually exclusive: `apply_label_transformer`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RowFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A RowFilter which sends rows through several RowFilters in sequence. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::Bigtable::V2::RowFilter>] + # The elements of "filters" are chained together to process the input row: + # in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row + # The full chain is executed atomically. + class Chain + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A RowFilter which sends each row to each of several component + # RowFilters and interleaves the results. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::Bigtable::V2::RowFilter>] + # The elements of "filters" all process a copy of the input row, and the + # results are pooled, sorted, and combined into a single output row. + # If multiple cells are produced with the same column and timestamp, + # they will all appear in the output row in an unspecified mutual order. + # Consider the following example, with three filters: + # + # input row + # | + # ----------------------------------------------------- + # | | | + # f(0) f(1) f(2) + # | | | + # 1: foo,bar,10,x foo,bar,10,z far,bar,7,a + # 2: foo,blah,11,z far,blah,5,x far,blah,5,x + # | | | + # ----------------------------------------------------- + # | + # 1: foo,bar,10,z // could have switched with #2 + # 2: foo,bar,10,x // could have switched with #1 + # 3: foo,blah,11,z + # 4: far,bar,7,a + # 5: far,blah,5,x // identical to #6 + # 6: far,blah,5,x // identical to #5 + # + # All interleaved filters are executed atomically. + class Interleave + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A RowFilter which evaluates one of two possible RowFilters, depending on + # whether or not a predicate RowFilter outputs any cells from the input row. + # + # IMPORTANT NOTE: The predicate filter does not execute atomically with the + # true and false filters, which may lead to inconsistent or unexpected + # results. Additionally, Condition filters have poor performance, especially + # when filters are set for the false condition. + # @!attribute [rw] predicate_filter + # @return [::Google::Cloud::Bigtable::V2::RowFilter] + # If `predicate_filter` outputs any cells, then `true_filter` will be + # evaluated on the input row. Otherwise, `false_filter` will be evaluated. + # @!attribute [rw] true_filter + # @return [::Google::Cloud::Bigtable::V2::RowFilter] + # The filter to apply to the input row if `predicate_filter` returns any + # results. If not provided, no results will be returned in the true case. + # @!attribute [rw] false_filter + # @return [::Google::Cloud::Bigtable::V2::RowFilter] + # The filter to apply to the input row if `predicate_filter` does not + # return any results. If not provided, no results will be returned in the + # false case. + class Condition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifies a particular change to be made to the contents of a row. + # @!attribute [rw] set_cell + # @return [::Google::Cloud::Bigtable::V2::Mutation::SetCell] + # Set a cell's value. + # + # Note: The following fields are mutually exclusive: `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] add_to_cell + # @return [::Google::Cloud::Bigtable::V2::Mutation::AddToCell] + # Incrementally updates an `Aggregate` cell. + # + # Note: The following fields are mutually exclusive: `add_to_cell`, `set_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] merge_to_cell + # @return [::Google::Cloud::Bigtable::V2::Mutation::MergeToCell] + # Merges accumulated state to an `Aggregate` cell. + # + # Note: The following fields are mutually exclusive: `merge_to_cell`, `set_cell`, `add_to_cell`, `delete_from_column`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delete_from_column + # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromColumn] + # Deletes cells from a column. + # + # Note: The following fields are mutually exclusive: `delete_from_column`, `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delete_from_family + # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromFamily] + # Deletes cells from a column family. + # + # Note: The following fields are mutually exclusive: `delete_from_family`, `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delete_from_row + # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromRow] + # Deletes cells from the entire row. + # + # Note: The following fields are mutually exclusive: `delete_from_row`, `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_family`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Mutation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A Mutation which sets the value of the specified cell. + # @!attribute [rw] family_name + # @return [::String] + # The name of the family into which new data should be written. + # Must match `[-_.a-zA-Z0-9]+` + # @!attribute [rw] column_qualifier + # @return [::String] + # The qualifier of the column into which new data should be written. + # Can be any byte string, including the empty string. + # @!attribute [rw] timestamp_micros + # @return [::Integer] + # The timestamp of the cell into which new data should be written. + # Use -1 for current Bigtable server time. + # Otherwise, the client should set this value itself, noting that the + # default value is a timestamp of zero if the field is left unspecified. + # Values must match the granularity of the table (e.g. micros, millis). + # @!attribute [rw] value + # @return [::String] + # The value to be written into the specified cell. + class SetCell + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Mutation which incrementally updates a cell in an `Aggregate` family. + # @!attribute [rw] family_name + # @return [::String] + # The name of the `Aggregate` family into which new data should be added. + # This must be a family with a `value_type` of `Aggregate`. + # Format: `[-_.a-zA-Z0-9]+` + # @!attribute [rw] column_qualifier + # @return [::Google::Cloud::Bigtable::V2::Value] + # The qualifier of the column into which new data should be added. This + # must be a `raw_value`. + # @!attribute [rw] timestamp + # @return [::Google::Cloud::Bigtable::V2::Value] + # The timestamp of the cell to which new data should be added. This must + # be a `raw_timestamp_micros` that matches the table's `granularity`. + # @!attribute [rw] input + # @return [::Google::Cloud::Bigtable::V2::Value] + # The input value to be accumulated into the specified cell. This must be + # compatible with the family's `value_type.input_type`. + class AddToCell + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Mutation which merges accumulated state into a cell in an `Aggregate` + # family. + # @!attribute [rw] family_name + # @return [::String] + # The name of the `Aggregate` family into which new data should be added. + # This must be a family with a `value_type` of `Aggregate`. + # Format: `[-_.a-zA-Z0-9]+` + # @!attribute [rw] column_qualifier + # @return [::Google::Cloud::Bigtable::V2::Value] + # The qualifier of the column into which new data should be added. This + # must be a `raw_value`. + # @!attribute [rw] timestamp + # @return [::Google::Cloud::Bigtable::V2::Value] + # The timestamp of the cell to which new data should be added. This must + # be a `raw_timestamp_micros` that matches the table's `granularity`. + # @!attribute [rw] input + # @return [::Google::Cloud::Bigtable::V2::Value] + # The input value to be merged into the specified cell. This must be + # compatible with the family's `value_type.state_type`. Merging `NULL` is + # allowed, but has no effect. + class MergeToCell + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Mutation which deletes cells from the specified column, optionally + # restricting the deletions to a given timestamp range. + # @!attribute [rw] family_name + # @return [::String] + # The name of the family from which cells should be deleted. + # Must match `[-_.a-zA-Z0-9]+` + # @!attribute [rw] column_qualifier + # @return [::String] + # The qualifier of the column from which cells should be deleted. + # Can be any byte string, including the empty string. + # @!attribute [rw] time_range + # @return [::Google::Cloud::Bigtable::V2::TimestampRange] + # The range of timestamps within which cells should be deleted. + class DeleteFromColumn + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Mutation which deletes all cells from the specified column family. + # @!attribute [rw] family_name + # @return [::String] + # The name of the family from which cells should be deleted. + # Must match `[-_.a-zA-Z0-9]+` + class DeleteFromFamily + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Mutation which deletes all cells from the containing row. + class DeleteFromRow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Specifies an atomic read/modify/write operation on the latest value of the + # specified column. + # @!attribute [rw] family_name + # @return [::String] + # The name of the family to which the read/modify/write should be applied. + # Must match `[-_.a-zA-Z0-9]+` + # @!attribute [rw] column_qualifier + # @return [::String] + # The qualifier of the column to which the read/modify/write should be + # applied. + # Can be any byte string, including the empty string. + # @!attribute [rw] append_value + # @return [::String] + # Rule specifying that `append_value` be appended to the existing value. + # If the targeted cell is unset, it will be treated as containing the + # empty string. + # + # Note: The following fields are mutually exclusive: `append_value`, `increment_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] increment_amount + # @return [::Integer] + # Rule specifying that `increment_amount` be added to the existing value. + # If the targeted cell is unset, it will be treated as containing a zero. + # Otherwise, the targeted cell must contain an 8-byte value (interpreted + # as a 64-bit big-endian signed integer), or the entire request will fail. + # + # Note: The following fields are mutually exclusive: `increment_amount`, `append_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ReadModifyWriteRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NOTE: This API is intended to be used by Apache Beam BigtableIO. + # A partition of a change stream. + # @!attribute [rw] row_range + # @return [::Google::Cloud::Bigtable::V2::RowRange] + # The row range covered by this partition and is specified by + # [`start_key_closed`, `end_key_open`). + class StreamPartition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NOTE: This API is intended to be used by Apache Beam BigtableIO. + # The information required to continue reading the data from multiple + # `StreamPartitions` from where a previous read left off. + # @!attribute [rw] tokens + # @return [::Array<::Google::Cloud::Bigtable::V2::StreamContinuationToken>] + # List of continuation tokens. + class StreamContinuationTokens + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NOTE: This API is intended to be used by Apache Beam BigtableIO. + # The information required to continue reading the data from a + # `StreamPartition` from where a previous read left off. + # @!attribute [rw] partition + # @return [::Google::Cloud::Bigtable::V2::StreamPartition] + # The partition that this token applies to. + # @!attribute [rw] token + # @return [::String] + # An encoded position in the stream to restart reading from. + class StreamContinuationToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Protocol buffers format descriptor, as described by Messages ProtoSchema and + # ProtoRows + class ProtoFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a column in a Bigtable Query Language result set. + # @!attribute [rw] name + # @return [::String] + # The name of the column. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigtable::V2::Type] + # The type of the column. + class ColumnMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResultSet schema in proto format + # @!attribute [rw] columns + # @return [::Array<::Google::Cloud::Bigtable::V2::ColumnMetadata>] + # The columns in the result set. + class ProtoSchema + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the structure of a Bigtable result set. + # @!attribute [rw] proto_schema + # @return [::Google::Cloud::Bigtable::V2::ProtoSchema] + # Schema in proto format + class ResultSetMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Rows represented in proto format. + # + # This should be constructed by concatenating the `batch_data` from each + # of the relevant `ProtoRowsBatch` messages and parsing the result as a + # `ProtoRows` message. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Bigtable::V2::Value>] + # A proto rows message consists of a list of values. Every N complete values + # defines a row, where N is equal to the number of entries in the + # `metadata.proto_schema.columns` value received in the first response. + class ProtoRows + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A part of a serialized `ProtoRows` message. + # @!attribute [rw] batch_data + # @return [::String] + # Part of a serialized `ProtoRows` message. + # A complete, parseable ProtoRows message is constructed by + # concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The + # `PartialResultSet` that contains the last part has `complete_batch` set to + # `true`. + class ProtoRowsBatch + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A partial result set from the streaming query API. + # Cloud Bigtable clients buffer partial results received in this message until + # a `resume_token` is received. + # + # The pseudocode below describes how to buffer and parse a stream of + # `PartialResultSet` messages. + # + # Having: + # - queue of row results waiting to be returned `queue` + # - extensible buffer of bytes `buffer` + # - a place to keep track of the most recent `resume_token` + # for each PartialResultSet `p` received { + # if p.reset { + # ensure `queue` is empty + # ensure `buffer` is empty + # } + # if p.estimated_batch_size != 0 { + # (optional) ensure `buffer` is sized to at least `p.estimated_batch_size` + # } + # if `p.proto_rows_batch` is set { + # append `p.proto_rows_batch.bytes` to `buffer` + # } + # if p.batch_checksum is set and `buffer` is not empty { + # validate the checksum matches the contents of `buffer` + # (see comments on `batch_checksum`) + # parse `buffer` as `ProtoRows` message, clearing `buffer` + # add parsed rows to end of `queue` + # } + # if p.resume_token is set { + # release results in `queue` + # save `p.resume_token` in `resume_token` + # } + # } + # @!attribute [rw] proto_rows_batch + # @return [::Google::Cloud::Bigtable::V2::ProtoRowsBatch] + # Partial rows in serialized ProtoRows format. + # @!attribute [rw] batch_checksum + # @return [::Integer] + # CRC32C checksum of concatenated `partial_rows` data for the current batch. + # + # When present, the buffered data from `partial_rows` forms a complete + # parseable message of the appropriate type. + # + # The client should mark the end of a parseable message and prepare to + # receive a new one starting from the next `PartialResultSet` message. + # Clients must verify the checksum of the serialized batch before yielding it + # to the caller. + # + # This does NOT mean the values can be yielded to the callers since a + # `resume_token` is required to safely do so. + # + # If `resume_token` is non-empty and any data has been received since the + # last one, this field is guaranteed to be non-empty. In other words, clients + # may assume that a batch will never cross a `resume_token` boundary. + # @!attribute [rw] resume_token + # @return [::String] + # An opaque token sent by the server to allow query resumption and signal + # that the buffered values constructed from received `partial_rows` can be + # yielded to the caller. Clients can provide this token in a subsequent + # request to resume the result stream from the current point. + # + # When `resume_token` is non-empty, the buffered values received from + # `partial_rows` since the last non-empty `resume_token` can be yielded to + # the callers, provided that the client keeps the value of `resume_token` and + # uses it on subsequent retries. + # + # A `resume_token` may be sent without information in `partial_rows` to + # checkpoint the progress of a sparse query. Any previous `partial_rows` data + # should still be yielded in this case, and the new `resume_token` should be + # saved for future retries as normal. + # + # A `resume_token` will only be sent on a boundary where there is either no + # ongoing result batch, or `batch_checksum` is also populated. + # + # The server will also send a sentinel `resume_token` when last batch of + # `partial_rows` is sent. If the client retries the ExecuteQueryRequest with + # the sentinel `resume_token`, the server will emit it again without any + # data in `partial_rows`, then return OK. + # @!attribute [rw] reset + # @return [::Boolean] + # If `true`, any data buffered since the last non-empty `resume_token` must + # be discarded before the other parts of this message, if any, are handled. + # @!attribute [rw] estimated_batch_size + # @return [::Integer] + # Estimated size of the buffer required to hold the next batch of results. + # + # This value will be sent with the first `partial_rows` of a batch. That is, + # on the first `partial_rows` received in a stream, on the first message + # after a `batch_checksum` message, and any time `reset` is true. + # + # The client can use this estimate to allocate a buffer for the next batch of + # results. This helps minimize the number of allocations required, though the + # buffer size may still need to be increased if the estimate is too low. + class PartialResultSet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Parameters on mutations where clients want to ensure idempotency (i.e. + # at-most-once semantics). This is currently only needed for certain aggregate + # types. + # @!attribute [rw] token + # @return [::String] + # Unique token used to identify replays of this mutation. + # Must be at least 8 bytes long. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Client-assigned timestamp when the mutation's first attempt was sent. + # Used to reject mutations that arrive after idempotency protection may + # have expired. May cause spurious rejections if clock skew is too high. + # + # Leave unset or zero to always accept the mutation, at the risk of + # double counting if the protection for previous attempts has expired. + class Idempotency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb new file mode 100644 index 000000000000..52a9e0a7afeb --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigtable + module V2 + # Feature flags supported or enabled by a client. + # This is intended to be sent as part of request metadata to assure the server + # that certain behaviors are safe to enable. This proto is meant to be + # serialized and websafe-base64 encoded under the `bigtable-features` metadata + # key. The value will remain constant for the lifetime of a client and due to + # HTTP2's HPACK compression, the request overhead will be tiny. + # This is an internal implementation detail and should not be used by end users + # directly. + # @!attribute [rw] reverse_scans + # @return [::Boolean] + # Notify the server that the client supports reverse scans. The server will + # reject ReadRowsRequests with the reverse bit set when this is absent. + # @!attribute [rw] mutate_rows_rate_limit + # @return [::Boolean] + # Notify the server that the client enables batch write flow control by + # requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, + # this disables partial retries. + # @!attribute [rw] mutate_rows_rate_limit2 + # @return [::Boolean] + # Notify the server that the client enables batch write flow control by + # requesting RateLimitInfo from MutateRowsResponse. With partial retries + # enabled. + # @!attribute [rw] last_scanned_row_responses + # @return [::Boolean] + # Notify the server that the client supports the last_scanned_row field + # in ReadRowsResponse for long-running scans. + # @!attribute [rw] routing_cookie + # @return [::Boolean] + # Notify the server that the client supports using encoded routing cookie + # strings to retry requests with. + # @!attribute [rw] retry_info + # @return [::Boolean] + # Notify the server that the client supports using retry info back off + # durations to retry requests with. + # @!attribute [rw] client_side_metrics_enabled + # @return [::Boolean] + # Notify the server that the client has client side metrics enabled. + # @!attribute [rw] traffic_director_enabled + # @return [::Boolean] + # Notify the server that the client using Traffic Director endpoint. + # @!attribute [rw] direct_access_requested + # @return [::Boolean] + # Notify the server that the client explicitly opted in for Direct Access. + # @!attribute [rw] peer_info + # @return [::Boolean] + # If the client can support using BigtablePeerInfo. + class FeatureFlags + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb new file mode 100644 index 000000000000..dd48ceaee1fc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigtable + module V2 + # PeerInfo contains information about the peer that the client is + # connecting to. + # @!attribute [rw] google_frontend_id + # @return [::Integer] + # An opaque identifier for the Google Frontend which serviced this request. + # Only set when not using DirectAccess. + # @!attribute [rw] application_frontend_id + # @return [::Integer] + # An opaque identifier for the application frontend which serviced this + # request. + # @!attribute [rw] application_frontend_zone + # @return [::String] + # The Cloud zone of the application frontend that served this request. + # @!attribute [rw] application_frontend_subzone + # @return [::String] + # The subzone of the application frontend that served this request, e.g. an + # identifier for where within the zone the application frontend is. + # @!attribute [rw] transport_type + # @return [::Google::Cloud::Bigtable::V2::PeerInfo::TransportType] + class PeerInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The transport type that the client used to connect to this peer. + module TransportType + # The transport type is unknown. + TRANSPORT_TYPE_UNKNOWN = 0 + + # The client connected to this peer via an external network + # (e.g. outside Google Coud). + TRANSPORT_TYPE_EXTERNAL = 1 + + # The client connected to this peer via CloudPath. + TRANSPORT_TYPE_CLOUD_PATH = 2 + + # The client connected to this peer via DirectAccess. + TRANSPORT_TYPE_DIRECT_ACCESS = 3 + + # The client connected to this peer via Bigtable Sessions using an unknown + # transport type. + TRANSPORT_TYPE_SESSION_UNKNOWN = 4 + + # The client connected to this peer via Bigtable Sessions on an external + # network (e.g. outside Google Cloud). + TRANSPORT_TYPE_SESSION_EXTERNAL = 5 + + # The client connected to this peer via Bigtable Sessions using CloudPath. + TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6 + + # The client connected to this peer via Bigtable Sessions using + # DirectAccess. + TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb new file mode 100644 index 000000000000..dbd4d3596e23 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigtable + module V2 + # ReadIterationStats captures information about the iteration of rows or cells + # over the course of a read, e.g. how many results were scanned in a read + # operation versus the results returned. + # @!attribute [rw] rows_seen_count + # @return [::Integer] + # The rows seen (scanned) as part of the request. This includes the count of + # rows returned, as captured below. + # @!attribute [rw] rows_returned_count + # @return [::Integer] + # The rows returned as part of the request. + # @!attribute [rw] cells_seen_count + # @return [::Integer] + # The cells seen (scanned) as part of the request. This includes the count of + # cells returned, as captured below. + # @!attribute [rw] cells_returned_count + # @return [::Integer] + # The cells returned as part of the request. + class ReadIterationStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RequestLatencyStats provides a measurement of the latency of the request as + # it interacts with different systems over its lifetime, e.g. how long the + # request took to execute within a frontend server. + # @!attribute [rw] frontend_server_latency + # @return [::Google::Protobuf::Duration] + # The latency measured by the frontend server handling this request, from + # when the request was received, to when this value is sent back in the + # response. For more context on the component that is measuring this latency, + # see: https://cloud.google.com/bigtable/docs/overview + # + # Note: This value may be slightly shorter than the value reported into + # aggregate latency metrics in Monitoring for this request + # (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value + # needs to be sent in the response before the latency measurement including + # that transmission is finalized. + # + # Note: This value includes the end-to-end latency of contacting nodes in + # the targeted cluster, e.g. measuring from when the first byte arrives at + # the frontend server, to when this value is sent back as the last value in + # the response, including any latency incurred by contacting nodes, waiting + # for results from nodes, and finally sending results from nodes back to the + # caller. + class RequestLatencyStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # FullReadStatsView captures all known information about a read. + # @!attribute [rw] read_iteration_stats + # @return [::Google::Cloud::Bigtable::V2::ReadIterationStats] + # Iteration stats describe how efficient the read is, e.g. comparing + # rows seen vs. rows returned or cells seen vs cells returned can provide an + # indication of read efficiency (the higher the ratio of seen to retuned the + # better). + # @!attribute [rw] request_latency_stats + # @return [::Google::Cloud::Bigtable::V2::RequestLatencyStats] + # Request latency stats describe the time taken to complete a request, from + # the server side. + class FullReadStatsView + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RequestStats is the container for additional information pertaining to a + # single request, helpful for evaluating the performance of the sent request. + # Currently, the following method is supported: google.bigtable.v2.ReadRows + # @!attribute [rw] full_read_stats_view + # @return [::Google::Cloud::Bigtable::V2::FullReadStatsView] + # Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL + # view, see package google.bigtable.v2. + class RequestStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb new file mode 100644 index 000000000000..c909499b78f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Bigtable + module V2 + # Response metadata proto + # @!attribute [rw] zone_id + # @return [::String] + # The cloud bigtable zone associated with the cluster. + # @!attribute [rw] cluster_id + # @return [::String] + # Identifier for a cluster that represents set of + # bigtable resources. + # @!attribute [rw] afe_id + # @return [::Integer] + # The AFE ID for the AFE that is served this request. + class ResponseParams + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb new file mode 100644 index 000000000000..2b77760b49db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Bigtable + module V2 + # `Type` represents the type of data that is written to, read from, or stored + # in Bigtable. It is heavily based on the GoogleSQL standard to help maintain + # familiarity and consistency across products and features. + # + # For compatibility with Bigtable's existing untyped APIs, each `Type` includes + # an `Encoding` which describes how to convert to or from the underlying data. + # + # Each encoding can operate in one of two modes: + # + # - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` + # if and only if `X <= Y`. This is useful anywhere sort order is important, + # for example when encoding keys. + # - Distinct: In this mode, Bigtable guarantees that if `X != Y` then + # `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For + # example, both `{'foo': '1', 'bar': '2'}` and `{'bar': '2', 'foo': '1'}` + # are valid encodings of the same JSON value. + # + # The API clearly documents which mode is used wherever an encoding can be + # configured. Each encoding also documents which values are supported in which + # modes. For example, when encoding INT64 as a numeric STRING, negative numbers + # cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but + # `STRING("-00001") > STRING("00001")`. + # @!attribute [rw] bytes_type + # @return [::Google::Cloud::Bigtable::V2::Type::Bytes] + # Bytes + # + # Note: The following fields are mutually exclusive: `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_type + # @return [::Google::Cloud::Bigtable::V2::Type::String] + # String + # + # Note: The following fields are mutually exclusive: `string_type`, `bytes_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] int64_type + # @return [::Google::Cloud::Bigtable::V2::Type::Int64] + # Int64 + # + # Note: The following fields are mutually exclusive: `int64_type`, `bytes_type`, `string_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] float32_type + # @return [::Google::Cloud::Bigtable::V2::Type::Float32] + # Float32 + # + # Note: The following fields are mutually exclusive: `float32_type`, `bytes_type`, `string_type`, `int64_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] float64_type + # @return [::Google::Cloud::Bigtable::V2::Type::Float64] + # Float64 + # + # Note: The following fields are mutually exclusive: `float64_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_type + # @return [::Google::Cloud::Bigtable::V2::Type::Bool] + # Bool + # + # Note: The following fields are mutually exclusive: `bool_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_type + # @return [::Google::Cloud::Bigtable::V2::Type::Timestamp] + # Timestamp + # + # Note: The following fields are mutually exclusive: `timestamp_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] date_type + # @return [::Google::Cloud::Bigtable::V2::Type::Date] + # Date + # + # Note: The following fields are mutually exclusive: `date_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] aggregate_type + # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate] + # Aggregate + # + # Note: The following fields are mutually exclusive: `aggregate_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_type + # @return [::Google::Cloud::Bigtable::V2::Type::Struct] + # Struct + # + # Note: The following fields are mutually exclusive: `struct_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] array_type + # @return [::Google::Cloud::Bigtable::V2::Type::Array] + # Array + # + # Note: The following fields are mutually exclusive: `array_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] map_type + # @return [::Google::Cloud::Bigtable::V2::Type::Map] + # Map + # + # Note: The following fields are mutually exclusive: `map_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proto_type + # @return [::Google::Cloud::Bigtable::V2::Type::Proto] + # Proto + # + # Note: The following fields are mutually exclusive: `proto_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] enum_type + # @return [::Google::Cloud::Bigtable::V2::Type::Enum] + # Enum + # + # Note: The following fields are mutually exclusive: `enum_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Type + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Bytes + # Values of type `Bytes` are stored in `Value.bytes_value`. + # @!attribute [rw] encoding + # @return [::Google::Cloud::Bigtable::V2::Type::Bytes::Encoding] + # The encoding to use when converting to or from lower level types. + class Bytes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Rules used to convert to or from lower level types. + # @!attribute [rw] raw + # @return [::Google::Cloud::Bigtable::V2::Type::Bytes::Encoding::Raw] + # Use `Raw` encoding. + class Encoding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Leaves the value as-is. + # + # Sorted mode: all values are supported. + # + # Distinct mode: all values are supported. + # @!attribute [rw] escape_nulls + # @return [::Boolean] + # If set, allows NULL values to be encoded as the empty string "". + # + # The actual empty string, or any value which only contains the + # null byte `0x00`, has one more null byte appended. + class Raw + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # String + # Values of type `String` are stored in `Value.string_value`. + # @!attribute [rw] encoding + # @return [::Google::Cloud::Bigtable::V2::Type::String::Encoding] + # The encoding to use when converting to or from lower level types. + class String + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Rules used to convert to or from lower level types. + # @!attribute [rw] utf8_raw + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Bigtable::V2::Type::String::Encoding::Utf8Raw] + # Deprecated: if set, converts to an empty `utf8_bytes`. + # + # Note: The following fields are mutually exclusive: `utf8_raw`, `utf8_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] utf8_bytes + # @return [::Google::Cloud::Bigtable::V2::Type::String::Encoding::Utf8Bytes] + # Use `Utf8Bytes` encoding. + # + # Note: The following fields are mutually exclusive: `utf8_bytes`, `utf8_raw`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Encoding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Deprecated: prefer the equivalent `Utf8Bytes`. + # @deprecated This message is deprecated and may be removed in the next major version update. + class Utf8Raw + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UTF-8 encoding. + # + # Sorted mode: + # - All values are supported. + # - Code point order is preserved. + # + # Distinct mode: all values are supported. + # + # Compatible with: + # + # - BigQuery `TEXT` encoding + # - HBase `Bytes.toBytes` + # - Java `String#getBytes(StandardCharsets.UTF_8)` + # @!attribute [rw] null_escape_char + # @return [::String] + # Single-character escape sequence used to support NULL values. + # + # If set, allows NULL values to be encoded as the empty string "". + # + # The actual empty string, or any value where every character equals + # `null_escape_char`, has one more `null_escape_char` appended. + # + # If `null_escape_char` is set and does not equal the ASCII null + # character `0x00`, then the encoding will not support sorted mode. + # + # . + class Utf8Bytes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Int64 + # Values of type `Int64` are stored in `Value.int_value`. + # @!attribute [rw] encoding + # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding] + # The encoding to use when converting to or from lower level types. + class Int64 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Rules used to convert to or from lower level types. + # @!attribute [rw] big_endian_bytes + # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding::BigEndianBytes] + # Use `BigEndianBytes` encoding. + # + # Note: The following fields are mutually exclusive: `big_endian_bytes`, `ordered_code_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ordered_code_bytes + # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding::OrderedCodeBytes] + # Use `OrderedCodeBytes` encoding. + # + # Note: The following fields are mutually exclusive: `ordered_code_bytes`, `big_endian_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Encoding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Encodes the value as an 8-byte big-endian two's complement value. + # + # Sorted mode: non-negative values are supported. + # + # Distinct mode: all values are supported. + # + # Compatible with: + # + # - BigQuery `BINARY` encoding + # - HBase `Bytes.toBytes` + # - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` + # @!attribute [rw] bytes_type + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Bigtable::V2::Type::Bytes] + # Deprecated: ignored if set. + class BigEndianBytes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encodes the value in a variable length binary format of up to 10 bytes. + # Values that are closer to zero use fewer bytes. + # + # Sorted mode: all values are supported. + # + # Distinct mode: all values are supported. + class OrderedCodeBytes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # bool + # Values of type `Bool` are stored in `Value.bool_value`. + class Bool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Float32 + # Values of type `Float32` are stored in `Value.float_value`. + class Float32 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Float64 + # Values of type `Float64` are stored in `Value.float_value`. + class Float64 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Timestamp + # Values of type `Timestamp` are stored in `Value.timestamp_value`. + # @!attribute [rw] encoding + # @return [::Google::Cloud::Bigtable::V2::Type::Timestamp::Encoding] + # The encoding to use when converting to or from lower level types. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Rules used to convert to or from lower level types. + # @!attribute [rw] unix_micros_int64 + # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding] + # Encodes the number of microseconds since the Unix epoch using the + # given `Int64` encoding. Values must be microsecond-aligned. + # + # Compatible with: + # + # - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS` + class Encoding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Date + # Values of type `Date` are stored in `Value.date_value`. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A structured data value, consisting of fields which map to dynamically + # typed values. + # Values of type `Struct` are stored in `Value.array_value` where entries are + # in the same order and number as `field_types`. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Bigtable::V2::Type::Struct::Field>] + # The names and types of the fields in this struct. + # @!attribute [rw] encoding + # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding] + # The encoding to use when converting to or from lower level types. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A struct field and its type. + # @!attribute [rw] field_name + # @return [::String] + # The field name (optional). Fields without a `field_name` are considered + # anonymous and cannot be referenced by name. + # @!attribute [rw] type + # @return [::Google::Cloud::Bigtable::V2::Type] + # The type of values in this field. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Rules used to convert to or from lower level types. + # @!attribute [rw] singleton + # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding::Singleton] + # Use `Singleton` encoding. + # + # Note: The following fields are mutually exclusive: `singleton`, `delimited_bytes`, `ordered_code_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delimited_bytes + # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding::DelimitedBytes] + # Use `DelimitedBytes` encoding. + # + # Note: The following fields are mutually exclusive: `delimited_bytes`, `singleton`, `ordered_code_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ordered_code_bytes + # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding::OrderedCodeBytes] + # User `OrderedCodeBytes` encoding. + # + # Note: The following fields are mutually exclusive: `ordered_code_bytes`, `singleton`, `delimited_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Encoding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Uses the encoding of `fields[0].type` as-is. + # Only valid if `fields.size == 1`. + class Singleton + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields are encoded independently and concatenated with a configurable + # `delimiter` in between. + # + # A struct with no fields defined is encoded as a single `delimiter`. + # + # Sorted mode: + # + # - Fields are encoded in sorted mode. + # - Encoded field values must not contain any bytes <= `delimiter[0]` + # - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + # `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + # + # Distinct mode: + # + # - Fields are encoded in distinct mode. + # - Encoded field values must not contain `delimiter[0]`. + # @!attribute [rw] delimiter + # @return [::String] + # Byte sequence used to delimit concatenated fields. The delimiter must + # contain at least 1 character and at most 50 characters. + class DelimitedBytes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fields are encoded independently and concatenated with the fixed byte + # pair `{0x00, 0x01}` in between. + # + # Any null `(0x00)` byte in an encoded field is replaced by the fixed + # byte pair `{0x00, 0xFF}`. + # + # Fields that encode to the empty string "" have special handling: + # + # - If *every* field encodes to "", or if the STRUCT has no fields + # defined, then the STRUCT is encoded as the fixed byte pair + # `{0x00, 0x00}`. + # - Otherwise, the STRUCT only encodes until the last non-empty field, + # omitting any trailing empty fields. Any empty fields that aren't + # omitted are replaced with the fixed byte pair `{0x00, 0x00}`. + # + # Examples: + # + # ``` + # - STRUCT() -> "\00\00" + # - STRUCT("") -> "\00\00" + # - STRUCT("", "") -> "\00\00" + # - STRUCT("", "B") -> "\00\00" + "\00\01" + "B" + # - STRUCT("A", "") -> "A" + # - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B" + # - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C" + # ``` + # + # + # Since null bytes are always escaped, this encoding can cause size + # blowup for encodings like `Int64.BigEndianBytes` that are likely to + # produce many such bytes. + # + # Sorted mode: + # + # - Fields are encoded in sorted mode. + # - All values supported by the field encodings are allowed + # - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if + # `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. + # + # Distinct mode: + # + # - Fields are encoded in distinct mode. + # - All values supported by the field encodings are allowed. + class OrderedCodeBytes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # A protobuf message type. + # Values of type `Proto` are stored in `Value.bytes_value`. + # @!attribute [rw] schema_bundle_id + # @return [::String] + # The ID of the schema bundle that this proto is defined in. + # @!attribute [rw] message_name + # @return [::String] + # The fully qualified name of the protobuf message, including package. In + # the format of "foo.bar.Message". + class Proto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A protobuf enum type. + # Values of type `Enum` are stored in `Value.int_value`. + # @!attribute [rw] schema_bundle_id + # @return [::String] + # The ID of the schema bundle that this enum is defined in. + # @!attribute [rw] enum_name + # @return [::String] + # The fully qualified name of the protobuf enum message, including package. + # In the format of "foo.bar.EnumMessage". + class Enum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An ordered list of elements of a given type. + # Values of type `Array` are stored in `Value.array_value`. + # @!attribute [rw] element_type + # @return [::Google::Cloud::Bigtable::V2::Type] + # The type of the elements in the array. This must not be `Array`. + class Array + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A mapping of keys to values of a given type. + # Values of type `Map` are stored in a `Value.array_value` where each entry + # is another `Value.array_value` with two elements (the key and the value, + # in that order). + # Normally encoded Map values won't have repeated keys, however, clients are + # expected to handle the case in which they do. If the same key appears + # multiple times, the _last_ value takes precedence. + # @!attribute [rw] key_type + # @return [::Google::Cloud::Bigtable::V2::Type] + # The type of a map key. + # Only `Bytes`, `String`, and `Int64` are allowed as key types. + # @!attribute [rw] value_type + # @return [::Google::Cloud::Bigtable::V2::Type] + # The type of the values in a map. + class Map + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A value that combines incremental updates into a summarized value. + # + # Data is never directly written or read using type `Aggregate`. Writes + # provide either the `input_type` or `state_type`, and reads always return + # the `state_type` . + # @!attribute [rw] input_type + # @return [::Google::Cloud::Bigtable::V2::Type] + # Type of the inputs that are accumulated by this `Aggregate`. + # Use `AddInput` mutations to accumulate new inputs. + # @!attribute [r] state_type + # @return [::Google::Cloud::Bigtable::V2::Type] + # Output only. Type that holds the internal accumulator state for the + # `Aggregate`. This is a function of the `input_type` and `aggregator` + # chosen. + # @!attribute [rw] sum + # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::Sum] + # Sum aggregator. + # + # Note: The following fields are mutually exclusive: `sum`, `hllpp_unique_count`, `max`, `min`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] hllpp_unique_count + # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::HyperLogLogPlusPlusUniqueCount] + # HyperLogLogPlusPlusUniqueCount aggregator. + # + # Note: The following fields are mutually exclusive: `hllpp_unique_count`, `sum`, `max`, `min`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] max + # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::Max] + # Max aggregator. + # + # Note: The following fields are mutually exclusive: `max`, `sum`, `hllpp_unique_count`, `min`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] min + # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::Min] + # Min aggregator. + # + # Note: The following fields are mutually exclusive: `min`, `sum`, `hllpp_unique_count`, `max`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Aggregate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Computes the sum of the input values. + # Allowed input: `Int64` + # State: same as input + class Sum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Computes the max of the input values. + # Allowed input: `Int64` + # State: same as input + class Max + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Computes the min of the input values. + # Allowed input: `Int64` + # State: same as input + class Min + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Computes an approximate unique count over the input values. When using + # raw data as input, be careful to use a consistent encoding. Otherwise + # the same value encoded differently could count more than once, or two + # distinct values could count as identical. + # Input: Any, or omit for Raw + # State: TBD + # Special state conversions: `Int64` (the unique count estimate) + class HyperLogLogPlusPlusUniqueCount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..9a7c0269fa42 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,148 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # + # Not recommended for use in new APIs, but still useful for legacy APIs and + # has no plan to be removed. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..1d0a9780457f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigtable-v2/snippets/Gemfile new file mode 100644 index 000000000000..8b28d0322449 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2", path: "../" +else + gem "google-cloud-bigtable-v2" +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-bigtable-v2/snippets/bigtable/check_and_mutate_row.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/check_and_mutate_row.rb new file mode 100644 index 000000000000..5814a6df6cc3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/check_and_mutate_row.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 bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the check_and_mutate_row call in the Bigtable 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::Bigtable::V2::Bigtable::Client#check_and_mutate_row. +# +def check_and_mutate_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new + + # Call the check_and_mutate_row method. + result = client.check_and_mutate_row request + + # The returned object is of type Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse. + p result +end +# [END bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb new file mode 100644 index 000000000000..6b3b09e893c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigtable_v2_generated_Bigtable_ExecuteQuery_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the execute_query call in the Bigtable 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::Bigtable::V2::Bigtable::Client#execute_query. +# +def execute_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new + + # Call the execute_query method to start streaming. + output = client.execute_query request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse + output.each do |current_response| + p current_response + end +end +# [END bigtable_v2_generated_Bigtable_ExecuteQuery_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb new file mode 100644 index 000000000000..b1928966a6c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the generate_initial_change_stream_partitions call in the Bigtable 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::Bigtable::V2::Bigtable::Client#generate_initial_change_stream_partitions. +# +def generate_initial_change_stream_partitions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new + + # Call the generate_initial_change_stream_partitions method to start streaming. + output = client.generate_initial_change_stream_partitions request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse + output.each do |current_response| + p current_response + end +end +# [END bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.rb new file mode 100644 index 000000000000..6f148459d270 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.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 bigtable_v2_generated_Bigtable_MutateRow_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the mutate_row call in the Bigtable 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::Bigtable::V2::Bigtable::Client#mutate_row. +# +def mutate_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::MutateRowRequest.new + + # Call the mutate_row method. + result = client.mutate_row request + + # The returned object is of type Google::Cloud::Bigtable::V2::MutateRowResponse. + p result +end +# [END bigtable_v2_generated_Bigtable_MutateRow_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb new file mode 100644 index 000000000000..319825bda340 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigtable_v2_generated_Bigtable_MutateRows_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the mutate_rows call in the Bigtable 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::Bigtable::V2::Bigtable::Client#mutate_rows. +# +def mutate_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::MutateRowsRequest.new + + # Call the mutate_rows method to start streaming. + output = client.mutate_rows request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigtable::V2::MutateRowsResponse + output.each do |current_response| + p current_response + end +end +# [END bigtable_v2_generated_Bigtable_MutateRows_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.rb new file mode 100644 index 000000000000..eeef89c612d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.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 bigtable_v2_generated_Bigtable_PingAndWarm_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the ping_and_warm call in the Bigtable 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::Bigtable::V2::Bigtable::Client#ping_and_warm. +# +def ping_and_warm + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::PingAndWarmRequest.new + + # Call the ping_and_warm method. + result = client.ping_and_warm request + + # The returned object is of type Google::Cloud::Bigtable::V2::PingAndWarmResponse. + p result +end +# [END bigtable_v2_generated_Bigtable_PingAndWarm_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.rb new file mode 100644 index 000000000000..6d883b1199b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.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 bigtable_v2_generated_Bigtable_PrepareQuery_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the prepare_query call in the Bigtable 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::Bigtable::V2::Bigtable::Client#prepare_query. +# +def prepare_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::PrepareQueryRequest.new + + # Call the prepare_query method. + result = client.prepare_query request + + # The returned object is of type Google::Cloud::Bigtable::V2::PrepareQueryResponse. + p result +end +# [END bigtable_v2_generated_Bigtable_PrepareQuery_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb new file mode 100644 index 000000000000..7ecdc1345f72 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigtable_v2_generated_Bigtable_ReadChangeStream_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the read_change_stream call in the Bigtable 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::Bigtable::V2::Bigtable::Client#read_change_stream. +# +def read_change_stream + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new + + # Call the read_change_stream method to start streaming. + output = client.read_change_stream request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse + output.each do |current_response| + p current_response + end +end +# [END bigtable_v2_generated_Bigtable_ReadChangeStream_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.rb new file mode 100644 index 000000000000..a65a94ba9865 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.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 bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the read_modify_write_row call in the Bigtable 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::Bigtable::V2::Bigtable::Client#read_modify_write_row. +# +def read_modify_write_row + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new + + # Call the read_modify_write_row method. + result = client.read_modify_write_row request + + # The returned object is of type Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse. + p result +end +# [END bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb new file mode 100644 index 000000000000..43326c1aa0be --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigtable_v2_generated_Bigtable_ReadRows_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the read_rows call in the Bigtable 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::Bigtable::V2::Bigtable::Client#read_rows. +# +def read_rows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::ReadRowsRequest.new + + # Call the read_rows method to start streaming. + output = client.read_rows request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigtable::V2::ReadRowsResponse + output.each do |current_response| + p current_response + end +end +# [END bigtable_v2_generated_Bigtable_ReadRows_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb new file mode 100644 index 000000000000..46d45fa6daf8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START bigtable_v2_generated_Bigtable_SampleRowKeys_sync] +require "google/cloud/bigtable/v2" + +## +# Snippet for the sample_row_keys call in the Bigtable 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::Bigtable::V2::Bigtable::Client#sample_row_keys. +# +def sample_row_keys + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Bigtable::V2::Bigtable::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new + + # Call the sample_row_keys method to start streaming. + output = client.sample_row_keys request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse + output.each do |current_response| + p current_response + end +end +# [END bigtable_v2_generated_Bigtable_SampleRowKeys_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json b/owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json new file mode 100644 index 000000000000..2eb0c4fba5ad --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json @@ -0,0 +1,455 @@ +{ + "client_library": { + "name": "google-cloud-bigtable-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.bigtable.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "bigtable_v2_generated_Bigtable_ReadRows_sync", + "title": "Snippet for the read_rows call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#read_rows.", + "file": "bigtable/read_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "read_rows", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#read_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::ReadRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::ReadRowsResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "ReadRows", + "full_name": "google.bigtable.v2.Bigtable.ReadRows", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_SampleRowKeys_sync", + "title": "Snippet for the sample_row_keys call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#sample_row_keys.", + "file": "bigtable/sample_row_keys.rb", + "language": "RUBY", + "client_method": { + "short_name": "sample_row_keys", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#sample_row_keys", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::SampleRowKeysRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::SampleRowKeysResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "SampleRowKeys", + "full_name": "google.bigtable.v2.Bigtable.SampleRowKeys", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_MutateRow_sync", + "title": "Snippet for the mutate_row call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_row.", + "file": "bigtable/mutate_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "mutate_row", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::MutateRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::MutateRowResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "MutateRow", + "full_name": "google.bigtable.v2.Bigtable.MutateRow", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_MutateRows_sync", + "title": "Snippet for the mutate_rows call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_rows.", + "file": "bigtable/mutate_rows.rb", + "language": "RUBY", + "client_method": { + "short_name": "mutate_rows", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_rows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::MutateRowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::MutateRowsResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "MutateRows", + "full_name": "google.bigtable.v2.Bigtable.MutateRows", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync", + "title": "Snippet for the check_and_mutate_row call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#check_and_mutate_row.", + "file": "bigtable/check_and_mutate_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "check_and_mutate_row", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#check_and_mutate_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "CheckAndMutateRow", + "full_name": "google.bigtable.v2.Bigtable.CheckAndMutateRow", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_PingAndWarm_sync", + "title": "Snippet for the ping_and_warm call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#ping_and_warm.", + "file": "bigtable/ping_and_warm.rb", + "language": "RUBY", + "client_method": { + "short_name": "ping_and_warm", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#ping_and_warm", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::PingAndWarmRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::PingAndWarmResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "PingAndWarm", + "full_name": "google.bigtable.v2.Bigtable.PingAndWarm", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync", + "title": "Snippet for the read_modify_write_row call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#read_modify_write_row.", + "file": "bigtable/read_modify_write_row.rb", + "language": "RUBY", + "client_method": { + "short_name": "read_modify_write_row", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#read_modify_write_row", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "ReadModifyWriteRow", + "full_name": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync", + "title": "Snippet for the generate_initial_change_stream_partitions call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#generate_initial_change_stream_partitions.", + "file": "bigtable/generate_initial_change_stream_partitions.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_initial_change_stream_partitions", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#generate_initial_change_stream_partitions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "GenerateInitialChangeStreamPartitions", + "full_name": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_ReadChangeStream_sync", + "title": "Snippet for the read_change_stream call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#read_change_stream.", + "file": "bigtable/read_change_stream.rb", + "language": "RUBY", + "client_method": { + "short_name": "read_change_stream", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#read_change_stream", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "ReadChangeStream", + "full_name": "google.bigtable.v2.Bigtable.ReadChangeStream", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_PrepareQuery_sync", + "title": "Snippet for the prepare_query call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#prepare_query.", + "file": "bigtable/prepare_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "prepare_query", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#prepare_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::PrepareQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::PrepareQueryResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "PrepareQuery", + "full_name": "google.bigtable.v2.Bigtable.PrepareQuery", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "bigtable_v2_generated_Bigtable_ExecuteQuery_sync", + "title": "Snippet for the execute_query call in the Bigtable service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#execute_query.", + "file": "bigtable/execute_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_query", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#execute_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Bigtable::V2::ExecuteQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Bigtable::V2::ExecuteQueryResponse", + "client": { + "short_name": "Bigtable::Client", + "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" + }, + "method": { + "short_name": "ExecuteQuery", + "full_name": "google.bigtable.v2.Bigtable.ExecuteQuery", + "service": { + "short_name": "Bigtable", + "full_name": "google.bigtable.v2.Bigtable" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb b/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb new file mode 100644 index 000000000000..c67b862eb238 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigtable/v2/bigtable" + +class ::Google::Cloud::Bigtable::V2::Bigtable::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_authorized_view_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.authorized_view_path project: "value0", instance: "value1", table: "value2", authorized_view: "value3" + assert_equal "projects/value0/instances/value1/tables/value2/authorizedViews/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", instance: "value1" + assert_equal "projects/value0/instances/value1", path + end + end + + def test_materialized_view_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.materialized_view_path project: "value0", instance: "value1", materialized_view: "value2" + assert_equal "projects/value0/instances/value1/materializedViews/value2", path + end + end + + def test_table_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.table_path project: "value0", instance: "value1", table: "value2" + assert_equal "projects/value0/instances/value1/tables/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb b/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb new file mode 100644 index 000000000000..8733df8081d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/bigtable/v2/bigtable_pb" +require "google/cloud/bigtable/v2/bigtable" + +class ::Google::Cloud::Bigtable::V2::Bigtable::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_read_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::ReadRowsResponse.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 server streaming method. + table_name = "hello world" + authorized_view_name = "hello world" + materialized_view_name = "hello world" + app_profile_id = "hello world" + rows = {} + filter = {} + rows_limit = 42 + request_stats_view = :REQUEST_STATS_VIEW_UNSPECIFIED + reversed = true + + read_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :read_rows, name + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["authorized_view_name"] + assert_equal "hello world", request["materialized_view_name"] + assert_equal "hello world", request["app_profile_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::RowSet), request["rows"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::RowFilter), request["filter"] + assert_equal 42, request["rows_limit"] + assert_equal :REQUEST_STATS_VIEW_UNSPECIFIED, request["request_stats_view"] + assert_equal true, request["reversed"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, read_rows_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.read_rows({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.read_rows table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.read_rows ::Google::Cloud::Bigtable::V2::ReadRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.read_rows({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.read_rows(::Google::Cloud::Bigtable::V2::ReadRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, read_rows_client_stub.call_rpc_count + end + end + + def test_sample_row_keys + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse.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 server streaming method. + table_name = "hello world" + authorized_view_name = "hello world" + materialized_view_name = "hello world" + app_profile_id = "hello world" + + sample_row_keys_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :sample_row_keys, name + assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["authorized_view_name"] + assert_equal "hello world", request["materialized_view_name"] + assert_equal "hello world", request["app_profile_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, sample_row_keys_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.sample_row_keys({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.sample_row_keys table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.sample_row_keys ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.sample_row_keys({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.sample_row_keys(::Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, sample_row_keys_client_stub.call_rpc_count + end + end + + def test_mutate_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::MutateRowResponse.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. + table_name = "hello world" + authorized_view_name = "hello world" + app_profile_id = "hello world" + row_key = "hello world" + mutations = [{}] + idempotency = {} + + mutate_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :mutate_row, name + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["authorized_view_name"] + assert_equal "hello world", request["app_profile_id"] + assert_equal "hello world", request["row_key"] + assert_kind_of ::Google::Cloud::Bigtable::V2::Mutation, request["mutations"].first + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::Idempotency), request["idempotency"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, mutate_row_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.mutate_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.mutate_row ::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.mutate_row(::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, mutate_row_client_stub.call_rpc_count + end + end + + def test_mutate_rows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::MutateRowsResponse.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 server streaming method. + table_name = "hello world" + authorized_view_name = "hello world" + app_profile_id = "hello world" + entries = [{}] + + mutate_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :mutate_rows, name + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["authorized_view_name"] + assert_equal "hello world", request["app_profile_id"] + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry, request["entries"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, mutate_rows_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.mutate_rows({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.mutate_rows table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.mutate_rows ::Google::Cloud::Bigtable::V2::MutateRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.mutate_rows({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.mutate_rows(::Google::Cloud::Bigtable::V2::MutateRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, mutate_rows_client_stub.call_rpc_count + end + end + + def test_check_and_mutate_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse.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. + table_name = "hello world" + authorized_view_name = "hello world" + app_profile_id = "hello world" + row_key = "hello world" + predicate_filter = {} + true_mutations = [{}] + false_mutations = [{}] + + check_and_mutate_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :check_and_mutate_row, name + assert_kind_of ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["authorized_view_name"] + assert_equal "hello world", request["app_profile_id"] + assert_equal "hello world", request["row_key"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::RowFilter), request["predicate_filter"] + assert_kind_of ::Google::Cloud::Bigtable::V2::Mutation, request["true_mutations"].first + assert_kind_of ::Google::Cloud::Bigtable::V2::Mutation, request["false_mutations"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, check_and_mutate_row_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.check_and_mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.check_and_mutate_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.check_and_mutate_row ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.check_and_mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.check_and_mutate_row(::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, check_and_mutate_row_client_stub.call_rpc_count + end + end + + def test_ping_and_warm + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::PingAndWarmResponse.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" + app_profile_id = "hello world" + + ping_and_warm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :ping_and_warm, name + assert_kind_of ::Google::Cloud::Bigtable::V2::PingAndWarmRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["app_profile_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, ping_and_warm_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.ping_and_warm({ name: name, app_profile_id: app_profile_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.ping_and_warm name: name, app_profile_id: app_profile_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.ping_and_warm ::Google::Cloud::Bigtable::V2::PingAndWarmRequest.new(name: name, app_profile_id: app_profile_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.ping_and_warm({ name: name, app_profile_id: app_profile_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.ping_and_warm(::Google::Cloud::Bigtable::V2::PingAndWarmRequest.new(name: name, app_profile_id: app_profile_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, ping_and_warm_client_stub.call_rpc_count + end + end + + def test_read_modify_write_row + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse.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. + table_name = "hello world" + authorized_view_name = "hello world" + app_profile_id = "hello world" + row_key = "hello world" + rules = [{}] + + read_modify_write_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :read_modify_write_row, name + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["authorized_view_name"] + assert_equal "hello world", request["app_profile_id"] + assert_equal "hello world", request["row_key"] + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadModifyWriteRule, request["rules"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, read_modify_write_row_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.read_modify_write_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.read_modify_write_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.read_modify_write_row ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.read_modify_write_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.read_modify_write_row(::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, read_modify_write_row_client_stub.call_rpc_count + end + end + + def test_generate_initial_change_stream_partitions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse.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 server streaming method. + table_name = "hello world" + app_profile_id = "hello world" + + generate_initial_change_stream_partitions_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :generate_initial_change_stream_partitions, name + assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["app_profile_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_initial_change_stream_partitions_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_initial_change_stream_partitions({ table_name: table_name, app_profile_id: app_profile_id }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_initial_change_stream_partitions table_name: table_name, app_profile_id: app_profile_id do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_initial_change_stream_partitions ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new(table_name: table_name, app_profile_id: app_profile_id) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_initial_change_stream_partitions({ table_name: table_name, app_profile_id: app_profile_id }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_initial_change_stream_partitions(::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new(table_name: table_name, app_profile_id: app_profile_id), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_initial_change_stream_partitions_client_stub.call_rpc_count + end + end + + def test_read_change_stream + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse.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 server streaming method. + table_name = "hello world" + app_profile_id = "hello world" + partition = {} + start_time = {} + end_time = {} + heartbeat_duration = {} + + read_change_stream_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :read_change_stream, name + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest, request + assert_equal "hello world", request["table_name"] + assert_equal "hello world", request["app_profile_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::StreamPartition), request["partition"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + assert_equal :start_time, request.start_from + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["heartbeat_duration"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, read_change_stream_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.read_change_stream({ table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.read_change_stream table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.read_change_stream ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new(table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.read_change_stream({ table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.read_change_stream(::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new(table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, read_change_stream_client_stub.call_rpc_count + end + end + + def test_prepare_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::PrepareQueryResponse.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. + instance_name = "hello world" + app_profile_id = "hello world" + query = "hello world" + proto_format = {} + param_types = {} + + prepare_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :prepare_query, name + assert_kind_of ::Google::Cloud::Bigtable::V2::PrepareQueryRequest, request + assert_equal "hello world", request["instance_name"] + assert_equal "hello world", request["app_profile_id"] + assert_equal "hello world", request["query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::ProtoFormat), request["proto_format"] + assert_equal :proto_format, request.data_format + assert_equal({}, request["param_types"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, prepare_query_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.prepare_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.prepare_query instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.prepare_query ::Google::Cloud::Bigtable::V2::PrepareQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.prepare_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.prepare_query(::Google::Cloud::Bigtable::V2::PrepareQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, prepare_query_client_stub.call_rpc_count + end + end + + def test_execute_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse.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 server streaming method. + instance_name = "hello world" + app_profile_id = "hello world" + query = "hello world" + prepared_query = "hello world" + proto_format = {} + resume_token = "hello world" + params = {} + + execute_query_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :execute_query, name + assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest, request + assert_equal "hello world", request["instance_name"] + assert_equal "hello world", request["app_profile_id"] + assert_equal "hello world", request["query"] + assert_equal "hello world", request["prepared_query"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::ProtoFormat), request["proto_format"] + assert_equal :proto_format, request.data_format + assert_equal "hello world", request["resume_token"] + assert_equal({}, request["params"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_query_client_stub do + # Create client + client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.execute_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.execute_query instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.execute_query ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.execute_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.execute_query(::Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_query_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::Bigtable::V2::Bigtable::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::Bigtable::V2::Bigtable::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::Bigtable::V2::Bigtable::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Bigtable::V2::Bigtable::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/.gitignore b/owl-bot-staging/google-cloud-billing-budgets-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1/.repo-metadata.json new file mode 100644 index 000000000000..4d0982fd70aa --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "billingbudgets.googleapis.com", + "api_shortname": "billingbudgets", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1/latest", + "distribution_name": "google-cloud-billing-budgets-v1", + "is_cloud": true, + "language": "ruby", + "name": "billingbudgets", + "name_pretty": "Billing Budgets V1 API", + "product_documentation": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BILLING_BUDGETS", + "ruby-cloud-product-url": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml b/owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml new file mode 100644 index 000000000000..dc447c9263d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-billing-budgets-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-billing-budgets-v1.rb" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/.toys.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/.yardopts b/owl-bot-staging/google-cloud-billing-budgets-v1/.yardopts new file mode 100644 index 000000000000..3c6728b9e74f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Billing Budgets 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-billing-budgets-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-billing-budgets-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..df4412dd47b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-billing-budgets-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-billing-budgets-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/billing/budgets/v1" + +client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/billing/budgets/v1" + +::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::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-billing-budgets-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/billing/budgets/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::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-billing-budgets-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-billing-budgets-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/LICENSE.md b/owl-bot-staging/google-cloud-billing-budgets-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1/README.md new file mode 100644 index 000000000000..1dcd3d2bc2fc --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Billing Budgets V1 API + +The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan. + +Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Billing Budgets V1 API. Most users should consider using +the main client gem, +[google-cloud-billing-budgets](https://rubygems.org/gems/google-cloud-billing-budgets). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-billing-budgets-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/billingbudgets.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/billing/budgets/v1" + +client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new +request = ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new # (request fields as keyword arguments...) +response = client.create_budget request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/billing/docs/how-to/budget-api-overview) +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/billing/budgets/v1" +require "logger" + +client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::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-billing-budgets`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-billing-budgets-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-billing-budgets`. +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-billing-budgets-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-billing-budgets-v1/Rakefile b/owl-bot-staging/google-cloud-billing-budgets-v1/Rakefile new file mode 100644 index 000000000000..e3e19588f9c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BILLING_BUDGETS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BILLING_BUDGETS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BILLING_BUDGETS_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 BILLING_BUDGETS_TEST_PROJECT=test123 BILLING_BUDGETS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/billing/budgets/v1/budget_service/credentials" + ::Google::Cloud::Billing::Budgets::V1::BudgetService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BILLING_BUDGETS_PROJECT"] = project + ENV["BILLING_BUDGETS_TEST_PROJECT"] = project + ENV["BILLING_BUDGETS_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-billing-budgets-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-billing-budgets-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-billing-budgets-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-billing-budgets-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-billing-budgets-v1" + header "google-cloud-billing-budgets-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-billing-budgets-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-billing-budgets-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-billing-budgets-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-billing-budgets-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-billing-budgets-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1/gapic_metadata.json new file mode 100644 index 000000000000..8d6ad700a101 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.billing.budgets.v1", + "libraryPackage": "::Google::Cloud::Billing::Budgets::V1", + "services": { + "BudgetService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client", + "rpcs": { + "CreateBudget": { + "methods": [ + "create_budget" + ] + }, + "UpdateBudget": { + "methods": [ + "update_budget" + ] + }, + "GetBudget": { + "methods": [ + "get_budget" + ] + }, + "ListBudgets": { + "methods": [ + "list_budgets" + ] + }, + "DeleteBudget": { + "methods": [ + "delete_budget" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec b/owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec new file mode 100644 index 000000000000..83e9e358c91d --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/billing/budgets/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-billing-budgets-v1" + gem.version = Google::Cloud::Billing::Budgets::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details." + gem.summary = "The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-v1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-v1.rb new file mode 100644 index 000000000000..10c551ea9723 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-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/billing/budgets/v1" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb new file mode 100644 index 000000000000..04752524d37a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/billing/budgets/v1/budget_service" +require "google/cloud/billing/budgets/v1/version" + +module Google + module Cloud + module Billing + module Budgets + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/billing/budgets/v1" + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/billing/budgets/v1" + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/billing/budgets/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb new file mode 100644 index 000000000000..fd6927afae1b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/billing/budgets/v1/budget_model.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' +require 'google/type/date_pb' +require 'google/type/money_pb' + + +descriptor_data = "\n2google/cloud/billing/budgets/v1/budget_model.proto\x12\x1fgoogle.cloud.billing.budgets.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\x1a\x17google/type/money.proto\"\xcf\x03\n\x06\x42udget\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\rbudget_filter\x18\x03 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.FilterB\x03\xe0\x41\x01\x12\x42\n\x06\x61mount\x18\x04 \x01(\x0b\x32-.google.cloud.billing.budgets.v1.BudgetAmountB\x03\xe0\x41\x02\x12L\n\x0fthreshold_rules\x18\x05 \x03(\x0b\x32..google.cloud.billing.budgets.v1.ThresholdRuleB\x03\xe0\x41\x01\x12S\n\x12notifications_rule\x18\x06 \x01(\x0b\x32\x32.google.cloud.billing.budgets.v1.NotificationsRuleB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:]\xea\x41Z\n$billingbudgets.googleapis.com/Budget\x12\x32\x62illingAccounts/{billing_account}/budgets/{budget}\"\xa0\x01\n\x0c\x42udgetAmount\x12.\n\x10specified_amount\x18\x01 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12O\n\x12last_period_amount\x18\x02 \x01(\x0b\x32\x31.google.cloud.billing.budgets.v1.LastPeriodAmountH\x00\x42\x0f\n\rbudget_amount\"\x12\n\x10LastPeriodAmount\"\xc8\x01\n\rThresholdRule\x12\x1e\n\x11threshold_percent\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12N\n\x0bspend_basis\x18\x02 \x01(\x0e\x32\x34.google.cloud.billing.budgets.v1.ThresholdRule.BasisB\x03\xe0\x41\x01\"G\n\x05\x42\x61sis\x12\x15\n\x11\x42\x41SIS_UNSPECIFIED\x10\x00\x12\x11\n\rCURRENT_SPEND\x10\x01\x12\x14\n\x10\x46ORECASTED_SPEND\x10\x02\"\xd5\x01\n\x11NotificationsRule\x12\x19\n\x0cpubsub_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eschema_version\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12-\n monitoring_notification_channels\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12+\n\x1e\x64isable_default_iam_recipients\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x65nable_project_level_recipients\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xc4\x05\n\x06\x46ilter\x12\x15\n\x08projects\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12resource_ancestors\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63redit_types\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x16\x63redit_types_treatment\x18\x04 \x01(\x0e\x32<.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatmentB\x03\xe0\x41\x01\x12\x15\n\x08services\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsubaccounts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12H\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.billing.budgets.v1.Filter.LabelsEntryB\x03\xe0\x41\x01\x12O\n\x0f\x63\x61lendar_period\x18\x08 \x01(\x0e\x32/.google.cloud.billing.budgets.v1.CalendarPeriodB\x03\xe0\x41\x01H\x00\x12K\n\rcustom_period\x18\t \x01(\x0b\x32-.google.cloud.billing.budgets.v1.CustomPeriodB\x03\xe0\x41\x01H\x00\x1aI\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValue:\x02\x38\x01\"\x8f\x01\n\x14\x43reditTypesTreatment\x12&\n\"CREDIT_TYPES_TREATMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13INCLUDE_ALL_CREDITS\x10\x01\x12\x17\n\x13\x45XCLUDE_ALL_CREDITS\x10\x02\x12\x1d\n\x19INCLUDE_SPECIFIED_CREDITS\x10\x03\x42\x0e\n\x0cusage_period\"d\n\x0c\x43ustomPeriod\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01*S\n\x0e\x43\x61lendarPeriod\x12\x1f\n\x1b\x43\x41LENDAR_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x0b\n\x07QUARTER\x10\x02\x12\x08\n\x04YEAR\x10\x03\x42x\n#com.google.cloud.billing.budgets.v1B\x10\x42udgetModelProtoP\x01Z=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Billing + module Budgets + module V1 + Budget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.Budget").msgclass + BudgetAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.BudgetAmount").msgclass + LastPeriodAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.LastPeriodAmount").msgclass + ThresholdRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ThresholdRule").msgclass + ThresholdRule::Basis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ThresholdRule.Basis").enummodule + NotificationsRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.NotificationsRule").msgclass + Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.Filter").msgclass + Filter::CreditTypesTreatment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment").enummodule + CustomPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.CustomPeriod").msgclass + CalendarPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.CalendarPeriod").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb new file mode 100644 index 000000000000..cfcaa453bac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/billing/budgets/v1/version" + +require "google/cloud/billing/budgets/v1/budget_service/credentials" +require "google/cloud/billing/budgets/v1/budget_service/paths" +require "google/cloud/billing/budgets/v1/budget_service/client" +require "google/cloud/billing/budgets/v1/budget_service/rest" + +module Google + module Cloud + module Billing + module Budgets + module V1 + ## + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/billing/budgets/v1/budget_service" + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/billing/budgets/v1/budget_service/rest" + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + module BudgetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "budget_service", "helpers.rb" +require "google/cloud/billing/budgets/v1/budget_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb new file mode 100644 index 000000000000..210b31807b17 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb @@ -0,0 +1,917 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1/budget_service_pb" + +module Google + module Cloud + module Billing + module Budgets + module V1 + module BudgetService + ## + # Client for the BudgetService service. + # + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "billingbudgets.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :budget_service_stub + + ## + # Configure the BudgetService Client class. + # + # See {::Google::Cloud::Billing::Budgets::V1::BudgetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BudgetService clients + # ::Google::Cloud::Billing::Budgets::V1::BudgetService::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", "Billing", "Budgets", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_budget.timeout = 60.0 + + default_config.rpcs.update_budget.timeout = 60.0 + default_config.rpcs.update_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_budget.timeout = 60.0 + default_config.rpcs.get_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_budgets.timeout = 60.0 + default_config.rpcs.list_budgets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_budget.timeout = 60.0 + default_config.rpcs.delete_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BudgetService 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::Billing::Budgets::V1::BudgetService::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 + @budget_service_stub.universe_domain + end + + ## + # Create a new BudgetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BudgetService 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/billing/budgets/v1/budget_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 + + @budget_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Billing::Budgets::V1::BudgetService::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 + ) + + @budget_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @budget_service_stub.logger + end + + # Service calls + + ## + # Creates a new budget. See + # [Quotas and limits](https://cloud.google.com/billing/quotas) + # for more information on the limits of the number of budgets you can create. + # + # @overload create_budget(request, options = nil) + # Pass arguments to `create_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(parent: nil, budget: nil) + # Pass arguments to `create_budget` via keyword arguments. Note that at + # least one keyword argument is 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 name of the billing account to create the budget in. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] + # Required. Budget to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::Budgets::V1::Budget] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new + # + # # Call the create_budget method. + # result = client.create_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + # p result + # + def create_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :create_budget, 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 budget and returns the updated budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. Budget fields that are not exposed in + # this API will not be changed by this method. + # + # @overload update_budget(request, options = nil) + # Pass arguments to `update_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(budget: nil, update_mask: nil) + # Pass arguments to `update_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] + # Required. The updated budget object. + # The budget to update is specified by the budget name in the budget. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Indicates which fields in the provided budget to update. + # Read-only fields (such as `name`) cannot be changed. If this is not + # provided, then only fields with non-default values from the request are + # updated. See + # https://developers.google.com/protocol-buffers/docs/proto3#default for more + # details about default values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::Budgets::V1::Budget] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new + # + # # Call the update_budget method. + # result = client.update_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + # p result + # + def update_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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.budget&.name + header_params["budget.name"] = request.budget.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_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :update_budget, 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 + + ## + # Returns a budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + # + # @overload get_budget(request, options = nil) + # Pass arguments to `get_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(name: nil) + # Pass arguments to `get_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of budget to get. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::Budgets::V1::Budget] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new + # + # # Call the get_budget method. + # result = client.get_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + # p result + # + def get_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :get_budget, 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 + + ## + # Returns a list of budgets for a billing account. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + # + # @overload list_budgets(request, options = nil) + # Pass arguments to `list_budgets` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budgets(parent: nil, scope: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_budgets` via keyword arguments. Note that at + # least one keyword argument is 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. Name of billing account to list budgets under. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @param scope [::String] + # Optional. Set the scope of the budgets to be returned, in the format of the + # resource name. The scope of a budget is the cost that it tracks, such as + # costs for a single project, or the costs for all projects in a folder. Only + # project scope (in the format of "projects/project-id" or "projects/123") is + # supported in this field. When this field is set to a project's resource + # name, the budgets returned are tracking the costs for that project. + # @param page_size [::Integer] + # Optional. The maximum number of budgets to return per page. + # The default and maximum value are 100. + # @param page_token [::String] + # Optional. The value returned by the last `ListBudgetsResponse` which + # indicates that this is a continuation of a prior `ListBudgets` call, + # and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new + # + # # Call the list_budgets method. + # result = client.list_budgets 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::Billing::Budgets::V1::Budget. + # p item + # end + # + def list_budgets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest + + # Converts hash 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_budgets.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::Billing::Budgets::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_budgets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_budgets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :list_budgets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @budget_service_stub, :list_budgets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a budget. Returns successfully if already deleted. + # + # @overload delete_budget(request, options = nil) + # Pass arguments to `delete_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(name: nil) + # Pass arguments to `delete_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the budget to delete. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new + # + # # Call the delete_budget method. + # result = client.delete_budget request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :delete_budget, 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 BudgetService API. + # + # This class represents the configuration for BudgetService, + # 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::Billing::Budgets::V1::BudgetService::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 + # # create_budget to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_budget.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_budget.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::Billing::Budgets::V1::BudgetService::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 = "billingbudgets.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 BudgetService 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 `create_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :create_budget + ## + # RPC-specific configuration for `update_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :update_budget + ## + # RPC-specific configuration for `get_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :get_budget + ## + # RPC-specific configuration for `list_budgets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_budgets + ## + # RPC-specific configuration for `delete_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_budget + + # @private + def initialize parent_rpcs = nil + create_budget_config = parent_rpcs.create_budget if parent_rpcs.respond_to? :create_budget + @create_budget = ::Gapic::Config::Method.new create_budget_config + update_budget_config = parent_rpcs.update_budget if parent_rpcs.respond_to? :update_budget + @update_budget = ::Gapic::Config::Method.new update_budget_config + get_budget_config = parent_rpcs.get_budget if parent_rpcs.respond_to? :get_budget + @get_budget = ::Gapic::Config::Method.new get_budget_config + list_budgets_config = parent_rpcs.list_budgets if parent_rpcs.respond_to? :list_budgets + @list_budgets = ::Gapic::Config::Method.new list_budgets_config + delete_budget_config = parent_rpcs.delete_budget if parent_rpcs.respond_to? :delete_budget + @delete_budget = ::Gapic::Config::Method.new delete_budget_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.rb new file mode 100644 index 000000000000..4fad20903d49 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Billing + module Budgets + module V1 + module BudgetService + # Credentials for the BudgetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BILLING_BUDGETS_CREDENTIALS", + "BILLING_BUDGETS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BILLING_BUDGETS_CREDENTIALS_JSON", + "BILLING_BUDGETS_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 +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb new file mode 100644 index 000000000000..baf4b4854f20 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Billing + module Budgets + module V1 + module BudgetService + # Path helper methods for the BudgetService API. + module Paths + ## + # Create a fully-qualified BillingAccount resource string. + # + # The resource will be in the following format: + # + # `billingAccounts/{billing_account}` + # + # @param billing_account [String] + # + # @return [::String] + def billing_account_path billing_account: + "billingAccounts/#{billing_account}" + end + + ## + # Create a fully-qualified Budget resource string. + # + # The resource will be in the following format: + # + # `billingAccounts/{billing_account}/budgets/{budget}` + # + # @param billing_account [String] + # @param budget [String] + # + # @return [::String] + def budget_path billing_account:, budget: + raise ::ArgumentError, "billing_account cannot contain /" if billing_account.to_s.include? "/" + + "billingAccounts/#{billing_account}/budgets/#{budget}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb new file mode 100644 index 000000000000..8d5e31077772 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/billing/budgets/v1/version" + +require "google/cloud/billing/budgets/v1/budget_service/credentials" +require "google/cloud/billing/budgets/v1/budget_service/paths" +require "google/cloud/billing/budgets/v1/budget_service/rest/client" + +module Google + module Cloud + module Billing + module Budgets + module V1 + ## + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/billing/budgets/v1/budget_service/rest" + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + module BudgetService + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/billing/budgets/v1/budget_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb new file mode 100644 index 000000000000..86317c5a6dec --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb @@ -0,0 +1,839 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1/budget_service_pb" +require "google/cloud/billing/budgets/v1/budget_service/rest/service_stub" + +module Google + module Cloud + module Billing + module Budgets + module V1 + module BudgetService + module Rest + ## + # REST client for the BudgetService service. + # + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "billingbudgets.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :budget_service_stub + + ## + # Configure the BudgetService Client class. + # + # See {::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BudgetService clients + # ::Google::Cloud::Billing::Budgets::V1::BudgetService::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", "Billing", "Budgets", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_budget.timeout = 60.0 + + default_config.rpcs.update_budget.timeout = 60.0 + default_config.rpcs.update_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_budget.timeout = 60.0 + default_config.rpcs.get_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_budgets.timeout = 60.0 + default_config.rpcs.list_budgets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_budget.timeout = 60.0 + default_config.rpcs.delete_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BudgetService 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::Billing::Budgets::V1::BudgetService::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 + @budget_service_stub.universe_domain + end + + ## + # Create a new BudgetService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BudgetService 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 + + @budget_service_stub = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @budget_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @budget_service_stub.logger + end + + # Service calls + + ## + # Creates a new budget. See + # [Quotas and limits](https://cloud.google.com/billing/quotas) + # for more information on the limits of the number of budgets you can create. + # + # @overload create_budget(request, options = nil) + # Pass arguments to `create_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(parent: nil, budget: nil) + # Pass arguments to `create_budget` via keyword arguments. Note that at + # least one keyword argument is 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 name of the billing account to create the budget in. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] + # Required. Budget to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::Budgets::V1::Budget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new + # + # # Call the create_budget method. + # result = client.create_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + # p result + # + def create_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.create_budget 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 budget and returns the updated budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. Budget fields that are not exposed in + # this API will not be changed by this method. + # + # @overload update_budget(request, options = nil) + # Pass arguments to `update_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(budget: nil, update_mask: nil) + # Pass arguments to `update_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] + # Required. The updated budget object. + # The budget to update is specified by the budget name in the budget. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Indicates which fields in the provided budget to update. + # Read-only fields (such as `name`) cannot be changed. If this is not + # provided, then only fields with non-default values from the request are + # updated. See + # https://developers.google.com/protocol-buffers/docs/proto3#default for more + # details about default values. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::Budgets::V1::Budget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new + # + # # Call the update_budget method. + # result = client.update_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + # p result + # + def update_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.update_budget 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 + + ## + # Returns a budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + # + # @overload get_budget(request, options = nil) + # Pass arguments to `get_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(name: nil) + # Pass arguments to `get_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of budget to get. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::Budgets::V1::Budget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new + # + # # Call the get_budget method. + # result = client.get_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + # p result + # + def get_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.get_budget 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 + + ## + # Returns a list of budgets for a billing account. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + # + # @overload list_budgets(request, options = nil) + # Pass arguments to `list_budgets` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budgets(parent: nil, scope: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_budgets` via keyword arguments. Note that at + # least one keyword argument is 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. Name of billing account to list budgets under. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @param scope [::String] + # Optional. Set the scope of the budgets to be returned, in the format of the + # resource name. The scope of a budget is the cost that it tracks, such as + # costs for a single project, or the costs for all projects in a folder. Only + # project scope (in the format of "projects/project-id" or "projects/123") is + # supported in this field. When this field is set to a project's resource + # name, the budgets returned are tracking the costs for that project. + # @param page_size [::Integer] + # Optional. The maximum number of budgets to return per page. + # The default and maximum value are 100. + # @param page_token [::String] + # Optional. The value returned by the last `ListBudgetsResponse` which + # indicates that this is a continuation of a prior `ListBudgets` call, + # and that the system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new + # + # # Call the list_budgets method. + # result = client.list_budgets 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::Billing::Budgets::V1::Budget. + # p item + # end + # + def list_budgets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest + + # Converts hash 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_budgets.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::Billing::Budgets::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_budgets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_budgets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.list_budgets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @budget_service_stub, :list_budgets, "budgets", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a budget. Returns successfully if already deleted. + # + # @overload delete_budget(request, options = nil) + # Pass arguments to `delete_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(name: nil) + # Pass arguments to `delete_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the budget to delete. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new + # + # # Call the delete_budget method. + # result = client.delete_budget request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.delete_budget 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 BudgetService REST API. + # + # This class represents the configuration for BudgetService 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::Billing::Budgets::V1::BudgetService::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 + # # create_budget to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_budget.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_budget.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 = "billingbudgets.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 BudgetService 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 `create_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :create_budget + ## + # RPC-specific configuration for `update_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :update_budget + ## + # RPC-specific configuration for `get_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :get_budget + ## + # RPC-specific configuration for `list_budgets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_budgets + ## + # RPC-specific configuration for `delete_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_budget + + # @private + def initialize parent_rpcs = nil + create_budget_config = parent_rpcs.create_budget if parent_rpcs.respond_to? :create_budget + @create_budget = ::Gapic::Config::Method.new create_budget_config + update_budget_config = parent_rpcs.update_budget if parent_rpcs.respond_to? :update_budget + @update_budget = ::Gapic::Config::Method.new update_budget_config + get_budget_config = parent_rpcs.get_budget if parent_rpcs.respond_to? :get_budget + @get_budget = ::Gapic::Config::Method.new get_budget_config + list_budgets_config = parent_rpcs.list_budgets if parent_rpcs.respond_to? :list_budgets + @list_budgets = ::Gapic::Config::Method.new list_budgets_config + delete_budget_config = parent_rpcs.delete_budget if parent_rpcs.respond_to? :delete_budget + @delete_budget = ::Gapic::Config::Method.new delete_budget_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb new file mode 100644 index 000000000000..e6842df2fc30 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb @@ -0,0 +1,390 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1/budget_service_pb" + +module Google + module Cloud + module Billing + module Budgets + module V1 + module BudgetService + module Rest + ## + # REST service stub for the BudgetService 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 create_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest] + # 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::Billing::Budgets::V1::Budget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # A result object deserialized from the server's reply + def create_budget request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_budget_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_budget", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest] + # 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::Billing::Budgets::V1::Budget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # A result object deserialized from the server's reply + def update_budget request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_budget_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_budget", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest] + # 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::Billing::Budgets::V1::Budget] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # A result object deserialized from the server's reply + def get_budget request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_budget_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_budget", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budgets REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest] + # 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::Billing::Budgets::V1::ListBudgetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse] + # A result object deserialized from the server's reply + def list_budgets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_budgets_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_budgets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse.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_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest] + # 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_budget request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_budget_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_budget", + 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 create_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest] + # 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_budget_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/budgets", + body: "budget", + matches: [ + ["parent", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest] + # 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_budget_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{budget.name}", + body: "budget", + matches: [ + ["budget.name", %r{^billingAccounts/[^/]+/budgets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest] + # 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_budget_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^billingAccounts/[^/]+/budgets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_budgets REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest] + # 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_budgets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/budgets", + matches: [ + ["parent", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_budget REST call + # + # @param request_pb [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest] + # 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_budget_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^billingAccounts/[^/]+/budgets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb new file mode 100644 index 000000000000..045f3faf1f79 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/billing/budgets/v1/budget_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/billing/budgets/v1/budget_model_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n4google/cloud/billing/budgets/v1/budget_service.proto\x12\x1fgoogle.cloud.billing.budgets.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/billing/budgets/v1/budget_model.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x91\x01\n\x13\x43reateBudgetRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12<\n\x06\x62udget\x18\x02 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.BudgetB\x03\xe0\x41\x02\"\x89\x01\n\x13UpdateBudgetRequest\x12<\n\x06\x62udget\x18\x01 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.BudgetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x10GetBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget\"\x97\x01\n\x12ListBudgetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"h\n\x13ListBudgetsResponse\x12\x38\n\x07\x62udgets\x18\x01 \x03(\x0b\x32\'.google.cloud.billing.budgets.v1.Budget\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x13\x44\x65leteBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget2\xf7\x07\n\rBudgetService\x12\xb5\x01\n\x0c\x43reateBudget\x12\x34.google.cloud.billing.budgets.v1.CreateBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"F\xda\x41\rparent,budget\x82\xd3\xe4\x93\x02\x30\"&/v1/{parent=billingAccounts/*}/budgets:\x06\x62udget\x12\xc1\x01\n\x0cUpdateBudget\x12\x34.google.cloud.billing.budgets.v1.UpdateBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"R\xda\x41\x12\x62udget,update_mask\x82\xd3\xe4\x93\x02\x37\x32-/v1/{budget.name=billingAccounts/*/budgets/*}:\x06\x62udget\x12\x9e\x01\n\tGetBudget\x12\x31.google.cloud.billing.budgets.v1.GetBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1/{name=billingAccounts/*/budgets/*}\x12\xb1\x01\n\x0bListBudgets\x12\x33.google.cloud.billing.budgets.v1.ListBudgetsRequest\x1a\x34.google.cloud.billing.budgets.v1.ListBudgetsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=billingAccounts/*}/budgets\x12\x93\x01\n\x0c\x44\x65leteBudget\x12\x34.google.cloud.billing.budgets.v1.DeleteBudgetRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1/{name=billingAccounts/*/budgets/*}\x1a\x7f\xca\x41\x1d\x62illingbudgets.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-platformBz\n#com.google.cloud.billing.budgets.v1B\x12\x42udgetServiceProtoP\x01Z=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Billing + module Budgets + module V1 + CreateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.CreateBudgetRequest").msgclass + UpdateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.UpdateBudgetRequest").msgclass + GetBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.GetBudgetRequest").msgclass + ListBudgetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ListBudgetsRequest").msgclass + ListBudgetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ListBudgetsResponse").msgclass + DeleteBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.DeleteBudgetRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb new file mode 100644 index 000000000000..c474bd0b200e --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb @@ -0,0 +1,72 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/billing/budgets/v1/budget_service.proto for package 'google.cloud.billing.budgets.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/billing/budgets/v1/budget_service_pb' + +module Google + module Cloud + module Billing + module Budgets + module V1 + module BudgetService + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.billing.budgets.v1.BudgetService' + + # Creates a new budget. See + # [Quotas and limits](https://cloud.google.com/billing/quotas) + # for more information on the limits of the number of budgets you can create. + rpc :CreateBudget, ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1::Budget + # Updates a budget and returns the updated budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. Budget fields that are not exposed in + # this API will not be changed by this method. + rpc :UpdateBudget, ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1::Budget + # Returns a budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + rpc :GetBudget, ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, ::Google::Cloud::Billing::Budgets::V1::Budget + # Returns a list of budgets for a billing account. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + rpc :ListBudgets, ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse + # Deletes a budget. Returns successfully if already deleted. + rpc :DeleteBudget, ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb new file mode 100644 index 000000000000..7c2dfeea0785 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/billing/budgets/v1/budget_service/rest" +require "google/cloud/billing/budgets/v1/version" + +module Google + module Cloud + module Billing + module Budgets + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/billing/budgets/v1/rest" + # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb new file mode 100644 index 000000000000..f6a5569be827 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module Budgets + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md new file mode 100644 index 000000000000..bfa240059526 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Billing Budgets 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-billing-budgets-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb new file mode 100644 index 000000000000..ee47bd9f5303 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb @@ -0,0 +1,389 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module Budgets + module V1 + # A budget is a plan that describes what you expect to spend on Cloud + # projects, plus the rules to execute as spend is tracked against that plan, + # (for example, send an alert when 90% of the target spend is met). + # The budget time period is configurable, with options such as month (default), + # quarter, year, or custom time period. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the budget. + # The resource name implies the scope of a budget. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # @!attribute [rw] display_name + # @return [::String] + # User data for display name in UI. The name must be less than or equal to 60 + # characters. + # @!attribute [rw] budget_filter + # @return [::Google::Cloud::Billing::Budgets::V1::Filter] + # Optional. Filters that define which resources are used to compute the + # actual spend against the budget amount, such as projects, services, and the + # budget's time period, as well as other filters. + # @!attribute [rw] amount + # @return [::Google::Cloud::Billing::Budgets::V1::BudgetAmount] + # Required. Budgeted amount. + # @!attribute [rw] threshold_rules + # @return [::Array<::Google::Cloud::Billing::Budgets::V1::ThresholdRule>] + # Optional. Rules that trigger alerts (notifications of thresholds + # being crossed) when spend exceeds the specified percentages of the budget. + # + # Optional for `pubsubTopic` notifications. + # + # Required if using email notifications. + # @!attribute [rw] notifications_rule + # @return [::Google::Cloud::Billing::Budgets::V1::NotificationsRule] + # Optional. Rules to apply to notifications sent based on budget spend and + # thresholds. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag to validate that the object is unchanged for a + # read-modify-write operation. + # An empty etag causes an update to overwrite other changes. + class Budget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The budgeted amount for each usage period. + # @!attribute [rw] specified_amount + # @return [::Google::Type::Money] + # A specified amount to use as the budget. + # `currency_code` is optional. If specified when creating a budget, it must + # match the currency of the billing account. If specified when updating a + # budget, it must match the currency_code of the existing budget. + # The `currency_code` is provided on output. + # + # Note: The following fields are mutually exclusive: `specified_amount`, `last_period_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] last_period_amount + # @return [::Google::Cloud::Billing::Budgets::V1::LastPeriodAmount] + # Use the last period's actual spend as the budget for the present period. + # LastPeriodAmount can only be set when the budget's time period is a + # {::Google::Cloud::Billing::Budgets::V1::Filter#calendar_period Filter.calendar_period}. + # It cannot be set in combination with + # {::Google::Cloud::Billing::Budgets::V1::Filter#custom_period Filter.custom_period}. + # + # Note: The following fields are mutually exclusive: `last_period_amount`, `specified_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BudgetAmount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a budget amount targeted to the last + # {::Google::Cloud::Billing::Budgets::V1::Filter#calendar_period Filter.calendar_period} + # spend. At this time, the amount is automatically 100% of the last calendar + # period's spend; that is, there are no other options yet. + # LastPeriodAmount cannot be set for a budget configured with + # a + # {::Google::Cloud::Billing::Budgets::V1::Filter#custom_period Filter.custom_period}. + class LastPeriodAmount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ThresholdRule contains the definition of a threshold. Threshold rules define + # the triggering events used to generate a budget notification email. When a + # threshold is crossed (spend exceeds the specified percentages of the + # budget), budget alert emails are sent to the email recipients you specify + # in the + # [NotificationsRule](#notificationsrule). + # + # Threshold rules also affect the fields included in the + # [JSON data + # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) + # sent to a Pub/Sub topic. + # + # Threshold rules are _required_ if using email notifications. + # + # Threshold rules are _optional_ if only setting a + # [`pubsubTopic` NotificationsRule](#NotificationsRule), + # unless you want your JSON data object to include data about the thresholds + # you set. + # + # For more information, see + # [set budget threshold rules and + # actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions). + # @!attribute [rw] threshold_percent + # @return [::Float] + # Required. Send an alert when this threshold is exceeded. + # This is a 1.0-based percentage, so 0.5 = 50%. + # Validation: non-negative number. + # @!attribute [rw] spend_basis + # @return [::Google::Cloud::Billing::Budgets::V1::ThresholdRule::Basis] + # Optional. The type of basis used to determine if spend has passed the + # threshold. Behavior defaults to CURRENT_SPEND if not set. + class ThresholdRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of basis used to determine if spend has passed the threshold. + module Basis + # Unspecified threshold basis. + BASIS_UNSPECIFIED = 0 + + # Use current spend as the basis for comparison against the threshold. + CURRENT_SPEND = 1 + + # Use forecasted spend for the period as the basis for comparison against + # the threshold. + # FORECASTED_SPEND can only be set when the budget's time period is a + # {::Google::Cloud::Billing::Budgets::V1::Filter#calendar_period Filter.calendar_period}. + # It cannot be set in combination with + # {::Google::Cloud::Billing::Budgets::V1::Filter#custom_period Filter.custom_period}. + FORECASTED_SPEND = 2 + end + end + + # NotificationsRule defines notifications that are sent based on budget spend + # and thresholds. + # @!attribute [rw] pubsub_topic + # @return [::String] + # Optional. The name of the Pub/Sub topic where budget-related messages are + # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates + # are sent to the topic at regular intervals; the timing of the updates is + # not dependent on the [threshold rules](#thresholdrule) you've set. + # + # Note that if you want your + # [Pub/Sub JSON + # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) + # to contain data for `alertThresholdExceeded`, you need at least one + # [alert threshold rule](#thresholdrule). When you set threshold rules, you + # must also enable at least one of the email notification options, either + # using the default IAM recipients or Cloud Monitoring email notification + # channels. + # + # To use Pub/Sub topics with budgets, you must do the following: + # + # 1. Create the Pub/Sub topic + # before connecting it to your budget. For guidance, see + # [Manage programmatic budget alert + # notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + # + # 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on + # the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. + # For additional details on Pub/Sub roles and permissions, see + # [Permissions required for this + # task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). + # @!attribute [rw] schema_version + # @return [::String] + # Optional. Required when + # {::Google::Cloud::Billing::Budgets::V1::NotificationsRule#pubsub_topic NotificationsRule.pubsub_topic} + # is set. The schema version of the notification sent to + # {::Google::Cloud::Billing::Budgets::V1::NotificationsRule#pubsub_topic NotificationsRule.pubsub_topic}. + # Only "1.0" is accepted. It represents the JSON schema as defined in + # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. + # @!attribute [rw] monitoring_notification_channels + # @return [::Array<::String>] + # Optional. Email targets to send notifications to when a threshold is + # exceeded. This is in addition to the `DefaultIamRecipients` who receive + # alert emails based on their billing account IAM role. The value is the full + # REST resource name of a Cloud Monitoring email notification channel with + # the form `projects/{project_id}/notificationChannels/{channel_id}`. A + # maximum of 5 email notifications are allowed. + # + # To customize budget alert email recipients with monitoring notification + # channels, you _must create the monitoring notification channels before + # you link them to a budget_. For guidance on setting up notification + # channels to use with budgets, see + # [Customize budget alert email + # recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). + # + # For Cloud Billing budget alerts, you _must use email notification + # channels_. The other types of notification channels are _not_ + # supported, such as Slack, SMS, or PagerDuty. If you want to + # [send budget notifications to + # Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), + # use a pubsubTopic and configure + # [programmatic + # notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). + # @!attribute [rw] disable_default_iam_recipients + # @return [::Boolean] + # Optional. When set to true, disables default notifications sent when a + # threshold is exceeded. Default notifications are sent to those with Billing + # Account Administrator and Billing Account User IAM roles for the target + # account. + # @!attribute [rw] enable_project_level_recipients + # @return [::Boolean] + # Optional. When set to true, and when the budget has a single project + # configured, notifications will be sent to project level recipients of that + # project. This field will be ignored if the budget has multiple or no + # project configured. + # + # Currently, project level recipients are the users with `Owner` role on a + # cloud project. + class NotificationsRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A filter for a budget, limiting the scope of the cost to calculate. + # @!attribute [rw] projects + # @return [::Array<::String>] + # Optional. A set of projects of the form `projects/{project}`, + # specifying that usage from only this set of projects should be + # included in the budget. If omitted, the report includes all usage for + # the billing account, regardless of which project the usage occurred on. + # @!attribute [rw] resource_ancestors + # @return [::Array<::String>] + # Optional. A set of folder and organization names of the form + # `folders/{folderId}` or `organizations/{organizationId}`, specifying that + # usage from only this set of folders and organizations should be included in + # the budget. If omitted, the budget includes all usage that the billing + # account pays for. If the folder or organization contains projects that are + # paid for by a different Cloud Billing account, the budget *doesn't* apply + # to those projects. + # @!attribute [rw] credit_types + # @return [::Array<::String>] + # Optional. If + # {::Google::Cloud::Billing::Budgets::V1::Filter#credit_types_treatment Filter.credit_types_treatment} + # is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be + # subtracted from gross cost to determine the spend for threshold + # calculations. See [a list of acceptable credit type + # values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + # + # If + # {::Google::Cloud::Billing::Budgets::V1::Filter#credit_types_treatment Filter.credit_types_treatment} + # is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. + # @!attribute [rw] credit_types_treatment + # @return [::Google::Cloud::Billing::Budgets::V1::Filter::CreditTypesTreatment] + # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + # @!attribute [rw] services + # @return [::Array<::String>] + # Optional. A set of services of the form `services/{service_id}`, + # specifying that usage from only this set of services should be + # included in the budget. If omitted, the report includes usage for + # all the services. + # The service names are available through the Catalog API: + # https://cloud.google.com/billing/v1/how-tos/catalog-api. + # @!attribute [rw] subaccounts + # @return [::Array<::String>] + # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, + # specifying that usage from only this set of subaccounts should be included + # in the budget. If a subaccount is set to the name of the parent account, + # usage from the parent account is included. If the field is omitted, + # the report includes usage from the parent account and all subaccounts, + # if they exist. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::ListValue}] + # Optional. A single label and value pair specifying that usage from only + # this set of labeled resources should be included in the budget. If omitted, + # the report includes all labeled and unlabeled usage. + # + # An object containing a single `"key": value` pair. Example: `{ "name": + # "wrench" }`. + # + # _Currently, multiple entries or multiple values per entry are not + # allowed._ + # @!attribute [rw] calendar_period + # @return [::Google::Cloud::Billing::Budgets::V1::CalendarPeriod] + # Optional. Specifies to track usage for recurring calendar period. + # For example, assume that CalendarPeriod.QUARTER is set. The budget + # tracks usage from April 1 to June 30, when the current calendar month is + # April, May, June. After that, it tracks usage from July 1 to + # September 30 when the current calendar month is July, August, September, + # so on. + # + # Note: The following fields are mutually exclusive: `calendar_period`, `custom_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_period + # @return [::Google::Cloud::Billing::Budgets::V1::CustomPeriod] + # Optional. Specifies to track usage from any start date (required) to any + # end date (optional). This time period is static, it does not recur. + # + # Note: The following fields are mutually exclusive: `custom_period`, `calendar_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Filter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::ListValue] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies how credits are applied when determining the spend for + # threshold calculations. Budgets track the total cost minus any applicable + # selected credits. + # [See the documentation for a list of credit + # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + module CreditTypesTreatment + CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0 + + # All types of credit are subtracted from the gross cost to determine the + # spend for threshold calculations. + INCLUDE_ALL_CREDITS = 1 + + # All types of credit are added to the net cost to determine the spend for + # threshold calculations. + EXCLUDE_ALL_CREDITS = 2 + + # [Credit + # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type) + # specified in the credit_types field are subtracted from the + # gross cost to determine the spend for threshold calculations. + INCLUDE_SPECIFIED_CREDITS = 3 + end + end + + # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Required. The start date must be after January 1, 2017. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Optional. The end date of the time period. Budgets with elapsed end date + # won't be processed. If unset, specifies to track all usage incurred since + # the start_date. + class CustomPeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `CalendarPeriod` represents the abstract concept of a time period that + # has a canonical start. Grammatically, "the start of the current + # `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian + # Pacific Time (UTC-8). + module CalendarPeriod + # Calendar period is unset. This is the default if the budget is for a + # custom time period (CustomPeriod). + CALENDAR_PERIOD_UNSPECIFIED = 0 + + # A month. Month starts on the first day of each month, such as January 1, + # February 1, March 1, and so on. + MONTH = 1 + + # A quarter. Quarters start on dates January 1, April 1, July 1, and October + # 1 of each year. + QUARTER = 2 + + # A year. Year starts on January 1. + YEAR = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb new file mode 100644 index 000000000000..05eacd754ff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module Budgets + module V1 + # Request for CreateBudget + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the billing account to create the budget in. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @!attribute [rw] budget + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # Required. Budget to create. + class CreateBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateBudget + # @!attribute [rw] budget + # @return [::Google::Cloud::Billing::Budgets::V1::Budget] + # Required. The updated budget object. + # The budget to update is specified by the budget name in the budget. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Indicates which fields in the provided budget to update. + # Read-only fields (such as `name`) cannot be changed. If this is not + # provided, then only fields with non-default values from the request are + # updated. See + # https://developers.google.com/protocol-buffers/docs/proto3#default for more + # details about default values. + class UpdateBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetBudget + # @!attribute [rw] name + # @return [::String] + # Required. Name of budget to get. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + class GetBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListBudgets + # @!attribute [rw] parent + # @return [::String] + # Required. Name of billing account to list budgets under. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @!attribute [rw] scope + # @return [::String] + # Optional. Set the scope of the budgets to be returned, in the format of the + # resource name. The scope of a budget is the cost that it tracks, such as + # costs for a single project, or the costs for all projects in a folder. Only + # project scope (in the format of "projects/project-id" or "projects/123") is + # supported in this field. When this field is set to a project's resource + # name, the budgets returned are tracking the costs for that project. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of budgets to return per page. + # The default and maximum value are 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value returned by the last `ListBudgetsResponse` which + # indicates that this is a continuation of a prior `ListBudgets` call, + # and that the system should return the next page of data. + class ListBudgetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListBudgets + # @!attribute [rw] budgets + # @return [::Array<::Google::Cloud::Billing::Budgets::V1::Budget>] + # List of the budgets owned by the requested billing account. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more budgets that match the + # request; this value should be passed in a new `ListBudgetsRequest`. + class ListBudgetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteBudget + # @!attribute [rw] name + # @return [::String] + # Required. Name of the budget to delete. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + class DeleteBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..1d0a9780457f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb new file mode 100644 index 000000000000..56a32eee300d --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents an amount of money with its currency type. + # @!attribute [rw] currency_code + # @return [::String] + # The three-letter currency code defined in ISO 4217. + # @!attribute [rw] units + # @return [::Integer] + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # @!attribute [rw] nanos + # @return [::Integer] + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + class Money + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/Gemfile new file mode 100644 index 000000000000..34a2b4b14b43 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1", path: "../" +else + gem "google-cloud-billing-budgets-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-billing-budgets-v1/snippets/budget_service/create_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/create_budget.rb new file mode 100644 index 000000000000..09c193126293 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/create_budget.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 billingbudgets_v1_generated_BudgetService_CreateBudget_sync] +require "google/cloud/billing/budgets/v1" + +## +# Snippet for the create_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#create_budget. +# +def create_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new + + # Call the create_budget method. + result = client.create_budget request + + # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + p result +end +# [END billingbudgets_v1_generated_BudgetService_CreateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.rb new file mode 100644 index 000000000000..dfc77645805f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.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 billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] +require "google/cloud/billing/budgets/v1" + +## +# Snippet for the delete_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#delete_budget. +# +def delete_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new + + # Call the delete_budget method. + result = client.delete_budget request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.rb new file mode 100644 index 000000000000..8246e9b4f2d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.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 billingbudgets_v1_generated_BudgetService_GetBudget_sync] +require "google/cloud/billing/budgets/v1" + +## +# Snippet for the get_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#get_budget. +# +def get_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new + + # Call the get_budget method. + result = client.get_budget request + + # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + p result +end +# [END billingbudgets_v1_generated_BudgetService_GetBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.rb new file mode 100644 index 000000000000..67de0896c0dc --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.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 billingbudgets_v1_generated_BudgetService_ListBudgets_sync] +require "google/cloud/billing/budgets/v1" + +## +# Snippet for the list_budgets call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#list_budgets. +# +def list_budgets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new + + # Call the list_budgets method. + result = client.list_budgets 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::Billing::Budgets::V1::Budget. + p item + end +end +# [END billingbudgets_v1_generated_BudgetService_ListBudgets_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.rb new file mode 100644 index 000000000000..f872e0949d77 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.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 billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] +require "google/cloud/billing/budgets/v1" + +## +# Snippet for the update_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#update_budget. +# +def update_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new + + # Call the update_budget method. + result = client.update_budget request + + # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. + p result +end +# [END billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json new file mode 100644 index 000000000000..26b75098d536 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-billing-budgets-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.billing.budgets.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "billingbudgets_v1_generated_BudgetService_CreateBudget_sync", + "title": "Snippet for the create_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#create_budget.", + "file": "budget_service/create_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#create_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1::Budget", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" + }, + "method": { + "short_name": "CreateBudget", + "full_name": "google.cloud.billing.budgets.v1.BudgetService.CreateBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1_generated_BudgetService_UpdateBudget_sync", + "title": "Snippet for the update_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#update_budget.", + "file": "budget_service/update_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#update_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1::Budget", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" + }, + "method": { + "short_name": "UpdateBudget", + "full_name": "google.cloud.billing.budgets.v1.BudgetService.UpdateBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1_generated_BudgetService_GetBudget_sync", + "title": "Snippet for the get_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#get_budget.", + "file": "budget_service/get_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#get_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1::Budget", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" + }, + "method": { + "short_name": "GetBudget", + "full_name": "google.cloud.billing.budgets.v1.BudgetService.GetBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1_generated_BudgetService_ListBudgets_sync", + "title": "Snippet for the list_budgets call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#list_budgets.", + "file": "budget_service/list_budgets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_budgets", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#list_budgets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" + }, + "method": { + "short_name": "ListBudgets", + "full_name": "google.cloud.billing.budgets.v1.BudgetService.ListBudgets", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1_generated_BudgetService_DeleteBudget_sync", + "title": "Snippet for the delete_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#delete_budget.", + "file": "budget_service/delete_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#delete_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" + }, + "method": { + "short_name": "DeleteBudget", + "full_name": "google.cloud.billing.budgets.v1.BudgetService.DeleteBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1.BudgetService" + } + } + }, + "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-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb new file mode 100644 index 000000000000..6e088281d20f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1/budget_service" + +class ::Google::Cloud::Billing::Budgets::V1::BudgetService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_billing_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.billing_account_path billing_account: "value0" + assert_equal "billingAccounts/value0", path + end + end + + def test_budget_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.budget_path billing_account: "value0", budget: "value1" + assert_equal "billingAccounts/value0/budgets/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb new file mode 100644 index 000000000000..8d3c7f2bf86e --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1/budget_service_pb" +require "google/cloud/billing/budgets/v1/budget_service/rest" + + +class ::Google::Cloud::Billing::Budgets::V1::BudgetService::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_create_budget + # Create test objects. + client_result = ::Google::Cloud::Billing::Budgets::V1::Budget.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + budget = {} + + create_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_create_budget_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_budget({ parent: parent, budget: budget }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_budget parent: parent, budget: budget do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_budget ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_budget({ parent: parent, budget: budget }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_budget(::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_budget_client_stub.call_count + end + end + end + + def test_update_budget + # Create test objects. + client_result = ::Google::Cloud::Billing::Budgets::V1::Budget.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + budget = {} + update_mask = {} + + update_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_update_budget_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_budget({ budget: budget, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_budget budget: budget, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_budget ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_budget({ budget: budget, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_budget(::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_budget_client_stub.call_count + end + end + end + + def test_get_budget + # Create test objects. + client_result = ::Google::Cloud::Billing::Budgets::V1::Budget.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_get_budget_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_budget({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_budget name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_budget ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_budget({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_budget(::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_budget_client_stub.call_count + end + end + end + + def test_list_budgets + # Create test objects. + client_result = ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scope = "hello world" + page_size = 42 + page_token = "hello world" + + list_budgets_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_list_budgets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_budgets_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_budgets({ parent: parent, scope: scope, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_budgets parent: parent, scope: scope, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_budgets ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets({ parent: parent, scope: scope, 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_budgets(::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets_client_stub.call_count + end + end + end + + def test_delete_budget + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_delete_budget_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_budget({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_budget name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_budget ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_budget({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_budget(::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_budget_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::Billing::Budgets::V1::BudgetService::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::Billing::Budgets::V1::BudgetService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb new file mode 100644 index 000000000000..8c6851e19264 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb @@ -0,0 +1,409 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1/budget_service_pb" +require "google/cloud/billing/budgets/v1/budget_service" + +class ::Google::Cloud::Billing::Budgets::V1::BudgetService::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_create_budget + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1::Budget.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" + budget = {} + + create_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1::Budget), request["budget"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_budget({ parent: parent, budget: budget }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_budget parent: parent, budget: budget do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_budget ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_budget({ parent: parent, budget: budget }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_budget(::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_budget_client_stub.call_rpc_count + end + end + + def test_update_budget + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1::Budget.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. + budget = {} + update_mask = {} + + update_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1::Budget), request["budget"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_budget({ budget: budget, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_budget budget: budget, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_budget ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_budget({ budget: budget, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_budget(::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_budget_client_stub.call_rpc_count + end + end + + def test_get_budget + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_budget({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_budget name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_budget ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.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_budget_client_stub.call_rpc_count + end + end + + def test_list_budgets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse.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 = "hello world" + page_size = 42 + page_token = "hello world" + + list_budgets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_budgets, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["scope"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_budgets_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_budgets({ parent: parent, scope: scope, 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_budgets parent: parent, scope: scope, 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_budgets ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets({ parent: parent, scope: scope, 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_budgets(::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets_client_stub.call_rpc_count + end + end + + def test_delete_budget + # 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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_budget({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_budget name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_budget ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.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_budget_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::Billing::Budgets::V1::BudgetService::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::Billing::Budgets::V1::BudgetService::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::Billing::Budgets::V1::BudgetService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..59d782c7a1e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "billingbudgets.googleapis.com", + "api_shortname": "billingbudgets", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest", + "distribution_name": "google-cloud-billing-budgets-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "billingbudgets", + "name_pretty": "Billing Budgets V1beta1 API", + "product_documentation": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BILLING_BUDGETS", + "ruby-cloud-product-url": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..1d4f685e648e --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-billing-budgets-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-billing-budgets-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts new file mode 100644 index 000000000000..3487684a3e20 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Billing Budgets V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..855ce5251b53 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-billing-budgets-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-billing-budgets-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/billing/budgets/v1beta1" + +client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/billing/budgets/v1beta1" + +::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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-billing-budgets-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/billing/budgets/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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-billing-budgets-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md new file mode 100644 index 000000000000..5bc643a79d4b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Billing Budgets V1beta1 API + +The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan. + +Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Billing Budgets V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-billing-budgets](https://rubygems.org/gems/google-cloud-billing-budgets). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-billing-budgets-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/billingbudgets.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/billing/budgets/v1beta1" + +client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new +request = ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new # (request fields as keyword arguments...) +response = client.create_budget request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/billing/docs/how-to/budget-api-overview) +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/billing/budgets/v1beta1" +require "logger" + +client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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-billing-budgets`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-billing-budgets-v1beta1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-billing-budgets`. +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-billing-budgets-v1beta1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile new file mode 100644 index 000000000000..1b72d09b7f2e --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-billing-budgets-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BILLING_BUDGETS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BILLING_BUDGETS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BILLING_BUDGETS_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 BILLING_BUDGETS_TEST_PROJECT=test123 BILLING_BUDGETS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/billing/budgets/v1beta1/budget_service/credentials" + ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BILLING_BUDGETS_PROJECT"] = project + ENV["BILLING_BUDGETS_TEST_PROJECT"] = project + ENV["BILLING_BUDGETS_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-billing-budgets-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-billing-budgets-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-billing-budgets-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-billing-budgets-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-billing-budgets-v1beta1" + header "google-cloud-billing-budgets-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-billing-budgets-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-billing-budgets-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-billing-budgets-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-billing-budgets-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..2c54c331974c --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.billing.budgets.v1beta1", + "libraryPackage": "::Google::Cloud::Billing::Budgets::V1beta1", + "services": { + "BudgetService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client", + "rpcs": { + "CreateBudget": { + "methods": [ + "create_budget" + ] + }, + "UpdateBudget": { + "methods": [ + "update_budget" + ] + }, + "GetBudget": { + "methods": [ + "get_budget" + ] + }, + "ListBudgets": { + "methods": [ + "list_budgets" + ] + }, + "DeleteBudget": { + "methods": [ + "delete_budget" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec new file mode 100644 index 000000000000..75c9a3db8e73 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/billing/budgets/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-billing-budgets-v1beta1" + gem.version = Google::Cloud::Billing::Budgets::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details." + gem.summary = "The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb new file mode 100644 index 000000000000..a2c72ad8cb8f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/billing/budgets/v1beta1" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb new file mode 100644 index 000000000000..1faf0acee996 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1beta1/budget_service" +require "google/cloud/billing/budgets/v1beta1/version" + +module Google + module Cloud + module Billing + module Budgets + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/billing/budgets/v1beta1" + # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + module V1beta1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/billing/budgets/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb new file mode 100644 index 000000000000..751f63ae7de2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/billing/budgets/v1beta1/budget_model.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/struct_pb' +require 'google/type/date_pb' +require 'google/type/money_pb' + + +descriptor_data = "\n7google/cloud/billing/budgets/v1beta1/budget_model.proto\x12$google.cloud.billing.budgets.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\x1a\x17google/type/money.proto\"\xde\x03\n\x06\x42udget\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12H\n\rbudget_filter\x18\x03 \x01(\x0b\x32,.google.cloud.billing.budgets.v1beta1.FilterB\x03\xe0\x41\x01\x12G\n\x06\x61mount\x18\x04 \x01(\x0b\x32\x32.google.cloud.billing.budgets.v1beta1.BudgetAmountB\x03\xe0\x41\x02\x12Q\n\x0fthreshold_rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.billing.budgets.v1beta1.ThresholdRuleB\x03\xe0\x41\x01\x12S\n\x10\x61ll_updates_rule\x18\x06 \x01(\x0b\x32\x34.google.cloud.billing.budgets.v1beta1.AllUpdatesRuleB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:]\xea\x41Z\n$billingbudgets.googleapis.com/Budget\x12\x32\x62illingAccounts/{billing_account}/budgets/{budget}\"\xa5\x01\n\x0c\x42udgetAmount\x12.\n\x10specified_amount\x18\x01 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12T\n\x12last_period_amount\x18\x02 \x01(\x0b\x32\x36.google.cloud.billing.budgets.v1beta1.LastPeriodAmountH\x00\x42\x0f\n\rbudget_amount\"\x12\n\x10LastPeriodAmount\"\xcd\x01\n\rThresholdRule\x12\x1e\n\x11threshold_percent\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12S\n\x0bspend_basis\x18\x02 \x01(\x0e\x32\x39.google.cloud.billing.budgets.v1beta1.ThresholdRule.BasisB\x03\xe0\x41\x01\"G\n\x05\x42\x61sis\x12\x15\n\x11\x42\x41SIS_UNSPECIFIED\x10\x00\x12\x11\n\rCURRENT_SPEND\x10\x01\x12\x14\n\x10\x46ORECASTED_SPEND\x10\x02\"\xd2\x01\n\x0e\x41llUpdatesRule\x12\x19\n\x0cpubsub_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eschema_version\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12-\n monitoring_notification_channels\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12+\n\x1e\x64isable_default_iam_recipients\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x65nable_project_level_recipients\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\x05\n\x06\x46ilter\x12\x15\n\x08projects\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12resource_ancestors\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63redit_types\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x16\x63redit_types_treatment\x18\x04 \x01(\x0e\x32\x41.google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatmentB\x03\xe0\x41\x01\x12\x15\n\x08services\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsubaccounts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12M\n\x06labels\x18\x06 \x03(\x0b\x32\x38.google.cloud.billing.budgets.v1beta1.Filter.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x0f\x63\x61lendar_period\x18\x08 \x01(\x0e\x32\x34.google.cloud.billing.budgets.v1beta1.CalendarPeriodB\x03\xe0\x41\x01H\x00\x12P\n\rcustom_period\x18\t \x01(\x0b\x32\x32.google.cloud.billing.budgets.v1beta1.CustomPeriodB\x03\xe0\x41\x01H\x00\x1aI\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValue:\x02\x38\x01\"\x8f\x01\n\x14\x43reditTypesTreatment\x12&\n\"CREDIT_TYPES_TREATMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13INCLUDE_ALL_CREDITS\x10\x01\x12\x17\n\x13\x45XCLUDE_ALL_CREDITS\x10\x02\x12\x1d\n\x19INCLUDE_SPECIFIED_CREDITS\x10\x03\x42\x0e\n\x0cusage_period\"d\n\x0c\x43ustomPeriod\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01*S\n\x0e\x43\x61lendarPeriod\x12\x1f\n\x1b\x43\x41LENDAR_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x0b\n\x07QUARTER\x10\x02\x12\x08\n\x04YEAR\x10\x03\x42p\n(com.google.cloud.billing.budgets.v1beta1P\x01ZBcloud.google.com/go/billing/budgets/apiv1beta1/budgetspb;budgetspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Billing + module Budgets + module V1beta1 + Budget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Budget").msgclass + BudgetAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.BudgetAmount").msgclass + LastPeriodAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.LastPeriodAmount").msgclass + ThresholdRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ThresholdRule").msgclass + ThresholdRule::Basis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ThresholdRule.Basis").enummodule + AllUpdatesRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.AllUpdatesRule").msgclass + Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Filter").msgclass + Filter::CreditTypesTreatment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment").enummodule + CustomPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CustomPeriod").msgclass + CalendarPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CalendarPeriod").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb new file mode 100644 index 000000000000..36b20d003967 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1beta1/version" + +require "google/cloud/billing/budgets/v1beta1/budget_service/credentials" +require "google/cloud/billing/budgets/v1beta1/budget_service/paths" +require "google/cloud/billing/budgets/v1beta1/budget_service/client" + +module Google + module Cloud + module Billing + module Budgets + module V1beta1 + ## + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/billing/budgets/v1beta1/budget_service" + # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + module BudgetService + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "budget_service", "helpers.rb" +require "google/cloud/billing/budgets/v1beta1/budget_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb new file mode 100644 index 000000000000..0ad96b01af6b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb @@ -0,0 +1,917 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1beta1/budget_service_pb" + +module Google + module Cloud + module Billing + module Budgets + module V1beta1 + module BudgetService + ## + # Client for the BudgetService service. + # + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "billingbudgets.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :budget_service_stub + + ## + # Configure the BudgetService Client class. + # + # See {::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BudgetService clients + # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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", "Billing", "Budgets", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_budget.timeout = 60.0 + + default_config.rpcs.update_budget.timeout = 60.0 + default_config.rpcs.update_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_budget.timeout = 60.0 + default_config.rpcs.get_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_budgets.timeout = 60.0 + default_config.rpcs.list_budgets.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_budget.timeout = 60.0 + default_config.rpcs.delete_budget.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::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 + @budget_service_stub.universe_domain + end + + ## + # Create a new BudgetService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BudgetService 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/billing/budgets/v1beta1/budget_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 + + @budget_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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 + ) + + @budget_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @budget_service_stub.logger + end + + # Service calls + + ## + # Creates a new budget. See + # [Quotas and limits](https://cloud.google.com/billing/quotas) + # for more information on the limits of the number of budgets you can create. + # + # @overload create_budget(request, options = nil) + # Pass arguments to `create_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(parent: nil, budget: nil) + # Pass arguments to `create_budget` via keyword arguments. Note that at + # least one keyword argument is 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 name of the billing account to create the budget in. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @param budget [::Google::Cloud::Billing::Budgets::V1beta1::Budget, ::Hash] + # Required. Budget to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new + # + # # Call the create_budget method. + # result = client.create_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. + # p result + # + def create_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :create_budget, 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 budget and returns the updated budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. Budget fields that are not exposed in + # this API will not be changed by this method. + # + # @overload update_budget(request, options = nil) + # Pass arguments to `update_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(budget: nil, update_mask: nil) + # Pass arguments to `update_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param budget [::Google::Cloud::Billing::Budgets::V1beta1::Budget, ::Hash] + # Required. The updated budget object. + # The budget to update is specified by the budget name in the budget. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Indicates which fields in the provided budget to update. + # Read-only fields (such as `name`) cannot be changed. If this is not + # provided, then only fields with non-default values from the request are + # updated. See + # https://developers.google.com/protocol-buffers/docs/proto3#default for more + # details about default values. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new + # + # # Call the update_budget method. + # result = client.update_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. + # p result + # + def update_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.budget&.name + header_params["budget.name"] = request.budget.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_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :update_budget, 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 + + ## + # Returns a budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + # + # @overload get_budget(request, options = nil) + # Pass arguments to `get_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(name: nil) + # Pass arguments to `get_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of budget to get. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.new + # + # # Call the get_budget method. + # result = client.get_budget request + # + # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. + # p result + # + def get_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :get_budget, 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 + + ## + # Returns a list of budgets for a billing account. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + # + # @overload list_budgets(request, options = nil) + # Pass arguments to `list_budgets` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budgets(parent: nil, scope: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_budgets` via keyword arguments. Note that at + # least one keyword argument is 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. Name of billing account to list budgets under. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @param scope [::String] + # Optional. Set the scope of the budgets to be returned, in the format of the + # resource name. The scope of a budget is the cost that it tracks, such as + # costs for a single project, or the costs for all projects in a folder. Only + # project scope (in the format of "projects/project-id" or "projects/123") is + # supported in this field. When this field is set to a project's resource + # name, the budgets returned are tracking the costs for that project. + # @param page_size [::Integer] + # Optional. The maximum number of budgets to return per page. + # The default and maximum value are 100. + # @param page_token [::String] + # Optional. The value returned by the last `ListBudgetsResponse` which + # indicates that this is a continuation of a prior `ListBudgets` call, + # and that the system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1beta1::Budget>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1beta1::Budget>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new + # + # # Call the list_budgets method. + # result = client.list_budgets 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::Billing::Budgets::V1beta1::Budget. + # p item + # end + # + def list_budgets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest + + # Converts hash 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_budgets.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::Billing::Budgets::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_budgets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_budgets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :list_budgets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @budget_service_stub, :list_budgets, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a budget. Returns successfully if already deleted. + # + # @overload delete_budget(request, options = nil) + # Pass arguments to `delete_budget` via a request object, either of type + # {::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_budget(name: nil) + # Pass arguments to `delete_budget` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the budget to delete. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/budgets/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.new + # + # # Call the delete_budget method. + # result = client.delete_budget request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_budget request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest + + # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_budget.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_budget.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @budget_service_stub.call_rpc :delete_budget, 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 BudgetService API. + # + # This class represents the configuration for BudgetService, + # 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::Billing::Budgets::V1beta1::BudgetService::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 + # # create_budget to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_budget.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_budget.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::Billing::Budgets::V1beta1::BudgetService::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 = "billingbudgets.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 BudgetService 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 `create_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :create_budget + ## + # RPC-specific configuration for `update_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :update_budget + ## + # RPC-specific configuration for `get_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :get_budget + ## + # RPC-specific configuration for `list_budgets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_budgets + ## + # RPC-specific configuration for `delete_budget` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_budget + + # @private + def initialize parent_rpcs = nil + create_budget_config = parent_rpcs.create_budget if parent_rpcs.respond_to? :create_budget + @create_budget = ::Gapic::Config::Method.new create_budget_config + update_budget_config = parent_rpcs.update_budget if parent_rpcs.respond_to? :update_budget + @update_budget = ::Gapic::Config::Method.new update_budget_config + get_budget_config = parent_rpcs.get_budget if parent_rpcs.respond_to? :get_budget + @get_budget = ::Gapic::Config::Method.new get_budget_config + list_budgets_config = parent_rpcs.list_budgets if parent_rpcs.respond_to? :list_budgets + @list_budgets = ::Gapic::Config::Method.new list_budgets_config + delete_budget_config = parent_rpcs.delete_budget if parent_rpcs.respond_to? :delete_budget + @delete_budget = ::Gapic::Config::Method.new delete_budget_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.rb new file mode 100644 index 000000000000..8e0dd7cbb5f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Billing + module Budgets + module V1beta1 + module BudgetService + # Credentials for the BudgetService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BILLING_BUDGETS_CREDENTIALS", + "BILLING_BUDGETS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BILLING_BUDGETS_CREDENTIALS_JSON", + "BILLING_BUDGETS_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 +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb new file mode 100644 index 000000000000..ed4331cea5fb --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Billing + module Budgets + module V1beta1 + module BudgetService + # Path helper methods for the BudgetService API. + module Paths + ## + # Create a fully-qualified BillingAccount resource string. + # + # The resource will be in the following format: + # + # `billingAccounts/{billing_account}` + # + # @param billing_account [String] + # + # @return [::String] + def billing_account_path billing_account: + "billingAccounts/#{billing_account}" + end + + ## + # Create a fully-qualified Budget resource string. + # + # The resource will be in the following format: + # + # `billingAccounts/{billing_account}/budgets/{budget}` + # + # @param billing_account [String] + # @param budget [String] + # + # @return [::String] + def budget_path billing_account:, budget: + raise ::ArgumentError, "billing_account cannot contain /" if billing_account.to_s.include? "/" + + "billingAccounts/#{billing_account}/budgets/#{budget}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb new file mode 100644 index 000000000000..d21779b6826a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/billing/budgets/v1beta1/budget_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/billing/budgets/v1beta1/budget_model_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n9google/cloud/billing/budgets/v1beta1/budget_service.proto\x12$google.cloud.billing.budgets.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x37google/cloud/billing/budgets/v1beta1/budget_model.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x96\x01\n\x13\x43reateBudgetRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12\x41\n\x06\x62udget\x18\x02 \x01(\x0b\x32,.google.cloud.billing.budgets.v1beta1.BudgetB\x03\xe0\x41\x02\"\x8e\x01\n\x13UpdateBudgetRequest\x12\x41\n\x06\x62udget\x18\x01 \x01(\x0b\x32,.google.cloud.billing.budgets.v1beta1.BudgetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x10GetBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget\"\x97\x01\n\x12ListBudgetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x13ListBudgetsResponse\x12=\n\x07\x62udgets\x18\x01 \x03(\x0b\x32,.google.cloud.billing.budgets.v1beta1.Budget\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x13\x44\x65leteBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget2\xf7\x07\n\rBudgetService\x12\xaf\x01\n\x0c\x43reateBudget\x12\x39.google.cloud.billing.budgets.v1beta1.CreateBudgetRequest\x1a,.google.cloud.billing.budgets.v1beta1.Budget\"6\x82\xd3\xe4\x93\x02\x30\"+/v1beta1/{parent=billingAccounts/*}/budgets:\x01*\x12\xb6\x01\n\x0cUpdateBudget\x12\x39.google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest\x1a,.google.cloud.billing.budgets.v1beta1.Budget\"=\x82\xd3\xe4\x93\x02\x37\x32\x32/v1beta1/{budget.name=billingAccounts/*/budgets/*}:\x01*\x12\xa6\x01\n\tGetBudget\x12\x36.google.cloud.billing.budgets.v1beta1.GetBudgetRequest\x1a,.google.cloud.billing.budgets.v1beta1.Budget\"3\x82\xd3\xe4\x93\x02-\x12+/v1beta1/{name=billingAccounts/*/budgets/*}\x12\xb7\x01\n\x0bListBudgets\x12\x38.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest\x1a\x39.google.cloud.billing.budgets.v1beta1.ListBudgetsResponse\"3\x82\xd3\xe4\x93\x02-\x12+/v1beta1/{parent=billingAccounts/*}/budgets\x12\x96\x01\n\x0c\x44\x65leteBudget\x12\x39.google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest\x1a\x16.google.protobuf.Empty\"3\x82\xd3\xe4\x93\x02-*+/v1beta1/{name=billingAccounts/*/budgets/*}\x1a\x7f\xca\x41\x1d\x62illingbudgets.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-platformBp\n(com.google.cloud.billing.budgets.v1beta1P\x01ZBcloud.google.com/go/billing/budgets/apiv1beta1/budgetspb;budgetspbb\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Billing + module Budgets + module V1beta1 + CreateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CreateBudgetRequest").msgclass + UpdateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest").msgclass + GetBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.GetBudgetRequest").msgclass + ListBudgetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ListBudgetsRequest").msgclass + ListBudgetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ListBudgetsResponse").msgclass + DeleteBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb new file mode 100644 index 000000000000..b78f8d6c013f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb @@ -0,0 +1,72 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/billing/budgets/v1beta1/budget_service.proto for package 'google.cloud.billing.budgets.v1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/billing/budgets/v1beta1/budget_service_pb' + +module Google + module Cloud + module Billing + module Budgets + module V1beta1 + module BudgetService + # BudgetService stores Cloud Billing budgets, which define a + # budget plan and rules to execute as we track spend against that plan. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.billing.budgets.v1beta1.BudgetService' + + # Creates a new budget. See + # [Quotas and limits](https://cloud.google.com/billing/quotas) + # for more information on the limits of the number of budgets you can create. + rpc :CreateBudget, ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1beta1::Budget + # Updates a budget and returns the updated budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. Budget fields that are not exposed in + # this API will not be changed by this method. + rpc :UpdateBudget, ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1beta1::Budget + # Returns a budget. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + rpc :GetBudget, ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest, ::Google::Cloud::Billing::Budgets::V1beta1::Budget + # Returns a list of budgets for a billing account. + # + # WARNING: There are some fields exposed on the Google Cloud Console that + # aren't available on this API. When reading from the API, you will not + # see these fields in the return value, though they may have been set + # in the Cloud Console. + rpc :ListBudgets, ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest, ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsResponse + # Deletes a budget. Returns successfully if already deleted. + rpc :DeleteBudget, ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb new file mode 100644 index 000000000000..1d9cee314360 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module Budgets + module V1beta1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..5150803f7b0e --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Billing Budgets V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb new file mode 100644 index 000000000000..f638c97a06bf --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb @@ -0,0 +1,362 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module Budgets + module V1beta1 + # A budget is a plan that describes what you expect to spend on Cloud + # projects, plus the rules to execute as spend is tracked against that plan, + # (for example, send an alert when 90% of the target spend is met). + # The budget time period is configurable, with options such as month (default), + # quarter, year, or custom time period. + # @!attribute [r] name + # @return [::String] + # Output only. Resource name of the budget. + # The resource name implies the scope of a budget. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + # @!attribute [rw] display_name + # @return [::String] + # User data for display name in UI. + # Validation: <= 60 chars. + # @!attribute [rw] budget_filter + # @return [::Google::Cloud::Billing::Budgets::V1beta1::Filter] + # Optional. Filters that define which resources are used to compute the + # actual spend against the budget amount, such as projects, services, and the + # budget's time period, as well as other filters. + # @!attribute [rw] amount + # @return [::Google::Cloud::Billing::Budgets::V1beta1::BudgetAmount] + # Required. Budgeted amount. + # @!attribute [rw] threshold_rules + # @return [::Array<::Google::Cloud::Billing::Budgets::V1beta1::ThresholdRule>] + # Optional. Rules that trigger alerts (notifications of thresholds + # being crossed) when spend exceeds the specified percentages of the budget. + # + # Optional for `pubsubTopic` notifications. + # + # Required if using email notifications. + # @!attribute [rw] all_updates_rule + # @return [::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule] + # Optional. Rules to apply to notifications sent based on budget spend and + # thresholds. + # @!attribute [rw] etag + # @return [::String] + # Optional. Etag to validate that the object is unchanged for a + # read-modify-write operation. + # An empty etag will cause an update to overwrite other changes. + class Budget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The budgeted amount for each usage period. + # @!attribute [rw] specified_amount + # @return [::Google::Type::Money] + # A specified amount to use as the budget. + # `currency_code` is optional. If specified when creating a budget, it must + # match the currency of the billing account. If specified when updating a + # budget, it must match the currency_code of the existing budget. + # The `currency_code` is provided on output. + # + # Note: The following fields are mutually exclusive: `specified_amount`, `last_period_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] last_period_amount + # @return [::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount] + # Use the last period's actual spend as the budget for the present period. + # LastPeriodAmount can only be set when the budget's time period is a + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}. + # It cannot be set in combination with + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}. + # + # Note: The following fields are mutually exclusive: `last_period_amount`, `specified_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BudgetAmount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes a budget amount targeted to the last + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period} + # spend. At this time, the amount is automatically 100% of the last calendar + # period's spend; that is, there are no other options yet. + # Future configuration options will be described here (for example, configuring + # a percentage of last period's spend). + # LastPeriodAmount cannot be set for a budget configured with + # a + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}. + class LastPeriodAmount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ThresholdRule contains the definition of a threshold. Threshold rules define + # the triggering events used to generate a budget notification email. When a + # threshold is crossed (spend exceeds the specified percentages of the + # budget), budget alert emails are sent to the email recipients you specify + # in the + # [NotificationsRule](#notificationsrule). + # + # Threshold rules also affect the fields included in the + # [JSON data + # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) + # sent to a Pub/Sub topic. + # + # Threshold rules are _required_ if using email notifications. + # + # Threshold rules are _optional_ if only setting a + # [`pubsubTopic` NotificationsRule](#NotificationsRule), + # unless you want your JSON data object to include data about the thresholds + # you set. + # + # For more information, see + # [set budget threshold rules and + # actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions). + # @!attribute [rw] threshold_percent + # @return [::Float] + # Required. Send an alert when this threshold is exceeded. + # This is a 1.0-based percentage, so 0.5 = 50%. + # Validation: non-negative number. + # @!attribute [rw] spend_basis + # @return [::Google::Cloud::Billing::Budgets::V1beta1::ThresholdRule::Basis] + # Optional. The type of basis used to determine if spend has passed the + # threshold. Behavior defaults to CURRENT_SPEND if not set. + class ThresholdRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of basis used to determine if spend has passed the threshold. + module Basis + # Unspecified threshold basis. + BASIS_UNSPECIFIED = 0 + + # Use current spend as the basis for comparison against the threshold. + CURRENT_SPEND = 1 + + # Use forecasted spend for the period as the basis for comparison against + # the threshold. + # FORECASTED_SPEND can only be set when the budget's time period is a + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}. + # It cannot be set in combination with + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}. + FORECASTED_SPEND = 2 + end + end + + # AllUpdatesRule defines notifications that are sent based on budget spend + # and thresholds. + # @!attribute [rw] pubsub_topic + # @return [::String] + # Optional. The name of the Pub/Sub topic where budget related messages will + # be published, in the form `projects/{project_id}/topics/{topic_id}`. + # Updates are sent at regular intervals to the topic. The topic needs to be + # created before the budget is created; see + # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications + # for more details. + # Caller is expected to have + # `pubsub.topics.setIamPolicy` permission on the topic when it's set for a + # budget, otherwise, the API call will fail with PERMISSION_DENIED. See + # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task + # for more details on Pub/Sub roles and permissions. + # @!attribute [rw] schema_version + # @return [::String] + # Optional. Required when + # {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic} + # is set. The schema version of the notification sent to + # {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic}. + # Only "1.0" is accepted. It represents the JSON schema as defined in + # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. + # @!attribute [rw] monitoring_notification_channels + # @return [::Array<::String>] + # Optional. Targets to send notifications to when a threshold is exceeded. + # This is in addition to default recipients who have billing account IAM + # roles. The value is the full REST resource name of a monitoring + # notification channel with the form + # `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 + # channels are allowed. See + # https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients + # for more details. + # @!attribute [rw] disable_default_iam_recipients + # @return [::Boolean] + # Optional. When set to true, disables default notifications sent when a + # threshold is exceeded. Default notifications are sent to those with Billing + # Account Administrator and Billing Account User IAM roles for the target + # account. + # @!attribute [rw] enable_project_level_recipients + # @return [::Boolean] + # Optional. When set to true, and when the budget has a single project + # configured, notifications will be sent to project level recipients of that + # project. This field will be ignored if the budget has multiple or no + # project configured. + # + # Currently, project level recipients are the users with `Owner` role on a + # cloud project. + class AllUpdatesRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A filter for a budget, limiting the scope of the cost to calculate. + # @!attribute [rw] projects + # @return [::Array<::String>] + # Optional. A set of projects of the form `projects/{project}`, + # specifying that usage from only this set of projects should be + # included in the budget. If omitted, the report will include all usage for + # the billing account, regardless of which project the usage occurred on. + # @!attribute [rw] resource_ancestors + # @return [::Array<::String>] + # Optional. A set of folder and organization names of the form + # `folders/{folderId}` or `organizations/{organizationId}`, specifying that + # usage from only this set of folders and organizations should be included in + # the budget. If omitted, the budget includes all usage that the billing + # account pays for. If the folder or organization contains projects that are + # paid for by a different Cloud Billing account, the budget *doesn't* apply + # to those projects. + # @!attribute [rw] credit_types + # @return [::Array<::String>] + # Optional. If + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment} + # is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be + # subtracted from gross cost to determine the spend for threshold + # calculations. See [a list of acceptable credit type + # values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + # + # If + # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment} + # is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. + # @!attribute [rw] credit_types_treatment + # @return [::Google::Cloud::Billing::Budgets::V1beta1::Filter::CreditTypesTreatment] + # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. + # @!attribute [rw] services + # @return [::Array<::String>] + # Optional. A set of services of the form `services/{service_id}`, + # specifying that usage from only this set of services should be + # included in the budget. If omitted, the report will include usage for + # all the services. + # The service names are available through the Catalog API: + # https://cloud.google.com/billing/v1/how-tos/catalog-api. + # @!attribute [rw] subaccounts + # @return [::Array<::String>] + # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, + # specifying that usage from only this set of subaccounts should be included + # in the budget. If a subaccount is set to the name of the parent account, + # usage from the parent account will be included. If omitted, the + # report will include usage from the parent account and all + # subaccounts, if they exist. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::ListValue}] + # Optional. A single label and value pair specifying that usage from only + # this set of labeled resources should be included in the budget. If omitted, + # the report will include all labeled and unlabeled usage. + # + # An object containing a single `"key": value` pair. Example: `{ "name": + # "wrench" }`. + # + # _Currently, multiple entries or multiple values per entry are not + # allowed._ + # @!attribute [rw] calendar_period + # @return [::Google::Cloud::Billing::Budgets::V1beta1::CalendarPeriod] + # Optional. Specifies to track usage for recurring calendar period. + # For example, assume that CalendarPeriod.QUARTER is set. The budget will + # track usage from April 1 to June 30, when the current calendar month is + # April, May, June. After that, it will track usage from July 1 to + # September 30 when the current calendar month is July, August, September, + # so on. + # + # Note: The following fields are mutually exclusive: `calendar_period`, `custom_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_period + # @return [::Google::Cloud::Billing::Budgets::V1beta1::CustomPeriod] + # Optional. Specifies to track usage from any start date (required) to any + # end date (optional). This time period is static, it does not recur. + # + # Note: The following fields are mutually exclusive: `custom_period`, `calendar_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Filter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::ListValue] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies how credits are applied when determining the spend for + # threshold calculations. Budgets track the total cost minus any applicable + # selected credits. + # [See the documentation for a list of credit + # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). + module CreditTypesTreatment + CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0 + + # All types of credit are subtracted from the gross cost to determine the + # spend for threshold calculations. + INCLUDE_ALL_CREDITS = 1 + + # All types of credit are added to the net cost to determine the spend for + # threshold calculations. + EXCLUDE_ALL_CREDITS = 2 + + # [Credit + # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type) + # specified in the credit_types field are subtracted from the + # gross cost to determine the spend for threshold calculations. + INCLUDE_SPECIFIED_CREDITS = 3 + end + end + + # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Required. The start date must be after January 1, 2017. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Optional. The end date of the time period. Budgets with elapsed end date + # won't be processed. If unset, specifies to track all usage incurred since + # the start_date. + class CustomPeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A `CalendarPeriod` represents the abstract concept of a time period that + # has a canonical start. Grammatically, "the start of the current + # `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian + # Pacific Time (UTC-8). + module CalendarPeriod + # Calendar period is unset. This is the default if the budget is for a + # custom time period (CustomPeriod). + CALENDAR_PERIOD_UNSPECIFIED = 0 + + # A month. Month starts on the first day of each month, such as January 1, + # February 1, March 1, and so on. + MONTH = 1 + + # A quarter. Quarters start on dates January 1, April 1, July 1, and October + # 1 of each year. + QUARTER = 2 + + # A year. Year starts on January 1. + YEAR = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb new file mode 100644 index 000000000000..f99b0780bbd9 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module Budgets + module V1beta1 + # Request for CreateBudget + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the billing account to create the budget in. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @!attribute [rw] budget + # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # Required. Budget to create. + class CreateBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for UpdateBudget + # @!attribute [rw] budget + # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] + # Required. The updated budget object. + # The budget to update is specified by the budget name in the budget. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Indicates which fields in the provided budget to update. + # Read-only fields (such as `name`) cannot be changed. If this is not + # provided, then only fields with non-default values from the request are + # updated. See + # https://developers.google.com/protocol-buffers/docs/proto3#default for more + # details about default values. + class UpdateBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for GetBudget + # @!attribute [rw] name + # @return [::String] + # Required. Name of budget to get. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + class GetBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for ListBudgets + # @!attribute [rw] parent + # @return [::String] + # Required. Name of billing account to list budgets under. Values + # are of the form `billingAccounts/{billingAccountId}`. + # @!attribute [rw] scope + # @return [::String] + # Optional. Set the scope of the budgets to be returned, in the format of the + # resource name. The scope of a budget is the cost that it tracks, such as + # costs for a single project, or the costs for all projects in a folder. Only + # project scope (in the format of "projects/project-id" or "projects/123") is + # supported in this field. When this field is set to a project's resource + # name, the budgets returned are tracking the costs for that project. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of budgets to return per page. + # The default and maximum value are 100. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value returned by the last `ListBudgetsResponse` which + # indicates that this is a continuation of a prior `ListBudgets` call, + # and that the system should return the next page of data. + class ListBudgetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for ListBudgets + # @!attribute [rw] budgets + # @return [::Array<::Google::Cloud::Billing::Budgets::V1beta1::Budget>] + # List of the budgets owned by the requested billing account. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more budgets that match the + # request; this value should be passed in a new `ListBudgetsRequest`. + class ListBudgetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for DeleteBudget + # @!attribute [rw] name + # @return [::String] + # Required. Name of the budget to delete. Values are of the form + # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. + class DeleteBudgetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb @@ -0,0 +1,108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # `Struct` represents a structured data value, consisting of fields + # which map to dynamically typed values. In some languages, `Struct` + # might be supported by a native representation. For example, in + # scripting languages like JS a struct is represented as an + # object. The details of that representation are described together + # with the proto support for the language. + # + # The JSON representation for `Struct` is JSON object. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] + # Unordered map of dynamically typed values. + class Struct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Protobuf::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # `Value` represents a dynamically typed value which can be either + # null, a number, a string, a boolean, a recursive struct value, or a + # list of values. A producer of value is expected to set one of these + # variants. Absence of any variant indicates an error. + # + # The JSON representation for `Value` is JSON value. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # Represents a null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] number_value + # @return [::Float] + # Represents a double value. + # + # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Represents a string value. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Represents a boolean value. + # + # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] struct_value + # @return [::Google::Protobuf::Struct] + # Represents a structured value. + # + # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] list_value + # @return [::Google::Protobuf::ListValue] + # Represents a repeated `Value`. + # + # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `ListValue` is a wrapper around a repeated field of values. + # + # The JSON representation for `ListValue` is JSON array. + # @!attribute [rw] values + # @return [::Array<::Google::Protobuf::Value>] + # Repeated field of dynamically typed values. + class ListValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `NullValue` is a singleton enumeration to represent the null value for the + # `Value` type union. + # + # The JSON representation for `NullValue` is JSON `null`. + module NullValue + # Null value. + NULL_VALUE = 0 + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..1d0a9780457f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb new file mode 100644 index 000000000000..56a32eee300d --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents an amount of money with its currency type. + # @!attribute [rw] currency_code + # @return [::String] + # The three-letter currency code defined in ISO 4217. + # @!attribute [rw] units + # @return [::Integer] + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # @!attribute [rw] nanos + # @return [::Integer] + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + class Money + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..26910abc8eb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-billing-budgets-v1beta1", path: "../" +else + gem "google-cloud-billing-budgets-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.rb new file mode 100644 index 000000000000..b12baf0dd6f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.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 billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync] +require "google/cloud/billing/budgets/v1beta1" + +## +# Snippet for the create_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#create_budget. +# +def create_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new + + # Call the create_budget method. + result = client.create_budget request + + # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. + p result +end +# [END billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.rb new file mode 100644 index 000000000000..e4e196bfaa6f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.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 billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync] +require "google/cloud/billing/budgets/v1beta1" + +## +# Snippet for the delete_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#delete_budget. +# +def delete_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.new + + # Call the delete_budget method. + result = client.delete_budget request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.rb new file mode 100644 index 000000000000..9e8690b6bfee --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.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 billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync] +require "google/cloud/billing/budgets/v1beta1" + +## +# Snippet for the get_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#get_budget. +# +def get_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.new + + # Call the get_budget method. + result = client.get_budget request + + # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. + p result +end +# [END billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.rb new file mode 100644 index 000000000000..6c682097f2a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.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 billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync] +require "google/cloud/billing/budgets/v1beta1" + +## +# Snippet for the list_budgets call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#list_budgets. +# +def list_budgets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new + + # Call the list_budgets method. + result = client.list_budgets 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::Billing::Budgets::V1beta1::Budget. + p item + end +end +# [END billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.rb new file mode 100644 index 000000000000..5098bdbfe810 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.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 billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync] +require "google/cloud/billing/budgets/v1beta1" + +## +# Snippet for the update_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#update_budget. +# +def update_budget + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new + + # Call the update_budget method. + result = client.update_budget request + + # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. + p result +end +# [END billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json new file mode 100644 index 000000000000..d6e6546dbb6f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-billing-budgets-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.billing.budgets.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync", + "title": "Snippet for the create_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#create_budget.", + "file": "budget_service/create_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#create_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::Budget", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" + }, + "method": { + "short_name": "CreateBudget", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.CreateBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync", + "title": "Snippet for the update_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#update_budget.", + "file": "budget_service/update_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#update_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::Budget", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" + }, + "method": { + "short_name": "UpdateBudget", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.UpdateBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync", + "title": "Snippet for the get_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#get_budget.", + "file": "budget_service/get_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#get_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::Budget", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" + }, + "method": { + "short_name": "GetBudget", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.GetBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync", + "title": "Snippet for the list_budgets call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#list_budgets.", + "file": "budget_service/list_budgets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_budgets", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#list_budgets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsResponse", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" + }, + "method": { + "short_name": "ListBudgets", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.ListBudgets", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync", + "title": "Snippet for the delete_budget call in the BudgetService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#delete_budget.", + "file": "budget_service/delete_budget.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_budget", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#delete_budget", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BudgetService::Client", + "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" + }, + "method": { + "short_name": "DeleteBudget", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.DeleteBudget", + "service": { + "short_name": "BudgetService", + "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" + } + } + }, + "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-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb new file mode 100644 index 000000000000..3096f8e3b8fb --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1beta1/budget_service" + +class ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_billing_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.billing_account_path billing_account: "value0" + assert_equal "billingAccounts/value0", path + end + end + + def test_budget_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.budget_path billing_account: "value0", budget: "value1" + assert_equal "billingAccounts/value0/budgets/value1", path + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb new file mode 100644 index 000000000000..06529d586698 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb @@ -0,0 +1,409 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/budgets/v1beta1/budget_service_pb" +require "google/cloud/billing/budgets/v1beta1/budget_service" + +class ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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_create_budget + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::Budget.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" + budget = {} + + create_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1beta1::Budget), request["budget"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_budget({ parent: parent, budget: budget }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_budget parent: parent, budget: budget do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_budget ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new(parent: parent, budget: budget) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_budget({ parent: parent, budget: budget }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_budget(::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new(parent: parent, budget: budget), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_budget_client_stub.call_rpc_count + end + end + + def test_update_budget + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::Budget.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. + budget = {} + update_mask = {} + + update_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1beta1::Budget), request["budget"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_budget({ budget: budget, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_budget budget: budget, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_budget ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_budget({ budget: budget, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_budget(::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_budget_client_stub.call_rpc_count + end + end + + def test_get_budget + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::Budget.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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_budget({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_budget name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_budget ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.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_budget_client_stub.call_rpc_count + end + end + + def test_list_budgets + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsResponse.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 = "hello world" + page_size = 42 + page_token = "hello world" + + list_budgets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_budgets, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["scope"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_budgets_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_budgets({ parent: parent, scope: scope, 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_budgets parent: parent, scope: scope, 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_budgets ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets({ parent: parent, scope: scope, 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_budgets(::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets_client_stub.call_rpc_count + end + end + + def test_delete_budget + # 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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_budget, name + assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_budget_client_stub do + # Create client + client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_budget({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_budget name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_budget ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.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_budget_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::Billing::Budgets::V1beta1::BudgetService::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::Billing::Budgets::V1beta1::BudgetService::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::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-billing-v1/.gitignore b/owl-bot-staging/google-cloud-billing-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-billing-v1/.repo-metadata.json new file mode 100644 index 000000000000..bdf366e4672e --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudbilling.googleapis.com", + "api_shortname": "cloudbilling", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest", + "distribution_name": "google-cloud-billing-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudbilling", + "name_pretty": "Billing V1 API", + "product_documentation": "https://cloud.google.com/billing", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Allows developers to manage billing for their Google Cloud Platform projects programmatically. Note that google-cloud-billing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BILLING", + "ruby-cloud-product-url": "https://cloud.google.com/billing", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-billing-v1/.rubocop.yml b/owl-bot-staging/google-cloud-billing-v1/.rubocop.yml new file mode 100644 index 000000000000..cce464ee31a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-billing-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-billing-v1.rb" diff --git a/owl-bot-staging/google-cloud-billing-v1/.toys.rb b/owl-bot-staging/google-cloud-billing-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/.yardopts b/owl-bot-staging/google-cloud-billing-v1/.yardopts new file mode 100644 index 000000000000..ba89231033b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Billing 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-billing-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-billing-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..d3019af522da --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-billing-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-billing-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/billing/v1" + +client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/billing/v1" + +::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Billing::V1::CloudBilling::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-billing-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/billing/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Billing::V1::CloudBilling::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-billing-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-billing-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-billing-v1/Gemfile b/owl-bot-staging/google-cloud-billing-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-billing-v1/LICENSE.md b/owl-bot-staging/google-cloud-billing-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/README.md b/owl-bot-staging/google-cloud-billing-v1/README.md new file mode 100644 index 000000000000..d86ca5910bc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Billing V1 API + +Allows developers to manage billing for their Google Cloud Platform projects programmatically. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Billing V1 API. Most users should consider using +the main client gem, +[google-cloud-billing](https://rubygems.org/gems/google-cloud-billing). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-billing-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/cloudbilling.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/billing/v1" + +client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new +request = ::Google::Cloud::Billing::V1::GetBillingAccountRequest.new # (request fields as keyword arguments...) +response = client.get_billing_account request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/billing) +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/billing/v1" +require "logger" + +client = ::Google::Cloud::Billing::V1::CloudBilling::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-billing`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-billing-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-billing`. +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-billing-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-billing-v1/Rakefile b/owl-bot-staging/google-cloud-billing-v1/Rakefile new file mode 100644 index 000000000000..caabb9f5ec72 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BILLING_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BILLING_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BILLING_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 BILLING_TEST_PROJECT=test123 BILLING_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/billing/v1/cloud_billing/credentials" + ::Google::Cloud::Billing::V1::CloudBilling::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BILLING_PROJECT"] = project + ENV["BILLING_TEST_PROJECT"] = project + ENV["BILLING_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-billing-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-billing-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-billing-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-billing-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-billing-v1" + header "google-cloud-billing-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-billing-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-billing-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-billing-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-billing-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-billing-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-billing-v1/gapic_metadata.json new file mode 100644 index 000000000000..89b5aa748982 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.billing.v1", + "libraryPackage": "::Google::Cloud::Billing::V1", + "services": { + "CloudBilling": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Billing::V1::CloudBilling::Client", + "rpcs": { + "GetBillingAccount": { + "methods": [ + "get_billing_account" + ] + }, + "ListBillingAccounts": { + "methods": [ + "list_billing_accounts" + ] + }, + "UpdateBillingAccount": { + "methods": [ + "update_billing_account" + ] + }, + "CreateBillingAccount": { + "methods": [ + "create_billing_account" + ] + }, + "ListProjectBillingInfo": { + "methods": [ + "list_project_billing_info" + ] + }, + "GetProjectBillingInfo": { + "methods": [ + "get_project_billing_info" + ] + }, + "UpdateProjectBillingInfo": { + "methods": [ + "update_project_billing_info" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + }, + "MoveBillingAccount": { + "methods": [ + "move_billing_account" + ] + } + } + } + } + }, + "CloudCatalog": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Billing::V1::CloudCatalog::Client", + "rpcs": { + "ListServices": { + "methods": [ + "list_services" + ] + }, + "ListSkus": { + "methods": [ + "list_skus" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec b/owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec new file mode 100644 index 000000000000..c45dd7943fb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/billing/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-billing-v1" + gem.version = Google::Cloud::Billing::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Allows developers to manage billing for their Google Cloud Platform projects programmatically. Note that google-cloud-billing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing instead. See the readme for more details." + gem.summary = "Allows developers to manage billing for their Google Cloud Platform projects programmatically." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grpc-google-iam-v1", "~> 1.11" +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-v1.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-v1.rb new file mode 100644 index 000000000000..e785b6f302ee --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-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/billing/v1" diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb new file mode 100644 index 000000000000..7ab843f1772f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/billing/v1/cloud_billing" +require "google/cloud/billing/v1/cloud_catalog" +require "google/cloud/billing/v1/version" + +module Google + module Cloud + module Billing + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/billing/v1" + # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/billing/v1" + # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/billing/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb new file mode 100644 index 000000000000..c14464975446 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/billing/v1/version" + +require "google/cloud/billing/v1/cloud_billing/credentials" +require "google/cloud/billing/v1/cloud_billing/paths" +require "google/cloud/billing/v1/cloud_billing/client" +require "google/cloud/billing/v1/cloud_billing/rest" + +module Google + module Cloud + module Billing + module V1 + ## + # Retrieves the Google Cloud Console billing accounts and associates them with + # projects. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/billing/v1/cloud_billing" + # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/billing/v1/cloud_billing/rest" + # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + module CloudBilling + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_billing", "helpers.rb" +require "google/cloud/billing/v1/cloud_billing/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb new file mode 100644 index 000000000000..b590c031a4e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb @@ -0,0 +1,1588 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_billing_pb" + +module Google + module Cloud + module Billing + module V1 + module CloudBilling + ## + # Client for the CloudBilling service. + # + # Retrieves the Google Cloud Console billing accounts and associates them with + # projects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_billing_stub + + ## + # Configure the CloudBilling Client class. + # + # See {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudBilling clients + # ::Google::Cloud::Billing::V1::CloudBilling::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", "Billing", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_billing_account.timeout = 60.0 + default_config.rpcs.get_billing_account.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_billing_accounts.timeout = 60.0 + default_config.rpcs.list_billing_accounts.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_billing_account.timeout = 60.0 + default_config.rpcs.update_billing_account.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_billing_account.timeout = 60.0 + + default_config.rpcs.list_project_billing_info.timeout = 60.0 + default_config.rpcs.list_project_billing_info.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_project_billing_info.timeout = 60.0 + default_config.rpcs.get_project_billing_info.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_project_billing_info.timeout = 60.0 + default_config.rpcs.update_project_billing_info.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.set_iam_policy.timeout = 60.0 + default_config.rpcs.set_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudBilling 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::Billing::V1::CloudBilling::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_billing_stub.universe_domain + end + + ## + # Create a new CloudBilling client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudBilling 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/billing/v1/cloud_billing_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_billing_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Billing::V1::CloudBilling::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_billing_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_billing_stub.logger + end + + # Service calls + + ## + # Gets information about a billing account. The current authenticated user + # must be a [viewer of the billing + # account](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload get_billing_account(request, options = nil) + # Pass arguments to `get_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::GetBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_account(name: nil) + # Pass arguments to `get_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the billing account to retrieve. For + # example, `billingAccounts/012345-567890-ABCDEF`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::GetBillingAccountRequest.new + # + # # Call the get_billing_account method. + # result = client.get_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def get_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetBillingAccountRequest + + # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :get_billing_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the billing accounts that the current authenticated user has + # permission to + # [view](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload list_billing_accounts(request, options = nil) + # Pass arguments to `list_billing_accounts` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListBillingAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_accounts(page_size: nil, page_token: nil, filter: nil, parent: nil) + # Pass arguments to `list_billing_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Requested page size. The maximum page size is 100; this is also the + # default. + # @param page_token [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListBillingAccounts` + # call. If unspecified, the first page of results is returned. + # @param filter [::String] + # Options for how to filter the returned billing accounts. + # This only supports filtering for + # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + # single provided parent billing account. + # (for example, + # `master_billing_account=billingAccounts/012345-678901-ABCDEF`). + # Boolean algebra and other fields are not currently supported. + # @param parent [::String] + # Optional. The parent resource to list billing accounts from. + # Format: + # - `organizations/{organization_id}`, for example, + # `organizations/12345678` + # - `billingAccounts/{billing_account_id}`, for example, + # `billingAccounts/012345-567890-ABCDEF` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListBillingAccountsRequest.new + # + # # Call the list_billing_accounts method. + # result = client.list_billing_accounts 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::Billing::V1::BillingAccount. + # p item + # end + # + def list_billing_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListBillingAccountsRequest + + # Converts hash 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_billing_accounts.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::Billing::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_billing_accounts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_billing_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :list_billing_accounts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, 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 + + ## + # Updates a billing account's fields. + # Currently the only field that can be edited is `display_name`. + # The current authenticated user must have the `billing.accounts.update` + # IAM permission, which is typically given to the + # [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) + # of the billing account. + # + # @overload update_billing_account(request, options = nil) + # Pass arguments to `update_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::UpdateBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_account(name: nil, account: nil, update_mask: nil) + # Pass arguments to `update_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the billing account resource to be updated. + # @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] + # Required. The billing account resource to replace the resource on the + # server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applied to the resource. + # Only "display_name" is currently supported. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new + # + # # Call the update_billing_account method. + # result = client.update_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def update_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest + + # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :update_billing_account, 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 + + ## + # This method creates [billing + # subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). + # + # Google Cloud resellers should use the + # Channel Services APIs, + # [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) + # and + # [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). + # + # When creating a subaccount, the current authenticated user must have the + # `billing.accounts.update` IAM permission on the parent account, which is + # typically given to billing account + # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + # This method will return an error if the parent account has not been + # provisioned for subaccounts. + # + # @overload create_billing_account(request, options = nil) + # Pass arguments to `create_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::CreateBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_account(billing_account: nil, parent: nil) + # Pass arguments to `create_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param billing_account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] + # Required. The billing account resource to create. + # Currently CreateBillingAccount only supports subaccount creation, so + # any created billing accounts must be under a provided parent billing + # account. + # @param parent [::String] + # Optional. The parent to create a billing account from. + # Format: + # - `billingAccounts/{billing_account_id}`, for example, + # `billingAccounts/012345-567890-ABCDEF` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::CreateBillingAccountRequest.new + # + # # Call the create_billing_account method. + # result = client.create_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def create_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::CreateBillingAccountRequest + + # Converts hash 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_billing_account.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::Billing::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.create_billing_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :create_billing_account, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the projects associated with a billing account. The current + # authenticated user must have the `billing.resourceAssociations.list` IAM + # permission, which is often given to billing account + # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload list_project_billing_info(request, options = nil) + # Pass arguments to `list_project_billing_info` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_project_billing_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the billing account associated with the + # projects that you want to list. For example, + # `billingAccounts/012345-567890-ABCDEF`. + # @param page_size [::Integer] + # Requested page size. The maximum page size is 100; this is also the + # default. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous `ListProjectBillingInfo` + # call. If unspecified, the first page of results is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new + # + # # Call the list_project_billing_info method. + # result = client.list_project_billing_info 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::Billing::V1::ProjectBillingInfo. + # p item + # end + # + def list_project_billing_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest + + # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_project_billing_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :list_project_billing_info, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, 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 billing information for a project. The current authenticated user + # must have the `resourcemanager.projects.get` permission for the project, + # which can be granted by assigning the [Project + # Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) + # role. + # + # @overload get_project_billing_info(request, options = nil) + # Pass arguments to `get_project_billing_info` via a request object, either of type + # {::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_project_billing_info(name: nil) + # Pass arguments to `get_project_billing_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the project for which billing information is + # retrieved. For example, `projects/tokyo-rain-123`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new + # + # # Call the get_project_billing_info method. + # result = client.get_project_billing_info request + # + # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. + # p result + # + def get_project_billing_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest + + # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_project_billing_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :get_project_billing_info, 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 + + ## + # Sets or updates the billing account associated with a project. You specify + # the new billing account by setting the `billing_account_name` in the + # `ProjectBillingInfo` resource to the resource name of a billing account. + # Associating a project with an open billing account enables billing on the + # project and allows charges for resource usage. If the project already had a + # billing account, this method changes the billing account used for resource + # usage charges. + # + # *Note:* Incurred charges that have not yet been reported in the transaction + # history of the Google Cloud Console might be billed to the new billing + # account, even if the charge occurred before the new billing account was + # assigned to the project. + # + # The current authenticated user must have ownership privileges for both + # the + # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + # ) and the [billing + # account](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # You can disable billing on the project by setting the + # `billing_account_name` field to empty. This action disassociates the + # current billing account from the project. Any billable activity of your + # in-use services will stop, and your application could stop functioning as + # expected. Any unbilled charges to date will be billed to the previously + # associated account. The current authenticated user must be either an owner + # of the project or an owner of the billing account for the project. + # + # Note that associating a project with a *closed* billing account will have + # much the same effect as disabling billing on the project: any paid + # resources used by the project will be shut down. Thus, unless you wish to + # disable billing, you should always call this method with the name of an + # *open* billing account. + # + # @overload update_project_billing_info(request, options = nil) + # Pass arguments to `update_project_billing_info` via a request object, either of type + # {::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, project_billing_info: nil) + # Pass arguments to `update_project_billing_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the project associated with the billing + # information that you want to update. For example, + # `projects/tokyo-rain-123`. + # @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash] + # The new billing information for the project. Output-only fields are + # ignored; thus, you can leave empty all fields except + # `billing_account_name`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new + # + # # Call the update_project_billing_info method. + # result = client.update_project_billing_info request + # + # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. + # p result + # + def update_project_billing_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest + + # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_project_billing_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :update_project_billing_info, 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 the access control policy for a billing account. + # The caller must have the `billing.accounts.getIamPolicy` permission on the + # account, which is often given to billing account + # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::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.resource + header_params["resource"] = request.resource + 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_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a billing account. Replaces any existing + # policy. + # The caller must have the `billing.accounts.setIamPolicy` permission on the + # account, which is often given to billing account + # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::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.resource + header_params["resource"] = request.resource + 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.set_iam_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests the access control policy for a billing account. This method takes + # the resource and a set of permissions as input and returns the subset of + # the input permissions that the caller is allowed for that resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Billing::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.resource + header_params["resource"] = request.resource + 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.test_iam_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :test_iam_permissions, 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 + + ## + # Changes which parent organization a billing account belongs to. + # + # @overload move_billing_account(request, options = nil) + # Pass arguments to `move_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::MoveBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload move_billing_account(name: nil, destination_parent: nil) + # Pass arguments to `move_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the billing account to move. + # Must be of the form `billingAccounts/{billing_account_id}`. + # The specified billing account cannot be a subaccount, since a subaccount + # always belongs to the same organization as its parent account. + # @param destination_parent [::String] + # Required. The resource name of the Organization to move + # the billing account under. + # Must be of the form `organizations/{organization_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new + # + # # Call the move_billing_account method. + # result = client.move_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def move_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::MoveBillingAccountRequest + + # Converts hash 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.move_billing_account.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::Billing::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.move_billing_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.move_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.call_rpc :move_billing_account, 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 CloudBilling API. + # + # This class represents the configuration for CloudBilling, + # 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::Billing::V1::CloudBilling::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_billing_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_billing_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_billing_account.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::Billing::V1::CloudBilling::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 = "cloudbilling.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 CloudBilling 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 `get_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_billing_account + ## + # RPC-specific configuration for `list_billing_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_billing_accounts + ## + # RPC-specific configuration for `update_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_billing_account + ## + # RPC-specific configuration for `create_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_billing_account + ## + # RPC-specific configuration for `list_project_billing_info` + # @return [::Gapic::Config::Method] + # + attr_reader :list_project_billing_info + ## + # RPC-specific configuration for `get_project_billing_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_billing_info + ## + # RPC-specific configuration for `update_project_billing_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_billing_info + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `move_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :move_billing_account + + # @private + def initialize parent_rpcs = nil + get_billing_account_config = parent_rpcs.get_billing_account if parent_rpcs.respond_to? :get_billing_account + @get_billing_account = ::Gapic::Config::Method.new get_billing_account_config + list_billing_accounts_config = parent_rpcs.list_billing_accounts if parent_rpcs.respond_to? :list_billing_accounts + @list_billing_accounts = ::Gapic::Config::Method.new list_billing_accounts_config + update_billing_account_config = parent_rpcs.update_billing_account if parent_rpcs.respond_to? :update_billing_account + @update_billing_account = ::Gapic::Config::Method.new update_billing_account_config + create_billing_account_config = parent_rpcs.create_billing_account if parent_rpcs.respond_to? :create_billing_account + @create_billing_account = ::Gapic::Config::Method.new create_billing_account_config + list_project_billing_info_config = parent_rpcs.list_project_billing_info if parent_rpcs.respond_to? :list_project_billing_info + @list_project_billing_info = ::Gapic::Config::Method.new list_project_billing_info_config + get_project_billing_info_config = parent_rpcs.get_project_billing_info if parent_rpcs.respond_to? :get_project_billing_info + @get_project_billing_info = ::Gapic::Config::Method.new get_project_billing_info_config + update_project_billing_info_config = parent_rpcs.update_project_billing_info if parent_rpcs.respond_to? :update_project_billing_info + @update_project_billing_info = ::Gapic::Config::Method.new update_project_billing_info_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + move_billing_account_config = parent_rpcs.move_billing_account if parent_rpcs.respond_to? :move_billing_account + @move_billing_account = ::Gapic::Config::Method.new move_billing_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb new file mode 100644 index 000000000000..0bd5383cab54 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Billing + module V1 + module CloudBilling + # Credentials for the CloudBilling API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-billing.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BILLING_CREDENTIALS", + "BILLING_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BILLING_CREDENTIALS_JSON", + "BILLING_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-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb new file mode 100644 index 000000000000..1d16099cbc03 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb @@ -0,0 +1,111 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module V1 + module CloudBilling + # Path helper methods for the CloudBilling API. + module Paths + ## + # Create a fully-qualified BillingAccount resource string. + # + # @overload billing_account_path(billing_account:) + # The resource will be in the following format: + # + # `billingAccounts/{billing_account}` + # + # @param billing_account [String] + # + # @overload billing_account_path(organization:, billing_account:) + # The resource will be in the following format: + # + # `organizations/{organization}/billingAccounts/{billing_account}` + # + # @param organization [String] + # @param billing_account [String] + # + # @return [::String] + def billing_account_path **args + resources = { + "billing_account" => (proc do |billing_account:| + "billingAccounts/#{billing_account}" + end), + "billing_account:organization" => (proc do |organization:, billing_account:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/billingAccounts/#{billing_account}" + 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 Organization resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}` + # + # @param organization [String] + # + # @return [::String] + def organization_path organization: + "organizations/#{organization}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified ProjectBillingInfo resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/billingInfo` + # + # @param project [String] + # + # @return [::String] + def project_billing_info_path project: + "projects/#{project}/billingInfo" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb new file mode 100644 index 000000000000..4fd6ef3e7b63 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/billing/v1/version" + +require "google/cloud/billing/v1/cloud_billing/credentials" +require "google/cloud/billing/v1/cloud_billing/paths" +require "google/cloud/billing/v1/cloud_billing/rest/client" + +module Google + module Cloud + module Billing + module V1 + ## + # Retrieves the Google Cloud Console billing accounts and associates them with + # projects. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/billing/v1/cloud_billing/rest" + # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + module CloudBilling + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/billing/v1/cloud_billing/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb new file mode 100644 index 000000000000..e6ca150d8fc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb @@ -0,0 +1,1484 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_billing_pb" +require "google/cloud/billing/v1/cloud_billing/rest/service_stub" + +module Google + module Cloud + module Billing + module V1 + module CloudBilling + module Rest + ## + # REST client for the CloudBilling service. + # + # Retrieves the Google Cloud Console billing accounts and associates them with + # projects. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_billing_stub + + ## + # Configure the CloudBilling Client class. + # + # See {::Google::Cloud::Billing::V1::CloudBilling::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudBilling clients + # ::Google::Cloud::Billing::V1::CloudBilling::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", "Billing", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_billing_account.timeout = 60.0 + default_config.rpcs.get_billing_account.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_billing_accounts.timeout = 60.0 + default_config.rpcs.list_billing_accounts.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_billing_account.timeout = 60.0 + default_config.rpcs.update_billing_account.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_billing_account.timeout = 60.0 + + default_config.rpcs.list_project_billing_info.timeout = 60.0 + default_config.rpcs.list_project_billing_info.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_project_billing_info.timeout = 60.0 + default_config.rpcs.get_project_billing_info.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_project_billing_info.timeout = 60.0 + default_config.rpcs.update_project_billing_info.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_iam_policy.timeout = 60.0 + default_config.rpcs.get_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.set_iam_policy.timeout = 60.0 + default_config.rpcs.set_iam_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.test_iam_permissions.timeout = 60.0 + default_config.rpcs.test_iam_permissions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudBilling 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::Billing::V1::CloudBilling::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_billing_stub.universe_domain + end + + ## + # Create a new CloudBilling REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudBilling client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_billing_stub = ::Google::Cloud::Billing::V1::CloudBilling::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_billing_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_billing_stub.logger + end + + # Service calls + + ## + # Gets information about a billing account. The current authenticated user + # must be a [viewer of the billing + # account](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload get_billing_account(request, options = nil) + # Pass arguments to `get_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::GetBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_account(name: nil) + # Pass arguments to `get_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the billing account to retrieve. For + # example, `billingAccounts/012345-567890-ABCDEF`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::GetBillingAccountRequest.new + # + # # Call the get_billing_account method. + # result = client.get_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def get_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetBillingAccountRequest + + # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.get_billing_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the billing accounts that the current authenticated user has + # permission to + # [view](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload list_billing_accounts(request, options = nil) + # Pass arguments to `list_billing_accounts` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListBillingAccountsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_accounts(page_size: nil, page_token: nil, filter: nil, parent: nil) + # Pass arguments to `list_billing_accounts` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Requested page size. The maximum page size is 100; this is also the + # default. + # @param page_token [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListBillingAccounts` + # call. If unspecified, the first page of results is returned. + # @param filter [::String] + # Options for how to filter the returned billing accounts. + # This only supports filtering for + # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + # single provided parent billing account. + # (for example, + # `master_billing_account=billingAccounts/012345-678901-ABCDEF`). + # Boolean algebra and other fields are not currently supported. + # @param parent [::String] + # Optional. The parent resource to list billing accounts from. + # Format: + # - `organizations/{organization_id}`, for example, + # `organizations/12345678` + # - `billingAccounts/{billing_account_id}`, for example, + # `billingAccounts/012345-567890-ABCDEF` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListBillingAccountsRequest.new + # + # # Call the list_billing_accounts method. + # result = client.list_billing_accounts 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::Billing::V1::BillingAccount. + # p item + # end + # + def list_billing_accounts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListBillingAccountsRequest + + # Converts hash 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_billing_accounts.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::Billing::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_billing_accounts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_billing_accounts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.list_billing_accounts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, "billing_accounts", 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 + + ## + # Updates a billing account's fields. + # Currently the only field that can be edited is `display_name`. + # The current authenticated user must have the `billing.accounts.update` + # IAM permission, which is typically given to the + # [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) + # of the billing account. + # + # @overload update_billing_account(request, options = nil) + # Pass arguments to `update_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::UpdateBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_account(name: nil, account: nil, update_mask: nil) + # Pass arguments to `update_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the billing account resource to be updated. + # @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] + # Required. The billing account resource to replace the resource on the + # server. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The update mask applied to the resource. + # Only "display_name" is currently supported. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new + # + # # Call the update_billing_account method. + # result = client.update_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def update_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest + + # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.update_billing_account 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 + + ## + # This method creates [billing + # subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). + # + # Google Cloud resellers should use the + # Channel Services APIs, + # [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) + # and + # [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). + # + # When creating a subaccount, the current authenticated user must have the + # `billing.accounts.update` IAM permission on the parent account, which is + # typically given to billing account + # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + # This method will return an error if the parent account has not been + # provisioned for subaccounts. + # + # @overload create_billing_account(request, options = nil) + # Pass arguments to `create_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::CreateBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_billing_account(billing_account: nil, parent: nil) + # Pass arguments to `create_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param billing_account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] + # Required. The billing account resource to create. + # Currently CreateBillingAccount only supports subaccount creation, so + # any created billing accounts must be under a provided parent billing + # account. + # @param parent [::String] + # Optional. The parent to create a billing account from. + # Format: + # - `billingAccounts/{billing_account_id}`, for example, + # `billingAccounts/012345-567890-ABCDEF` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::CreateBillingAccountRequest.new + # + # # Call the create_billing_account method. + # result = client.create_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def create_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::CreateBillingAccountRequest + + # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.create_billing_account request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists the projects associated with a billing account. The current + # authenticated user must have the `billing.resourceAssociations.list` IAM + # permission, which is often given to billing account + # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload list_project_billing_info(request, options = nil) + # Pass arguments to `list_project_billing_info` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_project_billing_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the billing account associated with the + # projects that you want to list. For example, + # `billingAccounts/012345-567890-ABCDEF`. + # @param page_size [::Integer] + # Requested page size. The maximum page size is 100; this is also the + # default. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous `ListProjectBillingInfo` + # call. If unspecified, the first page of results is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new + # + # # Call the list_project_billing_info method. + # result = client.list_project_billing_info 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::Billing::V1::ProjectBillingInfo. + # p item + # end + # + def list_project_billing_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest + + # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_project_billing_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.list_project_billing_info request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, "project_billing_info", 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 billing information for a project. The current authenticated user + # must have the `resourcemanager.projects.get` permission for the project, + # which can be granted by assigning the [Project + # Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) + # role. + # + # @overload get_project_billing_info(request, options = nil) + # Pass arguments to `get_project_billing_info` via a request object, either of type + # {::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_project_billing_info(name: nil) + # Pass arguments to `get_project_billing_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the project for which billing information is + # retrieved. For example, `projects/tokyo-rain-123`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new + # + # # Call the get_project_billing_info method. + # result = client.get_project_billing_info request + # + # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. + # p result + # + def get_project_billing_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest + + # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_project_billing_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.get_project_billing_info 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 + + ## + # Sets or updates the billing account associated with a project. You specify + # the new billing account by setting the `billing_account_name` in the + # `ProjectBillingInfo` resource to the resource name of a billing account. + # Associating a project with an open billing account enables billing on the + # project and allows charges for resource usage. If the project already had a + # billing account, this method changes the billing account used for resource + # usage charges. + # + # *Note:* Incurred charges that have not yet been reported in the transaction + # history of the Google Cloud Console might be billed to the new billing + # account, even if the charge occurred before the new billing account was + # assigned to the project. + # + # The current authenticated user must have ownership privileges for both + # the + # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + # ) and the [billing + # account](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # You can disable billing on the project by setting the + # `billing_account_name` field to empty. This action disassociates the + # current billing account from the project. Any billable activity of your + # in-use services will stop, and your application could stop functioning as + # expected. Any unbilled charges to date will be billed to the previously + # associated account. The current authenticated user must be either an owner + # of the project or an owner of the billing account for the project. + # + # Note that associating a project with a *closed* billing account will have + # much the same effect as disabling billing on the project: any paid + # resources used by the project will be shut down. Thus, unless you wish to + # disable billing, you should always call this method with the name of an + # *open* billing account. + # + # @overload update_project_billing_info(request, options = nil) + # Pass arguments to `update_project_billing_info` via a request object, either of type + # {::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, project_billing_info: nil) + # Pass arguments to `update_project_billing_info` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the project associated with the billing + # information that you want to update. For example, + # `projects/tokyo-rain-123`. + # @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash] + # The new billing information for the project. Output-only fields are + # ignored; thus, you can leave empty all fields except + # `billing_account_name`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new + # + # # Call the update_project_billing_info method. + # result = client.update_project_billing_info request + # + # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. + # p result + # + def update_project_billing_info request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest + + # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_project_billing_info.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.update_project_billing_info 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 the access control policy for a billing account. + # The caller must have the `billing.accounts.getIamPolicy` permission on the + # account, which is often given to billing account + # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload get_iam_policy(request, options = nil) + # Pass arguments to `get_iam_policy` via a request object, either of type + # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) + # Pass arguments to `get_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::GetIamPolicyRequest.new + # + # # Call the get_iam_policy method. + # result = client.get_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def get_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest + + # Converts hash 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_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::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_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.get_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Sets the access control policy for a billing account. Replaces any existing + # policy. + # The caller must have the `billing.accounts.setIamPolicy` permission on the + # account, which is often given to billing account + # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # @overload set_iam_policy(request, options = nil) + # Pass arguments to `set_iam_policy` via a request object, either of type + # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) + # Pass arguments to `set_iam_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @param policy [::Google::Iam::V1::Policy, ::Hash] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::SetIamPolicyRequest.new + # + # # Call the set_iam_policy method. + # result = client.set_iam_policy request + # + # # The returned object is of type Google::Iam::V1::Policy. + # p result + # + def set_iam_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest + + # Converts hash 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.set_iam_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::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.set_iam_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.set_iam_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.set_iam_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Tests the access control policy for a billing account. This method takes + # the resource and a set of permissions as input and returns the subset of + # the input permissions that the caller is allowed for that resource. + # + # @overload test_iam_permissions(request, options = nil) + # Pass arguments to `test_iam_permissions` via a request object, either of type + # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload test_iam_permissions(resource: nil, permissions: nil) + # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param resource [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @param permissions [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::V1::TestIamPermissionsRequest.new + # + # # Call the test_iam_permissions method. + # result = client.test_iam_permissions request + # + # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + # p result + # + def test_iam_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest + + # Converts hash 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.test_iam_permissions.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::Billing::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.test_iam_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.test_iam_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.test_iam_permissions 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 + + ## + # Changes which parent organization a billing account belongs to. + # + # @overload move_billing_account(request, options = nil) + # Pass arguments to `move_billing_account` via a request object, either of type + # {::Google::Cloud::Billing::V1::MoveBillingAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload move_billing_account(name: nil, destination_parent: nil) + # Pass arguments to `move_billing_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the billing account to move. + # Must be of the form `billingAccounts/{billing_account_id}`. + # The specified billing account cannot be a subaccount, since a subaccount + # always belongs to the same organization as its parent account. + # @param destination_parent [::String] + # Required. The resource name of the Organization to move + # the billing account under. + # Must be of the form `organizations/{organization_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new + # + # # Call the move_billing_account method. + # result = client.move_billing_account request + # + # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + # p result + # + def move_billing_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::MoveBillingAccountRequest + + # Converts hash 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.move_billing_account.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::Billing::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.move_billing_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.move_billing_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_billing_stub.move_billing_account 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 CloudBilling REST API. + # + # This class represents the configuration for CloudBilling 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::Billing::V1::CloudBilling::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_billing_account to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_billing_account.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_billing_account.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 = "cloudbilling.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 CloudBilling 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 `get_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_billing_account + ## + # RPC-specific configuration for `list_billing_accounts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_billing_accounts + ## + # RPC-specific configuration for `update_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :update_billing_account + ## + # RPC-specific configuration for `create_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :create_billing_account + ## + # RPC-specific configuration for `list_project_billing_info` + # @return [::Gapic::Config::Method] + # + attr_reader :list_project_billing_info + ## + # RPC-specific configuration for `get_project_billing_info` + # @return [::Gapic::Config::Method] + # + attr_reader :get_project_billing_info + ## + # RPC-specific configuration for `update_project_billing_info` + # @return [::Gapic::Config::Method] + # + attr_reader :update_project_billing_info + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + ## + # RPC-specific configuration for `move_billing_account` + # @return [::Gapic::Config::Method] + # + attr_reader :move_billing_account + + # @private + def initialize parent_rpcs = nil + get_billing_account_config = parent_rpcs.get_billing_account if parent_rpcs.respond_to? :get_billing_account + @get_billing_account = ::Gapic::Config::Method.new get_billing_account_config + list_billing_accounts_config = parent_rpcs.list_billing_accounts if parent_rpcs.respond_to? :list_billing_accounts + @list_billing_accounts = ::Gapic::Config::Method.new list_billing_accounts_config + update_billing_account_config = parent_rpcs.update_billing_account if parent_rpcs.respond_to? :update_billing_account + @update_billing_account = ::Gapic::Config::Method.new update_billing_account_config + create_billing_account_config = parent_rpcs.create_billing_account if parent_rpcs.respond_to? :create_billing_account + @create_billing_account = ::Gapic::Config::Method.new create_billing_account_config + list_project_billing_info_config = parent_rpcs.list_project_billing_info if parent_rpcs.respond_to? :list_project_billing_info + @list_project_billing_info = ::Gapic::Config::Method.new list_project_billing_info_config + get_project_billing_info_config = parent_rpcs.get_project_billing_info if parent_rpcs.respond_to? :get_project_billing_info + @get_project_billing_info = ::Gapic::Config::Method.new get_project_billing_info_config + update_project_billing_info_config = parent_rpcs.update_project_billing_info if parent_rpcs.respond_to? :update_project_billing_info + @update_project_billing_info = ::Gapic::Config::Method.new update_project_billing_info_config + get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy + @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config + set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy + @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config + test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions + @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config + move_billing_account_config = parent_rpcs.move_billing_account if parent_rpcs.respond_to? :move_billing_account + @move_billing_account = ::Gapic::Config::Method.new move_billing_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb new file mode 100644 index 000000000000..1fc692b95281 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb @@ -0,0 +1,792 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_billing_pb" + +module Google + module Cloud + module Billing + module V1 + module CloudBilling + module Rest + ## + # REST service stub for the CloudBilling service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::GetBillingAccountRequest] + # 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::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # A result object deserialized from the server's reply + def get_billing_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_billing_account_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_billing_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::BillingAccount.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_billing_accounts REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListBillingAccountsRequest] + # 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::Billing::V1::ListBillingAccountsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ListBillingAccountsResponse] + # A result object deserialized from the server's reply + def list_billing_accounts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_billing_accounts_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_billing_accounts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::ListBillingAccountsResponse.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_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest] + # 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::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # A result object deserialized from the server's reply + def update_billing_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_billing_account_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_billing_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::BillingAccount.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_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::CreateBillingAccountRequest] + # 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::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # A result object deserialized from the server's reply + def create_billing_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_billing_account_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_billing_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::BillingAccount.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_project_billing_info REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest] + # 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::Billing::V1::ListProjectBillingInfoResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse] + # A result object deserialized from the server's reply + def list_project_billing_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_project_billing_info_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_project_billing_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse.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_project_billing_info REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest] + # 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::Billing::V1::ProjectBillingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # A result object deserialized from the server's reply + def get_project_billing_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_project_billing_info_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_project_billing_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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_project_billing_info REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest] + # 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::Billing::V1::ProjectBillingInfo] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # A result object deserialized from the server's reply + def update_project_billing_info request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_project_billing_info_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_project_billing_info", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def get_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # 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::Iam::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::Policy] + # A result object deserialized from the server's reply + def set_iam_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "set_iam_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # 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::Iam::V1::TestIamPermissionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::V1::TestIamPermissionsResponse] + # A result object deserialized from the server's reply + def test_iam_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the move_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::MoveBillingAccountRequest] + # 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::Billing::V1::BillingAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # A result object deserialized from the server's reply + def move_billing_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_move_billing_account_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: "move_billing_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::BillingAccount.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::GetBillingAccountRequest] + # 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_billing_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_billing_accounts REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListBillingAccountsRequest] + # 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_billing_accounts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/billingAccounts", + matches: [] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/billingAccounts", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/subAccounts", + matches: [ + ["parent", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest] + # 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_billing_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "account", + matches: [ + ["name", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::CreateBillingAccountRequest] + # 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_billing_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/billingAccounts", + body: "billing_account", + matches: [] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/billingAccounts", + body: "billing_account", + matches: [ + ["parent", %r{^organizations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/subAccounts", + body: "billing_account", + matches: [ + ["parent", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_project_billing_info REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest] + # 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_project_billing_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/projects", + matches: [ + ["name", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_project_billing_info REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest] + # 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_project_billing_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/billingInfo", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_project_billing_info REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest] + # 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_project_billing_info_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{name}/billingInfo", + body: "project_billing_info", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] + # 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_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the set_iam_policy REST call + # + # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_set_iam_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + body: "*", + matches: [ + ["resource", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the test_iam_permissions REST call + # + # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_test_iam_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + body: "*", + matches: [ + ["resource", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the move_billing_account REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::MoveBillingAccountRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_move_billing_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:move", + body: "*", + matches: [ + ["name", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{destination_parent}/{name}:move", + matches: [ + ["destination_parent", %r{^organizations/[^/]+/?$}, false], + ["name", %r{^billingAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb new file mode 100644 index 000000000000..dc797afffb21 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/billing/v1/cloud_billing.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/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n+google/cloud/billing/v1/cloud_billing.proto\x12\x17google.cloud.billing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a google/protobuf/field_mask.proto\"\x83\x03\n\x0e\x42illingAccount\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\x04open\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x1e\n\x16master_billing_account\x18\x04 \x01(\t\x12\x13\n\x06parent\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rcurrency_code\x18\x07 \x01(\tB\x03\xe0\x41\x01:\xb4\x01\xea\x41\xb0\x01\n*cloudbilling.googleapis.com/BillingAccount\x12!billingAccounts/{billing_account}\x12>organizations/{organization}/billingAccounts/{billing_account}*\x0f\x62illingAccounts2\x0e\x62illingAccount\"\xd1\x01\n\x12ProjectBillingInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x62illing_account_name\x18\x03 \x01(\t\x12\x1c\n\x0f\x62illing_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03:S\xea\x41P\n.cloudbilling.googleapis.com/ProjectBillingInfo\x12\x1eprojects/{project}/billingInfo\"\\\n\x18GetBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\"h\n\x1aListBillingAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x13\n\x06parent\x18\x04 \x01(\tB\x03\xe0\x41\x01\"y\n\x1bListBillingAccountsResponse\x12\x41\n\x10\x62illing_accounts\x18\x01 \x03(\x0b\x32\'.google.cloud.billing.v1.BillingAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x1b\x43reateBillingAccountRequest\x12\x45\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\x12\x13\n\x06parent\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xcf\x01\n\x1bUpdateBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12=\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x88\x01\n\x1dListProjectBillingInfoRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1eListProjectBillingInfoResponse\x12I\n\x14project_billing_info\x18\x01 \x03(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1cGetProjectBillingInfoRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"\x7f\n\x1fUpdateProjectBillingInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\x14project_billing_info\x18\x02 \x01(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo\"\xb3\x01\n\x19MoveBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12T\n\x12\x64\x65stination_parent\x18\x02 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization2\xa1\x13\n\x0c\x43loudBilling\x12\x9c\x01\n\x11GetBillingAccount\x12\x31.google.cloud.billing.v1.GetBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=billingAccounts/*}\x12\x88\x02\n\x13ListBillingAccounts\x12\x33.google.cloud.billing.v1.ListBillingAccountsRequest\x1a\x34.google.cloud.billing.v1.ListBillingAccountsResponse\"\x85\x01\xda\x41\x00\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x13/v1/billingAccountsZ.\x12,/v1/{parent=organizations/*}/billingAccountsZ,\x12*/v1/{parent=billingAccounts/*}/subAccounts\x12\xb3\x01\n\x14UpdateBillingAccount\x12\x34.google.cloud.billing.v1.UpdateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"<\xda\x41\x0cname,account\x82\xd3\xe4\x93\x02\'2\x1c/v1/{name=billingAccounts/*}:\x07\x61\x63\x63ount\x12\xd0\x02\n\x14\x43reateBillingAccount\x12\x34.google.cloud.billing.v1.CreateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"\xd8\x01\xda\x41\x0f\x62illing_account\xda\x41\x16\x62illing_account,parent\x82\xd3\xe4\x93\x02\xa6\x01\"\x13/v1/billingAccounts:\x0f\x62illing_accountZ?\",/v1/{parent=organizations/*}/billingAccounts:\x0f\x62illing_accountZ=\"*/v1/{parent=billingAccounts/*}/subAccounts:\x0f\x62illing_account\x12\xbf\x01\n\x16ListProjectBillingInfo\x12\x36.google.cloud.billing.v1.ListProjectBillingInfoRequest\x1a\x37.google.cloud.billing.v1.ListProjectBillingInfoResponse\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=billingAccounts/*}/projects\x12\xad\x01\n\x15GetProjectBillingInfo\x12\x35.google.cloud.billing.v1.GetProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*}/billingInfo\x12\xde\x01\n\x18UpdateProjectBillingInfo\x12\x38.google.cloud.billing.v1.UpdateProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"[\xda\x41\x19name,project_billing_info\x82\xd3\xe4\x93\x02\x39\x1a!/v1/{name=projects/*}/billingInfo:\x14project_billing_info\x12\x8b\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"@\xda\x41\x08resource\x82\xd3\xe4\x93\x02/\x12-/v1/{resource=billingAccounts/*}:getIamPolicy\x12\x95\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"J\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x32\"-/v1/{resource=billingAccounts/*}:setIamPolicy:\x01*\x12\xc0\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"U\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02\x38\"3/v1/{resource=billingAccounts/*}:testIamPermissions:\x01*\x12\xe9\x01\n\x12MoveBillingAccount\x12\x32.google.cloud.billing.v1.MoveBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"v\x82\xd3\xe4\x93\x02p\"!/v1/{name=billingAccounts/*}:move:\x01*ZH\x12\x46/v1/{destination_parent=organizations/*}/{name=billingAccounts/*}:move\x1a\xb5\x01\xca\x41\x1b\x63loudbilling.googleapis.com\xd2\x41\x93\x01https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-billing.readonly,https://www.googleapis.com/auth/cloud-platformB\x80\x02\n\x1b\x63om.google.cloud.billing.v1B\x11\x43loudBillingProtoP\x01Z5cloud.google.com/go/billing/apiv1/billingpb;billingpb\xea\x41\x41\n+cloudresourcemanager.googleapis.com/Project\x12\x12projects/{project}\xea\x41P\n0cloudresourcemanager.googleapis.com/Organization\x12\x1corganizations/{organization}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Billing + module V1 + BillingAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.BillingAccount").msgclass + ProjectBillingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ProjectBillingInfo").msgclass + GetBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GetBillingAccountRequest").msgclass + ListBillingAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListBillingAccountsRequest").msgclass + ListBillingAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListBillingAccountsResponse").msgclass + CreateBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.CreateBillingAccountRequest").msgclass + UpdateBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.UpdateBillingAccountRequest").msgclass + ListProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListProjectBillingInfoRequest").msgclass + ListProjectBillingInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListProjectBillingInfoResponse").msgclass + GetProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GetProjectBillingInfoRequest").msgclass + UpdateProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.UpdateProjectBillingInfoRequest").msgclass + MoveBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.MoveBillingAccountRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb new file mode 100644 index 000000000000..f3b66e53c0fc --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb @@ -0,0 +1,136 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/billing/v1/cloud_billing.proto for package 'google.cloud.billing.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/billing/v1/cloud_billing_pb' + +module Google + module Cloud + module Billing + module V1 + module CloudBilling + # Retrieves the Google Cloud Console billing accounts and associates them with + # projects. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.billing.v1.CloudBilling' + + # Gets information about a billing account. The current authenticated user + # must be a [viewer of the billing + # account](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc :GetBillingAccount, ::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount + # Lists the billing accounts that the current authenticated user has + # permission to + # [view](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc :ListBillingAccounts, ::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Google::Cloud::Billing::V1::ListBillingAccountsResponse + # Updates a billing account's fields. + # Currently the only field that can be edited is `display_name`. + # The current authenticated user must have the `billing.accounts.update` + # IAM permission, which is typically given to the + # [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) + # of the billing account. + rpc :UpdateBillingAccount, ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount + # This method creates [billing + # subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). + # + # Google Cloud resellers should use the + # Channel Services APIs, + # [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) + # and + # [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). + # + # When creating a subaccount, the current authenticated user must have the + # `billing.accounts.update` IAM permission on the parent account, which is + # typically given to billing account + # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + # This method will return an error if the parent account has not been + # provisioned for subaccounts. + rpc :CreateBillingAccount, ::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount + # Lists the projects associated with a billing account. The current + # authenticated user must have the `billing.resourceAssociations.list` IAM + # permission, which is often given to billing account + # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc :ListProjectBillingInfo, ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse + # Gets the billing information for a project. The current authenticated user + # must have the `resourcemanager.projects.get` permission for the project, + # which can be granted by assigning the [Project + # Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) + # role. + rpc :GetProjectBillingInfo, ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Google::Cloud::Billing::V1::ProjectBillingInfo + # Sets or updates the billing account associated with a project. You specify + # the new billing account by setting the `billing_account_name` in the + # `ProjectBillingInfo` resource to the resource name of a billing account. + # Associating a project with an open billing account enables billing on the + # project and allows charges for resource usage. If the project already had a + # billing account, this method changes the billing account used for resource + # usage charges. + # + # *Note:* Incurred charges that have not yet been reported in the transaction + # history of the Google Cloud Console might be billed to the new billing + # account, even if the charge occurred before the new billing account was + # assigned to the project. + # + # The current authenticated user must have ownership privileges for both + # the + # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo + # ) and the [billing + # account](https://cloud.google.com/billing/docs/how-to/billing-access). + # + # You can disable billing on the project by setting the + # `billing_account_name` field to empty. This action disassociates the + # current billing account from the project. Any billable activity of your + # in-use services will stop, and your application could stop functioning as + # expected. Any unbilled charges to date will be billed to the previously + # associated account. The current authenticated user must be either an owner + # of the project or an owner of the billing account for the project. + # + # Note that associating a project with a *closed* billing account will have + # much the same effect as disabling billing on the project: any paid + # resources used by the project will be shut down. Thus, unless you wish to + # disable billing, you should always call this method with the name of an + # *open* billing account. + rpc :UpdateProjectBillingInfo, ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Google::Cloud::Billing::V1::ProjectBillingInfo + # Gets the access control policy for a billing account. + # The caller must have the `billing.accounts.getIamPolicy` permission on the + # account, which is often given to billing account + # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Sets the access control policy for a billing account. Replaces any existing + # policy. + # The caller must have the `billing.accounts.setIamPolicy` permission on the + # account, which is often given to billing account + # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Tests the access control policy for a billing account. This method takes + # the resource and a set of permissions as input and returns the subset of + # the input permissions that the caller is allowed for that resource. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + # Changes which parent organization a billing account belongs to. + rpc :MoveBillingAccount, ::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb new file mode 100644 index 000000000000..59fc46362306 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/billing/v1/version" + +require "google/cloud/billing/v1/cloud_catalog/credentials" +require "google/cloud/billing/v1/cloud_catalog/paths" +require "google/cloud/billing/v1/cloud_catalog/client" +require "google/cloud/billing/v1/cloud_catalog/rest" + +module Google + module Cloud + module Billing + module V1 + ## + # A catalog of Google Cloud Platform services and SKUs. + # Provides pricing information and metadata on Google Cloud Platform services + # and SKUs. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/billing/v1/cloud_catalog" + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/billing/v1/cloud_catalog/rest" + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new + # + module CloudCatalog + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_catalog", "helpers.rb" +require "google/cloud/billing/v1/cloud_catalog/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb new file mode 100644 index 000000000000..0ff66b9822eb --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb @@ -0,0 +1,605 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_catalog_pb" + +module Google + module Cloud + module Billing + module V1 + module CloudCatalog + ## + # Client for the CloudCatalog service. + # + # A catalog of Google Cloud Platform services and SKUs. + # Provides pricing information and metadata on Google Cloud Platform services + # and SKUs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_catalog_stub + + ## + # Configure the CloudCatalog Client class. + # + # See {::Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudCatalog clients + # ::Google::Cloud::Billing::V1::CloudCatalog::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", "Billing", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_services.timeout = 60.0 + + default_config.rpcs.list_skus.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudCatalog 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::Billing::V1::CloudCatalog::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_catalog_stub.universe_domain + end + + ## + # Create a new CloudCatalog client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudCatalog 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/billing/v1/cloud_catalog_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_catalog_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Billing::V1::CloudCatalog::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_catalog_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_catalog_stub.logger + end + + # Service calls + + ## + # Lists all public cloud services. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_services(page_size: nil, page_token: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Requested page size. Defaults to 5000. + # @param page_token [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListServices` + # call. If unspecified, the first page of results is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudCatalog::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Billing::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_catalog_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all publicly available SKUs for a given cloud service. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the service. + # Example: "services/6F81-5844-456A" + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional inclusive start time of the time range for which the pricing + # versions will be returned. Timestamps in the future are not allowed. + # The time range has to be within a single calendar month in + # America/Los_Angeles timezone. Time range as a whole is optional. If not + # specified, the latest pricing will be returned (up to 12 hours old at + # most). + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional exclusive end time of the time range for which the pricing + # versions will be returned. Timestamps in the future are not allowed. + # The time range has to be within a single calendar month in + # America/Los_Angeles timezone. Time range as a whole is optional. If not + # specified, the latest pricing will be returned (up to 12 hours old at + # most). + # @param currency_code [::String] + # The ISO 4217 currency code for the pricing info in the response proto. + # Will use the conversion rate as of start_time. + # Optional. If not specified USD will be used. + # @param page_size [::Integer] + # Requested page size. Defaults to 5000. + # @param page_token [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListSkus` + # call. If unspecified, the first page of results is returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudCatalog::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Billing::V1::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::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_skus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_catalog_stub.call_rpc :list_skus, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_skus, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudCatalog API. + # + # This class represents the configuration for CloudCatalog, + # 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::Billing::V1::CloudCatalog::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Billing::V1::CloudCatalog::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::Billing::V1::CloudCatalog::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 = "cloudbilling.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 CloudCatalog 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_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb new file mode 100644 index 000000000000..42a05a48cd3f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Billing + module V1 + module CloudCatalog + # Credentials for the CloudCatalog API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-billing", + "https://www.googleapis.com/auth/cloud-billing.readonly", + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BILLING_CREDENTIALS", + "BILLING_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BILLING_CREDENTIALS_JSON", + "BILLING_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-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.rb new file mode 100644 index 000000000000..51cadd42d8c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.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 Billing + module V1 + module CloudCatalog + # Path helper methods for the CloudCatalog API. + module Paths + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `services/{service}` + # + # @param service [String] + # + # @return [::String] + def service_path service: + "services/#{service}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.rb new file mode 100644 index 000000000000..a6a690402016 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.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! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/billing/v1/version" + +require "google/cloud/billing/v1/cloud_catalog/credentials" +require "google/cloud/billing/v1/cloud_catalog/paths" +require "google/cloud/billing/v1/cloud_catalog/rest/client" + +module Google + module Cloud + module Billing + module V1 + ## + # A catalog of Google Cloud Platform services and SKUs. + # Provides pricing information and metadata on Google Cloud Platform services + # and SKUs. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/billing/v1/cloud_catalog/rest" + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new + # + module CloudCatalog + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/billing/v1/cloud_catalog/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb new file mode 100644 index 000000000000..715c4e134c51 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb @@ -0,0 +1,556 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_catalog_pb" +require "google/cloud/billing/v1/cloud_catalog/rest/service_stub" + +module Google + module Cloud + module Billing + module V1 + module CloudCatalog + module Rest + ## + # REST client for the CloudCatalog service. + # + # A catalog of Google Cloud Platform services and SKUs. + # Provides pricing information and metadata on Google Cloud Platform services + # and SKUs. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_catalog_stub + + ## + # Configure the CloudCatalog Client class. + # + # See {::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudCatalog clients + # ::Google::Cloud::Billing::V1::CloudCatalog::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", "Billing", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_services.timeout = 60.0 + + default_config.rpcs.list_skus.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudCatalog 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::Billing::V1::CloudCatalog::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_catalog_stub.universe_domain + end + + ## + # Create a new CloudCatalog REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudCatalog client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_catalog_stub = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_catalog_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_catalog_stub.logger + end + + # Service calls + + ## + # Lists all public cloud services. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_services(page_size: nil, page_token: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param page_size [::Integer] + # Requested page size. Defaults to 5000. + # @param page_token [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListServices` + # call. If unspecified, the first page of results is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Billing::V1::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::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_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_catalog_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_catalog_stub, :list_services, "services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all publicly available SKUs for a given cloud service. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::Billing::V1::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Billing::V1::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The name of the service. + # Example: "services/6F81-5844-456A" + # @param start_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional inclusive start time of the time range for which the pricing + # versions will be returned. Timestamps in the future are not allowed. + # The time range has to be within a single calendar month in + # America/Los_Angeles timezone. Time range as a whole is optional. If not + # specified, the latest pricing will be returned (up to 12 hours old at + # most). + # @param end_time [::Google::Protobuf::Timestamp, ::Hash] + # Optional exclusive end time of the time range for which the pricing + # versions will be returned. Timestamps in the future are not allowed. + # The time range has to be within a single calendar month in + # America/Los_Angeles timezone. Time range as a whole is optional. If not + # specified, the latest pricing will be returned (up to 12 hours old at + # most). + # @param currency_code [::String] + # The ISO 4217 currency code for the pricing info in the response proto. + # Will use the conversion rate as of start_time. + # Optional. If not specified USD will be used. + # @param page_size [::Integer] + # Requested page size. Defaults to 5000. + # @param page_token [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListSkus` + # call. If unspecified, the first page of results is returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/billing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Billing::V1::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Billing::V1::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Billing::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_skus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_catalog_stub.list_skus request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_catalog_stub, :list_skus, "skus", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CloudCatalog REST API. + # + # This class represents the configuration for CloudCatalog 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::Billing::V1::CloudCatalog::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `: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 = "cloudbilling.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 CloudCatalog 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_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb new file mode 100644 index 000000000000..b60dfcea11a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/billing/v1/cloud_catalog_pb" + +module Google + module Cloud + module Billing + module V1 + module CloudCatalog + module Rest + ## + # REST service stub for the CloudCatalog service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_services REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ListServicesResponse] + # A result object deserialized from the server's reply + def list_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_skus REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListSkusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Billing::V1::ListSkusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Billing::V1::ListSkusResponse] + # A result object deserialized from the server's reply + def list_skus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_skus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Billing::V1::ListSkusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/services", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_skus REST call + # + # @param request_pb [::Google::Cloud::Billing::V1::ListSkusRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_skus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/skus", + matches: [ + ["parent", %r{^services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb new file mode 100644 index 000000000000..e40749f6ead2 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/billing/v1/cloud_catalog.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/protobuf/timestamp_pb' +require 'google/type/money_pb' + + +descriptor_data = "\n+google/cloud/billing/v1/cloud_catalog.proto\x12\x17google.cloud.billing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\x9d\x01\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nservice_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x1c\n\x14\x62usiness_entity_name\x18\x04 \x01(\t:<\xea\x41\x39\n#cloudbilling.googleapis.com/Service\x12\x12services/{service}\"\xe2\x02\n\x03Sku\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06sku_id\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x33\n\x08\x63\x61tegory\x18\x04 \x01(\x0b\x32!.google.cloud.billing.v1.Category\x12\x17\n\x0fservice_regions\x18\x05 \x03(\t\x12:\n\x0cpricing_info\x18\x06 \x03(\x0b\x32$.google.cloud.billing.v1.PricingInfo\x12\x1d\n\x15service_provider_name\x18\x07 \x01(\t\x12:\n\x0cgeo_taxonomy\x18\x08 \x01(\x0b\x32$.google.cloud.billing.v1.GeoTaxonomy:C\xea\x41@\n\x1f\x63loudbilling.googleapis.com/Sku\x12\x1dservices/{service}/skus/{sku}\"m\n\x08\x43\x61tegory\x12\x1c\n\x14service_display_name\x18\x01 \x01(\t\x12\x17\n\x0fresource_family\x18\x02 \x01(\t\x12\x16\n\x0eresource_group\x18\x03 \x01(\t\x12\x12\n\nusage_type\x18\x04 \x01(\t\"\x80\x02\n\x0bPricingInfo\x12\x32\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07summary\x18\x02 \x01(\t\x12\x46\n\x12pricing_expression\x18\x03 \x01(\x0b\x32*.google.cloud.billing.v1.PricingExpression\x12\x42\n\x10\x61ggregation_info\x18\x04 \x01(\x0b\x32(.google.cloud.billing.v1.AggregationInfo\x12 \n\x18\x63urrency_conversion_rate\x18\x05 \x01(\x01\"\xd3\x02\n\x11PricingExpression\x12\x12\n\nusage_unit\x18\x01 \x01(\t\x12\x18\n\x10\x64isplay_quantity\x18\x02 \x01(\x01\x12I\n\x0ctiered_rates\x18\x03 \x03(\x0b\x32\x33.google.cloud.billing.v1.PricingExpression.TierRate\x12\x1e\n\x16usage_unit_description\x18\x04 \x01(\t\x12\x11\n\tbase_unit\x18\x05 \x01(\t\x12\x1d\n\x15\x62\x61se_unit_description\x18\x06 \x01(\t\x12#\n\x1b\x62\x61se_unit_conversion_factor\x18\x07 \x01(\x01\x1aN\n\x08TierRate\x12\x1a\n\x12start_usage_amount\x18\x01 \x01(\x01\x12&\n\nunit_price\x18\x02 \x01(\x0b\x32\x12.google.type.Money\"\x84\x03\n\x0f\x41ggregationInfo\x12T\n\x11\x61ggregation_level\x18\x01 \x01(\x0e\x32\x39.google.cloud.billing.v1.AggregationInfo.AggregationLevel\x12Z\n\x14\x61ggregation_interval\x18\x02 \x01(\x0e\x32<.google.cloud.billing.v1.AggregationInfo.AggregationInterval\x12\x19\n\x11\x61ggregation_count\x18\x03 \x01(\x05\"O\n\x10\x41ggregationLevel\x12!\n\x1d\x41GGREGATION_LEVEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"S\n\x13\x41ggregationInterval\x12$\n AGGREGATION_INTERVAL_UNSPECIFIED\x10\x00\x12\t\n\x05\x44\x41ILY\x10\x01\x12\x0b\n\x07MONTHLY\x10\x02\"\xa3\x01\n\x0bGeoTaxonomy\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.cloud.billing.v1.GeoTaxonomy.Type\x12\x0f\n\x07regions\x18\x02 \x03(\t\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\x12\x12\n\x0eMULTI_REGIONAL\x10\x03\"<\n\x13ListServicesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\"c\n\x14ListServicesResponse\x12\x32\n\x08services\x18\x01 \x03(\x0b\x32 .google.cloud.billing.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xea\x01\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#cloudbilling.googleapis.com/Service\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rcurrency_code\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"W\n\x10ListSkusResponse\x12*\n\x04skus\x18\x01 \x03(\x0b\x32\x1c.google.cloud.billing.v1.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xde\x03\n\x0c\x43loudCatalog\x12\x84\x01\n\x0cListServices\x12,.google.cloud.billing.v1.ListServicesRequest\x1a-.google.cloud.billing.v1.ListServicesResponse\"\x17\xda\x41\x00\x82\xd3\xe4\x93\x02\x0e\x12\x0c/v1/services\x12\x8e\x01\n\x08ListSkus\x12(.google.cloud.billing.v1.ListSkusRequest\x1a).google.cloud.billing.v1.ListSkusResponse\"-\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=services/*}/skus\x1a\xb5\x01\xca\x41\x1b\x63loudbilling.googleapis.com\xd2\x41\x93\x01https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-billing.readonly,https://www.googleapis.com/auth/cloud-platformB\x8d\x01\n\x1b\x63om.google.cloud.billing.v1B\x11\x43loudCatalogProtoP\x01Z5cloud.google.com/go/billing/apiv1/billingpb;billingpb\xa2\x02\x07\x43LDCTLG\xaa\x02\x17Google.Cloud.Billing.V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Billing + module V1 + Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.Service").msgclass + Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.Sku").msgclass + Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.Category").msgclass + PricingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.PricingInfo").msgclass + PricingExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.PricingExpression").msgclass + PricingExpression::TierRate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.PricingExpression.TierRate").msgclass + AggregationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.AggregationInfo").msgclass + AggregationInfo::AggregationLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.AggregationInfo.AggregationLevel").enummodule + AggregationInfo::AggregationInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.AggregationInfo.AggregationInterval").enummodule + GeoTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GeoTaxonomy").msgclass + GeoTaxonomy::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GeoTaxonomy.Type").enummodule + ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListServicesRequest").msgclass + ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListServicesResponse").msgclass + ListSkusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListSkusRequest").msgclass + ListSkusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListSkusResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb new file mode 100644 index 000000000000..1d1fc7617b64 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb @@ -0,0 +1,49 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/billing/v1/cloud_catalog.proto for package 'google.cloud.billing.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/billing/v1/cloud_catalog_pb' + +module Google + module Cloud + module Billing + module V1 + module CloudCatalog + # A catalog of Google Cloud Platform services and SKUs. + # Provides pricing information and metadata on Google Cloud Platform services + # and SKUs. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.billing.v1.CloudCatalog' + + # Lists all public cloud services. + rpc :ListServices, ::Google::Cloud::Billing::V1::ListServicesRequest, ::Google::Cloud::Billing::V1::ListServicesResponse + # Lists all publicly available SKUs for a given cloud service. + rpc :ListSkus, ::Google::Cloud::Billing::V1::ListSkusRequest, ::Google::Cloud::Billing::V1::ListSkusResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb new file mode 100644 index 000000000000..d682da7fb8e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/billing/v1/cloud_billing/rest" +require "google/cloud/billing/v1/cloud_catalog/rest" +require "google/cloud/billing/v1/version" + +module Google + module Cloud + module Billing + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/billing/v1/rest" + # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/version.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/version.rb new file mode 100644 index 000000000000..a642717700c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/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 Billing + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md new file mode 100644 index 000000000000..d407f523c013 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Billing 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-billing-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb new file mode 100644 index 000000000000..93232edac528 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb @@ -0,0 +1,276 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module V1 + # A billing account in the + # [Google Cloud Console](https://console.cloud.google.com/). You can assign a + # billing account to one or more projects. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the billing account. The resource name + # has the form `billingAccounts/{billing_account_id}`. For example, + # `billingAccounts/012345-567890-ABCDEF` would be the resource name for + # billing account `012345-567890-ABCDEF`. + # @!attribute [r] open + # @return [::Boolean] + # Output only. True if the billing account is open, and will therefore be + # charged for any usage on associated projects. False if the billing account + # is closed, and therefore projects associated with it are unable to use paid + # services. + # @!attribute [rw] display_name + # @return [::String] + # The display name given to the billing account, such as `My Billing + # Account`. This name is displayed in the Google Cloud Console. + # @!attribute [rw] master_billing_account + # @return [::String] + # If this account is a + # [subaccount](https://cloud.google.com/billing/docs/concepts), then this + # will be the resource name of the parent billing account that it is being + # resold through. + # Otherwise this will be empty. + # @!attribute [r] parent + # @return [::String] + # Output only. The billing account's parent resource identifier. + # Use the `MoveBillingAccount` method to update the account's parent resource + # if it is a organization. + # Format: + # - `organizations/{organization_id}`, for example, + # `organizations/12345678` + # - `billingAccounts/{billing_account_id}`, for example, + # `billingAccounts/012345-567890-ABCDEF` + # @!attribute [rw] currency_code + # @return [::String] + # Optional. The currency in which the billing account is billed and charged, + # represented as an ISO 4217 code such as `USD`. + # + # Billing account currency is determined at the time of billing account + # creation and cannot be updated subsequently, so this field should not be + # set on update requests. In addition, a subaccount always matches the + # currency of its parent billing account, so this field should not be set on + # subaccount creation requests. Clients can read this field to determine the + # currency of an existing billing account. + class BillingAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encapsulation of billing information for a Google Cloud Console project. A + # project has at most one associated billing account at a time (but a billing + # account can be assigned to multiple projects). + # @!attribute [r] name + # @return [::String] + # Output only. The resource name for the `ProjectBillingInfo`; has the form + # `projects/{project_id}/billingInfo`. For example, the resource name for the + # billing information for project `tokyo-rain-123` would be + # `projects/tokyo-rain-123/billingInfo`. + # @!attribute [r] project_id + # @return [::String] + # Output only. The ID of the project that this `ProjectBillingInfo` + # represents, such as `tokyo-rain-123`. This is a convenience field so that + # you don't need to parse the `name` field to obtain a project ID. + # @!attribute [rw] billing_account_name + # @return [::String] + # The resource name of the billing account associated with the project, if + # any. For example, `billingAccounts/012345-567890-ABCDEF`. + # @!attribute [r] billing_enabled + # @return [::Boolean] + # Output only. True if the project is associated with an open billing + # account, to which usage on the project is charged. False if the project is + # associated with a closed billing account, or no billing account at all, and + # therefore cannot use paid services. + class ProjectBillingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetBillingAccount`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the billing account to retrieve. For + # example, `billingAccounts/012345-567890-ABCDEF`. + class GetBillingAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `ListBillingAccounts`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The maximum page size is 100; this is also the + # default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListBillingAccounts` + # call. If unspecified, the first page of results is returned. + # @!attribute [rw] filter + # @return [::String] + # Options for how to filter the returned billing accounts. + # This only supports filtering for + # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a + # single provided parent billing account. + # (for example, + # `master_billing_account=billingAccounts/012345-678901-ABCDEF`). + # Boolean algebra and other fields are not currently supported. + # @!attribute [rw] parent + # @return [::String] + # Optional. The parent resource to list billing accounts from. + # Format: + # - `organizations/{organization_id}`, for example, + # `organizations/12345678` + # - `billingAccounts/{billing_account_id}`, for example, + # `billingAccounts/012345-567890-ABCDEF` + class ListBillingAccountsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `ListBillingAccounts`. + # @!attribute [rw] billing_accounts + # @return [::Array<::Google::Cloud::Billing::V1::BillingAccount>] + # A list of billing accounts. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. To retrieve the next page, + # call `ListBillingAccounts` again with the `page_token` field set to this + # value. This field is empty if there are no more results to retrieve. + class ListBillingAccountsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `CreateBillingAccount`. + # @!attribute [rw] billing_account + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # Required. The billing account resource to create. + # Currently CreateBillingAccount only supports subaccount creation, so + # any created billing accounts must be under a provided parent billing + # account. + # @!attribute [rw] parent + # @return [::String] + # Optional. The parent to create a billing account from. + # Format: + # - `billingAccounts/{billing_account_id}`, for example, + # `billingAccounts/012345-567890-ABCDEF` + class CreateBillingAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `UpdateBillingAccount`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the billing account resource to be updated. + # @!attribute [rw] account + # @return [::Google::Cloud::Billing::V1::BillingAccount] + # Required. The billing account resource to replace the resource on the + # server. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The update mask applied to the resource. + # Only "display_name" is currently supported. + class UpdateBillingAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `ListProjectBillingInfo`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the billing account associated with the + # projects that you want to list. For example, + # `billingAccounts/012345-567890-ABCDEF`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The maximum page size is 100; this is also the + # default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous `ListProjectBillingInfo` + # call. If unspecified, the first page of results is returned. + class ListProjectBillingInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `ListProjectBillingInfoResponse`. + # @!attribute [rw] project_billing_info + # @return [::Array<::Google::Cloud::Billing::V1::ProjectBillingInfo>] + # A list of `ProjectBillingInfo` resources representing the projects + # associated with the billing account. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. To retrieve the next page, + # call `ListProjectBillingInfo` again with the `page_token` field set to this + # value. This field is empty if there are no more results to retrieve. + class ListProjectBillingInfoResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetProjectBillingInfo`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the project for which billing information is + # retrieved. For example, `projects/tokyo-rain-123`. + class GetProjectBillingInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `UpdateProjectBillingInfo`. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the project associated with the billing + # information that you want to update. For example, + # `projects/tokyo-rain-123`. + # @!attribute [rw] project_billing_info + # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] + # The new billing information for the project. Output-only fields are + # ignored; thus, you can leave empty all fields except + # `billing_account_name`. + class UpdateProjectBillingInfoRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `MoveBillingAccount` RPC. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the billing account to move. + # Must be of the form `billingAccounts/{billing_account_id}`. + # The specified billing account cannot be a subaccount, since a subaccount + # always belongs to the same organization as its parent account. + # @!attribute [rw] destination_parent + # @return [::String] + # Required. The resource name of the Organization to move + # the billing account under. + # Must be of the form `organizations/{organization_id}`. + class MoveBillingAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb new file mode 100644 index 000000000000..9075ac0bdd4b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb @@ -0,0 +1,352 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Billing + module V1 + # Encapsulates a single service in Google Cloud Platform. + # @!attribute [rw] name + # @return [::String] + # The resource name for the service. + # Example: "services/6F81-5844-456A" + # @!attribute [rw] service_id + # @return [::String] + # The identifier for the service. + # Example: "6F81-5844-456A" + # @!attribute [rw] display_name + # @return [::String] + # A human readable display name for this service. + # @!attribute [rw] business_entity_name + # @return [::String] + # The business under which the service is offered. + # Ex. "businessEntities/GCP", "businessEntities/Maps" + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Encapsulates a single SKU in Google Cloud + # @!attribute [rw] name + # @return [::String] + # The resource name for the SKU. + # Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" + # @!attribute [rw] sku_id + # @return [::String] + # The identifier for the SKU. + # Example: "D041-B8A1-6E0B" + # @!attribute [rw] description + # @return [::String] + # A human readable description of the SKU, has a maximum length of 256 + # characters. + # @!attribute [rw] category + # @return [::Google::Cloud::Billing::V1::Category] + # The category hierarchy of this SKU, purely for organizational purpose. + # @!attribute [rw] service_regions + # @return [::Array<::String>] + # List of service regions this SKU is offered at. + # Example: "asia-east1" + # Service regions can be found at https://cloud.google.com/about/locations/ + # @!attribute [rw] pricing_info + # @return [::Array<::Google::Cloud::Billing::V1::PricingInfo>] + # A timeline of pricing info for this SKU in chronological order. + # @!attribute [rw] service_provider_name + # @return [::String] + # Identifies the service provider. + # This is 'Google' for first party services in Google Cloud Platform. + # @!attribute [rw] geo_taxonomy + # @return [::Google::Cloud::Billing::V1::GeoTaxonomy] + # The geographic taxonomy for this sku. + class Sku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the category hierarchy of a SKU. + # @!attribute [rw] service_display_name + # @return [::String] + # The display name of the service this SKU belongs to. + # @!attribute [rw] resource_family + # @return [::String] + # The type of product the SKU refers to. + # Example: "Compute", "Storage", "Network", "ApplicationServices" etc. + # @!attribute [rw] resource_group + # @return [::String] + # A group classification for related SKUs. + # Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. + # @!attribute [rw] usage_type + # @return [::String] + # Represents how the SKU is consumed. + # Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. + class Category + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the pricing information for a SKU at a single point of time. + # @!attribute [rw] effective_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp from which this pricing was effective within the requested + # time range. This is guaranteed to be greater than or equal to the + # start_time field in the request and less than the end_time field in the + # request. If a time range was not specified in the request this field will + # be equivalent to a time within the last 12 hours, indicating the latest + # pricing info. + # @!attribute [rw] summary + # @return [::String] + # An optional human readable summary of the pricing information, has a + # maximum length of 256 characters. + # @!attribute [rw] pricing_expression + # @return [::Google::Cloud::Billing::V1::PricingExpression] + # Expresses the pricing formula. See `PricingExpression` for an example. + # @!attribute [rw] aggregation_info + # @return [::Google::Cloud::Billing::V1::AggregationInfo] + # Aggregation Info. This can be left unspecified if the pricing expression + # doesn't require aggregation. + # @!attribute [rw] currency_conversion_rate + # @return [::Float] + # Conversion rate used for currency conversion, from USD to the currency + # specified in the request. This includes any surcharge collected for billing + # in non USD currency. If a currency is not specified in the request this + # defaults to 1.0. + # Example: USD * currency_conversion_rate = JPY + class PricingInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Expresses a mathematical pricing formula. For Example:- + # + # `usage_unit: GBy` + # `tiered_rates:` + # `[start_usage_amount: 20, unit_price: $10]` + # `[start_usage_amount: 100, unit_price: $5]` + # + # The above expresses a pricing formula where the first 20GB is free, the + # next 80GB is priced at $10 per GB followed by $5 per GB for additional + # usage. + # @!attribute [rw] usage_unit + # @return [::String] + # The short hand for unit of usage this pricing is specified in. + # Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". + # @!attribute [rw] display_quantity + # @return [::Float] + # The recommended quantity of units for displaying pricing info. When + # displaying pricing info it is recommended to display: + # (unit_price * display_quantity) per display_quantity usage_unit. + # This field does not affect the pricing formula and is for display purposes + # only. + # Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and + # the display_quantity is "1000" then the recommended way of displaying the + # pricing info is "0.10 USD per 1000 GB" + # @!attribute [rw] tiered_rates + # @return [::Array<::Google::Cloud::Billing::V1::PricingExpression::TierRate>] + # The list of tiered rates for this pricing. The total cost is computed by + # applying each of the tiered rates on usage. This repeated list is sorted + # by ascending order of start_usage_amount. + # @!attribute [rw] usage_unit_description + # @return [::String] + # The unit of usage in human readable form. + # Example: "gibi byte". + # @!attribute [rw] base_unit + # @return [::String] + # The base unit for the SKU which is the unit used in usage exports. + # Example: "By" + # @!attribute [rw] base_unit_description + # @return [::String] + # The base unit in human readable form. + # Example: "byte". + # @!attribute [rw] base_unit_conversion_factor + # @return [::Float] + # Conversion factor for converting from price per usage_unit to price per + # base_unit, and start_usage_amount to start_usage_amount in base_unit. + # unit_price / base_unit_conversion_factor = price per base_unit. + # start_usage_amount * base_unit_conversion_factor = start_usage_amount in + # base_unit. + class PricingExpression + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The price rate indicating starting usage and its corresponding price. + # @!attribute [rw] start_usage_amount + # @return [::Float] + # Usage is priced at this rate only after this amount. + # Example: start_usage_amount of 10 indicates that the usage will be priced + # at the unit_price after the first 10 usage_units. + # @!attribute [rw] unit_price + # @return [::Google::Type::Money] + # The price per unit of usage. + # Example: unit_price of amount $10 indicates that each unit will cost $10. + class TierRate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents the aggregation level and interval for pricing of a single SKU. + # @!attribute [rw] aggregation_level + # @return [::Google::Cloud::Billing::V1::AggregationInfo::AggregationLevel] + # @!attribute [rw] aggregation_interval + # @return [::Google::Cloud::Billing::V1::AggregationInfo::AggregationInterval] + # @!attribute [rw] aggregation_count + # @return [::Integer] + # The number of intervals to aggregate over. + # Example: If aggregation_level is "DAILY" and aggregation_count is 14, + # aggregation will be over 14 days. + class AggregationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The level at which usage is aggregated to compute cost. + # Example: "ACCOUNT" aggregation level indicates that usage for tiered + # pricing is aggregated across all projects in a single account. + module AggregationLevel + AGGREGATION_LEVEL_UNSPECIFIED = 0 + + ACCOUNT = 1 + + PROJECT = 2 + end + + # The interval at which usage is aggregated to compute cost. + # Example: "MONTHLY" aggregation interval indicates that usage for tiered + # pricing is aggregated every month. + module AggregationInterval + AGGREGATION_INTERVAL_UNSPECIFIED = 0 + + DAILY = 1 + + MONTHLY = 2 + end + end + + # Encapsulates the geographic taxonomy data for a sku. + # @!attribute [rw] type + # @return [::Google::Cloud::Billing::V1::GeoTaxonomy::Type] + # The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + # @!attribute [rw] regions + # @return [::Array<::String>] + # The list of regions associated with a sku. Empty for Global skus, which are + # associated with all Google Cloud regions. + class GeoTaxonomy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. + module Type + # The type is not specified. + TYPE_UNSPECIFIED = 0 + + # The sku is global in nature, e.g. a license sku. Global skus are + # available in all regions, and so have an empty region list. + GLOBAL = 1 + + # The sku is available in a specific region, e.g. "us-west2". + REGIONAL = 2 + + # The sku is associated with multiple regions, e.g. "us-west2" and + # "us-east1". + MULTI_REGIONAL = 3 + end + end + + # Request message for `ListServices`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Defaults to 5000. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListServices` + # call. If unspecified, the first page of results is returned. + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `ListServices`. + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::Billing::V1::Service>] + # A list of services. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. To retrieve the next page, + # call `ListServices` again with the `page_token` field set to this + # value. This field is empty if there are no more results to retrieve. + class ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `ListSkus`. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the service. + # Example: "services/6F81-5844-456A" + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional inclusive start time of the time range for which the pricing + # versions will be returned. Timestamps in the future are not allowed. + # The time range has to be within a single calendar month in + # America/Los_Angeles timezone. Time range as a whole is optional. If not + # specified, the latest pricing will be returned (up to 12 hours old at + # most). + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional exclusive end time of the time range for which the pricing + # versions will be returned. Timestamps in the future are not allowed. + # The time range has to be within a single calendar month in + # America/Los_Angeles timezone. Time range as a whole is optional. If not + # specified, the latest pricing will be returned (up to 12 hours old at + # most). + # @!attribute [rw] currency_code + # @return [::String] + # The ISO 4217 currency code for the pricing info in the response proto. + # Will use the conversion rate as of start_time. + # Optional. If not specified USD will be used. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. Defaults to 5000. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to return. This should be a + # `next_page_token` value returned from a previous `ListSkus` + # call. If unspecified, the first page of results is returned. + class ListSkusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `ListSkus`. + # @!attribute [rw] skus + # @return [::Array<::Google::Cloud::Billing::V1::Sku>] + # The list of public SKUs of the given service. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. To retrieve the next page, + # call `ListSkus` again with the `page_token` field set to this + # value. This field is empty if there are no more results to retrieve. + class ListSkusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb new file mode 100644 index 000000000000..5445c77f8258 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # Request message for `SetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being specified. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] policy + # @return [::Google::Iam::V1::Policy] + # REQUIRED: The complete policy to be applied to the `resource`. The size of + # the policy is limited to a few 10s of KB. An empty policy is a + # valid policy but certain Cloud Platform services (such as Projects) + # might reject them. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + # the fields in the mask will be modified. If no mask is provided, the + # following default mask is used: + # + # `paths: "bindings, etag"` + class SetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GetIamPolicy` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] options + # @return [::Google::Iam::V1::GetPolicyOptions] + # OPTIONAL: A `GetPolicyOptions` object for specifying options to + # `GetIamPolicy`. + class GetIamPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `TestIamPermissions` method. + # @!attribute [rw] resource + # @return [::String] + # REQUIRED: The resource for which the policy detail is being requested. + # See the operation documentation for the appropriate value for this field. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # The set of permissions to check for the `resource`. Permissions with + # wildcards (such as '*' or 'storage.*') are not allowed. For more + # information see + # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + class TestIamPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for `TestIamPermissions` method. + # @!attribute [rw] permissions + # @return [::Array<::String>] + # A subset of `TestPermissionsRequest.permissions` that the caller is + # allowed. + class TestIamPermissionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb new file mode 100644 index 000000000000..60713d995b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module V1 + # Encapsulates settings provided to GetIamPolicy. + # @!attribute [rw] requested_policy_version + # @return [::Integer] + # Optional. The maximum policy version that will be used to format the + # policy. + # + # Valid values are 0, 1, and 3. Requests specifying an invalid value will be + # rejected. + # + # Requests for policies with any conditional role bindings must specify + # version 3. Policies with no conditional role bindings may specify any valid + # value or leave the field unset. + # + # The policy in the response might use the policy version that you specified, + # or it might use a lower policy version. For example, if you specify version + # 3, but the policy has no conditional role bindings, the response uses + # version 1. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class GetPolicyOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb new file mode 100644 index 000000000000..999575b797df --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb @@ -0,0 +1,426 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Iam + module V1 + # An Identity and Access Management (IAM) policy, which specifies access + # controls for Google Cloud resources. + # + # + # A `Policy` is a collection of `bindings`. A `binding` binds one or more + # `members`, or principals, to a single `role`. Principals can be user + # accounts, service accounts, Google groups, and domains (such as G Suite). A + # `role` is a named list of permissions; each `role` can be an IAM predefined + # role or a user-created custom role. + # + # For some types of Google Cloud resources, a `binding` can also specify a + # `condition`, which is a logical expression that allows access to a resource + # only if the expression evaluates to `true`. A condition can add constraints + # based on attributes of the request, the resource, or both. To learn which + # resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # + # **JSON example:** + # + # ``` + # { + # "bindings": [ + # { + # "role": "roles/resourcemanager.organizationAdmin", + # "members": [ + # "user:mike@example.com", + # "group:admins@example.com", + # "domain:google.com", + # "serviceAccount:my-project-id@appspot.gserviceaccount.com" + # ] + # }, + # { + # "role": "roles/resourcemanager.organizationViewer", + # "members": [ + # "user:eve@example.com" + # ], + # "condition": { + # "title": "expirable access", + # "description": "Does not grant access after Sep 2020", + # "expression": "request.time < + # timestamp('2020-10-01T00:00:00.000Z')", + # } + # } + # ], + # "etag": "BwWWja0YfJA=", + # "version": 3 + # } + # ``` + # + # **YAML example:** + # + # ``` + # bindings: + # - members: + # - user:mike@example.com + # - group:admins@example.com + # - domain:google.com + # - serviceAccount:my-project-id@appspot.gserviceaccount.com + # role: roles/resourcemanager.organizationAdmin + # - members: + # - user:eve@example.com + # role: roles/resourcemanager.organizationViewer + # condition: + # title: expirable access + # description: Does not grant access after Sep 2020 + # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') + # etag: BwWWja0YfJA= + # version: 3 + # ``` + # + # For a description of IAM and its features, see the + # [IAM documentation](https://cloud.google.com/iam/docs/). + # @!attribute [rw] version + # @return [::Integer] + # Specifies the format of the policy. + # + # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value + # are rejected. + # + # Any operation that affects conditional role bindings must specify version + # `3`. This requirement applies to the following operations: + # + # * Getting a policy that includes a conditional role binding + # * Adding a conditional role binding to a policy + # * Changing a conditional role binding in a policy + # * Removing any role binding, with or without a condition, from a policy + # that includes conditions + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + # + # If a policy does not include any conditions, operations on that policy may + # specify any valid version or leave the field unset. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + # @!attribute [rw] bindings + # @return [::Array<::Google::Iam::V1::Binding>] + # Associates a list of `members`, or principals, with a `role`. Optionally, + # may specify a `condition` that determines how and when the `bindings` are + # applied. Each of the `bindings` must contain at least one principal. + # + # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 + # of these principals can be Google groups. Each occurrence of a principal + # counts towards these limits. For example, if the `bindings` grant 50 + # different roles to `user:alice@example.com`, and not to any other + # principal, then you can add another 1,450 principals to the `bindings` in + # the `Policy`. + # @!attribute [rw] audit_configs + # @return [::Array<::Google::Iam::V1::AuditConfig>] + # Specifies cloud audit logging configuration for this policy. + # @!attribute [rw] etag + # @return [::String] + # `etag` is used for optimistic concurrency control as a way to help + # prevent simultaneous updates of a policy from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform policy updates in order to avoid race + # conditions: An `etag` is returned in the response to `getIamPolicy`, and + # systems are expected to put that etag in the request to `setIamPolicy` to + # ensure that their change will be applied to the same version of the policy. + # + # **Important:** If you use IAM Conditions, you must include the `etag` field + # whenever you call `setIamPolicy`. If you omit this field, then IAM allows + # you to overwrite a version `3` policy with a version `1` policy, and all of + # the conditions in the version `3` policy are lost. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Associates `members`, or principals, with a `role`. + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to the list of `members`, or principals. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # @!attribute [rw] members + # @return [::Array<::String>] + # Specifies the principals requesting access for a Google Cloud resource. + # `members` can have the following values: + # + # * `allUsers`: A special identifier that represents anyone who is + # on the internet; with or without a Google account. + # + # * `allAuthenticatedUsers`: A special identifier that represents anyone + # who is authenticated with a Google account or a service account. + # + # * `user:{emailid}`: An email address that represents a specific Google + # account. For example, `alice@example.com` . + # + # + # * `serviceAccount:{emailid}`: An email address that represents a service + # account. For example, `my-other-app@appspot.gserviceaccount.com`. + # + # * `group:{emailid}`: An email address that represents a Google group. + # For example, `admins@example.com`. + # + # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a user that has been recently deleted. For + # example, `alice@example.com?uid=123456789012345678901`. If the user is + # recovered, this value reverts to `user:{emailid}` and the recovered user + # retains the role in the binding. + # + # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + # unique identifier) representing a service account that has been recently + # deleted. For example, + # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. + # If the service account is undeleted, this value reverts to + # `serviceAccount:{emailid}` and the undeleted service account retains the + # role in the binding. + # + # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique + # identifier) representing a Google group that has been recently + # deleted. For example, `admins@example.com?uid=123456789012345678901`. If + # the group is recovered, this value reverts to `group:{emailid}` and the + # recovered group retains the role in the binding. + # + # + # * `domain:{domain}`: The G Suite domain (primary) that represents all the + # users of that domain. For example, `google.com` or `example.com`. + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + # + # If the condition evaluates to `true`, then this binding applies to the + # current request. + # + # If the condition evaluates to `false`, then this binding does not apply to + # the current request. However, a different role binding might grant the same + # role to one or more of the principals in this binding. + # + # To learn which resources support conditions in their IAM policies, see the + # [IAM + # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + class Binding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the audit configuration for a service. + # The configuration determines which permission types are logged, and what + # identities, if any, are exempted from logging. + # An AuditConfig must have one or more AuditLogConfigs. + # + # If there are AuditConfigs for both `allServices` and a specific service, + # the union of the two AuditConfigs is used for that service: the log_types + # specified in each AuditConfig are enabled, and the exempted_members in each + # AuditLogConfig are exempted. + # + # Example Policy with multiple AuditConfigs: + # + # { + # "audit_configs": [ + # { + # "service": "allServices", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # }, + # { + # "log_type": "ADMIN_READ" + # } + # ] + # }, + # { + # "service": "sampleservice.googleapis.com", + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ" + # }, + # { + # "log_type": "DATA_WRITE", + # "exempted_members": [ + # "user:aliya@example.com" + # ] + # } + # ] + # } + # ] + # } + # + # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ + # logging. It also exempts `jose@example.com` from DATA_READ logging, and + # `aliya@example.com` from DATA_WRITE logging. + # @!attribute [rw] service + # @return [::String] + # Specifies a service that will be enabled for audit logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # @!attribute [rw] audit_log_configs + # @return [::Array<::Google::Iam::V1::AuditLogConfig>] + # The configuration for logging of each type of permission. + class AuditConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provides the configuration for logging a type of permissions. + # Example: + # + # { + # "audit_log_configs": [ + # { + # "log_type": "DATA_READ", + # "exempted_members": [ + # "user:jose@example.com" + # ] + # }, + # { + # "log_type": "DATA_WRITE" + # } + # ] + # } + # + # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting + # jose@example.com from DATA_READ logging. + # @!attribute [rw] log_type + # @return [::Google::Iam::V1::AuditLogConfig::LogType] + # The log type that this config enables. + # @!attribute [rw] exempted_members + # @return [::Array<::String>] + # Specifies the identities that do not cause logging for this type of + # permission. + # Follows the same format of + # [Binding.members][google.iam.v1.Binding.members]. + class AuditLogConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The list of valid permission types for which logging can be configured. + # Admin writes are always logged, and are not configurable. + module LogType + # Default case. Should never be this. + LOG_TYPE_UNSPECIFIED = 0 + + # Admin reads. Example: CloudIAM getIamPolicy + ADMIN_READ = 1 + + # Data writes. Example: CloudSQL Users create + DATA_WRITE = 2 + + # Data reads. Example: CloudSQL Users list + DATA_READ = 3 + end + end + + # The difference delta between two policies. + # @!attribute [rw] binding_deltas + # @return [::Array<::Google::Iam::V1::BindingDelta>] + # The delta for Bindings between two policies. + # @!attribute [rw] audit_config_deltas + # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] + # The delta for AuditConfigs between two policies. + class PolicyDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # One delta entry for Binding. Each individual change (only one member in each + # entry) to a binding will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::BindingDelta::Action] + # The action that was performed on a Binding. + # Required + # @!attribute [rw] role + # @return [::String] + # Role that is assigned to `members`. + # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + # Required + # @!attribute [rw] member + # @return [::String] + # A single identity requesting access for a Google Cloud resource. + # Follows the same format of Binding.members. + # Required + # @!attribute [rw] condition + # @return [::Google::Type::Expr] + # The condition that is associated with this binding. + class BindingDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on a Binding in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of a Binding. + ADD = 1 + + # Removal of a Binding. + REMOVE = 2 + end + end + + # One delta entry for AuditConfig. Each individual change (only one + # exempted_member in each entry) to a AuditConfig will be a separate entry. + # @!attribute [rw] action + # @return [::Google::Iam::V1::AuditConfigDelta::Action] + # The action that was performed on an audit configuration in a policy. + # Required + # @!attribute [rw] service + # @return [::String] + # Specifies a service that was configured for Cloud Audit Logging. + # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. + # `allServices` is a special value that covers all services. + # Required + # @!attribute [rw] exempted_member + # @return [::String] + # A single identity that is exempted from "data access" audit + # logging for the `service` specified above. + # Follows the same format of Binding.members. + # @!attribute [rw] log_type + # @return [::String] + # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always + # enabled, and cannot be configured. + # Required + class AuditConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of action performed on an audit configuration in a policy. + module Action + # Unspecified. + ACTION_UNSPECIFIED = 0 + + # Addition of an audit configuration. + ADD = 1 + + # Removal of an audit configuration. + REMOVE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb new file mode 100644 index 000000000000..56a32eee300d --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents an amount of money with its currency type. + # @!attribute [rw] currency_code + # @return [::String] + # The three-letter currency code defined in ISO 4217. + # @!attribute [rw] units + # @return [::Integer] + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # @!attribute [rw] nanos + # @return [::Integer] + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + class Money + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-billing-v1/snippets/Gemfile new file mode 100644 index 000000000000..2b728daed1e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-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-billing-v1", path: "../" +else + gem "google-cloud-billing-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-billing-v1/snippets/cloud_billing/create_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/create_billing_account.rb new file mode 100644 index 000000000000..1385c575fafd --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/create_billing_account.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 cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the create_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#create_billing_account. +# +def create_billing_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::CreateBillingAccountRequest.new + + # Call the create_billing_account method. + result = client.create_billing_account request + + # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.rb new file mode 100644 index 000000000000..700eceb80480 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.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 cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the get_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#get_billing_account. +# +def get_billing_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::GetBillingAccountRequest.new + + # Call the get_billing_account method. + result = client.get_billing_account request + + # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb new file mode 100644 index 000000000000..771874816c3b --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the get_iam_policy call in the CloudBilling 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::Billing::V1::CloudBilling::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::GetIamPolicyRequest.new + + # Call the get_iam_policy method. + result = client.get_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.rb new file mode 100644 index 000000000000..f4b3858e1779 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.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 cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the get_project_billing_info call in the CloudBilling 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::Billing::V1::CloudBilling::Client#get_project_billing_info. +# +def get_project_billing_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new + + # Call the get_project_billing_info method. + result = client.get_project_billing_info request + + # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.rb new file mode 100644 index 000000000000..42ef1543b041 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.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 cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the list_billing_accounts call in the CloudBilling 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::Billing::V1::CloudBilling::Client#list_billing_accounts. +# +def list_billing_accounts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::ListBillingAccountsRequest.new + + # Call the list_billing_accounts method. + result = client.list_billing_accounts 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::Billing::V1::BillingAccount. + p item + end +end +# [END cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.rb new file mode 100644 index 000000000000..cd67e7762780 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.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 cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the list_project_billing_info call in the CloudBilling 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::Billing::V1::CloudBilling::Client#list_project_billing_info. +# +def list_project_billing_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new + + # Call the list_project_billing_info method. + result = client.list_project_billing_info 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::Billing::V1::ProjectBillingInfo. + p item + end +end +# [END cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.rb new file mode 100644 index 000000000000..8cee8230f794 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.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 cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the move_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#move_billing_account. +# +def move_billing_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new + + # Call the move_billing_account method. + result = client.move_billing_account request + + # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb new file mode 100644 index 000000000000..96a269f56eea --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the set_iam_policy call in the CloudBilling 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::Billing::V1::CloudBilling::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::SetIamPolicyRequest.new + + # Call the set_iam_policy method. + result = client.set_iam_policy request + + # The returned object is of type Google::Iam::V1::Policy. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.rb new file mode 100644 index 000000000000..8883eb7bd0ae --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.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 cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the test_iam_permissions call in the CloudBilling 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::Billing::V1::CloudBilling::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::V1::TestIamPermissionsRequest.new + + # Call the test_iam_permissions method. + result = client.test_iam_permissions request + + # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.rb new file mode 100644 index 000000000000..1bc84c05613d --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.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 cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the update_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#update_billing_account. +# +def update_billing_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new + + # Call the update_billing_account method. + result = client.update_billing_account request + + # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.rb new file mode 100644 index 000000000000..7a2ae2af8c69 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.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 cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the update_project_billing_info call in the CloudBilling 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::Billing::V1::CloudBilling::Client#update_project_billing_info. +# +def update_project_billing_info + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudBilling::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new + + # Call the update_project_billing_info method. + result = client.update_project_billing_info request + + # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. + p result +end +# [END cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb new file mode 100644 index 000000000000..c1e36fe6b0e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudbilling_v1_generated_CloudCatalog_ListServices_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the list_services call in the CloudCatalog 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::Billing::V1::CloudCatalog::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudCatalog::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::ListServicesRequest.new + + # Call the list_services method. + result = client.list_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Billing::V1::Service. + p item + end +end +# [END cloudbilling_v1_generated_CloudCatalog_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb new file mode 100644 index 000000000000..f973fcb6c3f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] +require "google/cloud/billing/v1" + +## +# Snippet for the list_skus call in the CloudCatalog 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::Billing::V1::CloudCatalog::Client#list_skus. +# +def list_skus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Billing::V1::CloudCatalog::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Billing::V1::ListSkusRequest.new + + # Call the list_skus method. + result = client.list_skus request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Billing::V1::Sku. + p item + end +end +# [END cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json b/owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json new file mode 100644 index 000000000000..33ae25137419 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-billing-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.billing.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync", + "title": "Snippet for the get_billing_account call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#get_billing_account.", + "file": "cloud_billing/get_billing_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_billing_account", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#get_billing_account", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::GetBillingAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::BillingAccount", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "GetBillingAccount", + "full_name": "google.cloud.billing.v1.CloudBilling.GetBillingAccount", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync", + "title": "Snippet for the list_billing_accounts call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#list_billing_accounts.", + "file": "cloud_billing/list_billing_accounts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_billing_accounts", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#list_billing_accounts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::ListBillingAccountsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::ListBillingAccountsResponse", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "ListBillingAccounts", + "full_name": "google.cloud.billing.v1.CloudBilling.ListBillingAccounts", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync", + "title": "Snippet for the update_billing_account call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#update_billing_account.", + "file": "cloud_billing/update_billing_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_billing_account", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#update_billing_account", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::UpdateBillingAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::BillingAccount", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "UpdateBillingAccount", + "full_name": "google.cloud.billing.v1.CloudBilling.UpdateBillingAccount", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync", + "title": "Snippet for the create_billing_account call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#create_billing_account.", + "file": "cloud_billing/create_billing_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_billing_account", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#create_billing_account", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::CreateBillingAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::BillingAccount", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "CreateBillingAccount", + "full_name": "google.cloud.billing.v1.CloudBilling.CreateBillingAccount", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync", + "title": "Snippet for the list_project_billing_info call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#list_project_billing_info.", + "file": "cloud_billing/list_project_billing_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_project_billing_info", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#list_project_billing_info", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "ListProjectBillingInfo", + "full_name": "google.cloud.billing.v1.CloudBilling.ListProjectBillingInfo", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync", + "title": "Snippet for the get_project_billing_info call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#get_project_billing_info.", + "file": "cloud_billing/get_project_billing_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_project_billing_info", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#get_project_billing_info", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::ProjectBillingInfo", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "GetProjectBillingInfo", + "full_name": "google.cloud.billing.v1.CloudBilling.GetProjectBillingInfo", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync", + "title": "Snippet for the update_project_billing_info call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#update_project_billing_info.", + "file": "cloud_billing/update_project_billing_info.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_project_billing_info", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#update_project_billing_info", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::ProjectBillingInfo", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "UpdateProjectBillingInfo", + "full_name": "google.cloud.billing.v1.CloudBilling.UpdateProjectBillingInfo", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#get_iam_policy.", + "file": "cloud_billing/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.billing.v1.CloudBilling.GetIamPolicy", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#set_iam_policy.", + "file": "cloud_billing/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.billing.v1.CloudBilling.SetIamPolicy", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#test_iam_permissions.", + "file": "cloud_billing/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.billing.v1.CloudBilling.TestIamPermissions", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync", + "title": "Snippet for the move_billing_account call in the CloudBilling service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#move_billing_account.", + "file": "cloud_billing/move_billing_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "move_billing_account", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#move_billing_account", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::MoveBillingAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::BillingAccount", + "client": { + "short_name": "CloudBilling::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" + }, + "method": { + "short_name": "MoveBillingAccount", + "full_name": "google.cloud.billing.v1.CloudBilling.MoveBillingAccount", + "service": { + "short_name": "CloudBilling", + "full_name": "google.cloud.billing.v1.CloudBilling" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudCatalog_ListServices_sync", + "title": "Snippet for the list_services call in the CloudCatalog service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudCatalog::Client#list_services.", + "file": "cloud_catalog/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::ListServicesResponse", + "client": { + "short_name": "CloudCatalog::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.cloud.billing.v1.CloudCatalog.ListServices", + "service": { + "short_name": "CloudCatalog", + "full_name": "google.cloud.billing.v1.CloudCatalog" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbilling_v1_generated_CloudCatalog_ListSkus_sync", + "title": "Snippet for the list_skus call in the CloudCatalog service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudCatalog::Client#list_skus.", + "file": "cloud_catalog/list_skus.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_skus", + "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client#list_skus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Billing::V1::ListSkusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Billing::V1::ListSkusResponse", + "client": { + "short_name": "CloudCatalog::Client", + "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client" + }, + "method": { + "short_name": "ListSkus", + "full_name": "google.cloud.billing.v1.CloudCatalog.ListSkus", + "service": { + "short_name": "CloudCatalog", + "full_name": "google.cloud.billing.v1.CloudCatalog" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb new file mode 100644 index 000000000000..cc05f53a8296 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_billing" + +class ::Google::Cloud::Billing::V1::CloudBilling::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_billing_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.billing_account_path billing_account: "value0" + assert_equal "billingAccounts/value0", path + + path = client.billing_account_path organization: "value0", billing_account: "value1" + assert_equal "organizations/value0/billingAccounts/value1", path + end + end + + def test_organization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_path organization: "value0" + assert_equal "organizations/value0", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_project_billing_info_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_billing_info_path project: "value0" + assert_equal "projects/value0/billingInfo", path + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb new file mode 100644 index 000000000000..983617c47c75 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb @@ -0,0 +1,707 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_billing_pb" +require "google/cloud/billing/v1/cloud_billing/rest" + + +class ::Google::Cloud::Billing::V1::CloudBilling::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_billing_account + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::BillingAccount.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_get_billing_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_billing_account({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_billing_account name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_billing_account ::Google::Cloud::Billing::V1::GetBillingAccountRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_billing_account({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_billing_account(::Google::Cloud::Billing::V1::GetBillingAccountRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_billing_account_client_stub.call_count + end + end + end + + def test_list_billing_accounts + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::ListBillingAccountsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + parent = "hello world" + + list_billing_accounts_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_list_billing_accounts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_billing_accounts_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_billing_accounts page_size: page_size, page_token: page_token, filter: filter, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_billing_accounts ::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_billing_accounts(::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_billing_accounts_client_stub.call_count + end + end + end + + def test_update_billing_account + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::BillingAccount.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + account = {} + update_mask = {} + + update_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_update_billing_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_billing_account({ name: name, account: account, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_billing_account name: name, account: account, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_billing_account ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_billing_account({ name: name, account: account, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_billing_account(::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_billing_account_client_stub.call_count + end + end + end + + def test_create_billing_account + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::BillingAccount.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + billing_account = {} + parent = "hello world" + + create_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_create_billing_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_billing_account({ billing_account: billing_account, parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_billing_account billing_account: billing_account, parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_billing_account ::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_billing_account({ billing_account: billing_account, parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_billing_account(::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_billing_account_client_stub.call_count + end + end + end + + def test_list_project_billing_info + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_project_billing_info_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_list_project_billing_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_project_billing_info_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_project_billing_info({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_project_billing_info name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_project_billing_info ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info({ name: name, 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_project_billing_info(::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info_client_stub.call_count + end + end + end + + def test_get_project_billing_info + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_project_billing_info_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_get_project_billing_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_project_billing_info_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_project_billing_info({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_project_billing_info name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_project_billing_info ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_project_billing_info({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_project_billing_info(::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_project_billing_info_client_stub.call_count + end + end + end + + def test_update_project_billing_info + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + project_billing_info = {} + + update_project_billing_info_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_update_project_billing_info_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_project_billing_info_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_project_billing_info name: name, project_billing_info: project_billing_info do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_project_billing_info ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_project_billing_info(::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_project_billing_info_client_stub.call_count + end + end + end + + def test_get_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_count + end + end + end + + def test_set_iam_policy + # Create test objects. + client_result = ::Google::Iam::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_count + end + end + end + + def test_test_iam_permissions + # Create test objects. + client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_count + end + end + end + + def test_move_billing_account + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::BillingAccount.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + destination_parent = "hello world" + + move_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_move_billing_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, move_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.move_billing_account({ name: name, destination_parent: destination_parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.move_billing_account name: name, destination_parent: destination_parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.move_billing_account ::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.move_billing_account({ name: name, destination_parent: destination_parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.move_billing_account(::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, move_billing_account_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::Billing::V1::CloudBilling::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::Billing::V1::CloudBilling::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb new file mode 100644 index 000000000000..5765cf5c730f --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb @@ -0,0 +1,780 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_billing_pb" +require "google/cloud/billing/v1/cloud_billing" + +class ::Google::Cloud::Billing::V1::CloudBilling::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_billing_account + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_billing_account, name + assert_kind_of ::Google::Cloud::Billing::V1::GetBillingAccountRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_billing_account({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_billing_account name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_billing_account ::Google::Cloud::Billing::V1::GetBillingAccountRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_billing_account({ 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_billing_account(::Google::Cloud::Billing::V1::GetBillingAccountRequest.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_billing_account_client_stub.call_rpc_count + end + end + + def test_list_billing_accounts + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::ListBillingAccountsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + filter = "hello world" + parent = "hello world" + + list_billing_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_billing_accounts, name + assert_kind_of ::Google::Cloud::Billing::V1::ListBillingAccountsRequest, request + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_billing_accounts_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }) 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_billing_accounts page_size: page_size, page_token: page_token, filter: filter, parent: parent 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_billing_accounts ::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent) 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_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }, 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_billing_accounts(::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent), 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_billing_accounts_client_stub.call_rpc_count + end + end + + def test_update_billing_account + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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" + account = {} + update_mask = {} + + update_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_billing_account, name + assert_kind_of ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::V1::BillingAccount), request["account"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_billing_account({ name: name, account: account, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_billing_account name: name, account: account, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_billing_account ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_billing_account({ name: name, account: account, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_billing_account(::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_billing_account_client_stub.call_rpc_count + end + end + + def test_create_billing_account + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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. + billing_account = {} + parent = "hello world" + + create_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_billing_account, name + assert_kind_of ::Google::Cloud::Billing::V1::CreateBillingAccountRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::V1::BillingAccount), request["billing_account"] + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_billing_account({ billing_account: billing_account, parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_billing_account billing_account: billing_account, parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_billing_account ::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_billing_account({ billing_account: billing_account, parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_billing_account(::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_billing_account_client_stub.call_rpc_count + end + end + + def test_list_project_billing_info + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse.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" + page_size = 42 + page_token = "hello world" + + list_project_billing_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_project_billing_info, name + assert_kind_of ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_project_billing_info_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_project_billing_info({ name: name, 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_project_billing_info name: name, 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_project_billing_info ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info({ name: name, 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_project_billing_info(::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info_client_stub.call_rpc_count + end + end + + def test_get_project_billing_info + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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_project_billing_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_project_billing_info, name + assert_kind_of ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_project_billing_info_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_project_billing_info({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_project_billing_info name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_project_billing_info ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_project_billing_info({ 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_project_billing_info(::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.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_project_billing_info_client_stub.call_rpc_count + end + end + + def test_update_project_billing_info + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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" + project_billing_info = {} + + update_project_billing_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_project_billing_info, name + assert_kind_of ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::V1::ProjectBillingInfo), request["project_billing_info"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_project_billing_info_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_project_billing_info name: name, project_billing_info: project_billing_info do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_project_billing_info ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_project_billing_info(::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_project_billing_info_client_stub.call_rpc_count + end + end + + def test_get_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + options = {} + + get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_iam_policy, name + assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_iam_policy({ resource: resource, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_iam_policy resource: resource, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_iam_policy_client_stub.call_rpc_count + end + end + + def test_set_iam_policy + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + resource = "hello world" + policy = {} + update_mask = {} + + set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :set_iam_policy, name + assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request + assert_equal "hello world", request["resource"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, set_iam_policy_client_stub.call_rpc_count + end + end + + def test_test_iam_permissions + # Create GRPC objects. + grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. + resource = "hello world" + permissions = ["hello world"] + + test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :test_iam_permissions, name + assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request + assert_equal "hello world", request["resource"] + assert_equal ["hello world"], request["permissions"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, test_iam_permissions_client_stub.call_rpc_count + end + end + + def test_move_billing_account + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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" + destination_parent = "hello world" + + move_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :move_billing_account, name + assert_kind_of ::Google::Cloud::Billing::V1::MoveBillingAccountRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["destination_parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, move_billing_account_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.move_billing_account({ name: name, destination_parent: destination_parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.move_billing_account name: name, destination_parent: destination_parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.move_billing_account ::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.move_billing_account({ name: name, destination_parent: destination_parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.move_billing_account(::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, move_billing_account_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::Billing::V1::CloudBilling::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::Billing::V1::CloudBilling::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::Billing::V1::CloudBilling::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Billing::V1::CloudBilling::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb new file mode 100644 index 000000000000..76b68632db8d --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/billing/v1/cloud_catalog" + +class ::Google::Cloud::Billing::V1::CloudCatalog::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_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path service: "value0" + assert_equal "services/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb new file mode 100644 index 000000000000..f2eb76dce2ba --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb @@ -0,0 +1,213 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_catalog_pb" +require "google/cloud/billing/v1/cloud_catalog/rest" + + +class ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::ListServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + + list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_services({ page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_services page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_services ::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_services({ 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_services(::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_count + end + end + end + + def test_list_skus + # Create test objects. + client_result = ::Google::Cloud::Billing::V1::ListSkusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + start_time = {} + end_time = {} + currency_code = "hello world" + page_size = 42 + page_token = "hello world" + + list_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_skus parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_skus ::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus(::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_skus_client_stub.call_count + end + end + end + + def test_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::Billing::V1::CloudCatalog::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::Billing::V1::CloudCatalog::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb new file mode 100644 index 000000000000..2d02240021cd --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb @@ -0,0 +1,242 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/billing/v1/cloud_catalog_pb" +require "google/cloud/billing/v1/cloud_catalog" + +class ::Google::Cloud::Billing::V1::CloudCatalog::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::ListServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + + list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_services, name + assert_kind_of ::Google::Cloud::Billing::V1::ListServicesRequest, request + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_services_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_services({ 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_services 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_services ::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_services({ 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_services(::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_rpc_count + end + end + + def test_list_skus + # Create GRPC objects. + grpc_response = ::Google::Cloud::Billing::V1::ListSkusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + start_time = {} + end_time = {} + currency_code = "hello world" + page_size = 42 + page_token = "hello world" + + list_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_skus, name + assert_kind_of ::Google::Cloud::Billing::V1::ListSkusRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] + assert_equal "hello world", request["currency_code"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_skus_client_stub do + # Create client + client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus ::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus(::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_skus_client_stub.call_rpc_count + end + end + + def test_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::Billing::V1::CloudCatalog::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::Billing::V1::CloudCatalog::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::Billing::V1::CloudCatalog::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Billing::V1::CloudCatalog::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/helper.rb b/owl-bot-staging/google-cloud-billing-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-billing-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/.gitignore b/owl-bot-staging/google-cloud-binary_authorization-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1/.repo-metadata.json new file mode 100644 index 000000000000..2f8790a17bc3 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/.repo-metadata.json @@ -0,0 +1,19 @@ +{ + "api_id": "binaryauthorization.googleapis.com", + "api_shortname": "binaryauthorization", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest", + "distribution_name": "google-cloud-binary_authorization-v1", + "is_cloud": true, + "language": "ruby", + "name": "binaryauthorization", + "name_pretty": "Binary Authorization V1 API", + "product_documentation": "https://cloud.google.com/binary-authorization/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BINARY_AUTHORIZATION", + "ruby-cloud-product-url": "https://cloud.google.com/binary-authorization/", + "ruby-cloud-service-override": "BinauthzManagementServiceV1=BinauthzManagementService;SystemPolicyV1=SystemPolicy;ValidationHelperV1=ValidationHelper", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml b/owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml new file mode 100644 index 000000000000..d50625d49551 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-binary_authorization-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-binary_authorization-v1.rb" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/.toys.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/.yardopts b/owl-bot-staging/google-cloud-binary_authorization-v1/.yardopts new file mode 100644 index 000000000000..a2253f9a1ac0 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Binary Authorization 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-binary_authorization-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-binary_authorization-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8279621c45ca --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-binary_authorization-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-binary_authorization-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/binary_authorization/v1" + +client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/binary_authorization/v1" + +::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-binary_authorization-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/binary_authorization/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/LICENSE.md b/owl-bot-staging/google-cloud-binary_authorization-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1/README.md new file mode 100644 index 000000000000..1421b3d50521 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Binary Authorization V1 API + +The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run. + +Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Binary Authorization V1 API. Most users should consider using +the main client gem, +[google-cloud-binary_authorization](https://rubygems.org/gems/google-cloud-binary_authorization). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-binary_authorization-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/binaryauthorization.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/binary_authorization/v1" + +client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new +request = ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new # (request fields as keyword arguments...) +response = client.get_policy request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/binary-authorization/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/binary_authorization/v1" +require "logger" + +client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.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-binary_authorization`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-binary_authorization-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-binary_authorization`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-binary_authorization-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-binary_authorization-v1/Rakefile b/owl-bot-staging/google-cloud-binary_authorization-v1/Rakefile new file mode 100644 index 000000000000..ed9face33f1e --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/Rakefile @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-binary_authorization-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BINARY_AUTHORIZATION_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BINARY_AUTHORIZATION_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BINARY_AUTHORIZATION_TEST_PROJECT=test123 BINARY_AUTHORIZATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/binary_authorization/v1/binauthz_management_service/credentials" + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BINARY_AUTHORIZATION_PROJECT"] = project + ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] = project + ENV["BINARY_AUTHORIZATION_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-binary_authorization-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-binary_authorization-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-binary_authorization-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-binary_authorization-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-binary_authorization-v1" + header "google-cloud-binary_authorization-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-binary_authorization-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-binary_authorization-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-binary_authorization-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-binary_authorization-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-binary_authorization-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1/gapic_metadata.json new file mode 100644 index 000000000000..62616714fd74 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/gapic_metadata.json @@ -0,0 +1,81 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.binaryauthorization.v1", + "libraryPackage": "::Google::Cloud::BinaryAuthorization::V1", + "services": { + "BinauthzManagementServiceV1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client", + "rpcs": { + "GetPolicy": { + "methods": [ + "get_policy" + ] + }, + "UpdatePolicy": { + "methods": [ + "update_policy" + ] + }, + "CreateAttestor": { + "methods": [ + "create_attestor" + ] + }, + "GetAttestor": { + "methods": [ + "get_attestor" + ] + }, + "UpdateAttestor": { + "methods": [ + "update_attestor" + ] + }, + "ListAttestors": { + "methods": [ + "list_attestors" + ] + }, + "DeleteAttestor": { + "methods": [ + "delete_attestor" + ] + } + } + } + } + }, + "SystemPolicyV1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client", + "rpcs": { + "GetSystemPolicy": { + "methods": [ + "get_system_policy" + ] + } + } + } + } + }, + "ValidationHelperV1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client", + "rpcs": { + "ValidateAttestationOccurrence": { + "methods": [ + "validate_attestation_occurrence" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec b/owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec new file mode 100644 index 000000000000..c6477e89d7bc --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/binary_authorization/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-binary_authorization-v1" + gem.version = Google::Cloud::BinaryAuthorization::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details." + gem.summary = "The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "grafeas-v1", "> 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-v1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-v1.rb new file mode 100644 index 000000000000..6fd39b3fb94a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-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/binary_authorization/v1" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb new file mode 100644 index 000000000000..d797dafc8014 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binary_authorization/v1/binauthz_management_service" +require "google/cloud/binary_authorization/v1/system_policy" +require "google/cloud/binary_authorization/v1/validation_helper" +require "google/cloud/binary_authorization/v1/version" + +module Google + module Cloud + module BinaryAuthorization + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1" + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1" + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/binary_authorization/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb new file mode 100644 index 000000000000..1efe07271436 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1/version" + +require "google/cloud/binary_authorization/v1/binauthz_management_service/credentials" +require "google/cloud/binary_authorization/v1/binauthz_management_service/paths" +require "google/cloud/binary_authorization/v1/binauthz_management_service/client" +require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1 + ## + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1/binauthz_management_service" + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + module BinauthzManagementService + end + end + end + end +end + +helper_path = ::File.join __dir__, "binauthz_management_service", "helpers.rb" +require "google/cloud/binary_authorization/v1/binauthz_management_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb new file mode 100644 index 000000000000..7f2a92bf4c5a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb @@ -0,0 +1,1108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module BinauthzManagementService + ## + # Client for the BinauthzManagementService service. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :binauthz_management_service_stub + + ## + # Configure the BinauthzManagementService Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BinauthzManagementService clients + # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_policy.timeout = 600.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_policy.timeout = 600.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_attestor.timeout = 600.0 + + default_config.rpcs.get_attestor.timeout = 600.0 + default_config.rpcs.get_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_attestor.timeout = 600.0 + default_config.rpcs.update_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_attestors.timeout = 600.0 + default_config.rpcs.list_attestors.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_attestor.timeout = 600.0 + default_config.rpcs.delete_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BinauthzManagementService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @binauthz_management_service_stub.universe_domain + end + + ## + # Create a new BinauthzManagementService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BinauthzManagementService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/binaryauthorization/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 + + @binauthz_management_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementServiceV1::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @binauthz_management_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @binauthz_management_service_stub.logger + end + + # Service calls + + ## + # A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} that must attest to + # a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1::Policy policy} if the project does not have one. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_policy(name: nil) + # Pass arguments to `get_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, + # in the format `projects/*/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :get_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1::Policy policy}, and returns a copy of the + # new {::Google::Cloud::BinaryAuthorization::V1::Policy policy}. A policy is always updated as a whole, to avoid race + # conditions with concurrent policy enforcement (or management!) + # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + # if the request is malformed. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Cloud::BinaryAuthorization::V1::Policy, ::Hash] + # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Policy#name policy name} field with the resource name in + # the request URL, in the format `projects/*/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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.policy&.name + header_params["policy.name"] = request.policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :update_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, + # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} already exists. + # + # @overload create_attestor(request, options = nil) + # Pass arguments to `create_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) + # Pass arguments to `create_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. + # @param attestor_id [::String] + # Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID. + # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] + # Required. The initial {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name, + # in the format `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new + # + # # Call the create_attestor method. + # result = client.create_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + # p result + # + def create_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :create_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. + # + # @overload get_attestor(request, options = nil) + # Pass arguments to `get_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_attestor(name: nil) + # Pass arguments to `get_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in the format + # `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new + # + # # Call the get_attestor method. + # result = client.get_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + # p result + # + def get_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :get_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. + # + # @overload update_attestor(request, options = nil) + # Pass arguments to `update_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_attestor(attestor: nil) + # Pass arguments to `update_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] + # Required. The updated {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name + # in the request URL, in the format `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new + # + # # Call the update_attestor method. + # result = client.update_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + # p result + # + def update_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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.attestor&.name + header_params["attestor.name"] = request.attestor.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :update_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}. + # Returns INVALID_ARGUMENT if the project does not exist. + # + # @overload list_attestors(request, options = nil) + # Pass arguments to `list_attestors` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attestors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format `projects/*`. + # @param page_size [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned + # from the previous call to the `ListAttestors` method. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new + # + # # Call the list_attestors method. + # result = client.list_attestors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1::Attestor. + # p item + # end + # + def list_attestors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_attestors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attestors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :list_attestors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. + # + # @overload delete_attestor(request, options = nil) + # Pass arguments to `delete_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_attestor(name: nil) + # Pass arguments to `delete_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the format + # `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new + # + # # Call the delete_attestor method. + # result = client.delete_attestor request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :delete_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BinauthzManagementService API. + # + # This class represents the configuration for BinauthzManagementService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BinauthzManagementService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `create_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attestor + ## + # RPC-specific configuration for `get_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attestor + ## + # RPC-specific configuration for `update_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :update_attestor + ## + # RPC-specific configuration for `list_attestors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attestors + ## + # RPC-specific configuration for `delete_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attestor + + # @private + def initialize parent_rpcs = nil + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor + @create_attestor = ::Gapic::Config::Method.new create_attestor_config + get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor + @get_attestor = ::Gapic::Config::Method.new get_attestor_config + update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor + @update_attestor = ::Gapic::Config::Method.new update_attestor_config + list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors + @list_attestors = ::Gapic::Config::Method.new list_attestors_config + delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor + @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb new file mode 100644 index 000000000000..530400adb780 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module BinauthzManagementService + # Credentials for the BinauthzManagementService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BINARY_AUTHORIZATION_CREDENTIALS", + "BINARY_AUTHORIZATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BINARY_AUTHORIZATION_CREDENTIALS_JSON", + "BINARY_AUTHORIZATION_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb new file mode 100644 index 000000000000..a4282d52ea46 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1 + module BinauthzManagementService + # Path helper methods for the BinauthzManagementService API. + module Paths + ## + # Create a fully-qualified Attestor resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/attestors/{attestor}` + # + # @param project [String] + # @param attestor [String] + # + # @return [::String] + def attestor_path project:, attestor: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/attestors/#{attestor}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/policy` + # + # @param project [String] + # + # @overload policy_path(location:) + # The resource will be in the following format: + # + # `locations/{location}/policy` + # + # @param location [String] + # + # @return [::String] + def policy_path **args + resources = { + "project" => (proc do |project:| + "projects/#{project}/policy" + end), + "location" => (proc do |location:| + "locations/#{location}/policy" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb new file mode 100644 index 000000000000..6a6ed328774c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1/version" + +require "google/cloud/binary_authorization/v1/binauthz_management_service/credentials" +require "google/cloud/binary_authorization/v1/binauthz_management_service/paths" +require "google/cloud/binary_authorization/v1/binauthz_management_service/rest/client" + +module Google + module Cloud + module BinaryAuthorization + module V1 + ## + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + module BinauthzManagementService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/binary_authorization/v1/binauthz_management_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb new file mode 100644 index 000000000000..5469431c70f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb @@ -0,0 +1,1016 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module BinauthzManagementService + module Rest + ## + # REST client for the BinauthzManagementService service. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :binauthz_management_service_stub + + ## + # Configure the BinauthzManagementService Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BinauthzManagementService clients + # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_policy.timeout = 600.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_policy.timeout = 600.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_attestor.timeout = 600.0 + + default_config.rpcs.get_attestor.timeout = 600.0 + default_config.rpcs.get_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_attestor.timeout = 600.0 + default_config.rpcs.update_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_attestors.timeout = 600.0 + default_config.rpcs.list_attestors.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_attestor.timeout = 600.0 + default_config.rpcs.delete_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BinauthzManagementService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @binauthz_management_service_stub.universe_domain + end + + ## + # Create a new BinauthzManagementService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BinauthzManagementService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @binauthz_management_service_stub = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @binauthz_management_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @binauthz_management_service_stub.logger + end + + # Service calls + + ## + # A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} that must attest to + # a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1::Policy policy} if the project does not have one. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_policy(name: nil) + # Pass arguments to `get_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, + # in the format `projects/*/policy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.get_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1::Policy policy}, and returns a copy of the + # new {::Google::Cloud::BinaryAuthorization::V1::Policy policy}. A policy is always updated as a whole, to avoid race + # conditions with concurrent policy enforcement (or management!) + # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + # if the request is malformed. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Cloud::BinaryAuthorization::V1::Policy, ::Hash] + # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Policy#name policy name} field with the resource name in + # the request URL, in the format `projects/*/policy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.update_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, + # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} already exists. + # + # @overload create_attestor(request, options = nil) + # Pass arguments to `create_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) + # Pass arguments to `create_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. + # @param attestor_id [::String] + # Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID. + # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] + # Required. The initial {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name, + # in the format `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new + # + # # Call the create_attestor method. + # result = client.create_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + # p result + # + def create_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.create_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. + # + # @overload get_attestor(request, options = nil) + # Pass arguments to `get_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_attestor(name: nil) + # Pass arguments to `get_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in the format + # `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new + # + # # Call the get_attestor method. + # result = client.get_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + # p result + # + def get_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.get_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. + # + # @overload update_attestor(request, options = nil) + # Pass arguments to `update_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_attestor(attestor: nil) + # Pass arguments to `update_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] + # Required. The updated {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name + # in the request URL, in the format `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new + # + # # Call the update_attestor method. + # result = client.update_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + # p result + # + def update_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.update_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}. + # Returns INVALID_ARGUMENT if the project does not exist. + # + # @overload list_attestors(request, options = nil) + # Pass arguments to `list_attestors` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attestors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format `projects/*`. + # @param page_size [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned + # from the previous call to the `ListAttestors` method. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new + # + # # Call the list_attestors method. + # result = client.list_attestors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1::Attestor. + # p item + # end + # + def list_attestors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_attestors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attestors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.list_attestors request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, "attestors", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. + # + # @overload delete_attestor(request, options = nil) + # Pass arguments to `delete_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_attestor(name: nil) + # Pass arguments to `delete_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the format + # `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new + # + # # Call the delete_attestor method. + # result = client.delete_attestor request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.delete_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BinauthzManagementService REST API. + # + # This class represents the configuration for BinauthzManagementService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BinauthzManagementService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `create_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attestor + ## + # RPC-specific configuration for `get_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attestor + ## + # RPC-specific configuration for `update_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :update_attestor + ## + # RPC-specific configuration for `list_attestors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attestors + ## + # RPC-specific configuration for `delete_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attestor + + # @private + def initialize parent_rpcs = nil + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor + @create_attestor = ::Gapic::Config::Method.new create_attestor_config + get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor + @get_attestor = ::Gapic::Config::Method.new get_attestor_config + update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor + @update_attestor = ::Gapic::Config::Method.new update_attestor_config + list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors + @list_attestors = ::Gapic::Config::Method.new list_attestors_config + delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor + @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb new file mode 100644 index 000000000000..7b1298ec749d --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb @@ -0,0 +1,511 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binaryauthorization/v1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module BinauthzManagementService + module Rest + ## + # REST service stub for the BinauthzManagementService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # A result object deserialized from the server's reply + def get_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # A result object deserialized from the server's reply + def update_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # A result object deserialized from the server's reply + def create_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # A result object deserialized from the server's reply + def get_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # A result object deserialized from the server's reply + def update_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_attestors REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse] + # A result object deserialized from the server's reply + def list_attestors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attestors_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_attestors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{policy.name}", + body: "policy", + matches: [ + ["policy.name", %r{^projects/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/attestors", + body: "attestor", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1/{attestor.name}", + body: "attestor", + matches: [ + ["attestor.name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attestors REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_attestors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/attestors", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb new file mode 100644 index 000000000000..999349ce2371 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" +require "google/cloud/binary_authorization/v1/system_policy/rest" +require "google/cloud/binary_authorization/v1/validation_helper/rest" +require "google/cloud/binary_authorization/v1/version" + +module Google + module Cloud + module BinaryAuthorization + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/binary_authorization/v1/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb new file mode 100644 index 000000000000..1bd243e5d524 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1/version" + +require "google/cloud/binary_authorization/v1/system_policy/credentials" +require "google/cloud/binary_authorization/v1/system_policy/paths" +require "google/cloud/binary_authorization/v1/system_policy/client" +require "google/cloud/binary_authorization/v1/system_policy/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1 + ## + # API for working with the system policy. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1/system_policy" + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1/system_policy/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new + # + module SystemPolicy + end + end + end + end +end + +helper_path = ::File.join __dir__, "system_policy", "helpers.rb" +require "google/cloud/binary_authorization/v1/system_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb new file mode 100644 index 000000000000..8e7f2b36ad22 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb @@ -0,0 +1,475 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module SystemPolicy + ## + # Client for the SystemPolicy service. + # + # API for working with the system policy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :system_policy_stub + + ## + # Configure the SystemPolicy Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SystemPolicy clients + # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SystemPolicy Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @system_policy_stub.universe_domain + end + + ## + # Create a new SystemPolicy client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SystemPolicy client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/binaryauthorization/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 + + @system_policy_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BinaryAuthorization::V1::SystemPolicyV1::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @system_policy_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @system_policy_stub.logger + end + + # Service calls + + ## + # Gets the current system policy in the specified location. + # + # @overload get_system_policy(request, options = nil) + # Pass arguments to `get_system_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_system_policy(name: nil) + # Pass arguments to `get_system_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new + # + # # Call the get_system_policy method. + # result = client.get_system_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + # p result + # + def get_system_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_system_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_system_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_system_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @system_policy_stub.call_rpc :get_system_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SystemPolicy API. + # + # This class represents the configuration for SystemPolicy, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_system_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SystemPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_system_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_system_policy + + # @private + def initialize parent_rpcs = nil + get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy + @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb new file mode 100644 index 000000000000..31966bc1a626 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module SystemPolicy + # Credentials for the SystemPolicy API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BINARY_AUTHORIZATION_CREDENTIALS", + "BINARY_AUTHORIZATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BINARY_AUTHORIZATION_CREDENTIALS_JSON", + "BINARY_AUTHORIZATION_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb new file mode 100644 index 000000000000..a34ddc6ef1de --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1 + module SystemPolicy + # Path helper methods for the SystemPolicy API. + module Paths + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/policy` + # + # @param project [String] + # + # @overload policy_path(location:) + # The resource will be in the following format: + # + # `locations/{location}/policy` + # + # @param location [String] + # + # @return [::String] + def policy_path **args + resources = { + "project" => (proc do |project:| + "projects/#{project}/policy" + end), + "location" => (proc do |location:| + "locations/#{location}/policy" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb new file mode 100644 index 000000000000..2155f943b245 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1/version" + +require "google/cloud/binary_authorization/v1/system_policy/credentials" +require "google/cloud/binary_authorization/v1/system_policy/paths" +require "google/cloud/binary_authorization/v1/system_policy/rest/client" + +module Google + module Cloud + module BinaryAuthorization + module V1 + ## + # API for working with the system policy. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/binary_authorization/v1/system_policy/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new + # + module SystemPolicy + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/binary_authorization/v1/system_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb new file mode 100644 index 000000000000..bef7a2dd8fad --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb @@ -0,0 +1,425 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/system_policy/rest/service_stub" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module SystemPolicy + module Rest + ## + # REST client for the SystemPolicy service. + # + # API for working with the system policy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :system_policy_stub + + ## + # Configure the SystemPolicy Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SystemPolicy clients + # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SystemPolicy Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @system_policy_stub.universe_domain + end + + ## + # Create a new SystemPolicy REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SystemPolicy client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @system_policy_stub = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @system_policy_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @system_policy_stub.logger + end + + # Service calls + + ## + # Gets the current system policy in the specified location. + # + # @overload get_system_policy(request, options = nil) + # Pass arguments to `get_system_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_system_policy(name: nil) + # Pass arguments to `get_system_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new + # + # # Call the get_system_policy method. + # result = client.get_system_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + # p result + # + def get_system_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_system_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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_system_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_system_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @system_policy_stub.get_system_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SystemPolicy REST API. + # + # This class represents the configuration for SystemPolicy REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_system_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SystemPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_system_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_system_policy + + # @private + def initialize parent_rpcs = nil + get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy + @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb new file mode 100644 index 000000000000..e2ae8689bfc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binaryauthorization/v1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module SystemPolicy + module Rest + ## + # REST service stub for the SystemPolicy service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_system_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # A result object deserialized from the server's reply + def get_system_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_system_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_system_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_system_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_system_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^locations/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.rb new file mode 100644 index 000000000000..c0b4f435f7a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1/version" + +require "google/cloud/binary_authorization/v1/validation_helper/credentials" +require "google/cloud/binary_authorization/v1/validation_helper/client" +require "google/cloud/binary_authorization/v1/validation_helper/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1 + ## + # BinAuthz Attestor verification + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1/validation_helper" + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1/validation_helper/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new + # + module ValidationHelper + end + end + end + end +end + +helper_path = ::File.join __dir__, "validation_helper", "helpers.rb" +require "google/cloud/binary_authorization/v1/validation_helper/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb new file mode 100644 index 000000000000..74c59831b8c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb @@ -0,0 +1,486 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module ValidationHelper + ## + # Client for the ValidationHelper service. + # + # BinAuthz Attestor verification + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :validation_helper_stub + + ## + # Configure the ValidationHelper Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ValidationHelper clients + # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ValidationHelper Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 + @validation_helper_stub.universe_domain + end + + ## + # Create a new ValidationHelper client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ValidationHelper client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/binaryauthorization/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 + + @validation_helper_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BinaryAuthorization::V1::ValidationHelperV1::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 + ) + + @validation_helper_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @validation_helper_stub.logger + end + + # Service calls + + ## + # Returns whether the given Attestation for the given image URI + # was signed by the given Attestor + # + # @overload validate_attestation_occurrence(request, options = nil) + # Pass arguments to `validate_attestation_occurrence` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil) + # Pass arguments to `validate_attestation_occurrence` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param attestor [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} of the + # [occurrence][grafeas.v1.Occurrence], in the format + # `projects/*/attestors/*`. + # @param attestation [::Grafeas::V1::AttestationOccurrence, ::Hash] + # Required. An {::Grafeas::V1::AttestationOccurrence AttestationOccurrence} to + # be checked that it can be verified by the Attestor. It does not have to be + # an existing entity in Container Analysis. It must otherwise be a valid + # AttestationOccurrence. + # @param occurrence_note [::String] + # Required. The resource name of the [Note][grafeas.v1.Note] to which the + # containing [Occurrence][grafeas.v1.Occurrence] is associated. + # @param occurrence_resource_uri [::String] + # Required. The URI of the artifact (e.g. container image) that is the + # subject of the containing [Occurrence][grafeas.v1.Occurrence]. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new + # + # # Call the validate_attestation_occurrence method. + # result = client.validate_attestation_occurrence request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse. + # p result + # + def validate_attestation_occurrence request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest + + # Converts hash 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.validate_attestation_occurrence.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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.attestor + header_params["attestor"] = request.attestor + 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.validate_attestation_occurrence.timeout, + metadata: metadata, + retry_policy: @config.rpcs.validate_attestation_occurrence.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @validation_helper_stub.call_rpc :validate_attestation_occurrence, 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 ValidationHelper API. + # + # This class represents the configuration for ValidationHelper, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 + # # validate_attestation_occurrence to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.validate_attestation_occurrence.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.validate_attestation_occurrence.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the ValidationHelper 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 `validate_attestation_occurrence` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_attestation_occurrence + + # @private + def initialize parent_rpcs = nil + validate_attestation_occurrence_config = parent_rpcs.validate_attestation_occurrence if parent_rpcs.respond_to? :validate_attestation_occurrence + @validate_attestation_occurrence = ::Gapic::Config::Method.new validate_attestation_occurrence_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb new file mode 100644 index 000000000000..bec24ad23cd8 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module ValidationHelper + # Credentials for the ValidationHelper API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BINARY_AUTHORIZATION_CREDENTIALS", + "BINARY_AUTHORIZATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BINARY_AUTHORIZATION_CREDENTIALS_JSON", + "BINARY_AUTHORIZATION_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb new file mode 100644 index 000000000000..33b694b610be --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.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 "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1/version" + +require "google/cloud/binary_authorization/v1/validation_helper/credentials" +require "google/cloud/binary_authorization/v1/validation_helper/rest/client" + +module Google + module Cloud + module BinaryAuthorization + module V1 + ## + # BinAuthz Attestor verification + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/binary_authorization/v1/validation_helper/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new + # + module ValidationHelper + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/binary_authorization/v1/validation_helper/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb new file mode 100644 index 000000000000..ac1888ead4ab --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb @@ -0,0 +1,436 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/validation_helper/rest/service_stub" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module ValidationHelper + module Rest + ## + # REST client for the ValidationHelper service. + # + # BinAuthz Attestor verification + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :validation_helper_stub + + ## + # Configure the ValidationHelper Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ValidationHelper clients + # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ValidationHelper Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 + @validation_helper_stub.universe_domain + end + + ## + # Create a new ValidationHelper REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ValidationHelper 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 + + @validation_helper_stub = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @validation_helper_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @validation_helper_stub.logger + end + + # Service calls + + ## + # Returns whether the given Attestation for the given image URI + # was signed by the given Attestor + # + # @overload validate_attestation_occurrence(request, options = nil) + # Pass arguments to `validate_attestation_occurrence` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil) + # Pass arguments to `validate_attestation_occurrence` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param attestor [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} of the + # [occurrence][grafeas.v1.Occurrence], in the format + # `projects/*/attestors/*`. + # @param attestation [::Grafeas::V1::AttestationOccurrence, ::Hash] + # Required. An {::Grafeas::V1::AttestationOccurrence AttestationOccurrence} to + # be checked that it can be verified by the Attestor. It does not have to be + # an existing entity in Container Analysis. It must otherwise be a valid + # AttestationOccurrence. + # @param occurrence_note [::String] + # Required. The resource name of the [Note][grafeas.v1.Note] to which the + # containing [Occurrence][grafeas.v1.Occurrence] is associated. + # @param occurrence_resource_uri [::String] + # Required. The URI of the artifact (e.g. container image) that is the + # subject of the containing [Occurrence][grafeas.v1.Occurrence]. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new + # + # # Call the validate_attestation_occurrence method. + # result = client.validate_attestation_occurrence request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse. + # p result + # + def validate_attestation_occurrence request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest + + # Converts hash 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.validate_attestation_occurrence.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::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.validate_attestation_occurrence.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.validate_attestation_occurrence.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @validation_helper_stub.validate_attestation_occurrence 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 ValidationHelper REST API. + # + # This class represents the configuration for ValidationHelper REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 + # # validate_attestation_occurrence to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.validate_attestation_occurrence.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.validate_attestation_occurrence.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 = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + 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 ValidationHelper 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 `validate_attestation_occurrence` + # @return [::Gapic::Config::Method] + # + attr_reader :validate_attestation_occurrence + + # @private + def initialize parent_rpcs = nil + validate_attestation_occurrence_config = parent_rpcs.validate_attestation_occurrence if parent_rpcs.respond_to? :validate_attestation_occurrence + @validate_attestation_occurrence = ::Gapic::Config::Method.new validate_attestation_occurrence_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb new file mode 100644 index 000000000000..c67a95fd8ea5 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binaryauthorization/v1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1 + module ValidationHelper + module Rest + ## + # REST service stub for the ValidationHelper 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 validate_attestation_occurrence REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] + # A result object deserialized from the server's reply + def validate_attestation_occurrence request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_validate_attestation_occurrence_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: "validate_attestation_occurrence", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.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 validate_attestation_occurrence REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_validate_attestation_occurrence_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{attestor}:validateAttestationOccurrence", + body: "*", + matches: [ + ["attestor", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/version.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/version.rb new file mode 100644 index 000000000000..d95ffedb69c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/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 BinaryAuthorization + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb new file mode 100644 index 000000000000..a82e617c64e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/v1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/binaryauthorization/v1/resources.proto\x12#google.cloud.binaryauthorization.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf8\x0c\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12r\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12i\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32>.google.cloud.binaryauthorization.v1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12l\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32\x46.google.cloud.binaryauthorization.v1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x85\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32R.google.cloud.binaryauthorization.v1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x90\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32W.google.cloud.binaryauthorization.v1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x88\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32S.google.cloud.binaryauthorization.v1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12W\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1ap\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\x1a|\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\x1a}\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xda\x03\n\rAdmissionRule\x12_\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x41.google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32\x42.google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xb7\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\\\n\x17user_owned_grafeas_note\x18\x03 \x01(\x0b\x32\x39.google.cloud.binaryauthorization.v1.UserOwnedGrafeasNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb4\x01\n\x14UserOwnedGrafeasNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12P\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32\x36.google.cloud.binaryauthorization.v1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xbf\x04\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12\x62\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32\x45.google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm\"\xb1\x03\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x1a\x02\x10\x01\"\xba\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12M\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\x8c\x02\n5com.google.protos.google.cloud.binaryauthorization.v1P\x00ZYcloud.google.com/go/binaryauthorization/apiv1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02#Google.Cloud.BinaryAuthorization.V1\xca\x02#Google\\Cloud\\BinaryAuthorization\\V1\xea\x02&Google::Cloud::BinaryAuthorization::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1 + Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.Policy").msgclass + Policy::GlobalPolicyEvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode").enummodule + AdmissionWhitelistPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern").msgclass + AdmissionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionRule").msgclass + AdmissionRule::EvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode").enummodule + AdmissionRule::EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode").enummodule + Attestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.Attestor").msgclass + UserOwnedGrafeasNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote").msgclass + PkixPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.PkixPublicKey").msgclass + PkixPublicKey::SignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm").enummodule + AttestorPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AttestorPublicKey").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb new file mode 100644 index 000000000000..f2f357a019f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/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/binaryauthorization/v1/resources_pb' +require 'google/protobuf/empty_pb' +require 'grafeas/v1/attestation_pb' + + +descriptor_data = "\n1google/cloud/binaryauthorization/v1/service.proto\x12#google.cloud.binaryauthorization.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/binaryauthorization/v1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgrafeas/v1/attestation.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"W\n\x13UpdatePolicyRequest\x12@\n\x06policy\x18\x01 \x01(\x0b\x32+.google.cloud.binaryauthorization.v1.PolicyB\x03\xe0\x41\x02\"\xbc\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32-.google.cloud.binaryauthorization.v1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"]\n\x15UpdateAttestorRequest\x12\x44\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32-.google.cloud.binaryauthorization.v1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x15ListAttestorsResponse\x12@\n\tattestors\x18\x01 \x03(\x0b\x32-.google.cloud.binaryauthorization.v1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\xbe\x01\n$ValidateAttestationOccurrenceRequest\x12\x15\n\x08\x61ttestor\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x0b\x61ttestation\x18\x02 \x01(\x0b\x32!.grafeas.v1.AttestationOccurrenceB\x03\xe0\x41\x02\x12\x1c\n\x0foccurrence_note\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12$\n\x17occurrence_resource_uri\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xf1\x01\n%ValidateAttestationOccurrenceResponse\x12\x61\n\x06result\x18\x01 \x01(\x0e\x32Q.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result\x12\x15\n\rdenial_reason\x18\x02 \x01(\t\"N\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\x12\x1e\n\x1a\x41TTESTATION_NOT_VERIFIABLE\x10\x02\x32\xe2\n\n\x1b\x42inauthzManagementServiceV1\x12\x9c\x01\n\tGetPolicy\x12\x35.google.cloud.binaryauthorization.v1.GetPolicyRequest\x1a+.google.cloud.binaryauthorization.v1.Policy\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=projects/*/policy}\x12\xb3\x01\n\x0cUpdatePolicy\x12\x38.google.cloud.binaryauthorization.v1.UpdatePolicyRequest\x1a+.google.cloud.binaryauthorization.v1.Policy\"<\xda\x41\x06policy\x82\xd3\xe4\x93\x02-\x1a#/v1/{policy.name=projects/*/policy}:\x06policy\x12\xce\x01\n\x0e\x43reateAttestor\x12:.google.cloud.binaryauthorization.v1.CreateAttestorRequest\x1a-.google.cloud.binaryauthorization.v1.Attestor\"Q\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xa7\x01\n\x0bGetAttestor\x12\x37.google.cloud.binaryauthorization.v1.GetAttestorRequest\x1a-.google.cloud.binaryauthorization.v1.Attestor\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/attestors/*}\x12\xc4\x01\n\x0eUpdateAttestor\x12:.google.cloud.binaryauthorization.v1.UpdateAttestorRequest\x1a-.google.cloud.binaryauthorization.v1.Attestor\"G\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02\x36\x1a*/v1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xba\x01\n\rListAttestors\x12\x39.google.cloud.binaryauthorization.v1.ListAttestorsRequest\x1a:.google.cloud.binaryauthorization.v1.ListAttestorsResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/attestors\x12\x96\x01\n\x0e\x44\x65leteAttestor\x12:.google.cloud.binaryauthorization.v1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\x94\x02\n\x0eSystemPolicyV1\x12\xa9\x01\n\x0fGetSystemPolicy\x12;.google.cloud.binaryauthorization.v1.GetSystemPolicyRequest\x1a+.google.cloud.binaryauthorization.v1.Policy\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xf5\x02\n\x12ValidationHelperV1\x12\x86\x02\n\x1dValidateAttestationOccurrence\x12I.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest\x1aJ.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse\"N\x82\xd3\xe4\x93\x02H\"C/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence:\x01*\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8c\x02\n5com.google.protos.google.cloud.binaryauthorization.v1P\x00ZYcloud.google.com/go/binaryauthorization/apiv1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02#Google.Cloud.BinaryAuthorization.V1\xca\x02#Google\\Cloud\\BinaryAuthorization\\V1\xea\x02&Google::Cloud::BinaryAuthorization::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1 + GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.GetPolicyRequest").msgclass + UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.UpdatePolicyRequest").msgclass + CreateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.CreateAttestorRequest").msgclass + GetAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.GetAttestorRequest").msgclass + UpdateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.UpdateAttestorRequest").msgclass + ListAttestorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ListAttestorsRequest").msgclass + ListAttestorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ListAttestorsResponse").msgclass + DeleteAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.DeleteAttestorRequest").msgclass + GetSystemPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.GetSystemPolicyRequest").msgclass + ValidateAttestationOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest").msgclass + ValidateAttestationOccurrenceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse").msgclass + ValidateAttestationOccurrenceResponse::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb new file mode 100644 index 000000000000..8e3e1b2e4ff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb @@ -0,0 +1,115 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/binaryauthorization/v1/service.proto for package 'Google.Cloud.BinaryAuthorization.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/binaryauthorization/v1/service_pb' + +module Google + module Cloud + module BinaryAuthorization + module V1 + module BinauthzManagementServiceV1 + # Customer-facing API for Cloud Binary Authorization. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * [Policy][google.cloud.binaryauthorization.v1.Policy] + # * [Attestor][google.cloud.binaryauthorization.v1.Attestor] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1' + + # A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to + # a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default + # [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. + rpc :GetPolicy, ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1::Policy + # Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the + # new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race + # conditions with concurrent policy enforcement (or management!) + # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + # if the request is malformed. + rpc :UpdatePolicy, ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, ::Google::Cloud::BinaryAuthorization::V1::Policy + # Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new + # [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, + # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + # [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. + rpc :CreateAttestor, ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1::Attestor + # Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. + # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + rpc :GetAttestor, ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1::Attestor + # Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. + # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + rpc :UpdateAttestor, ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1::Attestor + # Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. + # Returns INVALID_ARGUMENT if the project does not exist. + rpc :ListAttestors, ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse + # Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + rpc :DeleteAttestor, ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + module SystemPolicyV1 + # API for working with the system policy. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.binaryauthorization.v1.SystemPolicyV1' + + # Gets the current system policy in the specified location. + rpc :GetSystemPolicy, ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1::Policy + end + + Stub = Service.rpc_stub_class + end + module ValidationHelperV1 + # BinAuthz Attestor verification + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.binaryauthorization.v1.ValidationHelperV1' + + # Returns whether the given Attestation for the given image URI + # was signed by the given Attestor + rpc :ValidateAttestationOccurrence, ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md new file mode 100644 index 000000000000..f3a8af37824d --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Binary Authorization 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-binary_authorization-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb new file mode 100644 index 000000000000..810eb1c1a992 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb @@ -0,0 +1,374 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1 + # A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for container image binary authorization. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name, in the format `projects/*/policy`. There is + # at most one policy per project. + # @!attribute [rw] description + # @return [::String] + # Optional. A descriptive comment. + # @!attribute [rw] global_policy_evaluation_mode + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy::GlobalPolicyEvaluationMode] + # Optional. Controls the evaluation of a Google-maintained global admission + # policy for common system-level images. Images not covered by the global + # policy will be subject to the project admission policy. This setting + # has no effect when specified inside a global admission policy. + # @!attribute [rw] admission_whitelist_patterns + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern>] + # Optional. Admission policy allowlisting. A matching admission request will + # always be permitted. This feature is typically used to exclude Google or + # third-party infrastructure images from Binary Authorization policies. + # @!attribute [rw] cluster_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] + # Optional. Per-cluster admission rules. Cluster spec format: + # `location.clusterId`. There can be at most one admission rule per cluster + # spec. + # A `location` is either a compute zone (e.g. us-central1-a) or a region + # (e.g. us-central1). + # For `clusterId` syntax restrictions see + # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + # @!attribute [rw] kubernetes_namespace_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] + # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + # [a-z.-]+, e.g. 'some-namespace' + # @!attribute [rw] kubernetes_service_account_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] + # Optional. Per-kubernetes-service-account admission rules. Service account + # spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' + # @!attribute [rw] istio_service_identity_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] + # Optional. Per-istio-service-identity admission rules. Istio service + # identity spec format: + # spiffe:///ns//sa/ or + # /ns//sa/ + # e.g. spiffe://example.com/ns/test-ns/sa/default + # @!attribute [rw] default_admission_rule + # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] + # Required. Default admission rule for a cluster without a per-cluster, per- + # kubernetes-service-account, or per-istio-service-identity admission rule. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the policy was last updated. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] + class ClusterAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] + class KubernetesNamespaceAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] + class KubernetesServiceAccountAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] + class IstioServiceIdentityAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module GlobalPolicyEvaluationMode + # Not specified: DISABLE is assumed. + GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0 + + # Enables system policy evaluation. + ENABLE = 1 + + # Disables system policy evaluation. + DISABLE = 2 + end + end + + # An {::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern admission allowlist pattern} exempts images + # from checks by {::Google::Cloud::BinaryAuthorization::V1::AdmissionRule admission rules}. + # @!attribute [rw] name_pattern + # @return [::String] + # An image name pattern to allowlist, in the form `registry/path/to/image`. + # This supports a trailing `*` wildcard, but this is allowed only in + # text after the `registry/` part. This also supports a trailing `**` + # wildcard which matches subdirectories of a given entry. + class AdmissionWhitelistPattern + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An {::Google::Cloud::BinaryAuthorization::V1::AdmissionRule admission rule} specifies either that all container images + # used in a pod creation request must be attested to by one or more + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, that all pod creations will be allowed, or that all + # pod creations will be denied. + # + # Images matching an {::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern admission allowlist pattern} + # are exempted from admission rules and will never block a pod creation. + # @!attribute [rw] evaluation_mode + # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule::EvaluationMode] + # Required. How this admission rule will be evaluated. + # @!attribute [rw] require_attestations_by + # @return [::Array<::String>] + # Optional. The resource names of the attestors that must attest to + # a container image, in the format `projects/*/attestors/*`. Each + # attestor must exist before a policy can reference it. To add an attestor + # to a policy the principal issuing the policy change request must be able + # to read the attestor resource. + # + # Note: this field must be non-empty when the evaluation_mode field specifies + # REQUIRE_ATTESTATION, otherwise it must be empty. + # @!attribute [rw] enforcement_mode + # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule::EnforcementMode] + # Required. The action when a pod creation is denied by the admission rule. + class AdmissionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module EvaluationMode + # Do not use. + EVALUATION_MODE_UNSPECIFIED = 0 + + # This rule allows all all pod creations. + ALWAYS_ALLOW = 1 + + # This rule allows a pod creation if all the attestors listed in + # 'require_attestations_by' have valid attestations for all of the + # images in the pod spec. + REQUIRE_ATTESTATION = 2 + + # This rule denies all pod creations. + ALWAYS_DENY = 3 + end + + # Defines the possible actions when a pod creation is denied by an admission + # rule. + module EnforcementMode + # Do not use. + ENFORCEMENT_MODE_UNSPECIFIED = 0 + + # Enforce the admission rule by blocking the pod creation. + ENFORCED_BLOCK_AND_AUDIT_LOG = 1 + + # Dryrun mode: Audit logging only. This will allow the pod creation as if + # the admission request had specified break-glass. + DRYRUN_AUDIT_LOG_ONLY = 2 + end + end + + # An {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} that attests to container image + # artifacts. An existing attestor cannot be modified except where + # indicated. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name, in the format: + # `projects/*/attestors/*`. This field may not be updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A descriptive comment. This field may be updated. + # The field may be displayed in chooser dialogs. + # @!attribute [rw] user_owned_grafeas_note + # @return [::Google::Cloud::BinaryAuthorization::V1::UserOwnedGrafeasNote] + # This specifies how an attestation will be read, and how it will be used + # during policy enforcement. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the attestor was last updated. + class Attestor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An {::Google::Cloud::BinaryAuthorization::V1::UserOwnedGrafeasNote user owned Grafeas note} references a Grafeas + # Attestation.Authority Note created by the user. + # @!attribute [rw] note_reference + # @return [::String] + # Required. The Grafeas resource name of a Attestation.Authority Note, + # created by the user, in the format: `projects/*/notes/*`. This field may + # not be updated. + # + # An attestation by this attestor is stored as a Grafeas + # Attestation.Authority Occurrence that names a container image and that + # links to this Note. Grafeas is an external dependency. + # @!attribute [rw] public_keys + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1::AttestorPublicKey>] + # Optional. Public keys that verify attestations signed by this + # attestor. This field may be updated. + # + # If this field is non-empty, one of the specified public keys must + # verify that an attestation was signed by this attestor for the + # image specified in the admission request. + # + # If this field is empty, this attestor always returns that no + # valid attestations exist. + # @!attribute [r] delegation_service_account_email + # @return [::String] + # Output only. This field will contain the service account email address + # that this Attestor will use as the principal when querying Container + # Analysis. Attestor administrators must grant this service account the + # IAM role needed to read attestations from the [note_reference][Note] in + # Container Analysis (`containeranalysis.notes.occurrences.viewer`). + # + # This email address is fixed for the lifetime of the Attestor, but callers + # should not make any other assumptions about the service account email; + # future versions may use an email based on a different naming pattern. + class UserOwnedGrafeasNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A public key in the PkixPublicKey format (see + # https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). + # Public keys of this type are typically textually encoded using the PEM + # format. + # @!attribute [rw] public_key_pem + # @return [::String] + # A PEM-encoded public key, as described in + # https://tools.ietf.org/html/rfc7468#section-13 + # @!attribute [rw] signature_algorithm + # @return [::Google::Cloud::BinaryAuthorization::V1::PkixPublicKey::SignatureAlgorithm] + # The signature algorithm used to verify a message against a signature using + # this key. + # These signature algorithm must match the structure and any object + # identifiers encoded in `public_key_pem` (i.e. this algorithm must match + # that of the public key). + class PkixPublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a signature algorithm and other information necessary to verify + # signatures with a given public key. + # This is based primarily on the public key types supported by Tink's + # PemKeyType, which is in turn based on KMS's supported signing algorithms. + # See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz + # might support additional public key types independently of Tink and/or KMS. + module SignatureAlgorithm + # Not specified. + SIGNATURE_ALGORITHM_UNSPECIFIED = 0 + + # RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_PSS_2048_SHA256 = 1 + + # RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_PSS_3072_SHA256 = 2 + + # RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_PSS_4096_SHA256 = 3 + + # RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_PSS_4096_SHA512 = 4 + + # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5 + + # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6 + + # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7 + + # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + RSA_SIGN_PKCS1_4096_SHA512 = 8 + + # ECDSA on the NIST P-256 curve with a SHA256 digest. + ECDSA_P256_SHA256 = 9 + + # ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 9 + + # ECDSA on the NIST P-384 curve with a SHA384 digest. + ECDSA_P384_SHA384 = 10 + + # ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 10 + + # ECDSA on the NIST P-521 curve with a SHA512 digest. + ECDSA_P521_SHA512 = 11 + + # ECDSA on the NIST P-521 curve with a SHA512 digest. + EC_SIGN_P521_SHA512 = 11 + end + end + + # An {::Google::Cloud::BinaryAuthorization::V1::AttestorPublicKey attestor public key} that will be used to verify + # attestations signed by this attestor. + # @!attribute [rw] comment + # @return [::String] + # Optional. A descriptive comment. This field may be updated. + # @!attribute [rw] id + # @return [::String] + # The ID of this public key. + # Signatures verified by BinAuthz must include the ID of the public key that + # can be used to verify them, and that ID must match the contents of this + # field exactly. + # Additional restrictions on this field can be imposed based on which public + # key type is encapsulated. See the documentation on `public_key` cases below + # for details. + # @!attribute [rw] ascii_armored_pgp_public_key + # @return [::String] + # ASCII-armored representation of a PGP public key, as the entire output by + # the command `gpg --export --armor foo@example.com` (either LF or CRLF + # line endings). + # When using this field, `id` should be left blank. The BinAuthz API + # handlers will calculate the ID and fill it in automatically. BinAuthz + # computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + # upper-case hex. If `id` is provided by the caller, it will be + # overwritten by the API-calculated ID. + # + # Note: The following fields are mutually exclusive: `ascii_armored_pgp_public_key`, `pkix_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pkix_public_key + # @return [::Google::Cloud::BinaryAuthorization::V1::PkixPublicKey] + # A raw PKIX SubjectPublicKeyInfo format public key. + # + # NOTE: `id` may be explicitly provided by the caller when using this + # type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + # blank, a default one will be computed based on the digest of the DER + # encoding of the public key. + # + # Note: The following fields are mutually exclusive: `pkix_public_key`, `ascii_armored_pgp_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AttestorPublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb new file mode 100644 index 000000000000..995b068a0e85 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb @@ -0,0 +1,189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1 + # Request message for [BinauthzManagementService.GetPolicy][]. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, + # in the format `projects/*/policy`. + class GetPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.UpdatePolicy][]. + # @!attribute [rw] policy + # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] + # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Policy#name policy name} field with the resource name in + # the request URL, in the format `projects/*/policy`. + class UpdatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.CreateAttestor][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. + # @!attribute [rw] attestor_id + # @return [::String] + # Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID. + # @!attribute [rw] attestor + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # Required. The initial {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name, + # in the format `projects/*/attestors/*`. + class CreateAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.GetAttestor][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in the format + # `projects/*/attestors/*`. + class GetAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.UpdateAttestor][]. + # @!attribute [rw] attestor + # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] + # Required. The updated {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name + # in the request URL, in the format `projects/*/attestors/*`. + class UpdateAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.ListAttestors][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format `projects/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned + # from the previous call to the `ListAttestors` method. + class ListAttestorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for [BinauthzManagementService.ListAttestors][]. + # @!attribute [rw] attestors + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1::Attestor>] + # The list of {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. Pass this value in the + # {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} field in the subsequent call to the + # `ListAttestors` method to retrieve the next page of results. + class ListAttestorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.DeleteAttestor][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the format + # `projects/*/attestors/*`. + class DeleteAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to read the current system policy. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + class GetSystemPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for + # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence ValidationHelperV1.ValidateAttestationOccurrence}. + # @!attribute [rw] attestor + # @return [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} of the + # [occurrence][grafeas.v1.Occurrence], in the format + # `projects/*/attestors/*`. + # @!attribute [rw] attestation + # @return [::Grafeas::V1::AttestationOccurrence] + # Required. An {::Grafeas::V1::AttestationOccurrence AttestationOccurrence} to + # be checked that it can be verified by the Attestor. It does not have to be + # an existing entity in Container Analysis. It must otherwise be a valid + # AttestationOccurrence. + # @!attribute [rw] occurrence_note + # @return [::String] + # Required. The resource name of the [Note][grafeas.v1.Note] to which the + # containing [Occurrence][grafeas.v1.Occurrence] is associated. + # @!attribute [rw] occurrence_resource_uri + # @return [::String] + # Required. The URI of the artifact (e.g. container image) that is the + # subject of the containing [Occurrence][grafeas.v1.Occurrence]. + class ValidateAttestationOccurrenceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for + # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence ValidationHelperV1.ValidateAttestationOccurrence}. + # @!attribute [rw] result + # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse::Result] + # The result of the Attestation validation. + # @!attribute [rw] denial_reason + # @return [::String] + # The reason for denial if the Attestation couldn't be validated. + class ValidateAttestationOccurrenceResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The enum returned in the "result" field. + module Result + # Unspecified. + RESULT_UNSPECIFIED = 0 + + # The Attestation was able to verified by the Attestor. + VERIFIED = 1 + + # The Attestation was not able to verified by the Attestor. + ATTESTATION_NOT_VERIFIABLE = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/grafeas/v1/attestation.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/attestation.rb new file mode 100644 index 000000000000..23895f01f033 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/attestation.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 Grafeas + module V1 + # Note kind that represents a logical attestation "role" or "authority". For + # example, an organization might have one `Authority` for "QA" and one for + # "build". This note is intended to act strictly as a grouping mechanism for + # the attached occurrences (Attestations). This grouping mechanism also + # provides a security boundary, since IAM ACLs gate the ability for a principle + # to attach an occurrence to a given note. It also provides a single point of + # lookup to find all attached attestation occurrences, even if they don't all + # live in the same project. + # @!attribute [rw] hint + # @return [::Grafeas::V1::AttestationNote::Hint] + # Hint hints at the purpose of the attestation authority. + class AttestationNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This submessage provides human-readable hints about the purpose of the + # authority. Because the name of a note acts as its resource reference, it is + # important to disambiguate the canonical name of the Note (which might be a + # UUID for security purposes) from "readable" names more suitable for debug + # output. Note that these hints should not be used to look up authorities in + # security sensitive contexts, such as when looking up attestations to + # verify. + # @!attribute [rw] human_readable_name + # @return [::String] + # Required. The human readable name of this attestation authority, for + # example "qa". + class Hint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] compact_jwt + # @return [::String] + # The compact encoding of a JWS, which is always three base64 encoded strings + # joined by periods. For details, see: + # https://tools.ietf.org/html/rfc7515.html#section-3.1 + class Jwt + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Occurrence that represents a single "attestation". The authenticity of an + # attestation can be verified using the attached signature. If the verifier + # trusts the public key of the signer, then verifying the signature is + # sufficient to establish trust. In this circumstance, the authority to which + # this attestation is attached is primarily useful for lookup (how to find + # this attestation if you already know the authority and artifact to be + # verified) and intent (for which authority this attestation was intended to + # sign. + # @!attribute [rw] serialized_payload + # @return [::String] + # Required. The serialized payload that is verified by one or more + # `signatures`. + # @!attribute [rw] signatures + # @return [::Array<::Grafeas::V1::Signature>] + # One or more signatures over `serialized_payload`. Verifier implementations + # should consider this attestation message verified if at least one + # `signature` verifies `serialized_payload`. See `Signature` in common.proto + # for more details on signature structure and verification. + # @!attribute [rw] jwts + # @return [::Array<::Grafeas::V1::Jwt>] + # One or more JWTs encoding a self-contained attestation. + # Each JWT encodes the payload that it verifies within the JWT itself. + # Verifier implementation SHOULD ignore the `serialized_payload` field + # when verifying these JWTs. + # If only JWTs are present on this AttestationOccurrence, then the + # `serialized_payload` SHOULD be left empty. + # Each JWT SHOULD encode a claim specific to the `resource_uri` of this + # Occurrence, but this is not validated by Grafeas metadata API + # implementations. The JWT itself is opaque to Grafeas. + class AttestationOccurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb new file mode 100644 index 000000000000..eabafd087790 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb @@ -0,0 +1,243 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Grafeas + module V1 + # Metadata for any related URL information. + # @!attribute [rw] url + # @return [::String] + # Specific URL associated with the resource. + # @!attribute [rw] label + # @return [::String] + # Label to describe usage of the URL. + class RelatedUrl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Verifiers (e.g. Kritis implementations) MUST verify signatures + # with respect to the trust anchors defined in policy (e.g. a Kritis policy). + # Typically this means that the verifier has been configured with a map from + # `public_key_id` to public key material (and any required parameters, e.g. + # signing algorithm). + # + # In particular, verification implementations MUST NOT treat the signature + # `public_key_id` as anything more than a key lookup hint. The `public_key_id` + # DOES NOT validate or authenticate a public key; it only provides a mechanism + # for quickly selecting a public key ALREADY CONFIGURED on the verifier through + # a trusted channel. Verification implementations MUST reject signatures in any + # of the following circumstances: + # * The `public_key_id` is not recognized by the verifier. + # * The public key that `public_key_id` refers to does not verify the + # signature with respect to the payload. + # + # The `signature` contents SHOULD NOT be "attached" (where the payload is + # included with the serialized `signature` bytes). Verifiers MUST ignore any + # "attached" payload and only verify signatures with respect to explicitly + # provided payload (e.g. a `payload` field on the proto message that holds + # this Signature, or the canonical serialization of the proto message that + # holds this signature). + # @!attribute [rw] signature + # @return [::String] + # The content of the signature, an opaque bytestring. + # The payload that this signature verifies MUST be unambiguously provided + # with the Signature during verification. A wrapper message might provide + # the payload explicitly. Alternatively, a message might have a canonical + # serialization that can always be unambiguously computed to derive the + # payload. + # @!attribute [rw] public_key_id + # @return [::String] + # The identifier for the public key that verifies this signature. + # * The `public_key_id` is required. + # * The `public_key_id` SHOULD be an RFC3986 conformant URI. + # * When possible, the `public_key_id` SHOULD be an immutable reference, + # such as a cryptographic digest. + # + # Examples of valid `public_key_id`s: + # + # OpenPGP V4 public key fingerprint: + # * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" + # See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more + # details on this scheme. + # + # RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER + # serialization): + # * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" + # * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" + class Signature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MUST match + # https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An + # authenticated message of arbitrary type. + # @!attribute [rw] payload + # @return [::String] + # @!attribute [rw] payload_type + # @return [::String] + # @!attribute [rw] signatures + # @return [::Array<::Grafeas::V1::EnvelopeSignature>] + class Envelope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] sig + # @return [::String] + # @!attribute [rw] keyid + # @return [::String] + class EnvelopeSignature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicates the location at which a package was found. + # @!attribute [rw] file_path + # @return [::String] + # For jars that are contained inside .war files, this filepath + # can indicate the path to war file combined with the path to jar file. + # @!attribute [rw] layer_details + # @return [::Grafeas::V1::LayerDetails] + # Each package found in a file should have its own layer metadata (that is, + # information from the origin layer of the package). + # @!attribute [rw] line_number + # @return [::Integer] + # Line number in the file where the package was found. + # Optional field that only applies to source repository scanning. + class FileLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BaseImage describes a base image of a container image. + # @!attribute [rw] name + # @return [::String] + # The name of the base image. + # @!attribute [rw] repository + # @return [::String] + # The repository name in which the base image is from. + # @!attribute [rw] layer_count + # @return [::Integer] + # The number of layers that the base image is composed of. + # @!attribute [rw] registry + # @return [::String] + # The registry in which the base image is from. + class BaseImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the layer a package was found in. + # @!attribute [rw] index + # @return [::Integer] + # The index of the layer in the container image. + # @!attribute [rw] diff_id + # @return [::String] + # The diff ID (typically a sha256 hash) of the layer in the container image. + # @!attribute [rw] chain_id + # @return [::String] + # The layer chain ID (sha256 hash) of the layer in the container image. + # https://github.com/opencontainers/image-spec/blob/main/config.md#layer-chainid + # @!attribute [rw] command + # @return [::String] + # The layer build command that was used to build the layer. This may not be + # found in all layers depending on how the container image is built. + # @!attribute [rw] base_images + # @return [::Array<::Grafeas::V1::BaseImage>] + # The base images the layer is found within. + class LayerDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # License information. + # @!attribute [rw] expression + # @return [::String] + # Often a single license can be used to represent the licensing terms. + # Sometimes it is necessary to include a choice of one or more licenses + # or some combination of license identifiers. + # Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", + # "GPL-2.0-or-later WITH Bison-exception-2.2". + # @!attribute [rw] comments + # @return [::String] + # Comments + class License + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Digest information. + # @!attribute [rw] algo + # @return [::String] + # `SHA1`, `SHA512` etc. + # @!attribute [rw] digest_bytes + # @return [::String] + # Value of the digest. + class Digest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Kind represents the kinds of notes supported. + module NoteKind + # Default value. This value is unused. + NOTE_KIND_UNSPECIFIED = 0 + + # The note and occurrence represent a package vulnerability. + VULNERABILITY = 1 + + # The note and occurrence assert build provenance. + BUILD = 2 + + # This represents an image basis relationship. + IMAGE = 3 + + # This represents a package installed via a package manager. + PACKAGE = 4 + + # The note and occurrence track deployment events. + DEPLOYMENT = 5 + + # The note and occurrence track the initial discovery status of a resource. + DISCOVERY = 6 + + # This represents a logical "role" that can attest to artifacts. + ATTESTATION = 7 + + # This represents an available package upgrade. + UPGRADE = 8 + + # This represents a Compliance Note + COMPLIANCE = 9 + + # This represents a DSSE attestation Note + DSSE_ATTESTATION = 10 + + # This represents a Vulnerability Assessment. + VULNERABILITY_ASSESSMENT = 11 + + # This represents an SBOM Reference. + SBOM_REFERENCE = 12 + + # This represents a secret. + SECRET = 13 + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/Gemfile new file mode 100644 index 000000000000..b15f486811b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1", path: "../" +else + gem "google-cloud-binary_authorization-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-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb new file mode 100644 index 000000000000..d3d3d9cfbd30 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_BinauthzManagementService_CreateAttestor_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the create_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#create_attestor. +# +def create_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new + + # Call the create_attestor method. + result = client.create_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + p result +end +# [END binaryauthorization_v1_generated_BinauthzManagementService_CreateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb new file mode 100644 index 000000000000..3746ae61fee1 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_BinauthzManagementService_DeleteAttestor_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the delete_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#delete_attestor. +# +def delete_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new + + # Call the delete_attestor method. + result = client.delete_attestor request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END binaryauthorization_v1_generated_BinauthzManagementService_DeleteAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb new file mode 100644 index 000000000000..fc121e0e7a05 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_BinauthzManagementService_GetAttestor_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the get_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_attestor. +# +def get_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new + + # Call the get_attestor method. + result = client.get_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + p result +end +# [END binaryauthorization_v1_generated_BinauthzManagementService_GetAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb new file mode 100644 index 000000000000..db65dadfc232 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_BinauthzManagementService_GetPolicy_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the get_policy call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_policy. +# +def get_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new + + # Call the get_policy method. + result = client.get_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + p result +end +# [END binaryauthorization_v1_generated_BinauthzManagementService_GetPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb new file mode 100644 index 000000000000..50bf5c28142b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_BinauthzManagementService_ListAttestors_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the list_attestors call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#list_attestors. +# +def list_attestors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new + + # Call the list_attestors method. + result = client.list_attestors request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BinaryAuthorization::V1::Attestor. + p item + end +end +# [END binaryauthorization_v1_generated_BinauthzManagementService_ListAttestors_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb new file mode 100644 index 000000000000..a4228606d221 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_BinauthzManagementService_UpdateAttestor_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the update_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_attestor. +# +def update_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new + + # Call the update_attestor method. + result = client.update_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. + p result +end +# [END binaryauthorization_v1_generated_BinauthzManagementService_UpdateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb new file mode 100644 index 000000000000..c27d96a7f3ce --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_BinauthzManagementService_UpdatePolicy_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the update_policy call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_policy. +# +def update_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new + + # Call the update_policy method. + result = client.update_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + p result +end +# [END binaryauthorization_v1_generated_BinauthzManagementService_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json new file mode 100644 index 000000000000..b74cbd346028 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json @@ -0,0 +1,375 @@ +{ + "client_library": { + "name": "google-cloud-binary_authorization-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.binaryauthorization.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_GetPolicy_sync", + "title": "Snippet for the get_policy call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_policy.", + "file": "binauthz_management_service/get_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::Policy", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "GetPolicy", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.GetPolicy", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_UpdatePolicy_sync", + "title": "Snippet for the update_policy call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_policy.", + "file": "binauthz_management_service/update_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::Policy", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "UpdatePolicy", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.UpdatePolicy", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_CreateAttestor_sync", + "title": "Snippet for the create_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#create_attestor.", + "file": "binauthz_management_service/create_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#create_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "CreateAttestor", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.CreateAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_GetAttestor_sync", + "title": "Snippet for the get_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_attestor.", + "file": "binauthz_management_service/get_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "GetAttestor", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.GetAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_UpdateAttestor_sync", + "title": "Snippet for the update_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_attestor.", + "file": "binauthz_management_service/update_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "UpdateAttestor", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.UpdateAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_ListAttestors_sync", + "title": "Snippet for the list_attestors call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#list_attestors.", + "file": "binauthz_management_service/list_attestors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attestors", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#list_attestors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "ListAttestors", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.ListAttestors", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_DeleteAttestor_sync", + "title": "Snippet for the delete_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#delete_attestor.", + "file": "binauthz_management_service/delete_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#delete_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "DeleteAttestor", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.DeleteAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_SystemPolicy_GetSystemPolicy_sync", + "title": "Snippet for the get_system_policy call in the SystemPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client#get_system_policy.", + "file": "system_policy/get_system_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_system_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client#get_system_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::Policy", + "client": { + "short_name": "SystemPolicy::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client" + }, + "method": { + "short_name": "GetSystemPolicy", + "full_name": "google.cloud.binaryauthorization.v1.SystemPolicyV1.GetSystemPolicy", + "service": { + "short_name": "SystemPolicy", + "full_name": "google.cloud.binaryauthorization.v1.SystemPolicyV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1_generated_ValidationHelper_ValidateAttestationOccurrence_sync", + "title": "Snippet for the validate_attestation_occurrence call in the ValidationHelper service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence.", + "file": "validation_helper/validate_attestation_occurrence.rb", + "language": "RUBY", + "client_method": { + "short_name": "validate_attestation_occurrence", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse", + "client": { + "short_name": "ValidationHelper::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client" + }, + "method": { + "short_name": "ValidateAttestationOccurrence", + "full_name": "google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence", + "service": { + "short_name": "ValidationHelper", + "full_name": "google.cloud.binaryauthorization.v1.ValidationHelperV1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb new file mode 100644 index 000000000000..03c084a5d4a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_SystemPolicy_GetSystemPolicy_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the get_system_policy call in the SystemPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client#get_system_policy. +# +def get_system_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new + + # Call the get_system_policy method. + result = client.get_system_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. + p result +end +# [END binaryauthorization_v1_generated_SystemPolicy_GetSystemPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb new file mode 100644 index 000000000000..ce37ef22ca28 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1_generated_ValidationHelper_ValidateAttestationOccurrence_sync] +require "google/cloud/binary_authorization/v1" + +## +# Snippet for the validate_attestation_occurrence call in the ValidationHelper service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence. +# +def validate_attestation_occurrence + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new + + # Call the validate_attestation_occurrence method. + result = client.validate_attestation_occurrence request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse. + p result +end +# [END binaryauthorization_v1_generated_ValidationHelper_ValidateAttestationOccurrence_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb new file mode 100644 index 000000000000..021b9dc22a4c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binary_authorization/v1/binauthz_management_service" + +class ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_attestor_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.attestor_path project: "value0", attestor: "value1" + assert_equal "projects/value0/attestors/value1", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0" + assert_equal "projects/value0/policy", path + + path = client.policy_path location: "value0" + assert_equal "locations/value0/policy", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb new file mode 100644 index 000000000000..b02727df0d99 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb @@ -0,0 +1,481 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" + + +class ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_policy ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_policy(::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_client_stub.call_count + end + end + end + + def test_update_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy = {} + + update_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_policy({ policy: policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_policy policy: policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_policy ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_policy({ policy: policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_policy(::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_client_stub.call_count + end + end + end + + def test_create_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attestor_id = "hello world" + attestor = {} + + create_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_create_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_attestor ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_attestor(::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_attestor_client_stub.call_count + end + end + end + + def test_get_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_attestor({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_attestor name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_attestor ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_attestor({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_attestor(::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_attestor_client_stub.call_count + end + end + end + + def test_update_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + attestor = {} + + update_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_attestor({ attestor: attestor }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_attestor attestor: attestor do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_attestor ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_attestor({ attestor: attestor }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_attestor(::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_attestor_client_stub.call_count + end + end + end + + def test_list_attestors + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_attestors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_list_attestors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attestors_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_attestors ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_attestors(::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_attestors_client_stub.call_count + end + end + end + + def test_delete_attestor + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_delete_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_attestor({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_attestor name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_attestor({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_attestor_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb new file mode 100644 index 000000000000..9c8502cacacf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/binauthz_management_service" + +class ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_policy ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_policy(::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_policy_client_stub.call_rpc_count + end + end + + def test_update_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy = {} + + update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1::Policy), request["policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_policy({ policy: policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_policy policy: policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_policy ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_policy({ policy: policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_policy(::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_policy_client_stub.call_rpc_count + end + end + + def test_create_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attestor_id = "hello world" + attestor = {} + + create_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["attestor_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1::Attestor), request["attestor"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_attestor ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_attestor(::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_attestor_client_stub.call_rpc_count + end + end + + def test_get_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_attestor({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_attestor name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_attestor ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_attestor({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_attestor(::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_attestor_client_stub.call_rpc_count + end + end + + def test_update_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + attestor = {} + + update_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1::Attestor), request["attestor"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_attestor({ attestor: attestor }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_attestor attestor: attestor do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_attestor ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_attestor({ attestor: attestor }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_attestor(::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_attestor_client_stub.call_rpc_count + end + end + + def test_list_attestors + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_attestors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attestors, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_attestors_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_attestors ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_attestors(::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_attestors_client_stub.call_rpc_count + end + end + + def test_delete_attestor + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_attestor({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_attestor name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_attestor({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_attestor_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb new file mode 100644 index 000000000000..627c53badd9f --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binary_authorization/v1/system_policy" + +class ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0" + assert_equal "projects/value0/policy", path + + path = client.policy_path location: "value0" + assert_equal "locations/value0/policy", path + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb new file mode 100644 index 000000000000..c945256e19b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/system_policy/rest" + + +class ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_system_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_system_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::ServiceStub.stub :transcode_get_system_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_system_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_system_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_system_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_system_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_system_policy_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb new file mode 100644 index 000000000000..bc615fe2637c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/system_policy" + +class ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_system_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_system_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_system_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_system_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_system_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_system_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_system_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_system_policy_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb new file mode 100644 index 000000000000..bd7846c5fb28 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/validation_helper/rest" + + +class ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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_validate_attestation_occurrence + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + attestor = "hello world" + attestation = {} + occurrence_note = "hello world" + occurrence_resource_uri = "hello world" + + validate_attestation_occurrence_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::ServiceStub.stub :transcode_validate_attestation_occurrence_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, validate_attestation_occurrence_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.validate_attestation_occurrence attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.validate_attestation_occurrence ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.validate_attestation_occurrence(::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, validate_attestation_occurrence_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb new file mode 100644 index 000000000000..1beca9828985 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb @@ -0,0 +1,168 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binaryauthorization/v1/service_pb" +require "google/cloud/binary_authorization/v1/validation_helper" + +class ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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_validate_attestation_occurrence + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + attestor = "hello world" + attestation = {} + occurrence_note = "hello world" + occurrence_resource_uri = "hello world" + + validate_attestation_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :validate_attestation_occurrence, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, request + assert_equal "hello world", request["attestor"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::AttestationOccurrence), request["attestation"] + assert_equal "hello world", request["occurrence_note"] + assert_equal "hello world", request["occurrence_resource_uri"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, validate_attestation_occurrence_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.validate_attestation_occurrence attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.validate_attestation_occurrence ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.validate_attestation_occurrence(::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, validate_attestation_occurrence_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..4d21ef558c4c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json @@ -0,0 +1,19 @@ +{ + "api_id": "binaryauthorization.googleapis.com", + "api_shortname": "binaryauthorization", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest", + "distribution_name": "google-cloud-binary_authorization-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "binaryauthorization", + "name_pretty": "Binary Authorization V1beta1 API", + "product_documentation": "https://cloud.google.com/binary-authorization/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BINARY_AUTHORIZATION", + "ruby-cloud-product-url": "https://cloud.google.com/binary-authorization/", + "ruby-cloud-service-override": "BinauthzManagementServiceV1Beta1=BinauthzManagementService;SystemPolicyV1Beta1=SystemPolicy", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..7496dd195e5b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-binary_authorization-v1beta1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-binary_authorization-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts new file mode 100644 index 000000000000..d1b2fdebca77 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Binary Authorization V1beta1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..ab598dfa7e16 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-binary_authorization-v1beta1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-binary_authorization-v1beta1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/binary_authorization/v1beta1" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/binary_authorization/v1beta1" + +::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-binary_authorization-v1beta1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/binary_authorization/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md new file mode 100644 index 000000000000..4972c1e5a1ed --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Binary Authorization V1beta1 API + +The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run. + +Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Binary Authorization V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-binary_authorization](https://rubygems.org/gems/google-cloud-binary_authorization). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-binary_authorization-v1beta1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/binaryauthorization.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/binary_authorization/v1beta1" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new +request = ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new # (request fields as keyword arguments...) +response = client.get_policy request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/binary-authorization/) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/binary_authorization/v1beta1" +require "logger" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.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-binary_authorization`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-binary_authorization-v1beta1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-binary_authorization`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-binary_authorization-v1beta1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile new file mode 100644 index 000000000000..1ce7279d8545 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-binary_authorization-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BINARY_AUTHORIZATION_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BINARY_AUTHORIZATION_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BINARY_AUTHORIZATION_TEST_PROJECT=test123 BINARY_AUTHORIZATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BINARY_AUTHORIZATION_PROJECT"] = project + ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] = project + ENV["BINARY_AUTHORIZATION_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-binary_authorization-v1beta1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-binary_authorization-v1beta1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-binary_authorization-v1beta1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-binary_authorization-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-binary_authorization-v1beta1" + header "google-cloud-binary_authorization-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-binary_authorization-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-binary_authorization-v1beta1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-binary_authorization-v1beta1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-binary_authorization-v1beta1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..b3053a044eb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json @@ -0,0 +1,67 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.binaryauthorization.v1beta1", + "libraryPackage": "::Google::Cloud::BinaryAuthorization::V1beta1", + "services": { + "BinauthzManagementServiceV1Beta1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client", + "rpcs": { + "GetPolicy": { + "methods": [ + "get_policy" + ] + }, + "UpdatePolicy": { + "methods": [ + "update_policy" + ] + }, + "CreateAttestor": { + "methods": [ + "create_attestor" + ] + }, + "GetAttestor": { + "methods": [ + "get_attestor" + ] + }, + "UpdateAttestor": { + "methods": [ + "update_attestor" + ] + }, + "ListAttestors": { + "methods": [ + "list_attestors" + ] + }, + "DeleteAttestor": { + "methods": [ + "delete_attestor" + ] + } + } + } + } + }, + "SystemPolicyV1Beta1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client", + "rpcs": { + "GetSystemPolicy": { + "methods": [ + "get_system_policy" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec new file mode 100644 index 000000000000..592de79dce90 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/binary_authorization/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-binary_authorization-v1beta1" + gem.version = Google::Cloud::BinaryAuthorization::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details." + gem.summary = "The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb new file mode 100644 index 000000000000..8a412c54b91b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/binary_authorization/v1beta1" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb new file mode 100644 index 000000000000..1a6abd865063 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" +require "google/cloud/binary_authorization/v1beta1/system_policy" +require "google/cloud/binary_authorization/v1beta1/version" + +module Google + module Cloud + module BinaryAuthorization + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1beta1" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1beta1" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/binary_authorization/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb new file mode 100644 index 000000000000..514a9421da0a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1beta1/version" + +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/client" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module BinauthzManagementService + end + end + end + end +end + +helper_path = ::File.join __dir__, "binauthz_management_service", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb new file mode 100644 index 000000000000..efd56785a725 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb @@ -0,0 +1,1108 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1beta1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + ## + # Client for the BinauthzManagementService service. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :binauthz_management_service_stub + + ## + # Configure the BinauthzManagementService Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BinauthzManagementService clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_policy.timeout = 600.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_policy.timeout = 600.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_attestor.timeout = 600.0 + + default_config.rpcs.get_attestor.timeout = 600.0 + default_config.rpcs.get_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_attestor.timeout = 600.0 + default_config.rpcs.update_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_attestors.timeout = 600.0 + default_config.rpcs.list_attestors.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_attestor.timeout = 600.0 + default_config.rpcs.delete_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BinauthzManagementService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @binauthz_management_service_stub.universe_domain + end + + ## + # Create a new BinauthzManagementService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BinauthzManagementService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/binaryauthorization/v1beta1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @binauthz_management_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementServiceV1Beta1::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @binauthz_management_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @binauthz_management_service_stub.logger + end + + # Service calls + + ## + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must attest to + # a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project does not have one. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_policy(name: nil) + # Pass arguments to `get_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, + # in the format `projects/*/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :get_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a copy of the + # new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. A policy is always updated as a whole, to avoid race + # conditions with concurrent policy enforcement (or management!) + # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + # if the request is malformed. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] + # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in + # the request URL, in the format `projects/*/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.policy&.name + header_params["policy.name"] = request.policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :update_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, + # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already exists. + # + # @overload create_attestor(request, options = nil) + # Pass arguments to `create_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) + # Pass arguments to `create_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # @param attestor_id [::String] + # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, + # in the format `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new + # + # # Call the create_attestor method. + # result = client.create_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def create_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :create_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # + # @overload get_attestor(request, options = nil) + # Pass arguments to `get_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_attestor(name: nil) + # Pass arguments to `get_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format + # `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new + # + # # Call the get_attestor method. + # result = client.get_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def get_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :get_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # + # @overload update_attestor(request, options = nil) + # Pass arguments to `update_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_attestor(attestor: nil) + # Pass arguments to `update_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name + # in the request URL, in the format `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new + # + # # Call the update_attestor method. + # result = client.update_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def update_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.attestor&.name + header_params["attestor.name"] = request.attestor.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :update_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. + # Returns INVALID_ARGUMENT if the project does not exist. + # + # @overload list_attestors(request, options = nil) + # Pass arguments to `list_attestors` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attestors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. + # @param page_size [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned + # from the previous call to the `ListAttestors` method. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new + # + # # Call the list_attestors method. + # result = client.list_attestors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p item + # end + # + def list_attestors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_attestors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_attestors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attestors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :list_attestors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # + # @overload delete_attestor(request, options = nil) + # Pass arguments to `delete_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_attestor(name: nil) + # Pass arguments to `delete_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format + # `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new + # + # # Call the delete_attestor method. + # result = client.delete_attestor request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :delete_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BinauthzManagementService API. + # + # This class represents the configuration for BinauthzManagementService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the BinauthzManagementService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `create_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attestor + ## + # RPC-specific configuration for `get_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attestor + ## + # RPC-specific configuration for `update_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :update_attestor + ## + # RPC-specific configuration for `list_attestors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attestors + ## + # RPC-specific configuration for `delete_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attestor + + # @private + def initialize parent_rpcs = nil + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor + @create_attestor = ::Gapic::Config::Method.new create_attestor_config + get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor + @get_attestor = ::Gapic::Config::Method.new get_attestor_config + update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor + @update_attestor = ::Gapic::Config::Method.new update_attestor_config + list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors + @list_attestors = ::Gapic::Config::Method.new list_attestors_config + delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor + @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb new file mode 100644 index 000000000000..62123b4765a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + # Credentials for the BinauthzManagementService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BINARY_AUTHORIZATION_CREDENTIALS", + "BINARY_AUTHORIZATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BINARY_AUTHORIZATION_CREDENTIALS_JSON", + "BINARY_AUTHORIZATION_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb new file mode 100644 index 000000000000..64f9546c9431 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + # Path helper methods for the BinauthzManagementService API. + module Paths + ## + # Create a fully-qualified Attestor resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/attestors/{attestor}` + # + # @param project [String] + # @param attestor [String] + # + # @return [::String] + def attestor_path project:, attestor: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/attestors/#{attestor}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/policy` + # + # @param project [String] + # + # @overload policy_path(location:) + # The resource will be in the following format: + # + # `locations/{location}/policy` + # + # @param location [String] + # + # @return [::String] + def policy_path **args + resources = { + "project" => (proc do |project:| + "projects/#{project}/policy" + end), + "location" => (proc do |location:| + "locations/#{location}/policy" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb new file mode 100644 index 000000000000..b4f1c2a40ec4 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1beta1/version" + +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module BinauthzManagementService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb new file mode 100644 index 000000000000..74adacfe987d --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb @@ -0,0 +1,1016 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + module Rest + ## + # REST client for the BinauthzManagementService service. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :binauthz_management_service_stub + + ## + # Configure the BinauthzManagementService Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BinauthzManagementService clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_policy.timeout = 600.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_policy.timeout = 600.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_attestor.timeout = 600.0 + + default_config.rpcs.get_attestor.timeout = 600.0 + default_config.rpcs.get_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_attestor.timeout = 600.0 + default_config.rpcs.update_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_attestors.timeout = 600.0 + default_config.rpcs.list_attestors.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_attestor.timeout = 600.0 + default_config.rpcs.delete_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BinauthzManagementService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @binauthz_management_service_stub.universe_domain + end + + ## + # Create a new BinauthzManagementService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BinauthzManagementService client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @binauthz_management_service_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @binauthz_management_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @binauthz_management_service_stub.logger + end + + # Service calls + + ## + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must attest to + # a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project does not have one. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_policy(name: nil) + # Pass arguments to `get_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, + # in the format `projects/*/policy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.get_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a copy of the + # new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. A policy is always updated as a whole, to avoid race + # conditions with concurrent policy enforcement (or management!) + # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + # if the request is malformed. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] + # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in + # the request URL, in the format `projects/*/policy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.update_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, + # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already exists. + # + # @overload create_attestor(request, options = nil) + # Pass arguments to `create_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) + # Pass arguments to `create_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # @param attestor_id [::String] + # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, + # in the format `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new + # + # # Call the create_attestor method. + # result = client.create_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def create_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.create_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # + # @overload get_attestor(request, options = nil) + # Pass arguments to `get_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_attestor(name: nil) + # Pass arguments to `get_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format + # `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new + # + # # Call the get_attestor method. + # result = client.get_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def get_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.get_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # + # @overload update_attestor(request, options = nil) + # Pass arguments to `update_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_attestor(attestor: nil) + # Pass arguments to `update_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name + # in the request URL, in the format `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new + # + # # Call the update_attestor method. + # result = client.update_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def update_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.update_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. + # Returns INVALID_ARGUMENT if the project does not exist. + # + # @overload list_attestors(request, options = nil) + # Pass arguments to `list_attestors` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attestors` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. + # @param page_size [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned + # from the previous call to the `ListAttestors` method. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new + # + # # Call the list_attestors method. + # result = client.list_attestors request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p item + # end + # + def list_attestors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_attestors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_attestors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attestors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.list_attestors request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, "attestors", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # + # @overload delete_attestor(request, options = nil) + # Pass arguments to `delete_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_attestor(name: nil) + # Pass arguments to `delete_attestor` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format + # `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new + # + # # Call the delete_attestor method. + # result = client.delete_attestor request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_attestor.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.delete_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the BinauthzManagementService REST API. + # + # This class represents the configuration for BinauthzManagementService REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BinauthzManagementService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `create_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attestor + ## + # RPC-specific configuration for `get_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attestor + ## + # RPC-specific configuration for `update_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :update_attestor + ## + # RPC-specific configuration for `list_attestors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attestors + ## + # RPC-specific configuration for `delete_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attestor + + # @private + def initialize parent_rpcs = nil + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor + @create_attestor = ::Gapic::Config::Method.new create_attestor_config + get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor + @get_attestor = ::Gapic::Config::Method.new get_attestor_config + update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor + @update_attestor = ::Gapic::Config::Method.new update_attestor_config + list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors + @list_attestors = ::Gapic::Config::Method.new list_attestors_config + delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor + @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb new file mode 100644 index 000000000000..e95cf3599a62 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb @@ -0,0 +1,511 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binaryauthorization/v1beta1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + module Rest + ## + # REST service stub for the BinauthzManagementService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # A result object deserialized from the server's reply + def get_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # A result object deserialized from the server's reply + def update_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # A result object deserialized from the server's reply + def create_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # A result object deserialized from the server's reply + def get_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # A result object deserialized from the server's reply + def update_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_attestors REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse] + # A result object deserialized from the server's reply + def list_attestors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attestors_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_attestors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1beta1/{policy.name}", + body: "policy", + matches: [ + ["policy.name", %r{^projects/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/attestors", + body: "attestor", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1beta1/{attestor.name}", + body: "attestor", + matches: [ + ["attestor.name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attestors REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_attestors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/attestors", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb new file mode 100644 index 000000000000..2edf77a9c5ea --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest" +require "google/cloud/binary_authorization/v1beta1/version" + +module Google + module Cloud + module BinaryAuthorization + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/binary_authorization/v1beta1/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb new file mode 100644 index 000000000000..69c5ebc8bbe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1beta1/version" + +require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" +require "google/cloud/binary_authorization/v1beta1/system_policy/paths" +require "google/cloud/binary_authorization/v1beta1/system_policy/client" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # API for working with the system policy. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1beta1/system_policy" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + module SystemPolicy + end + end + end + end +end + +helper_path = ::File.join __dir__, "system_policy", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/system_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb new file mode 100644 index 000000000000..eca95db4ad07 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb @@ -0,0 +1,475 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1beta1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + ## + # Client for the SystemPolicy service. + # + # API for working with the system policy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :system_policy_stub + + ## + # Configure the SystemPolicy Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SystemPolicy clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SystemPolicy Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @system_policy_stub.universe_domain + end + + ## + # Create a new SystemPolicy client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SystemPolicy client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/binaryauthorization/v1beta1/service_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @system_policy_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicyV1Beta1::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @system_policy_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @system_policy_stub.logger + end + + # Service calls + + ## + # Gets the current system policy in the specified location. + # + # @overload get_system_policy(request, options = nil) + # Pass arguments to `get_system_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_system_policy(name: nil) + # Pass arguments to `get_system_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new + # + # # Call the get_system_policy method. + # result = client.get_system_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_system_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_system_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_system_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_system_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @system_policy_stub.call_rpc :get_system_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SystemPolicy API. + # + # This class represents the configuration for SystemPolicy, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_system_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the SystemPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_system_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_system_policy + + # @private + def initialize parent_rpcs = nil + get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy + @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb new file mode 100644 index 000000000000..5086add422bf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + # Credentials for the SystemPolicy API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BINARY_AUTHORIZATION_CREDENTIALS", + "BINARY_AUTHORIZATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BINARY_AUTHORIZATION_CREDENTIALS_JSON", + "BINARY_AUTHORIZATION_KEYFILE_JSON", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb new file mode 100644 index 000000000000..acd18465e582 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + # Path helper methods for the SystemPolicy API. + module Paths + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/policy` + # + # @param project [String] + # + # @overload policy_path(location:) + # The resource will be in the following format: + # + # `locations/{location}/policy` + # + # @param location [String] + # + # @return [::String] + def policy_path **args + resources = { + "project" => (proc do |project:| + "projects/#{project}/policy" + end), + "location" => (proc do |location:| + "locations/#{location}/policy" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb new file mode 100644 index 000000000000..4f48e77e210b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1beta1/version" + +require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" +require "google/cloud/binary_authorization/v1beta1/system_policy/paths" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest/client" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # API for working with the system policy. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + module SystemPolicy + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb new file mode 100644 index 000000000000..0423e3495c8e --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb @@ -0,0 +1,425 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + module Rest + ## + # REST client for the SystemPolicy service. + # + # API for working with the system policy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :system_policy_stub + + ## + # Configure the SystemPolicy Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SystemPolicy clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SystemPolicy Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @system_policy_stub.universe_domain + end + + ## + # Create a new SystemPolicy REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SystemPolicy client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @system_policy_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @system_policy_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @system_policy_stub.logger + end + + # Service calls + + ## + # Gets the current system policy in the specified location. + # + # @overload get_system_policy(request, options = nil) + # Pass arguments to `get_system_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_system_policy(name: nil) + # Pass arguments to `get_system_policy` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new + # + # # Call the get_system_policy method. + # result = client.get_system_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_system_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_system_policy.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_system_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_system_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @system_policy_stub.get_system_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the SystemPolicy REST API. + # + # This class represents the configuration for SystemPolicy REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_system_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SystemPolicy API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_system_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_system_policy + + # @private + def initialize parent_rpcs = nil + get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy + @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb new file mode 100644 index 000000000000..6e02f227b484 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/binaryauthorization/v1beta1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + module Rest + ## + # REST service stub for the SystemPolicy service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_system_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # A result object deserialized from the server's reply + def get_system_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_system_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_system_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_system_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_system_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^locations/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb new file mode 100644 index 000000000000..a42a2a29d560 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb new file mode 100644 index 000000000000..051ea7515920 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nLgoogle/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x11\n\x19\x43ontinuousValidationEvent\x12u\n\tpod_event\x18\x01 \x01(\x0b\x32`.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEventH\x00\x12r\n\x12\x63onfig_error_event\x18\x04 \x01(\x0b\x32T.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEventH\x00\x1a\xc5\x0e\n\x1c\x43ontinuousValidationPodEvent\x12\x15\n\rpod_namespace\x18\x07 \x01(\t\x12\x0b\n\x03pod\x18\x01 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x08 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x8a\x01\n\x07verdict\x18\x04 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict\x12}\n\x06images\x18\x05 \x03(\x0b\x32m.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails\x1a\xa3\n\n\x0cImageDetails\x12\r\n\x05image\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\t\x12\x93\x01\n\x0e\x63ontainer_type\x18\x06 \x01(\x0e\x32{.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType\x12\x89\x01\n\x06result\x18\x02 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x90\x01\n\rcheck_results\x18\x04 \x03(\x0b\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult\x1a\xf2\x04\n\x0b\x43heckResult\x12\x17\n\x0f\x63heck_set_index\x18\x01 \x01(\t\x12\x16\n\x0e\x63heck_set_name\x18\x02 \x01(\t\x12\xa1\x01\n\x0f\x63heck_set_scope\x18\x03 \x01(\x0b\x32\x87\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope\x12\x13\n\x0b\x63heck_index\x18\x04 \x01(\t\x12\x12\n\ncheck_name\x18\x05 \x01(\t\x12\x12\n\ncheck_type\x18\x06 \x01(\t\x12\x98\x01\n\x07verdict\x18\x07 \x01(\x0e\x32\x86\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict\x12\x13\n\x0b\x65xplanation\x18\x08 \x01(\t\x1a^\n\rCheckSetScope\x12$\n\x1akubernetes_service_account\x18\x01 \x01(\tH\x00\x12\x1e\n\x14kubernetes_namespace\x18\x02 \x01(\tH\x00\x42\x07\n\x05scope\"A\n\x0c\x43heckVerdict\x12\x1d\n\x19\x43HECK_VERDICT_UNSPECIFIED\x10\x00\x12\x12\n\x0eNON_CONFORMANT\x10\x01\"k\n\rContainerType\x12\x1e\n\x1a\x43ONTAINER_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCONTAINER\x10\x01\x12\x12\n\x0eINIT_CONTAINER\x10\x02\x12\x17\n\x13\x45PHEMERAL_CONTAINER\x10\x03\"@\n\x0b\x41uditResult\x12\x1c\n\x18\x41UDIT_RESULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"[\n\x18PolicyConformanceVerdict\x12*\n&POLICY_CONFORMANCE_VERDICT_UNSPECIFIED\x10\x00\x12\x13\n\x0fVIOLATES_POLICY\x10\x01\x1a\'\n\x10\x43onfigErrorEvent\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x0c\n\nevent_typeB\xb9\x02\n,com.google.cloud.binaryauthorization.v1beta1B ContinuousValidationLoggingProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ContinuousValidationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict").enummodule + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType").enummodule + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult").enummodule + ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict").enummodule + ContinuousValidationEvent::ConfigErrorEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEvent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb new file mode 100644 index 000000000000..469851b91756 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/v1beta1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/binaryauthorization/v1beta1/resources.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\r\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12w\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32K.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12n\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32\x43.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12q\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32K.google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8a\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32W.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x95\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32\\.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8d\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32X.google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12\\\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1au\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x86\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x82\x01\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xe4\x03\n\rAdmissionRule\x12\x64\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32G.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xbc\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x17user_owned_drydock_note\x18\x03 \x01(\x0b\x32>.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb9\x01\n\x14UserOwnedDrydockNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32;.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc4\x04\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12g\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32J.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm\"\xb1\x03\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x1a\x02\x10\x01\"\xbf\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12R\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\xba\x02\n,com.google.cloud.binaryauthorization.v1beta1B!BinaryAuthorizationResourcesProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy").msgclass + Policy::GlobalPolicyEvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode").enummodule + AdmissionWhitelistPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern").msgclass + AdmissionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule").msgclass + AdmissionRule::EvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode").enummodule + AdmissionRule::EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode").enummodule + Attestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Attestor").msgclass + UserOwnedDrydockNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote").msgclass + PkixPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey").msgclass + PkixPublicKey::SignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm").enummodule + AttestorPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AttestorPublicKey").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb new file mode 100644 index 000000000000..9cb9ff3147e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/v1beta1/service.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/binaryauthorization/v1beta1/resources_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n6google/cloud/binaryauthorization/v1beta1/service.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/binaryauthorization/v1beta1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\\\n\x13UpdatePolicyRequest\x12\x45\n\x06policy\x18\x01 \x01(\x0b\x32\x30.google.cloud.binaryauthorization.v1beta1.PolicyB\x03\xe0\x41\x02\"\xc1\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"b\n\x15UpdateAttestorRequest\x12I\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x15ListAttestorsResponse\x12\x45\n\tattestors\x18\x01 \x03(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy2\xcb\x0b\n BinauthzManagementServiceV1Beta1\x12\xab\x01\n\tGetPolicy\x12:.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1beta1/{name=projects/*/policy}\x12\xc2\x01\n\x0cUpdatePolicy\x12=.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"A\xda\x41\x06policy\x82\xd3\xe4\x93\x02\x32\x1a(/v1beta1/{policy.name=projects/*/policy}:\x06policy\x12\xdd\x01\n\x0e\x43reateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"V\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02\x32\"&/v1beta1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xb6\x01\n\x0bGetAttestor\x12<.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{name=projects/*/attestors/*}\x12\xd3\x01\n\x0eUpdateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"L\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02;\x1a//v1beta1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xc9\x01\n\rListAttestors\x12>.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest\x1a?.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{parent=projects/*}/attestors\x12\xa0\x01\n\x0e\x44\x65leteAttestor\x12?.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1beta1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xa8\x02\n\x13SystemPolicyV1Beta1\x12\xb8\x01\n\x0fGetSystemPolicy\x12@.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1beta1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x02\n,com.google.cloud.binaryauthorization.v1beta1B\x1f\x42inaryAuthorizationServiceProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetPolicyRequest").msgclass + UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest").msgclass + CreateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest").msgclass + GetAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetAttestorRequest").msgclass + UpdateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest").msgclass + ListAttestorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest").msgclass + ListAttestorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse").msgclass + DeleteAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest").msgclass + GetSystemPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb new file mode 100644 index 000000000000..f5b18afc2228 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb @@ -0,0 +1,98 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/binaryauthorization/v1beta1/service.proto for package 'Google.Cloud.BinaryAuthorization.V1beta1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/binaryauthorization/v1beta1/service_pb' + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementServiceV1Beta1 + # Customer-facing API for Cloud Binary Authorization. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * [Policy][google.cloud.binaryauthorization.v1beta1.Policy] + # * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1' + + # A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to + # a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default + # [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. + rpc :GetPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy + # Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the + # new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race + # conditions with concurrent policy enforcement (or management!) + # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + # if the request is malformed. + rpc :UpdatePolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy + # Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, + # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. + rpc :CreateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor + # Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + rpc :GetAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor + # Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + rpc :UpdateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor + # Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns INVALID_ARGUMENT if the project does not exist. + rpc :ListAttestors, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse + # Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + rpc :DeleteAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + module SystemPolicyV1Beta1 + # API for working with the system policy. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1' + + # Gets the current system policy in the specified location. + rpc :GetSystemPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..be8531e0c118 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Binary Authorization V1beta1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb new file mode 100644 index 000000000000..b6a5fb241fd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb @@ -0,0 +1,201 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + # Represents an auditing event from Continuous Validation. + # @!attribute [rw] pod_event + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent] + # Pod event. + # + # Note: The following fields are mutually exclusive: `pod_event`, `config_error_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] config_error_event + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ConfigErrorEvent] + # Config error event. + # + # Note: The following fields are mutually exclusive: `config_error_event`, `pod_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ContinuousValidationEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An auditing event for one Pod. + # @!attribute [rw] pod_namespace + # @return [::String] + # The k8s namespace of the Pod. + # @!attribute [rw] pod + # @return [::String] + # The name of the Pod. + # @!attribute [rw] policy_name + # @return [::String] + # The name of the policy. + # @!attribute [rw] deploy_time + # @return [::Google::Protobuf::Timestamp] + # Deploy time of the Pod from k8s. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Termination time of the Pod from k8s, or nothing if still running. + # @!attribute [rw] verdict + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict] + # Auditing verdict for this Pod. + # @!attribute [rw] images + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails>] + # List of images with auditing details. + class ContinuousValidationPodEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Container image with auditing details. + # @!attribute [rw] image + # @return [::String] + # The name of the image. + # @!attribute [rw] container_name + # @return [::String] + # The name of the container. + # @!attribute [rw] container_type + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType] + # The container type that this image belongs to. + # @!attribute [rw] result + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult] + # The result of the audit for this image. + # @!attribute [rw] description + # @return [::String] + # Description of the above result. + # @!attribute [rw] check_results + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult>] + # List of check results. + class ImageDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] check_set_index + # @return [::String] + # The index of the check set. + # @!attribute [rw] check_set_name + # @return [::String] + # The name of the check set. + # @!attribute [rw] check_set_scope + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope] + # The scope of the check set. + # @!attribute [rw] check_index + # @return [::String] + # The index of the check. + # @!attribute [rw] check_name + # @return [::String] + # The name of the check. + # @!attribute [rw] check_type + # @return [::String] + # The type of the check. + # @!attribute [rw] verdict + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict] + # The verdict of this check. + # @!attribute [rw] explanation + # @return [::String] + # User-friendly explanation of this check result. + class CheckResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A scope specifier for check sets. + # @!attribute [rw] kubernetes_service_account + # @return [::String] + # Matches a single Kubernetes service account, e.g. + # 'my-namespace:my-service-account'. + # `kubernetes_service_account` scope is always more specific than + # `kubernetes_namespace` scope for the same namespace. + # + # Note: The following fields are mutually exclusive: `kubernetes_service_account`, `kubernetes_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kubernetes_namespace + # @return [::String] + # Matches all Kubernetes service accounts in the provided + # namespace, unless a more specific `kubernetes_service_account` + # scope already matched. + # + # Note: The following fields are mutually exclusive: `kubernetes_namespace`, `kubernetes_service_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CheckSetScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result of evaluating one check. + module CheckVerdict + # We should always have a verdict. This is an error. + CHECK_VERDICT_UNSPECIFIED = 0 + + # The check was successfully evaluated and the image did not satisfy + # the check. + NON_CONFORMANT = 1 + end + end + + # The container type. + module ContainerType + # The container type should always be specified. This is an error. + CONTAINER_TYPE_UNSPECIFIED = 0 + + # A regular deployment. + CONTAINER = 1 + + # Init container defined as specified at + # https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + INIT_CONTAINER = 2 + + # Ephemeral container defined as specified at + # https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/ + EPHEMERAL_CONTAINER = 3 + end + + # Result of the audit. + module AuditResult + # Unspecified result. This is an error. + AUDIT_RESULT_UNSPECIFIED = 0 + + # Image is allowed. + ALLOW = 1 + + # Image is denied. + DENY = 2 + end + end + + # Audit time policy conformance verdict. + module PolicyConformanceVerdict + # We should always have a verdict. This is an error. + POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0 + + # The pod violates the policy. + VIOLATES_POLICY = 1 + end + end + + # An event describing a user-actionable configuration issue that prevents CV + # from auditing. + # @!attribute [rw] description + # @return [::String] + # A description of the issue. + class ConfigErrorEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb new file mode 100644 index 000000000000..2fc73b1063fc --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb @@ -0,0 +1,376 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for Binary Authorization. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name, in the format `projects/*/policy`. There is + # at most one policy per project. + # @!attribute [rw] description + # @return [::String] + # Optional. A descriptive comment. + # @!attribute [rw] global_policy_evaluation_mode + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy::GlobalPolicyEvaluationMode] + # Optional. Controls the evaluation of a Google-maintained global admission + # policy for common system-level images. Images not covered by the global + # policy will be subject to the project admission policy. This setting + # has no effect when specified inside a global admission policy. + # @!attribute [rw] admission_whitelist_patterns + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern>] + # Optional. Admission policy allowlisting. A matching admission request will + # always be permitted. This feature is typically used to exclude Google or + # third-party infrastructure images from Binary Authorization policies. + # @!attribute [rw] cluster_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-cluster admission rules. Cluster spec format: + # `location.clusterId`. There can be at most one admission rule per cluster + # spec. + # A `location` is either a compute zone (e.g. us-central1-a) or a region + # (e.g. us-central1). + # For `clusterId` syntax restrictions see + # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + # @!attribute [rw] kubernetes_namespace_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + # `[a-z.-]+`, e.g. `some-namespace` + # @!attribute [rw] kubernetes_service_account_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-kubernetes-service-account admission rules. Service account + # spec format: `namespace:serviceaccount`. e.g. `test-ns:default` + # @!attribute [rw] istio_service_identity_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-istio-service-identity admission rules. Istio service + # identity spec format: + # `spiffe:///ns//sa/` or + # `/ns//sa/` + # e.g. `spiffe://example.com/ns/test-ns/sa/default` + # @!attribute [rw] default_admission_rule + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + # Required. Default admission rule for a cluster without a per-cluster, per- + # kubernetes-service-account, or per-istio-service-identity admission rule. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the policy was last updated. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class ClusterAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class KubernetesNamespaceAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class KubernetesServiceAccountAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class IstioServiceIdentityAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module GlobalPolicyEvaluationMode + # Not specified: DISABLE is assumed. + GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0 + + # Enables system policy evaluation. + ENABLE = 1 + + # Disables system policy evaluation. + DISABLE = 2 + end + end + + # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission allowlist pattern} exempts images + # from checks by {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rules}. + # @!attribute [rw] name_pattern + # @return [::String] + # An image name pattern to allowlist, in the form `registry/path/to/image`. + # This supports a trailing `*` as a wildcard, but this is allowed only in + # text after the `registry/` part. `*` wildcard does not match `/`, i.e., + # `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match + # `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which + # matches subdirectories, i.e., `gcr.io/nginx**` matches + # `gcr.io/nginx/image`. + class AdmissionWhitelistPattern + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} specifies either that all container images + # used in a pod creation request must be attested to by one or more + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod creations will be allowed, or that all + # pod creations will be denied. + # + # Images matching an {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission allowlist pattern} + # are exempted from admission rules and will never block a pod creation. + # @!attribute [rw] evaluation_mode + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EvaluationMode] + # Required. How this admission rule will be evaluated. + # @!attribute [rw] require_attestations_by + # @return [::Array<::String>] + # Optional. The resource names of the attestors that must attest to + # a container image, in the format `projects/*/attestors/*`. Each + # attestor must exist before a policy can reference it. To add an attestor + # to a policy the principal issuing the policy change request must be able + # to read the attestor resource. + # + # Note: this field must be non-empty when the evaluation_mode field specifies + # REQUIRE_ATTESTATION, otherwise it must be empty. + # @!attribute [rw] enforcement_mode + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EnforcementMode] + # Required. The action when a pod creation is denied by the admission rule. + class AdmissionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module EvaluationMode + # Do not use. + EVALUATION_MODE_UNSPECIFIED = 0 + + # This rule allows all all pod creations. + ALWAYS_ALLOW = 1 + + # This rule allows a pod creation if all the attestors listed in + # `require_attestations_by` have valid attestations for all of the + # images in the pod spec. + REQUIRE_ATTESTATION = 2 + + # This rule denies all pod creations. + ALWAYS_DENY = 3 + end + + # Defines the possible actions when a pod creation is denied by an admission + # rule. + module EnforcementMode + # Do not use. + ENFORCEMENT_MODE_UNSPECIFIED = 0 + + # Enforce the admission rule by blocking the pod creation. + ENFORCED_BLOCK_AND_AUDIT_LOG = 1 + + # Dryrun mode: Audit logging only. This will allow the pod creation as if + # the admission request had specified break-glass. + DRYRUN_AUDIT_LOG_ONLY = 2 + end + end + + # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests to container image + # artifacts. An existing attestor cannot be modified except where + # indicated. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name, in the format: + # `projects/*/attestors/*`. This field may not be updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A descriptive comment. This field may be updated. + # The field may be displayed in chooser dialogs. + # @!attribute [rw] user_owned_drydock_note + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote] + # A Drydock ATTESTATION_AUTHORITY Note, created by the user. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the attestor was last updated. + class Attestor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An {::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote user owned drydock note} references a Drydock + # ATTESTATION_AUTHORITY Note created by the user. + # @!attribute [rw] note_reference + # @return [::String] + # Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, + # created by the user, in the format: `projects/*/notes/*` (or the legacy + # `providers/*/notes/*`). This field may not be updated. + # + # An attestation by this attestor is stored as a Drydock + # ATTESTATION_AUTHORITY Occurrence that names a container image and that + # links to this Note. Drydock is an external dependency. + # @!attribute [rw] public_keys + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey>] + # Optional. Public keys that verify attestations signed by this + # attestor. This field may be updated. + # + # If this field is non-empty, one of the specified public keys must + # verify that an attestation was signed by this attestor for the + # image specified in the admission request. + # + # If this field is empty, this attestor always returns that no + # valid attestations exist. + # @!attribute [r] delegation_service_account_email + # @return [::String] + # Output only. This field will contain the service account email address + # that this Attestor will use as the principal when querying Container + # Analysis. Attestor administrators must grant this service account the + # IAM role needed to read attestations from the [note_reference][Note] in + # Container Analysis (`containeranalysis.notes.occurrences.viewer`). + # + # This email address is fixed for the lifetime of the Attestor, but callers + # should not make any other assumptions about the service account email; + # future versions may use an email based on a different naming pattern. + class UserOwnedDrydockNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A public key in the PkixPublicKey format (see + # https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). + # Public keys of this type are typically textually encoded using the PEM + # format. + # @!attribute [rw] public_key_pem + # @return [::String] + # A PEM-encoded public key, as described in + # https://tools.ietf.org/html/rfc7468#section-13 + # @!attribute [rw] signature_algorithm + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey::SignatureAlgorithm] + # The signature algorithm used to verify a message against a signature using + # this key. + # These signature algorithm must match the structure and any object + # identifiers encoded in `public_key_pem` (i.e. this algorithm must match + # that of the public key). + class PkixPublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a signature algorithm and other information necessary to verify + # signatures with a given public key. + # This is based primarily on the public key types supported by Tink's + # PemKeyType, which is in turn based on KMS's supported signing algorithms. + # See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz + # might support additional public key types independently of Tink and/or KMS. + module SignatureAlgorithm + # Not specified. + SIGNATURE_ALGORITHM_UNSPECIFIED = 0 + + # RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_PSS_2048_SHA256 = 1 + + # RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_PSS_3072_SHA256 = 2 + + # RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_PSS_4096_SHA256 = 3 + + # RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_PSS_4096_SHA512 = 4 + + # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5 + + # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6 + + # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7 + + # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + RSA_SIGN_PKCS1_4096_SHA512 = 8 + + # ECDSA on the NIST P-256 curve with a SHA256 digest. + ECDSA_P256_SHA256 = 9 + + # ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 9 + + # ECDSA on the NIST P-384 curve with a SHA384 digest. + ECDSA_P384_SHA384 = 10 + + # ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 10 + + # ECDSA on the NIST P-521 curve with a SHA512 digest. + ECDSA_P521_SHA512 = 11 + + # ECDSA on the NIST P-521 curve with a SHA512 digest. + EC_SIGN_P521_SHA512 = 11 + end + end + + # An {::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey attestor public key} that will be used to verify + # attestations signed by this attestor. + # @!attribute [rw] comment + # @return [::String] + # Optional. A descriptive comment. This field may be updated. + # @!attribute [rw] id + # @return [::String] + # The ID of this public key. + # Signatures verified by BinAuthz must include the ID of the public key that + # can be used to verify them, and that ID must match the contents of this + # field exactly. + # Additional restrictions on this field can be imposed based on which public + # key type is encapsulated. See the documentation on `public_key` cases below + # for details. + # @!attribute [rw] ascii_armored_pgp_public_key + # @return [::String] + # ASCII-armored representation of a PGP public key, as the entire output by + # the command `gpg --export --armor foo@example.com` (either LF or CRLF + # line endings). + # When using this field, `id` should be left blank. The BinAuthz API + # handlers will calculate the ID and fill it in automatically. BinAuthz + # computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + # upper-case hex. If `id` is provided by the caller, it will be + # overwritten by the API-calculated ID. + # + # Note: The following fields are mutually exclusive: `ascii_armored_pgp_public_key`, `pkix_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pkix_public_key + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey] + # A raw PKIX SubjectPublicKeyInfo format public key. + # + # NOTE: `id` may be explicitly provided by the caller when using this + # type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + # blank, a default one will be computed based on the digest of the DER + # encoding of the public key. + # + # Note: The following fields are mutually exclusive: `pkix_public_key`, `ascii_armored_pgp_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AttestorPublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb new file mode 100644 index 000000000000..a06df76e65aa --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + # Request message for [BinauthzManagementService.GetPolicy][]. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, + # in the format `projects/*/policy`. + class GetPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.UpdatePolicy][]. + # @!attribute [rw] policy + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in + # the request URL, in the format `projects/*/policy`. + class UpdatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.CreateAttestor][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # @!attribute [rw] attestor_id + # @return [::String] + # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # @!attribute [rw] attestor + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, + # in the format `projects/*/attestors/*`. + class CreateAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.GetAttestor][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format + # `projects/*/attestors/*`. + class GetAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.UpdateAttestor][]. + # @!attribute [rw] attestor + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will + # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name + # in the request URL, in the format `projects/*/attestors/*`. + class UpdateAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.ListAttestors][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned + # from the previous call to the `ListAttestors` method. + class ListAttestorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for [BinauthzManagementService.ListAttestors][]. + # @!attribute [rw] attestors + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # The list of {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. Pass this value in the + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} field in the subsequent call to the + # `ListAttestors` method to retrieve the next page of results. + class ListAttestorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.DeleteAttestor][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format + # `projects/*/attestors/*`. + class DeleteAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to read the current system policy. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + class GetSystemPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..8f4b3597354e --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-binary_authorization-v1beta1", path: "../" +else + gem "google-cloud-binary_authorization-v1beta1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb new file mode 100644 index 000000000000..c46ee14890e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the create_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor. +# +def create_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new + + # Call the create_attestor method. + result = client.create_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb new file mode 100644 index 000000000000..51992644d116 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the delete_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor. +# +def delete_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new + + # Call the delete_attestor method. + result = client.delete_attestor request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb new file mode 100644 index 000000000000..ef7b221c8b46 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the get_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor. +# +def get_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new + + # Call the get_attestor method. + result = client.get_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb new file mode 100644 index 000000000000..dce4e31a50aa --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the get_policy call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy. +# +def get_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new + + # Call the get_policy method. + result = client.get_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb new file mode 100644 index 000000000000..c2fbab3a0f9a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the list_attestors call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors. +# +def list_attestors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new + + # Call the list_attestors method. + result = client.list_attestors request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + p item + end +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb new file mode 100644 index 000000000000..ff23b5b74d4d --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the update_attestor call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor. +# +def update_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new + + # Call the update_attestor method. + result = client.update_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb new file mode 100644 index 000000000000..b802404b7a59 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the update_policy call in the BinauthzManagementService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy. +# +def update_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new + + # Call the update_policy method. + result = client.update_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json new file mode 100644 index 000000000000..a14f6813b420 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-cloud-binary_authorization-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.binaryauthorization.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync", + "title": "Snippet for the get_policy call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy.", + "file": "binauthz_management_service/get_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "GetPolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetPolicy", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync", + "title": "Snippet for the update_policy call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy.", + "file": "binauthz_management_service/update_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "UpdatePolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdatePolicy", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync", + "title": "Snippet for the create_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor.", + "file": "binauthz_management_service/create_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "CreateAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.CreateAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync", + "title": "Snippet for the get_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor.", + "file": "binauthz_management_service/get_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "GetAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync", + "title": "Snippet for the update_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor.", + "file": "binauthz_management_service/update_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "UpdateAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdateAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync", + "title": "Snippet for the list_attestors call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors.", + "file": "binauthz_management_service/list_attestors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attestors", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "ListAttestors", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.ListAttestors", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync", + "title": "Snippet for the delete_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor.", + "file": "binauthz_management_service/delete_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "DeleteAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.DeleteAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync", + "title": "Snippet for the get_system_policy call in the SystemPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy.", + "file": "system_policy/get_system_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_system_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", + "client": { + "short_name": "SystemPolicy::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client" + }, + "method": { + "short_name": "GetSystemPolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1.GetSystemPolicy", + "service": { + "short_name": "SystemPolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb new file mode 100644 index 000000000000..3c42be712580 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the get_system_policy call in the SystemPolicy service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy. +# +def get_system_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new + + # Call the get_system_policy method. + result = client.get_system_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + p result +end +# [END binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb new file mode 100644 index 000000000000..ab4e972dbb0f --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_attestor_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.attestor_path project: "value0", attestor: "value1" + assert_equal "projects/value0/attestors/value1", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0" + assert_equal "projects/value0/policy", path + + path = client.policy_path location: "value0" + assert_equal "locations/value0/policy", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb new file mode 100644 index 000000000000..6a1a29cd2c4d --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb @@ -0,0 +1,481 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + + +class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_client_stub.call_count + end + end + end + + def test_update_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy = {} + + update_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_policy({ policy: policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_policy policy: policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_policy({ policy: policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_client_stub.call_count + end + end + end + + def test_create_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attestor_id = "hello world" + attestor = {} + + create_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_create_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_attestor_client_stub.call_count + end + end + end + + def test_get_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_attestor({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_attestor name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_attestor({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_attestor_client_stub.call_count + end + end + end + + def test_update_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + attestor = {} + + update_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_attestor({ attestor: attestor }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_attestor attestor: attestor do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_attestor({ attestor: attestor }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_attestor_client_stub.call_count + end + end + end + + def test_list_attestors + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_attestors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_list_attestors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attestors_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_attestors_client_stub.call_count + end + end + end + + def test_delete_attestor + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_delete_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_attestor({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_attestor name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_attestor({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_attestor_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb new file mode 100644 index 000000000000..83ef71896c40 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb @@ -0,0 +1,523 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_policy_client_stub.call_rpc_count + end + end + + def test_update_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + policy = {} + + update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Policy), request["policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_policy({ policy: policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_policy policy: policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_policy({ policy: policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_policy_client_stub.call_rpc_count + end + end + + def test_create_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attestor_id = "hello world" + attestor = {} + + create_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["attestor_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_attestor_client_stub.call_rpc_count + end + end + + def test_get_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_attestor({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_attestor name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_attestor({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_attestor_client_stub.call_rpc_count + end + end + + def test_update_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + attestor = {} + + update_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_attestor({ attestor: attestor }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_attestor attestor: attestor do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_attestor({ attestor: attestor }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_attestor_client_stub.call_rpc_count + end + end + + def test_list_attestors + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_attestors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attestors, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_attestors_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_attestors_client_stub.call_rpc_count + end + end + + def test_delete_attestor + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_attestor_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_attestor({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_attestor name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_attestor({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_attestor_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb new file mode 100644 index 000000000000..4133cf9a2fdf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binary_authorization/v1beta1/system_policy" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0" + assert_equal "projects/value0/policy", path + + path = client.policy_path location: "value0" + assert_equal "locations/value0/policy", path + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb new file mode 100644 index 000000000000..9e14be6fdc61 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + + +class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_system_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_system_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.stub :transcode_get_system_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_system_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_system_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_system_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_system_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_system_policy_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb new file mode 100644 index 000000000000..a869904d380e --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/system_policy" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_system_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_system_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_system_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_system_policy_client_stub do + # Create client + client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_system_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_system_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_system_policy({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_system_policy_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-build-v1/.gitignore b/owl-bot-staging/google-cloud-build-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-build-v1/.repo-metadata.json new file mode 100644 index 000000000000..087909e6953e --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudbuild.googleapis.com", + "api_shortname": "cloudbuild", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest", + "distribution_name": "google-cloud-build-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudbuild", + "name_pretty": "Cloud Build V1 API", + "product_documentation": "https://cloud.google.com/build/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details.", + "ruby-cloud-env-prefix": "CLOUD_BUILD", + "ruby-cloud-product-url": "https://cloud.google.com/build/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-build-v1/.rubocop.yml b/owl-bot-staging/google-cloud-build-v1/.rubocop.yml new file mode 100644 index 000000000000..e893f15a343f --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-build-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-build-v1.rb" diff --git a/owl-bot-staging/google-cloud-build-v1/.toys.rb b/owl-bot-staging/google-cloud-build-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/.yardopts b/owl-bot-staging/google-cloud-build-v1/.yardopts new file mode 100644 index 000000000000..a71fb2448bf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Build 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-build-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-build-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..434fd55ea786 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-build-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-build-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/build/v1" + +client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/build/v1" + +::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Build::V1::CloudBuild::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-build-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/build/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Build::V1::CloudBuild::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-build-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-build-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-build-v1/Gemfile b/owl-bot-staging/google-cloud-build-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-build-v1/LICENSE.md b/owl-bot-staging/google-cloud-build-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/README.md b/owl-bot-staging/google-cloud-build-v1/README.md new file mode 100644 index 000000000000..44c9c2c0f3a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Build V1 API + +Creates and manages builds on Google Cloud Platform. + +Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Build V1 API. Most users should consider using +the main client gem, +[google-cloud-build](https://rubygems.org/gems/google-cloud-build). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-build-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/cloudbuild.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/build/v1" + +client = ::Google::Cloud::Build::V1::CloudBuild::Client.new +request = ::Google::Cloud::Build::V1::CreateBuildRequest.new # (request fields as keyword arguments...) +response = client.create_build request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/build/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/build/v1" +require "logger" + +client = ::Google::Cloud::Build::V1::CloudBuild::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-build`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-build-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-build`. +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-build-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-build-v1/Rakefile b/owl-bot-staging/google-cloud-build-v1/Rakefile new file mode 100644 index 000000000000..0158338fa6fb --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["CLOUD_BUILD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["CLOUD_BUILD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["CLOUD_BUILD_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 CLOUD_BUILD_TEST_PROJECT=test123 CLOUD_BUILD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/build/v1/cloud_build/credentials" + ::Google::Cloud::Build::V1::CloudBuild::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["CLOUD_BUILD_PROJECT"] = project + ENV["CLOUD_BUILD_TEST_PROJECT"] = project + ENV["CLOUD_BUILD_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-build-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-build-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-build-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-build-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-build-v1" + header "google-cloud-build-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-build-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-build-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-build-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-build-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-build-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-build-v1/gapic_metadata.json new file mode 100644 index 000000000000..f5807751bfba --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/gapic_metadata.json @@ -0,0 +1,113 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.devtools.cloudbuild.v1", + "libraryPackage": "::Google::Cloud::Build::V1", + "services": { + "CloudBuild": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Build::V1::CloudBuild::Client", + "rpcs": { + "CreateBuild": { + "methods": [ + "create_build" + ] + }, + "GetBuild": { + "methods": [ + "get_build" + ] + }, + "ListBuilds": { + "methods": [ + "list_builds" + ] + }, + "CancelBuild": { + "methods": [ + "cancel_build" + ] + }, + "RetryBuild": { + "methods": [ + "retry_build" + ] + }, + "ApproveBuild": { + "methods": [ + "approve_build" + ] + }, + "CreateBuildTrigger": { + "methods": [ + "create_build_trigger" + ] + }, + "GetBuildTrigger": { + "methods": [ + "get_build_trigger" + ] + }, + "ListBuildTriggers": { + "methods": [ + "list_build_triggers" + ] + }, + "DeleteBuildTrigger": { + "methods": [ + "delete_build_trigger" + ] + }, + "UpdateBuildTrigger": { + "methods": [ + "update_build_trigger" + ] + }, + "RunBuildTrigger": { + "methods": [ + "run_build_trigger" + ] + }, + "ReceiveTriggerWebhook": { + "methods": [ + "receive_trigger_webhook" + ] + }, + "CreateWorkerPool": { + "methods": [ + "create_worker_pool" + ] + }, + "GetWorkerPool": { + "methods": [ + "get_worker_pool" + ] + }, + "DeleteWorkerPool": { + "methods": [ + "delete_worker_pool" + ] + }, + "UpdateWorkerPool": { + "methods": [ + "update_worker_pool" + ] + }, + "ListWorkerPools": { + "methods": [ + "list_worker_pools" + ] + }, + "GetDefaultServiceAccount": { + "methods": [ + "get_default_service_account" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec b/owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec new file mode 100644 index 000000000000..1f3e775a6bbc --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/build/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-build-v1" + gem.version = Google::Cloud::Build::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details." + gem.summary = "Creates and manages builds on Google Cloud Platform." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-v1.rb b/owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-v1.rb new file mode 100644 index 000000000000..cfc783546de0 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-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/build/v1" diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1.rb new file mode 100644 index 000000000000..3188280c0763 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/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/build/v1/cloud_build" +require "google/cloud/build/v1/version" + +module Google + module Cloud + module Build + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/build/v1" + # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/build/v1" + # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/build/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb new file mode 100644 index 000000000000..af7efb757793 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/build/v1/version" + +require "google/cloud/build/v1/cloud_build/credentials" +require "google/cloud/build/v1/cloud_build/paths" +require "google/cloud/build/v1/cloud_build/operations" +require "google/cloud/build/v1/cloud_build/client" +require "google/cloud/build/v1/cloud_build/rest" + +module Google + module Cloud + module Build + module V1 + ## + # Creates and manages builds on Google Cloud Platform. + # + # The main concept used by this API is a `Build`, which describes the location + # of the source to build, how to build the source, and where to store the + # built artifacts, if any. + # + # A user can list previously-requested builds or get builds by their ID to + # determine the status of the build. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/build/v1/cloud_build" + # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/build/v1/cloud_build/rest" + # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + module CloudBuild + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_build", "helpers.rb" +require "google/cloud/build/v1/cloud_build/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb new file mode 100644 index 000000000000..0fdb546f38f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb @@ -0,0 +1,2518 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/devtools/cloudbuild/v1/cloudbuild_pb" + +module Google + module Cloud + module Build + module V1 + module CloudBuild + ## + # Client for the CloudBuild service. + # + # Creates and manages builds on Google Cloud Platform. + # + # The main concept used by this API is a `Build`, which describes the location + # of the source to build, how to build the source, and where to store the + # built artifacts, if any. + # + # A user can list previously-requested builds or get builds by their ID to + # determine the status of the build. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_build_stub + + ## + # Configure the CloudBuild Client class. + # + # See {::Google::Cloud::Build::V1::CloudBuild::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudBuild clients + # ::Google::Cloud::Build::V1::CloudBuild::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", "Build", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_build.timeout = 600.0 + + default_config.rpcs.get_build.timeout = 600.0 + default_config.rpcs.get_build.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_builds.timeout = 600.0 + default_config.rpcs.list_builds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.cancel_build.timeout = 600.0 + + default_config.rpcs.retry_build.timeout = 600.0 + + default_config.rpcs.create_build_trigger.timeout = 600.0 + + default_config.rpcs.get_build_trigger.timeout = 600.0 + default_config.rpcs.get_build_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_build_triggers.timeout = 600.0 + default_config.rpcs.list_build_triggers.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_build_trigger.timeout = 600.0 + default_config.rpcs.delete_build_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_build_trigger.timeout = 600.0 + + default_config.rpcs.run_build_trigger.timeout = 600.0 + + default_config.rpcs.create_worker_pool.timeout = 600.0 + + default_config.rpcs.get_worker_pool.timeout = 600.0 + default_config.rpcs.get_worker_pool.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_worker_pool.timeout = 600.0 + + default_config.rpcs.update_worker_pool.timeout = 600.0 + + default_config.rpcs.list_worker_pools.timeout = 600.0 + default_config.rpcs.list_worker_pools.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudBuild 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::Build::V1::CloudBuild::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_build_stub.universe_domain + end + + ## + # Create a new CloudBuild client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudBuild 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/devtools/cloudbuild/v1/cloudbuild_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 + + @cloud_build_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Build::V1::CloudBuild::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_build_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::Build::V1::CloudBuild::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_build_stub.logger + end + + # Service calls + + ## + # Starts a build with the specified configuration. + # + # This method returns a long-running `Operation`, which includes the build + # ID. Pass the build ID to `GetBuild` to determine the build status (such as + # `SUCCESS` or `FAILURE`). + # + # @overload create_build(request, options = nil) + # Pass arguments to `create_build` via a request object, either of type + # {::Google::Cloud::Build::V1::CreateBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CreateBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build(parent: nil, project_id: nil, build: nil) + # Pass arguments to `create_build` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent resource where this build will be created. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project. + # @param build [::Google::Cloud::Build::V1::Build, ::Hash] + # Required. Build resource 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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CreateBuildRequest.new + # + # # Call the create_build method. + # result = client.create_build 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_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildRequest + + # Converts hash 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_build.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_build.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :create_build, 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 information about a previously requested build. + # + # The `Build` that is returned includes its status (such as `SUCCESS`, + # `FAILURE`, or `WORKING`), and timing information. + # + # @overload get_build(request, options = nil) + # Pass arguments to `get_build` via a request object, either of type + # {::Google::Cloud::Build::V1::GetBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) + # Pass arguments to `get_build` via keyword arguments. Note that at + # least one keyword argument is 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 `Build` to retrieve. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @param project_id [::String] + # Required. ID of the project. + # @param id [::String] + # Required. ID of the build. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::Build] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::Build] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetBuildRequest.new + # + # # Call the get_build method. + # result = client.get_build request + # + # # The returned object is of type Google::Cloud::Build::V1::Build. + # p result + # + def get_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildRequest + + # Converts hash 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_build.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_build.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :get_build, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously requested builds. + # + # Previously requested builds may still be in-progress, or may have finished + # successfully or unsuccessfully. + # + # @overload list_builds(request, options = nil) + # Pass arguments to `list_builds` via a request object, either of type + # {::Google::Cloud::Build::V1::ListBuildsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ListBuildsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_builds(parent: nil, project_id: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_builds` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent of the collection of `Builds`. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project. + # @param page_size [::Integer] + # Number of results to return in the list. + # @param page_token [::String] + # The page token for the next page of Builds. + # + # If unspecified, the first page of results is returned. + # + # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + # In this case, the token should be discarded, and pagination should be + # restarted from the first page of results. + # + # See https://google.aip.dev/158 for more. + # @param filter [::String] + # The raw filter text to constrain the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::Build>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::Build>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ListBuildsRequest.new + # + # # Call the list_builds method. + # result = client.list_builds 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::Build::V1::Build. + # p item + # end + # + def list_builds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildsRequest + + # Converts hash 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_builds.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_builds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_builds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :list_builds, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_builds, 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 + + ## + # Cancels a build in progress. + # + # @overload cancel_build(request, options = nil) + # Pass arguments to `cancel_build` via a request object, either of type + # {::Google::Cloud::Build::V1::CancelBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CancelBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) + # Pass arguments to `cancel_build` via keyword arguments. Note that at + # least one keyword argument is 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 `Build` to cancel. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @param project_id [::String] + # Required. ID of the project. + # @param id [::String] + # Required. ID of the build. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::Build] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::Build] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CancelBuildRequest.new + # + # # Call the cancel_build method. + # result = client.cancel_build request + # + # # The returned object is of type Google::Cloud::Build::V1::Build. + # p result + # + def cancel_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CancelBuildRequest + + # Converts hash 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_build.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_build.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :cancel_build, 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 build based on the specified build. + # + # This method creates a new build using the original build request, which may + # or may not result in an identical build. + # + # For triggered builds: + # + # * Triggered builds resolve to a precise revision; therefore a retry of a + # triggered build will result in a build that uses the same revision. + # + # For non-triggered builds that specify `RepoSource`: + # + # * If the original build built from the tip of a branch, the retried build + # will build from the tip of that branch, which may not be the same revision + # as the original build. + # * If the original build specified a commit sha or revision ID, the retried + # build will use the identical source. + # + # For builds that specify `StorageSource`: + # + # * If the original build pulled source from Cloud Storage without + # specifying the generation of the object, the new build will use the current + # object, which may be different from the original build source. + # * If the original build pulled source from Cloud Storage and specified the + # generation of the object, the new build will attempt to use the same + # object, which may or may not be available depending on the bucket's + # lifecycle management settings. + # + # @overload retry_build(request, options = nil) + # Pass arguments to `retry_build` via a request object, either of type + # {::Google::Cloud::Build::V1::RetryBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::RetryBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload retry_build(name: nil, project_id: nil, id: nil) + # Pass arguments to `retry_build` via keyword arguments. Note that at + # least one keyword argument is 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 `Build` to retry. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @param project_id [::String] + # Required. ID of the project. + # @param id [::String] + # Required. Build ID of the original build. + # + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::RetryBuildRequest.new + # + # # Call the retry_build method. + # result = client.retry_build 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 retry_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RetryBuildRequest + + # Converts hash 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.retry_build.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.retry_build.timeout, + metadata: metadata, + retry_policy: @config.rpcs.retry_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :retry_build, 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 + + ## + # Approves or rejects a pending build. + # + # If approved, the returned long-running operation (LRO) will be analogous to + # the LRO returned from a CreateBuild call. + # + # If rejected, the returned LRO will be immediately done. + # + # @overload approve_build(request, options = nil) + # Pass arguments to `approve_build` via a request object, either of type + # {::Google::Cloud::Build::V1::ApproveBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ApproveBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload approve_build(name: nil, approval_result: nil) + # Pass arguments to `approve_build` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the target build. + # For example: "projects/\\{$project_id}/builds/\\{$build_id}" + # @param approval_result [::Google::Cloud::Build::V1::ApprovalResult, ::Hash] + # Approval decision and metadata. + # + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ApproveBuildRequest.new + # + # # Call the approve_build method. + # result = client.approve_build 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 approve_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ApproveBuildRequest + + # Converts hash 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.approve_build.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.approve_build.timeout, + metadata: metadata, + retry_policy: @config.rpcs.approve_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :approve_build, 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 + + ## + # Creates a new `BuildTrigger`. + # + # @overload create_build_trigger(request, options = nil) + # Pass arguments to `create_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::CreateBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CreateBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(parent: nil, project_id: nil, trigger: nil) + # Pass arguments to `create_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent resource where this trigger will be created. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project for which to configure automatic builds. + # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] + # Required. `BuildTrigger` to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::BuildTrigger] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new + # + # # Call the create_build_trigger method. + # result = client.create_build_trigger request + # + # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + # p result + # + def create_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_build_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :create_build_trigger, 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 + + ## + # Returns information about a `BuildTrigger`. + # + # @overload get_build_trigger(request, options = nil) + # Pass arguments to `get_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::GetBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) + # Pass arguments to `get_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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 `Trigger` to retrieve. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param project_id [::String] + # Required. ID of the project that owns the trigger. + # @param trigger_id [::String] + # Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::BuildTrigger] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new + # + # # Call the get_build_trigger method. + # result = client.get_build_trigger request + # + # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + # p result + # + def get_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_build_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :get_build_trigger, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists existing `BuildTrigger`s. + # + # @overload list_build_triggers(request, options = nil) + # Pass arguments to `list_build_triggers` via a request object, either of type + # {::Google::Cloud::Build::V1::ListBuildTriggersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ListBuildTriggersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_triggers(parent: nil, project_id: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_build_triggers` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent of the collection of `Triggers`. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project for which to list BuildTriggers. + # @param page_size [::Integer] + # Number of results to return in the list. + # @param page_token [::String] + # Token to provide to skip to a particular spot in the list. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new + # + # # Call the list_build_triggers method. + # result = client.list_build_triggers 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::Build::V1::BuildTrigger. + # p item + # end + # + def list_build_triggers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildTriggersRequest + + # Converts hash 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_build_triggers.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_build_triggers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_build_triggers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :list_build_triggers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_build_triggers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a `BuildTrigger` by its project ID and trigger ID. + # + # @overload delete_build_trigger(request, options = nil) + # Pass arguments to `delete_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::DeleteBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) + # Pass arguments to `delete_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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 `Trigger` to delete. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param project_id [::String] + # Required. ID of the project that owns the trigger. + # @param trigger_id [::String] + # Required. ID of the `BuildTrigger` to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new + # + # # Call the delete_build_trigger method. + # result = client.delete_build_trigger request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_build_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :delete_build_trigger, 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 `BuildTrigger` by its project ID and trigger ID. + # + # @overload update_build_trigger(request, options = nil) + # Pass arguments to `update_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::UpdateBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(project_id: nil, trigger_id: nil, trigger: nil, update_mask: nil) + # Pass arguments to `update_build_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the project that owns the trigger. + # @param trigger_id [::String] + # Required. ID of the `BuildTrigger` to update. + # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] + # Required. `BuildTrigger` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Update mask for the resource. If this is set, + # the server will only update the fields specified in the field mask. + # Otherwise, a full update of the mutable resource fields will be performed. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::BuildTrigger] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new + # + # # Call the update_build_trigger method. + # result = client.update_build_trigger request + # + # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + # p result + # + def update_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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.trigger&.resource_name + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.trigger.resource_name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_build_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :update_build_trigger, 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 + + ## + # Runs a `BuildTrigger` at a particular source revision. + # + # To run a regional or global trigger, use the POST request + # that includes the location endpoint in the path (ex. + # v1/projects/\\{projectId}/locations/\\{region}/triggers/\\{triggerId}:run). The + # POST request that does not include the location endpoint in the path can + # only be used when running global triggers. + # + # @overload run_build_trigger(request, options = nil) + # Pass arguments to `run_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::RunBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload run_build_trigger(name: nil, project_id: nil, trigger_id: nil, source: nil) + # Pass arguments to `run_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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 `Trigger` to run. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param project_id [::String] + # Required. ID of the project. + # @param trigger_id [::String] + # Required. ID of the trigger. + # @param source [::Google::Cloud::Build::V1::RepoSource, ::Hash] + # Source to build against this trigger. + # Branch and tag names cannot consist of regular expressions. + # + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new + # + # # Call the run_build_trigger method. + # result = client.run_build_trigger 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 run_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RunBuildTriggerRequest + + # Converts hash 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.run_build_trigger.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.run_build_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :run_build_trigger, 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 + + ## + # ReceiveTriggerWebhook [Experimental] is called when the API receives a + # webhook request targeted at a specific trigger. + # + # @overload receive_trigger_webhook(request, options = nil) + # Pass arguments to `receive_trigger_webhook` via a request object, either of type + # {::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload receive_trigger_webhook(name: nil, body: nil, project_id: nil, trigger: nil, secret: nil) + # Pass arguments to `receive_trigger_webhook` via keyword arguments. Note that at + # least one keyword argument is 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 `ReceiveTriggerWebhook` to retrieve. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param body [::Google::Api::HttpBody, ::Hash] + # HTTP request body. + # @param project_id [::String] + # Project in which the specified trigger lives + # @param trigger [::String] + # Name of the trigger to run the payload against + # @param secret [::String] + # Secret token used for authorization if an OAuth token isn't provided. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new + # + # # Call the receive_trigger_webhook method. + # result = client.receive_trigger_webhook request + # + # # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse. + # p result + # + def receive_trigger_webhook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest + + # Converts hash 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.receive_trigger_webhook.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::Build::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.project_id + header_params["project_id"] = request.project_id + end + if request.trigger + header_params["trigger"] = request.trigger + 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.receive_trigger_webhook.timeout, + metadata: metadata, + retry_policy: @config.rpcs.receive_trigger_webhook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :receive_trigger_webhook, 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 `WorkerPool`. + # + # @overload create_worker_pool(request, options = nil) + # Pass arguments to `create_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::CreateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil) + # Pass arguments to `create_worker_pool` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this worker pool will be created. + # Format: `projects/{project}/locations/{location}`. + # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] + # Required. `WorkerPool` resource to create. + # @param worker_pool_id [::String] + # Required. Immutable. The ID to use for the `WorkerPool`, which will become + # the final component of the resource name. + # + # This value should be 1-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param validate_only [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + # + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new + # + # # Call the create_worker_pool method. + # result = client.create_worker_pool 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_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :create_worker_pool, 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 details of a `WorkerPool`. + # + # @overload get_worker_pool(request, options = nil) + # Pass arguments to `get_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::GetWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(name: nil) + # Pass arguments to `get_worker_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `WorkerPool` to retrieve. + # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::WorkerPool] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::WorkerPool] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new + # + # # Call the get_worker_pool method. + # result = client.get_worker_pool request + # + # # The returned object is of type Google::Cloud::Build::V1::WorkerPool. + # p result + # + def get_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/workerPools/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :get_worker_pool, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a `WorkerPool`. + # + # @overload delete_worker_pool(request, options = nil) + # Pass arguments to `delete_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::DeleteWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_worker_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `WorkerPool` to delete. + # Format: + # `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # @param etag [::String] + # Optional. If provided, it must match the server's etag on the workerpool + # for the request to be processed. + # @param allow_missing [::Boolean] + # If set to true, and the `WorkerPool` is not found, the request will succeed + # but no action will be taken on the server. + # @param validate_only [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + # + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new + # + # # Call the delete_worker_pool method. + # result = client.delete_worker_pool 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_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/workerPools/[^/]+/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :delete_worker_pool, 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 `WorkerPool`. + # + # @overload update_worker_pool(request, options = nil) + # Pass arguments to `update_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::UpdateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(worker_pool: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_worker_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] + # Required. The `WorkerPool` to update. + # + # The `name` field is used to identify the `WorkerPool` to update. + # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A mask specifying which fields in `worker_pool` to update. + # @param validate_only [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + # + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new + # + # # Call the update_worker_pool method. + # result = client.update_worker_pool 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_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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.worker_pool&.name + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/workerPools/[^/]+/?$}.match request.worker_pool.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_worker_pool.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :update_worker_pool, 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 `WorkerPool`s. + # + # @overload list_worker_pools(request, options = nil) + # Pass arguments to `list_worker_pools` via a request object, either of type + # {::Google::Cloud::Build::V1::ListWorkerPoolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pools(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_worker_pools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of the collection of `WorkerPools`. + # Format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # The maximum number of `WorkerPool`s to return. The service may return + # fewer than this value. If omitted, the server will use a sensible default. + # @param page_token [::String] + # A page token, received from a previous `ListWorkerPools` call. Provide this + # to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new + # + # # Call the list_worker_pools method. + # result = client.list_worker_pools 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::Build::V1::WorkerPool. + # p item + # end + # + def list_worker_pools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListWorkerPoolsRequest + + # Converts hash 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_worker_pools.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_worker_pools.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_worker_pools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :list_worker_pools, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_worker_pools, 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 `DefaultServiceAccount` used by the project. + # + # @overload get_default_service_account(request, options = nil) + # Pass arguments to `get_default_service_account` via a request object, either of type + # {::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_default_service_account(name: nil) + # Pass arguments to `get_default_service_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `DefaultServiceAccount` to retrieve. + # Format: + # `projects/{project}/locations/{location}/defaultServiceAccount` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V1::DefaultServiceAccount] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V1::DefaultServiceAccount] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new + # + # # Call the get_default_service_account method. + # result = client.get_default_service_account request + # + # # The returned object is of type Google::Cloud::Build::V1::DefaultServiceAccount. + # p result + # + def get_default_service_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest + + # Converts hash 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_default_service_account.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::Build::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 + regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/defaultServiceAccount/?$}.match request.name + if regex_match + header_params["location"] = regex_match["location".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_default_service_account.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_default_service_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.call_rpc :get_default_service_account, 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 CloudBuild API. + # + # This class represents the configuration for CloudBuild, + # 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::Build::V1::CloudBuild::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 + # # create_build to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_build.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_build.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::Build::V1::CloudBuild::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 = "cloudbuild.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 CloudBuild 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 `create_build` + # @return [::Gapic::Config::Method] + # + attr_reader :create_build + ## + # RPC-specific configuration for `get_build` + # @return [::Gapic::Config::Method] + # + attr_reader :get_build + ## + # RPC-specific configuration for `list_builds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_builds + ## + # RPC-specific configuration for `cancel_build` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_build + ## + # RPC-specific configuration for `retry_build` + # @return [::Gapic::Config::Method] + # + attr_reader :retry_build + ## + # RPC-specific configuration for `approve_build` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_build + ## + # RPC-specific configuration for `create_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :create_build_trigger + ## + # RPC-specific configuration for `get_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :get_build_trigger + ## + # RPC-specific configuration for `list_build_triggers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_build_triggers + ## + # RPC-specific configuration for `delete_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_build_trigger + ## + # RPC-specific configuration for `update_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :update_build_trigger + ## + # RPC-specific configuration for `run_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :run_build_trigger + ## + # RPC-specific configuration for `receive_trigger_webhook` + # @return [::Gapic::Config::Method] + # + attr_reader :receive_trigger_webhook + ## + # RPC-specific configuration for `create_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_worker_pool + ## + # RPC-specific configuration for `get_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_worker_pool + ## + # RPC-specific configuration for `delete_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_worker_pool + ## + # RPC-specific configuration for `update_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_worker_pool + ## + # RPC-specific configuration for `list_worker_pools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_worker_pools + ## + # RPC-specific configuration for `get_default_service_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_default_service_account + + # @private + def initialize parent_rpcs = nil + create_build_config = parent_rpcs.create_build if parent_rpcs.respond_to? :create_build + @create_build = ::Gapic::Config::Method.new create_build_config + get_build_config = parent_rpcs.get_build if parent_rpcs.respond_to? :get_build + @get_build = ::Gapic::Config::Method.new get_build_config + list_builds_config = parent_rpcs.list_builds if parent_rpcs.respond_to? :list_builds + @list_builds = ::Gapic::Config::Method.new list_builds_config + cancel_build_config = parent_rpcs.cancel_build if parent_rpcs.respond_to? :cancel_build + @cancel_build = ::Gapic::Config::Method.new cancel_build_config + retry_build_config = parent_rpcs.retry_build if parent_rpcs.respond_to? :retry_build + @retry_build = ::Gapic::Config::Method.new retry_build_config + approve_build_config = parent_rpcs.approve_build if parent_rpcs.respond_to? :approve_build + @approve_build = ::Gapic::Config::Method.new approve_build_config + create_build_trigger_config = parent_rpcs.create_build_trigger if parent_rpcs.respond_to? :create_build_trigger + @create_build_trigger = ::Gapic::Config::Method.new create_build_trigger_config + get_build_trigger_config = parent_rpcs.get_build_trigger if parent_rpcs.respond_to? :get_build_trigger + @get_build_trigger = ::Gapic::Config::Method.new get_build_trigger_config + list_build_triggers_config = parent_rpcs.list_build_triggers if parent_rpcs.respond_to? :list_build_triggers + @list_build_triggers = ::Gapic::Config::Method.new list_build_triggers_config + delete_build_trigger_config = parent_rpcs.delete_build_trigger if parent_rpcs.respond_to? :delete_build_trigger + @delete_build_trigger = ::Gapic::Config::Method.new delete_build_trigger_config + update_build_trigger_config = parent_rpcs.update_build_trigger if parent_rpcs.respond_to? :update_build_trigger + @update_build_trigger = ::Gapic::Config::Method.new update_build_trigger_config + run_build_trigger_config = parent_rpcs.run_build_trigger if parent_rpcs.respond_to? :run_build_trigger + @run_build_trigger = ::Gapic::Config::Method.new run_build_trigger_config + receive_trigger_webhook_config = parent_rpcs.receive_trigger_webhook if parent_rpcs.respond_to? :receive_trigger_webhook + @receive_trigger_webhook = ::Gapic::Config::Method.new receive_trigger_webhook_config + create_worker_pool_config = parent_rpcs.create_worker_pool if parent_rpcs.respond_to? :create_worker_pool + @create_worker_pool = ::Gapic::Config::Method.new create_worker_pool_config + get_worker_pool_config = parent_rpcs.get_worker_pool if parent_rpcs.respond_to? :get_worker_pool + @get_worker_pool = ::Gapic::Config::Method.new get_worker_pool_config + delete_worker_pool_config = parent_rpcs.delete_worker_pool if parent_rpcs.respond_to? :delete_worker_pool + @delete_worker_pool = ::Gapic::Config::Method.new delete_worker_pool_config + update_worker_pool_config = parent_rpcs.update_worker_pool if parent_rpcs.respond_to? :update_worker_pool + @update_worker_pool = ::Gapic::Config::Method.new update_worker_pool_config + list_worker_pools_config = parent_rpcs.list_worker_pools if parent_rpcs.respond_to? :list_worker_pools + @list_worker_pools = ::Gapic::Config::Method.new list_worker_pools_config + get_default_service_account_config = parent_rpcs.get_default_service_account if parent_rpcs.respond_to? :get_default_service_account + @get_default_service_account = ::Gapic::Config::Method.new get_default_service_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/credentials.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/credentials.rb new file mode 100644 index 000000000000..3eb64de1936a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/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 Build + module V1 + module CloudBuild + # Credentials for the CloudBuild API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "CLOUD_BUILD_CREDENTIALS", + "CLOUD_BUILD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "CLOUD_BUILD_CREDENTIALS_JSON", + "CLOUD_BUILD_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-build-v1/lib/google/cloud/build/v1/cloud_build/operations.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/operations.rb new file mode 100644 index 000000000000..17b36508fcfc --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/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 Build + module V1 + module CloudBuild + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudBuild 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 CloudBuild 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::Build::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::Build::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::Build::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::Build::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::Build::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 = "cloudbuild.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-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb new file mode 100644 index 000000000000..137a60e829fa --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb @@ -0,0 +1,392 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Build + module V1 + module CloudBuild + # Path helper methods for the CloudBuild API. + module Paths + ## + # Create a fully-qualified Build resource string. + # + # @overload build_path(project:, build:) + # The resource will be in the following format: + # + # `projects/{project}/builds/{build}` + # + # @param project [String] + # @param build [String] + # + # @overload build_path(project:, location:, build:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/builds/{build}` + # + # @param project [String] + # @param location [String] + # @param build [String] + # + # @return [::String] + def build_path **args + resources = { + "build:project" => (proc do |project:, build:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/builds/#{build}" + end), + "build:location:project" => (proc do |project:, location:, build:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/builds/#{build}" + 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 BuildTrigger resource string. + # + # @overload build_trigger_path(project:, trigger:) + # The resource will be in the following format: + # + # `projects/{project}/triggers/{trigger}` + # + # @param project [String] + # @param trigger [String] + # + # @overload build_trigger_path(project:, location:, trigger:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/triggers/{trigger}` + # + # @param project [String] + # @param location [String] + # @param trigger [String] + # + # @return [::String] + def build_trigger_path **args + resources = { + "project:trigger" => (proc do |project:, trigger:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/triggers/#{trigger}" + end), + "location:project:trigger" => (proc do |project:, location:, trigger:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/triggers/#{trigger}" + 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 CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` + # + # @param project [String] + # @param location [String] + # @param keyring [String] + # @param key [String] + # + # @return [::String] + def crypto_key_path project:, location:, keyring:, key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "keyring cannot contain /" if keyring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{keyring}/cryptoKeys/#{key}" + end + + ## + # Create a fully-qualified DefaultServiceAccount resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/defaultServiceAccount` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def default_service_account_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/defaultServiceAccount" + end + + ## + # Create a fully-qualified GitRepositoryLink resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # @param git_repository_link [String] + # + # @return [::String] + def git_repository_link_path project:, location:, connection:, git_repository_link: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}/gitRepositoryLinks/#{git_repository_link}" + end + + ## + # Create a fully-qualified GithubEnterpriseConfig resource string. + # + # @overload github_enterprise_config_path(project:, config:) + # The resource will be in the following format: + # + # `projects/{project}/githubEnterpriseConfigs/{config}` + # + # @param project [String] + # @param config [String] + # + # @overload github_enterprise_config_path(project:, location:, config:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/githubEnterpriseConfigs/{config}` + # + # @param project [String] + # @param location [String] + # @param config [String] + # + # @return [::String] + def github_enterprise_config_path **args + resources = { + "config:project" => (proc do |project:, config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/githubEnterpriseConfigs/#{config}" + end), + "config:location:project" => (proc do |project:, location:, config:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/githubEnterpriseConfigs/#{config}" + 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 Network resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/global/networks/{network}` + # + # @param project [String] + # @param network [String] + # + # @return [::String] + def network_path project:, network: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/global/networks/#{network}" + end + + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` + # + # @param project [String] + # @param region [String] + # @param networkattachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, networkattachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + ## + # Create a fully-qualified Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, connection:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}" + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{version}` + # + # @param project [String] + # @param secret [String] + # @param version [String] + # + # @return [::String] + def secret_version_path project:, secret:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{version}" + end + + ## + # Create a fully-qualified ServiceAccount resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/serviceAccounts/{service_account}` + # + # @param project [String] + # @param service_account [String] + # + # @return [::String] + def service_account_path project:, service_account: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/serviceAccounts/#{service_account}" + end + + ## + # Create a fully-qualified Subscription resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/subscriptions/{subscription}` + # + # @param project [String] + # @param subscription [String] + # + # @return [::String] + def subscription_path project:, subscription: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/subscriptions/#{subscription}" + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + ## + # Create a fully-qualified WorkerPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workerPools/{worker_pool}` + # + # @param project [String] + # @param location [String] + # @param worker_pool [String] + # + # @return [::String] + def worker_pool_path project:, location:, worker_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb new file mode 100644 index 000000000000..e0716c3a0646 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/build/v1/version" + +require "google/cloud/build/v1/cloud_build/credentials" +require "google/cloud/build/v1/cloud_build/paths" +require "google/cloud/build/v1/cloud_build/rest/operations" +require "google/cloud/build/v1/cloud_build/rest/client" + +module Google + module Cloud + module Build + module V1 + ## + # Creates and manages builds on Google Cloud Platform. + # + # The main concept used by this API is a `Build`, which describes the location + # of the source to build, how to build the source, and where to store the + # built artifacts, if any. + # + # A user can list previously-requested builds or get builds by their ID to + # determine the status of the build. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/build/v1/cloud_build/rest" + # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + module CloudBuild + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/build/v1/cloud_build/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb new file mode 100644 index 000000000000..70b1b54fa124 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb @@ -0,0 +1,2285 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/devtools/cloudbuild/v1/cloudbuild_pb" +require "google/cloud/build/v1/cloud_build/rest/service_stub" + +module Google + module Cloud + module Build + module V1 + module CloudBuild + module Rest + ## + # REST client for the CloudBuild service. + # + # Creates and manages builds on Google Cloud Platform. + # + # The main concept used by this API is a `Build`, which describes the location + # of the source to build, how to build the source, and where to store the + # built artifacts, if any. + # + # A user can list previously-requested builds or get builds by their ID to + # determine the status of the build. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_build_stub + + ## + # Configure the CloudBuild Client class. + # + # See {::Google::Cloud::Build::V1::CloudBuild::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudBuild clients + # ::Google::Cloud::Build::V1::CloudBuild::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", "Build", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_build.timeout = 600.0 + + default_config.rpcs.get_build.timeout = 600.0 + default_config.rpcs.get_build.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_builds.timeout = 600.0 + default_config.rpcs.list_builds.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.cancel_build.timeout = 600.0 + + default_config.rpcs.retry_build.timeout = 600.0 + + default_config.rpcs.create_build_trigger.timeout = 600.0 + + default_config.rpcs.get_build_trigger.timeout = 600.0 + default_config.rpcs.get_build_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.list_build_triggers.timeout = 600.0 + default_config.rpcs.list_build_triggers.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_build_trigger.timeout = 600.0 + default_config.rpcs.delete_build_trigger.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.update_build_trigger.timeout = 600.0 + + default_config.rpcs.run_build_trigger.timeout = 600.0 + + default_config.rpcs.create_worker_pool.timeout = 600.0 + + default_config.rpcs.get_worker_pool.timeout = 600.0 + default_config.rpcs.get_worker_pool.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_worker_pool.timeout = 600.0 + + default_config.rpcs.update_worker_pool.timeout = 600.0 + + default_config.rpcs.list_worker_pools.timeout = 600.0 + default_config.rpcs.list_worker_pools.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudBuild 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::Build::V1::CloudBuild::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_build_stub.universe_domain + end + + ## + # Create a new CloudBuild REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudBuild 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::Build::V1::CloudBuild::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 + + @cloud_build_stub = ::Google::Cloud::Build::V1::CloudBuild::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_build_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::Build::V1::CloudBuild::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_build_stub.logger + end + + # Service calls + + ## + # Starts a build with the specified configuration. + # + # This method returns a long-running `Operation`, which includes the build + # ID. Pass the build ID to `GetBuild` to determine the build status (such as + # `SUCCESS` or `FAILURE`). + # + # @overload create_build(request, options = nil) + # Pass arguments to `create_build` via a request object, either of type + # {::Google::Cloud::Build::V1::CreateBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CreateBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build(parent: nil, project_id: nil, build: nil) + # Pass arguments to `create_build` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent resource where this build will be created. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project. + # @param build [::Google::Cloud::Build::V1::Build, ::Hash] + # Required. Build resource 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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CreateBuildRequest.new + # + # # Call the create_build method. + # result = client.create_build 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_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildRequest + + # Converts hash 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_build.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::Build::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_build.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.create_build 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 information about a previously requested build. + # + # The `Build` that is returned includes its status (such as `SUCCESS`, + # `FAILURE`, or `WORKING`), and timing information. + # + # @overload get_build(request, options = nil) + # Pass arguments to `get_build` via a request object, either of type + # {::Google::Cloud::Build::V1::GetBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) + # Pass arguments to `get_build` via keyword arguments. Note that at + # least one keyword argument is 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 `Build` to retrieve. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @param project_id [::String] + # Required. ID of the project. + # @param id [::String] + # Required. ID of the build. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::Build] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::Build] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetBuildRequest.new + # + # # Call the get_build method. + # result = client.get_build request + # + # # The returned object is of type Google::Cloud::Build::V1::Build. + # p result + # + def get_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildRequest + + # Converts hash 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_build.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::Build::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_build.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.get_build request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists previously requested builds. + # + # Previously requested builds may still be in-progress, or may have finished + # successfully or unsuccessfully. + # + # @overload list_builds(request, options = nil) + # Pass arguments to `list_builds` via a request object, either of type + # {::Google::Cloud::Build::V1::ListBuildsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ListBuildsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_builds(parent: nil, project_id: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_builds` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent of the collection of `Builds`. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project. + # @param page_size [::Integer] + # Number of results to return in the list. + # @param page_token [::String] + # The page token for the next page of Builds. + # + # If unspecified, the first page of results is returned. + # + # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + # In this case, the token should be discarded, and pagination should be + # restarted from the first page of results. + # + # See https://google.aip.dev/158 for more. + # @param filter [::String] + # The raw filter text to constrain the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::Build>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::Build>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ListBuildsRequest.new + # + # # Call the list_builds method. + # result = client.list_builds 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::Build::V1::Build. + # p item + # end + # + def list_builds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildsRequest + + # Converts hash 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_builds.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::Build::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_builds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_builds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.list_builds request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_build_stub, :list_builds, "builds", 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 + + ## + # Cancels a build in progress. + # + # @overload cancel_build(request, options = nil) + # Pass arguments to `cancel_build` via a request object, either of type + # {::Google::Cloud::Build::V1::CancelBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CancelBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) + # Pass arguments to `cancel_build` via keyword arguments. Note that at + # least one keyword argument is 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 `Build` to cancel. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @param project_id [::String] + # Required. ID of the project. + # @param id [::String] + # Required. ID of the build. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::Build] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::Build] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CancelBuildRequest.new + # + # # Call the cancel_build method. + # result = client.cancel_build request + # + # # The returned object is of type Google::Cloud::Build::V1::Build. + # p result + # + def cancel_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CancelBuildRequest + + # Converts hash 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_build.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::Build::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_build.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.cancel_build 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 build based on the specified build. + # + # This method creates a new build using the original build request, which may + # or may not result in an identical build. + # + # For triggered builds: + # + # * Triggered builds resolve to a precise revision; therefore a retry of a + # triggered build will result in a build that uses the same revision. + # + # For non-triggered builds that specify `RepoSource`: + # + # * If the original build built from the tip of a branch, the retried build + # will build from the tip of that branch, which may not be the same revision + # as the original build. + # * If the original build specified a commit sha or revision ID, the retried + # build will use the identical source. + # + # For builds that specify `StorageSource`: + # + # * If the original build pulled source from Cloud Storage without + # specifying the generation of the object, the new build will use the current + # object, which may be different from the original build source. + # * If the original build pulled source from Cloud Storage and specified the + # generation of the object, the new build will attempt to use the same + # object, which may or may not be available depending on the bucket's + # lifecycle management settings. + # + # @overload retry_build(request, options = nil) + # Pass arguments to `retry_build` via a request object, either of type + # {::Google::Cloud::Build::V1::RetryBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::RetryBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload retry_build(name: nil, project_id: nil, id: nil) + # Pass arguments to `retry_build` via keyword arguments. Note that at + # least one keyword argument is 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 `Build` to retry. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @param project_id [::String] + # Required. ID of the project. + # @param id [::String] + # Required. Build ID of the original build. + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::RetryBuildRequest.new + # + # # Call the retry_build method. + # result = client.retry_build 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 retry_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RetryBuildRequest + + # Converts hash 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.retry_build.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::Build::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.retry_build.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.retry_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.retry_build 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 + + ## + # Approves or rejects a pending build. + # + # If approved, the returned long-running operation (LRO) will be analogous to + # the LRO returned from a CreateBuild call. + # + # If rejected, the returned LRO will be immediately done. + # + # @overload approve_build(request, options = nil) + # Pass arguments to `approve_build` via a request object, either of type + # {::Google::Cloud::Build::V1::ApproveBuildRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ApproveBuildRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload approve_build(name: nil, approval_result: nil) + # Pass arguments to `approve_build` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the target build. + # For example: "projects/\\{$project_id}/builds/\\{$build_id}" + # @param approval_result [::Google::Cloud::Build::V1::ApprovalResult, ::Hash] + # Approval decision and metadata. + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ApproveBuildRequest.new + # + # # Call the approve_build method. + # result = client.approve_build 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 approve_build request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ApproveBuildRequest + + # Converts hash 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.approve_build.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::Build::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.approve_build.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.approve_build.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.approve_build 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 + + ## + # Creates a new `BuildTrigger`. + # + # @overload create_build_trigger(request, options = nil) + # Pass arguments to `create_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::CreateBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CreateBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(parent: nil, project_id: nil, trigger: nil) + # Pass arguments to `create_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent resource where this trigger will be created. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project for which to configure automatic builds. + # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] + # Required. `BuildTrigger` to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new + # + # # Call the create_build_trigger method. + # result = client.create_build_trigger request + # + # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + # p result + # + def create_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.create_build_trigger 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 + + ## + # Returns information about a `BuildTrigger`. + # + # @overload get_build_trigger(request, options = nil) + # Pass arguments to `get_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::GetBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) + # Pass arguments to `get_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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 `Trigger` to retrieve. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param project_id [::String] + # Required. ID of the project that owns the trigger. + # @param trigger_id [::String] + # Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new + # + # # Call the get_build_trigger method. + # result = client.get_build_trigger request + # + # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + # p result + # + def get_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.get_build_trigger request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists existing `BuildTrigger`s. + # + # @overload list_build_triggers(request, options = nil) + # Pass arguments to `list_build_triggers` via a request object, either of type + # {::Google::Cloud::Build::V1::ListBuildTriggersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ListBuildTriggersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_triggers(parent: nil, project_id: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_build_triggers` via keyword arguments. Note that at + # least one keyword argument is 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] + # The parent of the collection of `Triggers`. + # Format: `projects/{project}/locations/{location}` + # @param project_id [::String] + # Required. ID of the project for which to list BuildTriggers. + # @param page_size [::Integer] + # Number of results to return in the list. + # @param page_token [::String] + # Token to provide to skip to a particular spot in the list. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new + # + # # Call the list_build_triggers method. + # result = client.list_build_triggers 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::Build::V1::BuildTrigger. + # p item + # end + # + def list_build_triggers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildTriggersRequest + + # Converts hash 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_build_triggers.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::Build::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_build_triggers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_build_triggers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.list_build_triggers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_build_stub, :list_build_triggers, "triggers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a `BuildTrigger` by its project ID and trigger ID. + # + # @overload delete_build_trigger(request, options = nil) + # Pass arguments to `delete_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::DeleteBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) + # Pass arguments to `delete_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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 `Trigger` to delete. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param project_id [::String] + # Required. ID of the project that owns the trigger. + # @param trigger_id [::String] + # Required. ID of the `BuildTrigger` to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new + # + # # Call the delete_build_trigger method. + # result = client.delete_build_trigger request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.delete_build_trigger 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 `BuildTrigger` by its project ID and trigger ID. + # + # @overload update_build_trigger(request, options = nil) + # Pass arguments to `update_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::UpdateBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_build_trigger(project_id: nil, trigger_id: nil, trigger: nil, update_mask: nil) + # Pass arguments to `update_build_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param project_id [::String] + # Required. ID of the project that owns the trigger. + # @param trigger_id [::String] + # Required. ID of the `BuildTrigger` to update. + # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] + # Required. `BuildTrigger` to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Update mask for the resource. If this is set, + # the server will only update the fields specified in the field mask. + # Otherwise, a full update of the mutable resource fields will be performed. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new + # + # # Call the update_build_trigger method. + # result = client.update_build_trigger request + # + # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + # p result + # + def update_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest + + # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.update_build_trigger 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 + + ## + # Runs a `BuildTrigger` at a particular source revision. + # + # To run a regional or global trigger, use the POST request + # that includes the location endpoint in the path (ex. + # v1/projects/\\{projectId}/locations/\\{region}/triggers/\\{triggerId}:run). The + # POST request that does not include the location endpoint in the path can + # only be used when running global triggers. + # + # @overload run_build_trigger(request, options = nil) + # Pass arguments to `run_build_trigger` via a request object, either of type + # {::Google::Cloud::Build::V1::RunBuildTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload run_build_trigger(name: nil, project_id: nil, trigger_id: nil, source: nil) + # Pass arguments to `run_build_trigger` via keyword arguments. Note that at + # least one keyword argument is 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 `Trigger` to run. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param project_id [::String] + # Required. ID of the project. + # @param trigger_id [::String] + # Required. ID of the trigger. + # @param source [::Google::Cloud::Build::V1::RepoSource, ::Hash] + # Source to build against this trigger. + # Branch and tag names cannot consist of regular expressions. + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new + # + # # Call the run_build_trigger method. + # result = client.run_build_trigger 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 run_build_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RunBuildTriggerRequest + + # Converts hash 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.run_build_trigger.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::Build::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.run_build_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_build_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.run_build_trigger 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 + + ## + # ReceiveTriggerWebhook [Experimental] is called when the API receives a + # webhook request targeted at a specific trigger. + # + # @overload receive_trigger_webhook(request, options = nil) + # Pass arguments to `receive_trigger_webhook` via a request object, either of type + # {::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload receive_trigger_webhook(name: nil, body: nil, project_id: nil, trigger: nil, secret: nil) + # Pass arguments to `receive_trigger_webhook` via keyword arguments. Note that at + # least one keyword argument is 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 `ReceiveTriggerWebhook` to retrieve. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @param body [::Google::Api::HttpBody, ::Hash] + # HTTP request body. + # @param project_id [::String] + # Project in which the specified trigger lives + # @param trigger [::String] + # Name of the trigger to run the payload against + # @param secret [::String] + # Secret token used for authorization if an OAuth token isn't provided. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new + # + # # Call the receive_trigger_webhook method. + # result = client.receive_trigger_webhook request + # + # # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse. + # p result + # + def receive_trigger_webhook request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest + + # Converts hash 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.receive_trigger_webhook.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::Build::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.receive_trigger_webhook.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.receive_trigger_webhook.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.receive_trigger_webhook 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 `WorkerPool`. + # + # @overload create_worker_pool(request, options = nil) + # Pass arguments to `create_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::CreateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil) + # Pass arguments to `create_worker_pool` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this worker pool will be created. + # Format: `projects/{project}/locations/{location}`. + # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] + # Required. `WorkerPool` resource to create. + # @param worker_pool_id [::String] + # Required. Immutable. The ID to use for the `WorkerPool`, which will become + # the final component of the resource name. + # + # This value should be 1-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param validate_only [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new + # + # # Call the create_worker_pool method. + # result = client.create_worker_pool 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_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.create_worker_pool 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 details of a `WorkerPool`. + # + # @overload get_worker_pool(request, options = nil) + # Pass arguments to `get_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::GetWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(name: nil) + # Pass arguments to `get_worker_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `WorkerPool` to retrieve. + # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::WorkerPool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::WorkerPool] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new + # + # # Call the get_worker_pool method. + # result = client.get_worker_pool request + # + # # The returned object is of type Google::Cloud::Build::V1::WorkerPool. + # p result + # + def get_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.get_worker_pool request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a `WorkerPool`. + # + # @overload delete_worker_pool(request, options = nil) + # Pass arguments to `delete_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::DeleteWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_worker_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `WorkerPool` to delete. + # Format: + # `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # @param etag [::String] + # Optional. If provided, it must match the server's etag on the workerpool + # for the request to be processed. + # @param allow_missing [::Boolean] + # If set to true, and the `WorkerPool` is not found, the request will succeed + # but no action will be taken on the server. + # @param validate_only [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new + # + # # Call the delete_worker_pool method. + # result = client.delete_worker_pool 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_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.delete_worker_pool 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 `WorkerPool`. + # + # @overload update_worker_pool(request, options = nil) + # Pass arguments to `update_worker_pool` via a request object, either of type + # {::Google::Cloud::Build::V1::UpdateWorkerPoolRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pool(worker_pool: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_worker_pool` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] + # Required. The `WorkerPool` to update. + # + # The `name` field is used to identify the `WorkerPool` to update. + # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. A mask specifying which fields in `worker_pool` to update. + # @param validate_only [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + # @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/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new + # + # # Call the update_worker_pool method. + # result = client.update_worker_pool 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_worker_pool request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest + + # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_worker_pool.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.update_worker_pool 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 `WorkerPool`s. + # + # @overload list_worker_pools(request, options = nil) + # Pass arguments to `list_worker_pools` via a request object, either of type + # {::Google::Cloud::Build::V1::ListWorkerPoolsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_worker_pools(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_worker_pools` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of the collection of `WorkerPools`. + # Format: `projects/{project}/locations/{location}`. + # @param page_size [::Integer] + # The maximum number of `WorkerPool`s to return. The service may return + # fewer than this value. If omitted, the server will use a sensible default. + # @param page_token [::String] + # A page token, received from a previous `ListWorkerPools` call. Provide this + # to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new + # + # # Call the list_worker_pools method. + # result = client.list_worker_pools 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::Build::V1::WorkerPool. + # p item + # end + # + def list_worker_pools request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListWorkerPoolsRequest + + # Converts hash 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_worker_pools.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::Build::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_worker_pools.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_worker_pools.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.list_worker_pools request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_build_stub, :list_worker_pools, "worker_pools", 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 `DefaultServiceAccount` used by the project. + # + # @overload get_default_service_account(request, options = nil) + # Pass arguments to `get_default_service_account` via a request object, either of type + # {::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_default_service_account(name: nil) + # Pass arguments to `get_default_service_account` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the `DefaultServiceAccount` to retrieve. + # Format: + # `projects/{project}/locations/{location}/defaultServiceAccount` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Build::V1::DefaultServiceAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::DefaultServiceAccount] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/build/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new + # + # # Call the get_default_service_account method. + # result = client.get_default_service_account request + # + # # The returned object is of type Google::Cloud::Build::V1::DefaultServiceAccount. + # p result + # + def get_default_service_account request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest + + # Converts hash 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_default_service_account.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::Build::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_default_service_account.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_default_service_account.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_build_stub.get_default_service_account 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 CloudBuild REST API. + # + # This class represents the configuration for CloudBuild 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::Build::V1::CloudBuild::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 + # # create_build to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_build.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_build.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 = "cloudbuild.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 CloudBuild 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 `create_build` + # @return [::Gapic::Config::Method] + # + attr_reader :create_build + ## + # RPC-specific configuration for `get_build` + # @return [::Gapic::Config::Method] + # + attr_reader :get_build + ## + # RPC-specific configuration for `list_builds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_builds + ## + # RPC-specific configuration for `cancel_build` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_build + ## + # RPC-specific configuration for `retry_build` + # @return [::Gapic::Config::Method] + # + attr_reader :retry_build + ## + # RPC-specific configuration for `approve_build` + # @return [::Gapic::Config::Method] + # + attr_reader :approve_build + ## + # RPC-specific configuration for `create_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :create_build_trigger + ## + # RPC-specific configuration for `get_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :get_build_trigger + ## + # RPC-specific configuration for `list_build_triggers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_build_triggers + ## + # RPC-specific configuration for `delete_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_build_trigger + ## + # RPC-specific configuration for `update_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :update_build_trigger + ## + # RPC-specific configuration for `run_build_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :run_build_trigger + ## + # RPC-specific configuration for `receive_trigger_webhook` + # @return [::Gapic::Config::Method] + # + attr_reader :receive_trigger_webhook + ## + # RPC-specific configuration for `create_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :create_worker_pool + ## + # RPC-specific configuration for `get_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :get_worker_pool + ## + # RPC-specific configuration for `delete_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_worker_pool + ## + # RPC-specific configuration for `update_worker_pool` + # @return [::Gapic::Config::Method] + # + attr_reader :update_worker_pool + ## + # RPC-specific configuration for `list_worker_pools` + # @return [::Gapic::Config::Method] + # + attr_reader :list_worker_pools + ## + # RPC-specific configuration for `get_default_service_account` + # @return [::Gapic::Config::Method] + # + attr_reader :get_default_service_account + + # @private + def initialize parent_rpcs = nil + create_build_config = parent_rpcs.create_build if parent_rpcs.respond_to? :create_build + @create_build = ::Gapic::Config::Method.new create_build_config + get_build_config = parent_rpcs.get_build if parent_rpcs.respond_to? :get_build + @get_build = ::Gapic::Config::Method.new get_build_config + list_builds_config = parent_rpcs.list_builds if parent_rpcs.respond_to? :list_builds + @list_builds = ::Gapic::Config::Method.new list_builds_config + cancel_build_config = parent_rpcs.cancel_build if parent_rpcs.respond_to? :cancel_build + @cancel_build = ::Gapic::Config::Method.new cancel_build_config + retry_build_config = parent_rpcs.retry_build if parent_rpcs.respond_to? :retry_build + @retry_build = ::Gapic::Config::Method.new retry_build_config + approve_build_config = parent_rpcs.approve_build if parent_rpcs.respond_to? :approve_build + @approve_build = ::Gapic::Config::Method.new approve_build_config + create_build_trigger_config = parent_rpcs.create_build_trigger if parent_rpcs.respond_to? :create_build_trigger + @create_build_trigger = ::Gapic::Config::Method.new create_build_trigger_config + get_build_trigger_config = parent_rpcs.get_build_trigger if parent_rpcs.respond_to? :get_build_trigger + @get_build_trigger = ::Gapic::Config::Method.new get_build_trigger_config + list_build_triggers_config = parent_rpcs.list_build_triggers if parent_rpcs.respond_to? :list_build_triggers + @list_build_triggers = ::Gapic::Config::Method.new list_build_triggers_config + delete_build_trigger_config = parent_rpcs.delete_build_trigger if parent_rpcs.respond_to? :delete_build_trigger + @delete_build_trigger = ::Gapic::Config::Method.new delete_build_trigger_config + update_build_trigger_config = parent_rpcs.update_build_trigger if parent_rpcs.respond_to? :update_build_trigger + @update_build_trigger = ::Gapic::Config::Method.new update_build_trigger_config + run_build_trigger_config = parent_rpcs.run_build_trigger if parent_rpcs.respond_to? :run_build_trigger + @run_build_trigger = ::Gapic::Config::Method.new run_build_trigger_config + receive_trigger_webhook_config = parent_rpcs.receive_trigger_webhook if parent_rpcs.respond_to? :receive_trigger_webhook + @receive_trigger_webhook = ::Gapic::Config::Method.new receive_trigger_webhook_config + create_worker_pool_config = parent_rpcs.create_worker_pool if parent_rpcs.respond_to? :create_worker_pool + @create_worker_pool = ::Gapic::Config::Method.new create_worker_pool_config + get_worker_pool_config = parent_rpcs.get_worker_pool if parent_rpcs.respond_to? :get_worker_pool + @get_worker_pool = ::Gapic::Config::Method.new get_worker_pool_config + delete_worker_pool_config = parent_rpcs.delete_worker_pool if parent_rpcs.respond_to? :delete_worker_pool + @delete_worker_pool = ::Gapic::Config::Method.new delete_worker_pool_config + update_worker_pool_config = parent_rpcs.update_worker_pool if parent_rpcs.respond_to? :update_worker_pool + @update_worker_pool = ::Gapic::Config::Method.new update_worker_pool_config + list_worker_pools_config = parent_rpcs.list_worker_pools if parent_rpcs.respond_to? :list_worker_pools + @list_worker_pools = ::Gapic::Config::Method.new list_worker_pools_config + get_default_service_account_config = parent_rpcs.get_default_service_account if parent_rpcs.respond_to? :get_default_service_account + @get_default_service_account = ::Gapic::Config::Method.new get_default_service_account_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb new file mode 100644 index 000000000000..a1d812bf164b --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb @@ -0,0 +1,940 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Build + module V1 + module CloudBuild + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudBuild 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 CloudBuild 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::Build::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::Build::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::Build::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::Build::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 = "cloudbuild.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}", + matches: [ + ["name", %r{^operations/?$}, 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{^operations(?:/.*)?$}, true] + ] + ) + .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{^operations(?:/.*)?$}, true] + ] + ) + 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{^operations(?:/.*)?$}, true] + ] + ) + .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-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb new file mode 100644 index 000000000000..207d7b67a72f --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb @@ -0,0 +1,1357 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/devtools/cloudbuild/v1/cloudbuild_pb" + +module Google + module Cloud + module Build + module V1 + module CloudBuild + module Rest + ## + # REST service stub for the CloudBuild 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 create_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CreateBuildRequest] + # 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_build request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_build_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_build", + 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_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetBuildRequest] + # 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::Build::V1::Build] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::Build] + # A result object deserialized from the server's reply + def get_build request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_build_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_build", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::Build.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_builds REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ListBuildsRequest] + # 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::Build::V1::ListBuildsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::ListBuildsResponse] + # A result object deserialized from the server's reply + def list_builds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_builds_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_builds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::ListBuildsResponse.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_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CancelBuildRequest] + # 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::Build::V1::Build] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::Build] + # A result object deserialized from the server's reply + def cancel_build request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_build_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_build", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::Build.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the retry_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::RetryBuildRequest] + # 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 retry_build request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_retry_build_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: "retry_build", + 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 approve_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ApproveBuildRequest] + # 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 approve_build request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_approve_build_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: "approve_build", + 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_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CreateBuildTriggerRequest] + # 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::Build::V1::BuildTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # A result object deserialized from the server's reply + def create_build_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_build_trigger_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_build_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::BuildTrigger.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_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetBuildTriggerRequest] + # 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::Build::V1::BuildTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # A result object deserialized from the server's reply + def get_build_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_build_trigger_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_build_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::BuildTrigger.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_build_triggers REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ListBuildTriggersRequest] + # 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::Build::V1::ListBuildTriggersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::ListBuildTriggersResponse] + # A result object deserialized from the server's reply + def list_build_triggers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_build_triggers_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_build_triggers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::ListBuildTriggersResponse.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_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest] + # 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_build_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_build_trigger_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_build_trigger", + 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 update_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest] + # 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::Build::V1::BuildTrigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # A result object deserialized from the server's reply + def update_build_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_build_trigger_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_build_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::BuildTrigger.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the run_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::RunBuildTriggerRequest] + # 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 run_build_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_build_trigger_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: "run_build_trigger", + 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 receive_trigger_webhook REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest] + # 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::Build::V1::ReceiveTriggerWebhookResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] + # A result object deserialized from the server's reply + def receive_trigger_webhook request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_receive_trigger_webhook_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: "receive_trigger_webhook", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CreateWorkerPoolRequest] + # 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_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_worker_pool_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_worker_pool", + 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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetWorkerPoolRequest] + # 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::Build::V1::WorkerPool] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::WorkerPool] + # A result object deserialized from the server's reply + def get_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_worker_pool_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_worker_pool", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::WorkerPool.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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest] + # 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_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_worker_pool_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_worker_pool", + 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_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest] + # 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_worker_pool request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_worker_pool_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_worker_pool", + 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_worker_pools REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ListWorkerPoolsRequest] + # 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::Build::V1::ListWorkerPoolsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::ListWorkerPoolsResponse] + # A result object deserialized from the server's reply + def list_worker_pools request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_worker_pools_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_worker_pools", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::ListWorkerPoolsResponse.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_default_service_account REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest] + # 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::Build::V1::DefaultServiceAccount] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Build::V1::DefaultServiceAccount] + # A result object deserialized from the server's reply + def get_default_service_account request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_default_service_account_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_default_service_account", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Build::V1::DefaultServiceAccount.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_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CreateBuildRequest] + # 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_build_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/projects/{project_id}/builds", + body: "build", + matches: [ + ["project_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/builds", + body: "build", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetBuildRequest] + # 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_build_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/projects/{project_id}/builds/{id}", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_builds REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ListBuildsRequest] + # 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_builds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/projects/{project_id}/builds", + matches: [ + ["project_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/builds", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CancelBuildRequest] + # 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_build_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/projects/{project_id}/builds/{id}:cancel", + body: "*", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the retry_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::RetryBuildRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_retry_build_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/projects/{project_id}/builds/{id}:retry", + body: "*", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:retry", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the approve_build REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ApproveBuildRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_approve_build_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:approve", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/builds/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:approve", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CreateBuildTriggerRequest] + # 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_build_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/projects/{project_id}/triggers", + body: "trigger", + matches: [ + ["project_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/triggers", + body: "trigger", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetBuildTriggerRequest] + # 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_build_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["trigger_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_build_triggers REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ListBuildTriggersRequest] + # 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_build_triggers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/projects/{project_id}/triggers", + matches: [ + ["project_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/triggers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest] + # 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_build_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["trigger_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest] + # 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_build_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}", + body: "trigger", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["trigger_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{trigger.resource_name}", + body: "trigger", + matches: [ + ["trigger.resource_name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_build_trigger REST call + # + # @param request_pb [::Google::Cloud::Build::V1::RunBuildTriggerRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_run_build_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}:run", + body: "source", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["trigger_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:run", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the receive_trigger_webhook REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_receive_trigger_webhook_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/projects/{project_id}/triggers/{trigger}:webhook", + body: "body", + matches: [ + ["project_id", %r{^[^/]+/?$}, false], + ["trigger", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:webhook", + body: "body", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::CreateWorkerPoolRequest] + # 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_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workerPools", + body: "worker_pool", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetWorkerPoolRequest] + # 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_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest] + # 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_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_worker_pool REST call + # + # @param request_pb [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest] + # 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_worker_pool_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{worker_pool.name}", + body: "worker_pool", + matches: [ + ["worker_pool.name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_worker_pools REST call + # + # @param request_pb [::Google::Cloud::Build::V1::ListWorkerPoolsRequest] + # 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_worker_pools_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workerPools", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_default_service_account REST call + # + # @param request_pb [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest] + # 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_default_service_account_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/defaultServiceAccount/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/rest.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/rest.rb new file mode 100644 index 000000000000..94c380db385c --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/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/build/v1/cloud_build/rest" +require "google/cloud/build/v1/version" + +module Google + module Cloud + module Build + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/build/v1/rest" + # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb new file mode 100644 index 000000000000..8018b64452d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/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 Build + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb new file mode 100644 index 000000000000..85a7c8d4ad8c --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb @@ -0,0 +1,138 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/cloudbuild/v1/cloudbuild.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/httpbody_pb' +require 'google/api/resource_pb' +require 'google/api/routing_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/devtools/cloudbuild/v1/cloudbuild.proto\x12\x1dgoogle.devtools.cloudbuild.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"h\n\x1fGetDefaultServiceAccountRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/cloudbuild.googleapis.com/DefaultServiceAccount\"\x82\x02\n\x15\x44\x65\x66\x61ultServiceAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x15service_account_email\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!iam.googleapis.com/ServiceAccount:\x8b\x01\xea\x41\x87\x01\n/cloudbuild.googleapis.com/DefaultServiceAccount\x12=projects/{project}/locations/{location}/defaultServiceAccount2\x15\x64\x65\x66\x61ultServiceAccount\"q\n\x11RetryBuildRequest\x12\x32\n\x04name\x18\x03 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc0\x01\n\x16RunBuildTriggerRequest\x12\x39\n\x04name\x18\x04 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\"\xf4\x01\n\rStorageSource\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x13\n\x06object\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12W\n\x0esource_fetcher\x18\x05 \x01(\x0e\x32:.google.devtools.cloudbuild.v1.StorageSource.SourceFetcherB\x03\xe0\x41\x01\"L\n\rSourceFetcher\x12\x1e\n\x1aSOURCE_FETCHER_UNSPECIFIED\x10\x00\x12\n\n\x06GSUTIL\x10\x01\x12\x0f\n\x0bGCS_FETCHER\x10\x02\"F\n\tGitSource\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x64ir\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08revision\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xc7\x02\n\nRepoSource\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\trepo_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x0b\x62ranch_name\x18\x03 \x01(\tH\x00\x12\x12\n\x08tag_name\x18\x04 \x01(\tH\x00\x12\x14\n\ncommit_sha\x18\x05 \x01(\tH\x00\x12\x10\n\x03\x64ir\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cinvert_regex\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\rsubstitutions\x18\t \x03(\x0b\x32<.google.devtools.cloudbuild.v1.RepoSource.SubstitutionsEntryB\x03\xe0\x41\x01\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08revision\"U\n\x15StorageSourceManifest\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06object\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\ngeneration\x18\x03 \x01(\x03\"\x80\x01\n\x13\x43onnectedRepository\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x10\n\x03\x64ir\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08revision\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x8e\x03\n\x06Source\x12\x46\n\x0estorage_source\x18\x02 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSourceH\x00\x12@\n\x0brepo_source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSourceH\x00\x12>\n\ngit_source\x18\x05 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitSourceH\x00\x12W\n\x17storage_source_manifest\x18\x08 \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifestH\x00\x12W\n\x14\x63onnected_repository\x18\t \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.ConnectedRepositoryB\x03\xe0\x41\x01H\x00\x42\x08\n\x06source\"\x95\x01\n\nBuiltImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64igest\x18\x03 \x01(\t\x12\x41\n\x0bpush_timing\x18\x04 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcf\x01\n\x15UploadedPythonPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xcf\x01\n\x15UploadedMavenArtifact\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xca\x01\n\x10UploadedGoModule\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xcc\x01\n\x12UploadedNpmPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xc5\x04\n\tBuildStep\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\x12\x12\n\nentrypoint\x18\x07 \x01(\t\x12\x12\n\nsecret_env\x18\x08 \x03(\t\x12\x36\n\x07volumes\x18\t \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12<\n\x06timing\x18\n \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12\x41\n\x0bpull_timing\x18\r \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\x06status\x18\x0c \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x15\n\rallow_failure\x18\x0e \x01(\x08\x12\x16\n\texit_code\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x10\x61llow_exit_codes\x18\x12 \x03(\x05\x12\x0e\n\x06script\x18\x13 \x01(\t\x12\"\n\x15\x61utomap_substitutions\x18\x14 \x01(\x08H\x00\x88\x01\x01\x42\x18\n\x16_automap_substitutions\"$\n\x06Volume\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\xa0\x04\n\x07Results\x12\x39\n\x06images\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.BuiltImage\x12\x19\n\x11\x62uild_step_images\x18\x03 \x03(\t\x12\x19\n\x11\x61rtifact_manifest\x18\x04 \x01(\t\x12\x15\n\rnum_artifacts\x18\x05 \x01(\x03\x12\x1a\n\x12\x62uild_step_outputs\x18\x06 \x03(\x0c\x12@\n\x0f\x61rtifact_timing\x18\x07 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan\x12M\n\x0fpython_packages\x18\x08 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedPythonPackage\x12M\n\x0fmaven_artifacts\x18\t \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedMavenArtifact\x12H\n\ngo_modules\x18\n \x03(\x0b\x32/.google.devtools.cloudbuild.v1.UploadedGoModuleB\x03\xe0\x41\x01\x12G\n\x0cnpm_packages\x18\x0c \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.UploadedNpmPackage\"`\n\x0e\x41rtifactResult\x12\x10\n\x08location\x18\x01 \x01(\t\x12<\n\tfile_hash\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\"\xbf\x13\n\x05\x42uild\x12\x11\n\x04name\x18- \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12@\n\x06status\x18\x02 \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x18 \x01(\tB\x03\xe0\x41\x03\x12:\n\x06source\x18\x03 \x01(\x0b\x32%.google.devtools.cloudbuild.v1.SourceB\x03\xe0\x41\x01\x12\x37\n\x05steps\x18\x0b \x03(\x0b\x32(.google.devtools.cloudbuild.v1.BuildStep\x12<\n\x07results\x18\n \x01(\x0b\x32&.google.devtools.cloudbuild.v1.ResultsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x66inish_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06images\x18\r \x03(\t\x12,\n\tqueue_ttl\x18( \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\tartifacts\x18% \x01(\x0b\x32(.google.devtools.cloudbuild.v1.Artifacts\x12\x13\n\x0blogs_bucket\x18\x13 \x01(\t\x12O\n\x11source_provenance\x18\x15 \x01(\x0b\x32/.google.devtools.cloudbuild.v1.SourceProvenanceB\x03\xe0\x41\x03\x12\x1d\n\x10\x62uild_trigger_id\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12<\n\x07options\x18\x17 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildOptions\x12\x14\n\x07log_url\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12N\n\rsubstitutions\x18\x1d \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.Build.SubstitutionsEntry\x12\x0c\n\x04tags\x18\x1f \x03(\t\x12\x36\n\x07secrets\x18 \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Secret\x12\x45\n\x06timing\x18! \x03(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.TimingEntryB\x03\xe0\x41\x03\x12\x43\n\x08\x61pproval\x18, \x01(\x0b\x32,.google.devtools.cloudbuild.v1.BuildApprovalB\x03\xe0\x41\x03\x12?\n\x0fservice_account\x18* \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x41\n\x11\x61vailable_secrets\x18/ \x01(\x0b\x32&.google.devtools.cloudbuild.v1.Secrets\x12\x43\n\x08warnings\x18\x31 \x03(\x0b\x32,.google.devtools.cloudbuild.v1.Build.WarningB\x03\xe0\x41\x03\x12\x41\n\ngit_config\x18\x30 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitConfigB\x03\xe0\x41\x01\x12K\n\x0c\x66\x61ilure_info\x18\x33 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.FailureInfoB\x03\xe0\x41\x03\x12\x44\n\x0c\x64\x65pendencies\x18\x38 \x03(\x0b\x32).google.devtools.cloudbuild.v1.DependencyB\x03\xe0\x41\x01\x1a\xa8\x01\n\x07Warning\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08priority\x18\x02 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.Build.Warning.Priority\"F\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x41LERT\x10\x03\x1a\x9e\x02\n\x0b\x46\x61ilureInfo\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xb2\x01\n\x0b\x46\x61ilureType\x12\x1c\n\x18\x46\x41ILURE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPUSH_FAILED\x10\x01\x12\x18\n\x14PUSH_IMAGE_NOT_FOUND\x10\x02\x12\x17\n\x13PUSH_NOT_AUTHORIZED\x10\x03\x12\x13\n\x0fLOGGING_FAILURE\x10\x04\x12\x13\n\x0fUSER_BUILD_STEP\x10\x05\x12\x17\n\x13\x46\x45TCH_SOURCE_FAILED\x10\x06\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aV\n\x0bTimingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan:\x02\x38\x01\"\x99\x01\n\x06Status\x12\x12\n\x0eSTATUS_UNKNOWN\x10\x00\x12\x0b\n\x07PENDING\x10\n\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07WORKING\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\x0b\n\x07\x46\x41ILURE\x10\x04\x12\x12\n\x0eINTERNAL_ERROR\x10\x05\x12\x0b\n\x07TIMEOUT\x10\x06\x12\r\n\tCANCELLED\x10\x07\x12\x0b\n\x07\x45XPIRED\x10\t:\x8f\x01\xea\x41\x8b\x01\n\x1f\x63loudbuild.googleapis.com/Build\x12!projects/{project}/builds/{build}\x12\x36projects/{project}/locations/{location}/builds/{build}*\x06\x62uilds2\x05\x62uild\"\xd5\x03\n\nDependency\x12\x0f\n\x05\x65mpty\x18\x01 \x01(\x08H\x00\x12S\n\ngit_source\x18\x02 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceDependencyH\x00\x1a\xd1\x01\n\x13GitSourceDependency\x12V\n\nrepository\x18\x01 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceRepositoryB\x03\xe0\x41\x02\x12\x15\n\x08revision\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12recurse_submodules\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x64\x65pth\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tdest_path\x18\x05 \x01(\tB\x03\xe0\x41\x02\x1a\x85\x01\n\x13GitSourceRepository\x12\r\n\x03url\x18\x01 \x01(\tH\x00\x12S\n\x11\x64\x65veloper_connect\x18\x02 \x01(\tB6\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLinkH\x00\x42\n\n\x08repotypeB\x05\n\x03\x64\x65p\"\xb0\x01\n\tGitConfig\x12\x41\n\x04http\x18\x01 \x01(\x0b\x32\x33.google.devtools.cloudbuild.v1.GitConfig.HttpConfig\x1a`\n\nHttpConfig\x12R\n\x19proxy_secret_version_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xb4\x07\n\tArtifacts\x12\x0e\n\x06images\x18\x01 \x03(\t\x12I\n\x07objects\x18\x02 \x01(\x0b\x32\x38.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects\x12O\n\x0fmaven_artifacts\x18\x03 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact\x12J\n\ngo_modules\x18\x04 \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.Artifacts.GoModuleB\x03\xe0\x41\x01\x12O\n\x0fpython_packages\x18\x05 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.PythonPackage\x12I\n\x0cnpm_packages\x18\x06 \x03(\x0b\x32\x33.google.devtools.cloudbuild.v1.Artifacts.NpmPackage\x1ap\n\x0f\x41rtifactObjects\x12\x10\n\x08location\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12<\n\x06timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x1an\n\rMavenArtifact\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x0b\x61rtifact_id\x18\x03 \x01(\t\x12\x10\n\x08group_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x1a\xbf\x01\n\x08GoModule\x12\x1c\n\x0frepository_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13repository_location\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15repository_project_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsource_path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmodule_path\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0emodule_version\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x32\n\rPythonPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x1a;\n\nNpmPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x19\n\x0cpackage_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\"h\n\x08TimeSpan\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"M\n\x16\x42uildOperationMetadata\x12\x33\n\x05\x62uild\x18\x01 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.Build\"\xef\x04\n\x10SourceProvenance\x12M\n\x17resolved_storage_source\x18\x03 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSource\x12G\n\x14resolved_repo_source\x18\x06 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12^\n resolved_storage_source_manifest\x18\t \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifest\x12^\n\x1dresolved_connected_repository\x18\n \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.ConnectedRepositoryB\x03\xe0\x41\x03\x12J\n\x13resolved_git_source\x18\x0b \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitSourceB\x03\xe0\x41\x03\x12Y\n\x0b\x66ile_hashes\x18\x04 \x03(\x0b\x32?.google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntryB\x03\xe0\x41\x03\x1a\\\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes:\x02\x38\x01\"D\n\nFileHashes\x12\x36\n\tfile_hash\x18\x01 \x03(\x0b\x32#.google.devtools.cloudbuild.v1.Hash\"\x9a\x01\n\x04Hash\x12:\n\x04type\x18\x01 \x01(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"G\n\x08HashType\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x10\n\x0cGO_MODULE_H1\x10\x03\x12\n\n\x06SHA512\x10\x04\"\x92\x01\n\x07Secrets\x12J\n\x0esecret_manager\x18\x01 \x03(\x0b\x32\x32.google.devtools.cloudbuild.v1.SecretManagerSecret\x12;\n\x06inline\x18\x02 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.InlineSecret\"\xc5\x01\n\x0cInlineSecret\x12<\n\x0ckms_key_name\x18\x01 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12H\n\x07\x65nv_map\x18\x02 \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.InlineSecret.EnvMapEntry\x1a-\n\x0b\x45nvMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"i\n\x13SecretManagerSecret\x12\x45\n\x0cversion_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x0b\n\x03\x65nv\x18\x02 \x01(\t\"\x9a\x01\n\x06Secret\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\x12H\n\nsecret_env\x18\x03 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.Secret.SecretEnvEntry\x1a\x30\n\x0eSecretEnvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\x9d\x01\n\x12\x43reateBuildRequest\x12\x34\n\x06parent\x18\x04 \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05\x62uild\x18\x02 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildB\x03\xe0\x41\x02\"o\n\x0fGetBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x99\x01\n\x11ListBuildsRequest\x12\x34\n\x06parent\x18\t \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"c\n\x12ListBuildsResponse\x12\x34\n\x06\x62uilds\x18\x01 \x03(\x0b\x32$.google.devtools.cloudbuild.v1.Build\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"r\n\x12\x43\x61ncelBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x13\x41pproveBuildRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0f\x61pproval_result\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResult\"\xb7\x02\n\rBuildApproval\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.BuildApproval.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalConfigB\x03\xe0\x41\x03\x12\x42\n\x06result\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResultB\x03\xe0\x41\x03\"V\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0c\n\x08REJECTED\x10\x03\x12\r\n\tCANCELLED\x10\x05\"+\n\x0e\x41pprovalConfig\x12\x19\n\x11\x61pproval_required\x18\x01 \x01(\x08\"\xa0\x02\n\x0e\x41pprovalResult\x12\x1d\n\x10\x61pprover_account\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rapproval_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x08\x64\x65\x63ision\x18\x04 \x01(\x0e\x32\x36.google.devtools.cloudbuild.v1.ApprovalResult.DecisionB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03url\x18\x06 \x01(\tB\x03\xe0\x41\x01\"@\n\x08\x44\x65\x63ision\x12\x18\n\x14\x44\x45\x43ISION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41PPROVED\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\"\xae\x02\n\rGitRepoSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\nrepository\x18\x06 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12\x0b\n\x03ref\x18\x02 \x01(\t\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12Y\n\x18github_enterprise_config\x18\x04 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xa7\x03\n\rGitFileSource\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12?\n\nrepository\x18\x07 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12\x10\n\x08revision\x18\x04 \x01(\t\x12Y\n\x18github_enterprise_config\x18\x05 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\"d\n\x08RepoType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x1d\n\x19\x43LOUD_SOURCE_REPOSITORIES\x10\x01\x12\n\n\x06GITHUB\x10\x02\x12\x14\n\x10\x42ITBUCKET_SERVER\x10\x03\x12\n\n\x06GITLAB\x10\x04\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xd2\t\n\x0c\x42uildTrigger\x12\x15\n\rresource_name\x18\" \x01(\t\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\n \x01(\t\x12\x0c\n\x04name\x18\x15 \x01(\t\x12\x0c\n\x04tags\x18\x13 \x03(\t\x12\x43\n\x10trigger_template\x18\x07 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12\x41\n\x06github\x18\r \x01(\x0b\x32\x31.google.devtools.cloudbuild.v1.GitHubEventsConfig\x12\x42\n\rpubsub_config\x18\x1d \x01(\x0b\x32+.google.devtools.cloudbuild.v1.PubsubConfig\x12\x44\n\x0ewebhook_config\x18\x1f \x01(\x0b\x32,.google.devtools.cloudbuild.v1.WebhookConfig\x12\x14\n\nautodetect\x18\x12 \x01(\x08H\x00\x12\x35\n\x05\x62uild\x18\x04 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildH\x00\x12\x12\n\x08\x66ilename\x18\x08 \x01(\tH\x00\x12G\n\x0fgit_file_source\x18\x18 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitFileSourceH\x00\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12U\n\rsubstitutions\x18\x0b \x03(\x0b\x32>.google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry\x12\x15\n\rignored_files\x18\x0f \x03(\t\x12\x16\n\x0eincluded_files\x18\x10 \x03(\t\x12\x13\n\x06\x66ilter\x18\x1e \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fsource_to_build\x18\x1a \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitRepoSource\x12?\n\x0fservice_account\x18! \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12U\n\x17repository_event_config\x18\' \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.RepositoryEventConfig\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa2\x01\xea\x41\x9e\x01\n&cloudbuild.googleapis.com/BuildTrigger\x12%projects/{project}/triggers/{trigger}\x12:projects/{project}/locations/{location}/triggers/{trigger}*\x08triggers2\x07triggerB\x10\n\x0e\x62uild_template\"\xb5\x03\n\x15RepositoryEventConfig\x12=\n\nrepository\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x61\n\x0frepository_type\x18\x02 \x01(\x0e\x32\x43.google.devtools.cloudbuild.v1.RepositoryEventConfig.RepositoryTypeB\x03\xe0\x41\x03\x12H\n\x0cpull_request\x18\x03 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x04 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\"k\n\x0eRepositoryType\x12\x1f\n\x1bREPOSITORY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\x15\n\x11GITHUB_ENTERPRISE\x10\x02\x12\x15\n\x11GITLAB_ENTERPRISE\x10\x03\x42\x08\n\x06\x66ilter\"\xdc\x01\n\x12GitHubEventsConfig\x12\x1b\n\x0finstallation_id\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x0c\n\x04name\x18\x07 \x01(\t\x12H\n\x0cpull_request\x18\x04 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x05 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\x42\x07\n\x05\x65vent\"\x82\x03\n\x0cPubsubConfig\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x45\n\x15service_account_email\x18\x03 \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12@\n\x05state\x18\x04 \x01(\x0e\x32\x31.google.devtools.cloudbuild.v1.PubsubConfig.State\"s\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x18\n\x14SUBSCRIPTION_DELETED\x10\x02\x12\x11\n\rTOPIC_DELETED\x10\x03\x12\x1e\n\x1aSUBSCRIPTION_MISCONFIGURED\x10\x04\"\xe3\x01\n\rWebhookConfig\x12\x44\n\x06secret\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x12\x41\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.WebhookConfig.State\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x12\n\x0eSECRET_DELETED\x10\x02\x42\r\n\x0b\x61uth_method\"\x94\x02\n\x11PullRequestFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12X\n\x0f\x63omment_control\x18\x05 \x01(\x0e\x32?.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl\x12\x14\n\x0cinvert_regex\x18\x06 \x01(\x08\"r\n\x0e\x43ommentControl\x12\x15\n\x11\x43OMMENTS_DISABLED\x10\x00\x12\x14\n\x10\x43OMMENTS_ENABLED\x10\x01\x12\x33\n/COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY\x10\x02\x42\t\n\x07git_ref\"N\n\nPushFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12\r\n\x03tag\x18\x03 \x01(\tH\x00\x12\x14\n\x0cinvert_regex\x18\x04 \x01(\x08\x42\t\n\x07git_ref\"\xb4\x01\n\x19\x43reateBuildTriggerRequest\x12;\n\x06parent\x18\x03 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x02 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\"\x85\x01\n\x16GetBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x18ListBuildTriggersRequest\x12;\n\x06parent\x18\x04 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x19ListBuildTriggersResponse\x12=\n\x08triggers\x18\x01 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x88\x01\n\x19\x44\x65leteBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc1\x01\n\x19UpdateBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x03 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa2\x0c\n\x0c\x42uildOptions\x12L\n\x16source_provenance_hash\x18\x01 \x03(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12Y\n\x17requested_verify_option\x18\x02 \x01(\x0e\x32\x38.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption\x12M\n\x0cmachine_type\x18\x03 \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.MachineType\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x03\x12[\n\x13substitution_option\x18\x04 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption\x12\x1d\n\x15\x64ynamic_substitutions\x18\x11 \x01(\x08\x12\x1d\n\x15\x61utomap_substitutions\x18\x16 \x01(\x08\x12\\\n\x14log_streaming_option\x18\x05 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption\x12\x17\n\x0bworker_pool\x18\x07 \x01(\tB\x02\x18\x01\x12I\n\x04pool\x18\x13 \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.BuildOptions.PoolOptionB\x03\xe0\x41\x01\x12H\n\x07logging\x18\x0b \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode\x12\x0b\n\x03\x65nv\x18\x0c \x03(\t\x12\x12\n\nsecret_env\x18\r \x03(\t\x12\x36\n\x07volumes\x18\x0e \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12p\n\x1c\x64\x65\x66\x61ult_logs_bucket_behavior\x18\x15 \x01(\x0e\x32\x45.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehaviorB\x03\xe0\x41\x01\x12&\n\x19\x65nable_structured_logging\x18\x17 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\nPoolOption\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\".\n\x0cVerifyOption\x12\x10\n\x0cNOT_VERIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\"w\n\x0bMachineType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cN1_HIGHCPU_8\x10\x01\x12\x11\n\rN1_HIGHCPU_32\x10\x02\x12\x10\n\x0c\x45\x32_HIGHCPU_8\x10\x05\x12\x11\n\rE2_HIGHCPU_32\x10\x06\x12\r\n\tE2_MEDIUM\x10\x07\"5\n\x12SubstitutionOption\x12\x0e\n\nMUST_MATCH\x10\x00\x12\x0f\n\x0b\x41LLOW_LOOSE\x10\x01\"G\n\x12LogStreamingOption\x12\x12\n\x0eSTREAM_DEFAULT\x10\x00\x12\r\n\tSTREAM_ON\x10\x01\x12\x0e\n\nSTREAM_OFF\x10\x02\"|\n\x0bLoggingMode\x12\x17\n\x13LOGGING_UNSPECIFIED\x10\x00\x12\n\n\x06LEGACY\x10\x01\x12\x0c\n\x08GCS_ONLY\x10\x02\x12\x18\n\x10STACKDRIVER_ONLY\x10\x03\x1a\x02\x08\x01\x12\x16\n\x12\x43LOUD_LOGGING_ONLY\x10\x05\x12\x08\n\x04NONE\x10\x04\"|\n\x19\x44\x65\x66\x61ultLogsBucketBehavior\x12,\n(DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x1e\n\x1aREGIONAL_USER_OWNED_BUCKET\x10\x01\x12\x11\n\rLEGACY_BUCKET\x10\x02\"\x85\x01\n\x1cReceiveTriggerWebhookRequest\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\"\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x14.google.api.HttpBody\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0f\n\x07trigger\x18\x03 \x01(\t\x12\x0e\n\x06secret\x18\x04 \x01(\t\"\x1f\n\x1dReceiveTriggerWebhookResponse\"\x8e\x04\n\x16GitHubEnterpriseConfig\x12\x0c\n\x04name\x18\x07 \x01(\t\x12\x10\n\x08host_url\x18\x03 \x01(\t\x12\x13\n\x06\x61pp_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0bwebhook_key\x18\x08 \x01(\t\x12>\n\x0epeered_network\x18\t \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12L\n\x07secrets\x18\n \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.GitHubEnterpriseSecretsB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06ssl_ca\x18\x0c \x01(\tB\x03\xe0\x41\x01:\xb5\x01\xea\x41\xb1\x01\n0cloudbuild.googleapis.com/GithubEnterpriseConfig\x12\x33projects/{project}/githubEnterpriseConfigs/{config}\x12Hprojects/{project}/locations/{location}/githubEnterpriseConfigs/{config}\"\xed\x02\n\x17GitHubEnterpriseSecrets\x12Q\n\x18private_key_version_name\x18\x05 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12T\n\x1bwebhook_secret_version_name\x18\x06 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12R\n\x19oauth_secret_version_name\x18\x07 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12U\n\x1coauth_client_id_version_name\x18\x08 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x96\x06\n\nWorkerPool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32:.google.devtools.cloudbuild.v1.WorkerPool.AnnotationsEntry\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\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32/.google.devtools.cloudbuild.v1.WorkerPool.StateB\x03\xe0\x41\x03\x12T\n\x16private_pool_v1_config\x18\x0c \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.PrivatePoolV1ConfigH\x00\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x89\x01\xea\x41\x85\x01\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}*\x0bworkerPools2\nworkerPoolR\x01\x01\x42\x08\n\x06\x63onfig\"\xba\x07\n\x13PrivatePoolV1Config\x12V\n\rworker_config\x18\x01 \x01(\x0b\x32?.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig\x12X\n\x0enetwork_config\x18\x02 \x01(\x0b\x32@.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig\x12n\n\x17private_service_connect\x18\x05 \x01(\x0b\x32H.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnectB\x03\xe0\x41\x05\x1a\x90\x01\n\x0cWorkerConfig\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x03\x12.\n\x1c\x65nable_nested_virtualization\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualization\x1a\xb6\x02\n\rNetworkConfig\x12\x41\n\x0epeered_network\x18\x01 \x01(\tB)\xe0\x41\x05\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x64\n\regress_option\x18\x02 \x01(\x0e\x32M.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption\x12$\n\x17peered_network_ip_range\x18\x03 \x01(\tB\x03\xe0\x41\x05\"V\n\x0c\x45gressOption\x12\x1d\n\x19\x45GRESS_OPTION_UNSPECIFIED\x10\x00\x12\x14\n\x10NO_PUBLIC_EGRESS\x10\x01\x12\x11\n\rPUBLIC_EGRESS\x10\x02\x1a\xb4\x01\n\x15PrivateServiceConnect\x12O\n\x12network_attachment\x18\x01 \x01(\tB3\xe0\x41\x05\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\x12*\n\x1apublic_ip_address_disabled\x18\x02 \x01(\x08\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11route_all_traffic\x18\x03 \x01(\x08\x42\x03\xe0\x41\x05\"\xd0\x01\n\x17\x43reateWorkerPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x0bworker_pool\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12\x1e\n\x0eworker_pool_id\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"R\n\x14GetWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\"\x96\x01\n\x17\x44\x65leteWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xab\x01\n\x17UpdateWorkerPoolRequest\x12\x43\n\x0bworker_pool\x18\x01 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"z\n\x16ListWorkerPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x17ListWorkerPoolsResponse\x12?\n\x0cworker_pools\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n!CreateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!UpdateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!DeleteWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xf9-\n\nCloudBuild\x12\xb7\x02\n\x0b\x43reateBuild\x12\x31.google.devtools.cloudbuild.v1.CreateBuildRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x10project_id,build\xda\x41\x06parent\x82\xd3\xe4\x93\x02^\" /v1/projects/{project_id}/builds:\x05\x62uildZ3\"*/v1/{parent=projects/*/locations/*}/builds:\x05\x62uild\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x8f\x02\n\x08GetBuild\x12..google.devtools.cloudbuild.v1.GetBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xac\x01\xda\x41\rproject_id,id\xda\x41\x04name\x82\xd3\xe4\x93\x02U\x12%/v1/projects/{project_id}/builds/{id}Z,\x12*/v1/{name=projects/*/locations/*/builds/*}\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\x91\x02\n\nListBuilds\x12\x30.google.devtools.cloudbuild.v1.ListBuildsRequest\x1a\x31.google.devtools.cloudbuild.v1.ListBuildsResponse\"\x9d\x01\xda\x41\x11project_id,filter\x82\xd3\xe4\x93\x02P\x12 /v1/projects/{project_id}/buildsZ,\x12*/v1/{parent=projects/*/locations/*}/builds\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa9\x02\n\x0b\x43\x61ncelBuild\x12\x31.google.devtools.cloudbuild.v1.CancelBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xc0\x01\xda\x41\rproject_id,id\xda\x41\x04name\x82\xd3\xe4\x93\x02i\",/v1/projects/{project_id}/builds/{id}:cancel:\x01*Z6\"1/v1/{name=projects/*/locations/*/builds/*}:cancel:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xc0\x02\n\nRetryBuild\x12\x30.google.devtools.cloudbuild.v1.RetryBuildRequest\x1a\x1d.google.longrunning.Operation\"\xe0\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\rproject_id,id\xda\x41\x04name\x82\xd3\xe4\x93\x02g\"+/v1/projects/{project_id}/builds/{id}:retry:\x01*Z5\"0/v1/{name=projects/*/locations/*/builds/*}:retry:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xc1\x02\n\x0c\x41pproveBuild\x12\x32.google.devtools.cloudbuild.v1.ApproveBuildRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x14name,approval_result\x82\xd3\xe4\x93\x02\x64\"&/v1/{name=projects/*/builds/*}:approve:\x01*Z7\"2/v1/{name=projects/*/locations/*/builds/*}:approve:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xbb\x02\n\x12\x43reateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xbd\x01\xda\x41\x12project_id,trigger\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x66\"\"/v1/projects/{project_id}/triggers:\x07triggerZ7\",/v1/{parent=projects/*/locations/*}/triggers:\x07trigger\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xba\x02\n\x0fGetBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.GetBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xc2\x01\xda\x41\x15project_id,trigger_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61\x12//v1/projects/{project_id}/triggers/{trigger_id}Z.\x12,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xa3\x02\n\x11ListBuildTriggers\x12\x37.google.devtools.cloudbuild.v1.ListBuildTriggersRequest\x1a\x38.google.devtools.cloudbuild.v1.ListBuildTriggersResponse\"\x9a\x01\xda\x41\nproject_id\x82\xd3\xe4\x93\x02T\x12\"/v1/projects/{project_id}/triggersZ.\x12,/v1/{parent=projects/*/locations/*}/triggers\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xab\x02\n\x12\x44\x65leteBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest\x1a\x16.google.protobuf.Empty\"\xc2\x01\xda\x41\x15project_id,trigger_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61*//v1/projects/{project_id}/triggers/{trigger_id}Z.*,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xf6\x02\n\x12UpdateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xf8\x01\xda\x41\x1dproject_id,trigger_id,trigger\x82\xd3\xe4\x93\x02\x84\x01\x32//v1/projects/{project_id}/triggers/{trigger_id}:\x07triggerZH2=/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}:\x07trigger\x8a\xd3\xe4\x93\x02G\x12\x45\n\x15trigger.resource_name\x12,projects/*/locations/{location=*}/triggers/*\x12\xe1\x02\n\x0fRunBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.RunBuildTriggerRequest\x1a\x1d.google.longrunning.Operation\"\xf7\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x1cproject_id,trigger_id,source\x82\xd3\xe4\x93\x02t\"3/v1/projects/{project_id}/triggers/{trigger_id}:run:\x06sourceZ5\"0/v1/{name=projects/*/locations/*/triggers/*}:run:\x01*\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\x95\x02\n\x15ReceiveTriggerWebhook\x12;.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest\x1a<.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse\"\x80\x01\x82\xd3\xe4\x93\x02z\"4/v1/projects/{project_id}/triggers/{trigger}:webhook:\x04\x62odyZ<\"4/v1/{name=projects/*/locations/*/triggers/*}:webhook:\x04\x62ody\x12\xb9\x02\n\x10\x43reateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xcd\x01\xca\x41/\n\nWorkerPool\x12!CreateWorkerPoolOperationMetadata\xda\x41!parent,worker_pool,worker_pool_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/workerPools:\x0bworker_pool\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xee\x01\n\rGetWorkerPool\x12\x33.google.devtools.cloudbuild.v1.GetWorkerPoolRequest\x1a).google.devtools.cloudbuild.v1.WorkerPool\"}\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xa6\x02\n\x10\x44\x65leteWorkerPool\x12\x36.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xba\x01\xca\x41:\n\x15google.protobuf.Empty\x12!DeleteWorkerPoolOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xd3\x02\n\x10UpdateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xe7\x01\xca\x41/\n\nWorkerPool\x12!UpdateWorkerPoolOperationMetadata\xda\x41\x17worker_pool,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{worker_pool.name=projects/*/locations/*/workerPools/*}:\x0bworker_pool\x8a\xd3\xe4\x93\x02\x45\x12\x43\n\x10worker_pool.name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xf5\x01\n\x0fListWorkerPools\x12\x35.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest\x1a\x36.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse\"s\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/workerPools\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa0\x02\n\x18GetDefaultServiceAccount\x12>.google.devtools.cloudbuild.v1.GetDefaultServiceAccountRequest\x1a\x34.google.devtools.cloudbuild.v1.DefaultServiceAccount\"\x8d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/defaultServiceAccount}\x8a\xd3\xe4\x93\x02\x41\x12?\n\x04name\x12\x37projects/*/locations/{location=*}/defaultServiceAccount\x1aM\xca\x41\x19\x63loudbuild.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\n\n\x18\x63om.google.cloudbuild.v1P\x01ZAcloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V1\xca\x02\x15Google\\Cloud\\Build\\V1\xea\x02\x18Google::Cloud::Build::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41\x66\n gkehub.googleapis.com/Membership\x12\x42projects/{project}/locations/{location}/memberships/{cluster_name}\xea\x41p\n!cloudkms.googleapis.com/CryptoKey\x12Kprojects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}\xea\x41U\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}\xea\x41\x9e\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}\xea\x41\x82\x01\n$cloudbuild.googleapis.com/Repository\x12Zprojects/{project}/locations/{location}/connections/{connection}/repositories/{repository}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Build + module V1 + GetDefaultServiceAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetDefaultServiceAccountRequest").msgclass + DefaultServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DefaultServiceAccount").msgclass + RetryBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RetryBuildRequest").msgclass + RunBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RunBuildTriggerRequest").msgclass + StorageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSource").msgclass + StorageSource::SourceFetcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSource.SourceFetcher").enummodule + GitSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitSource").msgclass + RepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RepoSource").msgclass + StorageSourceManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSourceManifest").msgclass + ConnectedRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ConnectedRepository").msgclass + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Source").msgclass + BuiltImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuiltImage").msgclass + UploadedPythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedPythonPackage").msgclass + UploadedMavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedMavenArtifact").msgclass + UploadedGoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedGoModule").msgclass + UploadedNpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedNpmPackage").msgclass + BuildStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildStep").msgclass + Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Volume").msgclass + Results = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Results").msgclass + ArtifactResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ArtifactResult").msgclass + Build = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build").msgclass + Build::Warning = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.Warning").msgclass + Build::Warning::Priority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.Warning.Priority").enummodule + Build::FailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.FailureInfo").msgclass + Build::FailureInfo::FailureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType").enummodule + Build::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.Status").enummodule + Dependency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Dependency").msgclass + Dependency::GitSourceDependency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Dependency.GitSourceDependency").msgclass + Dependency::GitSourceRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Dependency.GitSourceRepository").msgclass + GitConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitConfig").msgclass + GitConfig::HttpConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitConfig.HttpConfig").msgclass + Artifacts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts").msgclass + Artifacts::ArtifactObjects = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects").msgclass + Artifacts::MavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.MavenArtifact").msgclass + Artifacts::GoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.GoModule").msgclass + Artifacts::PythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.PythonPackage").msgclass + Artifacts::NpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.NpmPackage").msgclass + TimeSpan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.TimeSpan").msgclass + BuildOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOperationMetadata").msgclass + SourceProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.SourceProvenance").msgclass + FileHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.FileHashes").msgclass + Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash").msgclass + Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash.HashType").enummodule + Secrets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secrets").msgclass + InlineSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.InlineSecret").msgclass + SecretManagerSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.SecretManagerSecret").msgclass + Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secret").msgclass + CreateBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateBuildRequest").msgclass + GetBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetBuildRequest").msgclass + ListBuildsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildsRequest").msgclass + ListBuildsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildsResponse").msgclass + CancelBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CancelBuildRequest").msgclass + ApproveBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApproveBuildRequest").msgclass + BuildApproval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildApproval").msgclass + BuildApproval::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildApproval.State").enummodule + ApprovalConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApprovalConfig").msgclass + ApprovalResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApprovalResult").msgclass + ApprovalResult::Decision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApprovalResult.Decision").enummodule + GitRepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitRepoSource").msgclass + GitFileSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitFileSource").msgclass + GitFileSource::RepoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitFileSource.RepoType").enummodule + BuildTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildTrigger").msgclass + RepositoryEventConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RepositoryEventConfig").msgclass + RepositoryEventConfig::RepositoryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RepositoryEventConfig.RepositoryType").enummodule + GitHubEventsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEventsConfig").msgclass + PubsubConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig").msgclass + PubsubConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig.State").enummodule + WebhookConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WebhookConfig").msgclass + WebhookConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WebhookConfig.State").enummodule + PullRequestFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter").msgclass + PullRequestFilter::CommentControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl").enummodule + PushFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PushFilter").msgclass + CreateBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateBuildTriggerRequest").msgclass + GetBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetBuildTriggerRequest").msgclass + ListBuildTriggersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildTriggersRequest").msgclass + ListBuildTriggersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildTriggersResponse").msgclass + DeleteBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest").msgclass + UpdateBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest").msgclass + BuildOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions").msgclass + BuildOptions::PoolOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.PoolOption").msgclass + BuildOptions::VerifyOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.VerifyOption").enummodule + BuildOptions::MachineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.MachineType").enummodule + BuildOptions::SubstitutionOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption").enummodule + BuildOptions::LogStreamingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption").enummodule + BuildOptions::LoggingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LoggingMode").enummodule + BuildOptions::DefaultLogsBucketBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior").enummodule + ReceiveTriggerWebhookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest").msgclass + ReceiveTriggerWebhookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse").msgclass + GitHubEnterpriseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEnterpriseConfig").msgclass + GitHubEnterpriseSecrets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets").msgclass + WorkerPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool").msgclass + WorkerPool::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.State").enummodule + PrivatePoolV1Config = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config").msgclass + PrivatePoolV1Config::WorkerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig").msgclass + PrivatePoolV1Config::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig").msgclass + PrivatePoolV1Config::NetworkConfig::EgressOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption").enummodule + PrivatePoolV1Config::PrivateServiceConnect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect").msgclass + CreateWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateWorkerPoolRequest").msgclass + GetWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetWorkerPoolRequest").msgclass + DeleteWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest").msgclass + UpdateWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest").msgclass + ListWorkerPoolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListWorkerPoolsRequest").msgclass + ListWorkerPoolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListWorkerPoolsResponse").msgclass + CreateWorkerPoolOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata").msgclass + UpdateWorkerPoolOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata").msgclass + DeleteWorkerPoolOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb new file mode 100644 index 000000000000..5e7f0d45e06b --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb @@ -0,0 +1,136 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/cloudbuild/v1/cloudbuild.proto for package 'Google.Cloud.Build.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/devtools/cloudbuild/v1/cloudbuild_pb' + +module Google + module Cloud + module Build + module V1 + module CloudBuild + # Creates and manages builds on Google Cloud Platform. + # + # The main concept used by this API is a `Build`, which describes the location + # of the source to build, how to build the source, and where to store the + # built artifacts, if any. + # + # A user can list previously-requested builds or get builds by their ID to + # determine the status of the build. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.cloudbuild.v1.CloudBuild' + + # Starts a build with the specified configuration. + # + # This method returns a long-running `Operation`, which includes the build + # ID. Pass the build ID to `GetBuild` to determine the build status (such as + # `SUCCESS` or `FAILURE`). + rpc :CreateBuild, ::Google::Cloud::Build::V1::CreateBuildRequest, ::Google::Longrunning::Operation + # Returns information about a previously requested build. + # + # The `Build` that is returned includes its status (such as `SUCCESS`, + # `FAILURE`, or `WORKING`), and timing information. + rpc :GetBuild, ::Google::Cloud::Build::V1::GetBuildRequest, ::Google::Cloud::Build::V1::Build + # Lists previously requested builds. + # + # Previously requested builds may still be in-progress, or may have finished + # successfully or unsuccessfully. + rpc :ListBuilds, ::Google::Cloud::Build::V1::ListBuildsRequest, ::Google::Cloud::Build::V1::ListBuildsResponse + # Cancels a build in progress. + rpc :CancelBuild, ::Google::Cloud::Build::V1::CancelBuildRequest, ::Google::Cloud::Build::V1::Build + # Creates a new build based on the specified build. + # + # This method creates a new build using the original build request, which may + # or may not result in an identical build. + # + # For triggered builds: + # + # * Triggered builds resolve to a precise revision; therefore a retry of a + # triggered build will result in a build that uses the same revision. + # + # For non-triggered builds that specify `RepoSource`: + # + # * If the original build built from the tip of a branch, the retried build + # will build from the tip of that branch, which may not be the same revision + # as the original build. + # * If the original build specified a commit sha or revision ID, the retried + # build will use the identical source. + # + # For builds that specify `StorageSource`: + # + # * If the original build pulled source from Cloud Storage without + # specifying the generation of the object, the new build will use the current + # object, which may be different from the original build source. + # * If the original build pulled source from Cloud Storage and specified the + # generation of the object, the new build will attempt to use the same + # object, which may or may not be available depending on the bucket's + # lifecycle management settings. + rpc :RetryBuild, ::Google::Cloud::Build::V1::RetryBuildRequest, ::Google::Longrunning::Operation + # Approves or rejects a pending build. + # + # If approved, the returned long-running operation (LRO) will be analogous to + # the LRO returned from a CreateBuild call. + # + # If rejected, the returned LRO will be immediately done. + rpc :ApproveBuild, ::Google::Cloud::Build::V1::ApproveBuildRequest, ::Google::Longrunning::Operation + # Creates a new `BuildTrigger`. + rpc :CreateBuildTrigger, ::Google::Cloud::Build::V1::CreateBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger + # Returns information about a `BuildTrigger`. + rpc :GetBuildTrigger, ::Google::Cloud::Build::V1::GetBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger + # Lists existing `BuildTrigger`s. + rpc :ListBuildTriggers, ::Google::Cloud::Build::V1::ListBuildTriggersRequest, ::Google::Cloud::Build::V1::ListBuildTriggersResponse + # Deletes a `BuildTrigger` by its project ID and trigger ID. + rpc :DeleteBuildTrigger, ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, ::Google::Protobuf::Empty + # Updates a `BuildTrigger` by its project ID and trigger ID. + rpc :UpdateBuildTrigger, ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger + # Runs a `BuildTrigger` at a particular source revision. + # + # To run a regional or global trigger, use the POST request + # that includes the location endpoint in the path (ex. + # v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The + # POST request that does not include the location endpoint in the path can + # only be used when running global triggers. + rpc :RunBuildTrigger, ::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Google::Longrunning::Operation + # ReceiveTriggerWebhook [Experimental] is called when the API receives a + # webhook request targeted at a specific trigger. + rpc :ReceiveTriggerWebhook, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse + # Creates a `WorkerPool`. + rpc :CreateWorkerPool, ::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Google::Longrunning::Operation + # Returns details of a `WorkerPool`. + rpc :GetWorkerPool, ::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool + # Deletes a `WorkerPool`. + rpc :DeleteWorkerPool, ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Google::Longrunning::Operation + # Updates a `WorkerPool`. + rpc :UpdateWorkerPool, ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Google::Longrunning::Operation + # Lists `WorkerPool`s. + rpc :ListWorkerPools, ::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Google::Cloud::Build::V1::ListWorkerPoolsResponse + # Returns the `DefaultServiceAccount` used by the project. + rpc :GetDefaultServiceAccount, ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, ::Google::Cloud::Build::V1::DefaultServiceAccount + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-build-v1/proto_docs/README.md new file mode 100644 index 000000000000..6b09ae66a7cc --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Build 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-build-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/httpbody.rb new file mode 100644 index 000000000000..938f7ac6b2fd --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/httpbody.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Message that represents an arbitrary HTTP body. It should only be used for + # payload formats that can't be represented as JSON, such as raw binary or + # an HTML page. + # + # + # This message can be used both in streaming and non-streaming API methods in + # the request as well as the response. + # + # It can be used as a top-level request field, which is convenient if one + # wants to extract parameters from either the URL or HTTP template into the + # request fields and also want access to the raw HTTP body. + # + # Example: + # + # message GetResourceRequest { + # // A unique request id. + # string request_id = 1; + # + # // The raw HTTP body is bound to this field. + # google.api.HttpBody http_body = 2; + # + # } + # + # service ResourceService { + # rpc GetResource(GetResourceRequest) + # returns (google.api.HttpBody); + # rpc UpdateResource(google.api.HttpBody) + # returns (google.protobuf.Empty); + # + # } + # + # Example with streaming methods: + # + # service CaldavService { + # rpc GetCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # rpc UpdateCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # + # } + # + # Use of this type only changes how the request and response bodies are + # handled, all other features will continue to work unchanged. + # @!attribute [rw] content_type + # @return [::String] + # The HTTP Content-Type header value specifying the content type of the body. + # @!attribute [rw] data + # @return [::String] + # The HTTP request/response body as raw binary. + # @!attribute [rw] extensions + # @return [::Array<::Google::Protobuf::Any>] + # Application specific response metadata. Must be set in the first response + # for streaming APIs. + class HttpBody + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..6d71a9430253 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,463 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/
` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb new file mode 100644 index 000000000000..076561275d87 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb @@ -0,0 +1,2751 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Build + module V1 + # Returns the default service account that will be used for `Builds`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `DefaultServiceAccount` to retrieve. + # Format: + # `projects/{project}/locations/{location}/defaultServiceAccount` + class GetDefaultServiceAccountRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The default service account used for `Builds`. + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `projects/{project}/locations/{location}/defaultServiceAccount` + # @!attribute [r] service_account_email + # @return [::String] + # Output only. The email address of the service account identity that will be + # used for a build by default. + # + # This is returned in the format + # `projects/{project}/serviceAccounts/{service_account}` where + # `{service_account}` could be the legacy Cloud Build SA, in the format + # [PROJECT_NUMBER]@cloudbuild.gserviceaccount.com or the Compute SA, in the + # format [PROJECT_NUMBER]-compute@developer.gserviceaccount.com. + # + # If no service account will be used by default, this will be empty. + class DefaultServiceAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a build to retry. + # @!attribute [rw] name + # @return [::String] + # The name of the `Build` to retry. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project. + # @!attribute [rw] id + # @return [::String] + # Required. Build ID of the original build. + class RetryBuildRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies a build trigger to run and the source to use. + # @!attribute [rw] name + # @return [::String] + # The name of the `Trigger` to run. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project. + # @!attribute [rw] trigger_id + # @return [::String] + # Required. ID of the trigger. + # @!attribute [rw] source + # @return [::Google::Cloud::Build::V1::RepoSource] + # Source to build against this trigger. + # Branch and tag names cannot consist of regular expressions. + class RunBuildTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of the source in an archive file in Cloud Storage. + # @!attribute [rw] bucket + # @return [::String] + # Cloud Storage bucket containing the source (see + # [Bucket Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + # @!attribute [rw] object + # @return [::String] + # Required. Cloud Storage object containing the source. + # + # This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) + # containing source to build. + # @!attribute [rw] generation + # @return [::Integer] + # Optional. Cloud Storage generation for the object. If the generation is + # omitted, the latest generation will be used. + # @!attribute [rw] source_fetcher + # @return [::Google::Cloud::Build::V1::StorageSource::SourceFetcher] + # Optional. Option to specify the tool to fetch the source file for the + # build. + class StorageSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the tool to fetch the source file for the build. + module SourceFetcher + # Unspecified defaults to GSUTIL. + SOURCE_FETCHER_UNSPECIFIED = 0 + + # Use the "gsutil" tool to download the source file. + GSUTIL = 1 + + # Use the Cloud Storage Fetcher tool to download the source file. + GCS_FETCHER = 2 + end + end + + # Location of the source in any accessible Git repository. + # @!attribute [rw] url + # @return [::String] + # Required. Location of the Git repo to build. + # + # This will be used as a `git remote`, see + # https://git-scm.com/docs/git-remote. + # @!attribute [rw] dir + # @return [::String] + # Optional. Directory, relative to the source root, in which to run the + # build. + # + # This must be a relative path. If a step's `dir` is specified and is an + # absolute path, this value is ignored for that step's execution. + # @!attribute [rw] revision + # @return [::String] + # Optional. The revision to fetch from the Git repository such as a branch, a + # tag, a commit SHA, or any Git ref. + # + # Cloud Build uses `git fetch` to fetch the revision from the Git + # repository; therefore make sure that the string you provide for `revision` + # is parsable by the command. For information on string values accepted by + # `git fetch`, see + # https://git-scm.com/docs/gitrevisions#_specifying_revisions. For + # information on `git fetch`, see https://git-scm.com/docs/git-fetch. + class GitSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of the source in a Google Cloud Source Repository. + # @!attribute [rw] project_id + # @return [::String] + # Optional. ID of the project that owns the Cloud Source Repository. If + # omitted, the project ID requesting the build is assumed. + # @!attribute [rw] repo_name + # @return [::String] + # Required. Name of the Cloud Source Repository. + # @!attribute [rw] branch_name + # @return [::String] + # Regex matching branches to build. + # + # The syntax of the regular expressions accepted is the syntax accepted by + # RE2 and described at https://github.com/google/re2/wiki/Syntax + # + # Note: The following fields are mutually exclusive: `branch_name`, `tag_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tag_name + # @return [::String] + # Regex matching tags to build. + # + # The syntax of the regular expressions accepted is the syntax accepted by + # RE2 and described at https://github.com/google/re2/wiki/Syntax + # + # Note: The following fields are mutually exclusive: `tag_name`, `branch_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] commit_sha + # @return [::String] + # Explicit commit SHA to build. + # + # Note: The following fields are mutually exclusive: `commit_sha`, `branch_name`, `tag_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] dir + # @return [::String] + # Optional. Directory, relative to the source root, in which to run the + # build. + # + # This must be a relative path. If a step's `dir` is specified and is an + # absolute path, this value is ignored for that step's execution. + # @!attribute [rw] invert_regex + # @return [::Boolean] + # Optional. Only trigger a build if the revision regex does NOT match the + # revision regex. + # @!attribute [rw] substitutions + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Substitutions to use in a triggered build. + # Should only be used with RunBuildTrigger + class RepoSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SubstitutionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Location of the source manifest in Cloud Storage. + # This feature is in Preview; see description + # [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + # @!attribute [rw] bucket + # @return [::String] + # Required. Cloud Storage bucket containing the source manifest (see [Bucket + # Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + # @!attribute [rw] object + # @return [::String] + # Required. Cloud Storage object containing the source manifest. + # + # This object must be a JSON file. + # @!attribute [rw] generation + # @return [::Integer] + # Cloud Storage generation for the object. If the generation is + # omitted, the latest generation will be used. + class StorageSourceManifest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of the source in a 2nd-gen Google Cloud Build repository resource. + # @!attribute [rw] repository + # @return [::String] + # Required. Name of the Google Cloud Build repository, formatted as + # `projects/*/locations/*/connections/*/repositories/*`. + # @!attribute [rw] dir + # @return [::String] + # Optional. Directory, relative to the source root, in which to run the + # build. + # @!attribute [rw] revision + # @return [::String] + # Required. The revision to fetch from the Git repository such as a branch, a + # tag, a commit SHA, or any Git ref. + class ConnectedRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of the source in a supported storage service. + # @!attribute [rw] storage_source + # @return [::Google::Cloud::Build::V1::StorageSource] + # If provided, get the source from this location in Cloud Storage. + # + # Note: The following fields are mutually exclusive: `storage_source`, `repo_source`, `git_source`, `storage_source_manifest`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] repo_source + # @return [::Google::Cloud::Build::V1::RepoSource] + # If provided, get the source from this location in a Cloud Source + # Repository. + # + # Note: The following fields are mutually exclusive: `repo_source`, `storage_source`, `git_source`, `storage_source_manifest`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] git_source + # @return [::Google::Cloud::Build::V1::GitSource] + # If provided, get the source from this Git repository. + # + # Note: The following fields are mutually exclusive: `git_source`, `storage_source`, `repo_source`, `storage_source_manifest`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] storage_source_manifest + # @return [::Google::Cloud::Build::V1::StorageSourceManifest] + # If provided, get the source from this manifest in Cloud Storage. + # This feature is in Preview; see description + # [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). + # + # Note: The following fields are mutually exclusive: `storage_source_manifest`, `storage_source`, `repo_source`, `git_source`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] connected_repository + # @return [::Google::Cloud::Build::V1::ConnectedRepository] + # Optional. If provided, get the source from this 2nd-gen Google Cloud + # Build repository resource. + # + # Note: The following fields are mutually exclusive: `connected_repository`, `storage_source`, `repo_source`, `git_source`, `storage_source_manifest`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Source + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An image built by the pipeline. + # @!attribute [rw] name + # @return [::String] + # Name used to push the container image to Google Container Registry, as + # presented to `docker push`. + # @!attribute [rw] digest + # @return [::String] + # Docker Registry 2.0 digest. + # @!attribute [r] push_timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for pushing the specified image. + # @!attribute [r] artifact_registry_package + # @return [::String] + # Output only. Path to the artifact in Artifact Registry. + class BuiltImage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Artifact uploaded using the PythonPackage directive. + # @!attribute [rw] uri + # @return [::String] + # URI of the uploaded artifact. + # @!attribute [rw] file_hashes + # @return [::Google::Cloud::Build::V1::FileHashes] + # Hash types and values of the Python Artifact. + # @!attribute [r] push_timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for pushing the specified artifact. + # @!attribute [r] artifact_registry_package + # @return [::String] + # Output only. Path to the artifact in Artifact Registry. + class UploadedPythonPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Maven artifact uploaded using the MavenArtifact directive. + # @!attribute [rw] uri + # @return [::String] + # URI of the uploaded artifact. + # @!attribute [rw] file_hashes + # @return [::Google::Cloud::Build::V1::FileHashes] + # Hash types and values of the Maven Artifact. + # @!attribute [r] push_timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for pushing the specified artifact. + # @!attribute [r] artifact_registry_package + # @return [::String] + # Output only. Path to the artifact in Artifact Registry. + class UploadedMavenArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Go module artifact uploaded to Artifact Registry using the GoModule + # directive. + # @!attribute [rw] uri + # @return [::String] + # URI of the uploaded artifact. + # @!attribute [rw] file_hashes + # @return [::Google::Cloud::Build::V1::FileHashes] + # Hash types and values of the Go Module Artifact. + # @!attribute [r] push_timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for pushing the specified artifact. + # @!attribute [r] artifact_registry_package + # @return [::String] + # Output only. Path to the artifact in Artifact Registry. + class UploadedGoModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An npm package uploaded to Artifact Registry using the NpmPackage + # directive. + # @!attribute [rw] uri + # @return [::String] + # URI of the uploaded npm package. + # @!attribute [rw] file_hashes + # @return [::Google::Cloud::Build::V1::FileHashes] + # Hash types and values of the npm package. + # @!attribute [r] push_timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for pushing the specified artifact. + # @!attribute [r] artifact_registry_package + # @return [::String] + # Output only. Path to the artifact in Artifact Registry. + class UploadedNpmPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A step in the build pipeline. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the container image that will run this particular + # build step. + # + # If the image is available in the host's Docker daemon's cache, it + # will be run directly. If not, the host will attempt to pull the image + # first, using the builder service account's credentials if necessary. + # + # The Docker daemon's cache will already have the latest versions of all of + # the officially supported build steps + # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). + # The Docker daemon will also have cached many of the layers for some popular + # images, like "ubuntu", "debian", but they will be refreshed at the time you + # attempt to use them. + # + # If you built an image in a previous build step, it will be stored in the + # host's Docker daemon's cache and is available to use as the name for a + # later build step. + # @!attribute [rw] env + # @return [::Array<::String>] + # A list of environment variable definitions to be used when running a step. + # + # The elements are of the form "KEY=VALUE" for the environment variable "KEY" + # being given the value "VALUE". + # @!attribute [rw] args + # @return [::Array<::String>] + # A list of arguments that will be presented to the step when it is started. + # + # If the image used to run the step's container has an entrypoint, the `args` + # are used as arguments to that entrypoint. If the image does not define + # an entrypoint, the first element in args is used as the entrypoint, + # and the remainder will be used as arguments. + # @!attribute [rw] dir + # @return [::String] + # Working directory to use when running this step's container. + # + # If this value is a relative path, it is relative to the build's working + # directory. If this value is absolute, it may be outside the build's working + # directory, in which case the contents of the path may not be persisted + # across build step executions, unless a `volume` for that path is specified. + # + # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, + # which specifies an absolute path, the `RepoSource` `dir` is ignored for + # the step's execution. + # @!attribute [rw] id + # @return [::String] + # Unique identifier for this build step, used in `wait_for` to + # reference this build step as a dependency. + # @!attribute [rw] wait_for + # @return [::Array<::String>] + # The ID(s) of the step(s) that this build step depends on. + # This build step will not start until all the build steps in `wait_for` + # have completed successfully. If `wait_for` is empty, this build step will + # start when all previous build steps in the `Build.Steps` list have + # completed successfully. + # @!attribute [rw] entrypoint + # @return [::String] + # Entrypoint to be used instead of the build step image's default entrypoint. + # If unset, the image's default entrypoint is used. + # @!attribute [rw] secret_env + # @return [::Array<::String>] + # A list of environment variables which are encrypted using a Cloud Key + # Management Service crypto key. These values must be specified in the + # build's `Secret`. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::Build::V1::Volume>] + # List of volumes to mount into the build step. + # + # Each volume is created as an empty volume prior to execution of the + # build step. Upon completion of the build, volumes and their contents are + # discarded. + # + # Using a named volume in only one step is not valid as it is indicative + # of a build request with an incorrect configuration. + # @!attribute [r] timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for executing this build step. + # @!attribute [r] pull_timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for pulling this build step's + # builder image only. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Time limit for executing this build step. If not defined, the step has no + # time limit and will be allowed to continue to run until either it completes + # or the build itself times out. + # @!attribute [r] status + # @return [::Google::Cloud::Build::V1::Build::Status] + # Output only. Status of the build step. At this time, build step status is + # only updated on build completion; step status is not updated in real-time + # as the build progresses. + # @!attribute [rw] allow_failure + # @return [::Boolean] + # Allow this build step to fail without failing the entire build. + # + # If false, the entire build will fail if this step fails. Otherwise, the + # build will succeed, but this step will still have a failure status. + # Error information will be reported in the failure_detail field. + # @!attribute [r] exit_code + # @return [::Integer] + # Output only. Return code from running the step. + # @!attribute [rw] allow_exit_codes + # @return [::Array<::Integer>] + # Allow this build step to fail without failing the entire build if and + # only if the exit code is one of the specified codes. If allow_failure + # is also specified, this field will take precedence. + # @!attribute [rw] script + # @return [::String] + # A shell script to be executed in the step. + # + # When script is provided, the user cannot specify the entrypoint or args. + # @!attribute [rw] automap_substitutions + # @return [::Boolean] + # Option to include built-in and custom substitutions as env variables + # for this build step. This option will override the global option + # in BuildOption. + class BuildStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Volume describes a Docker container volume which is mounted into build steps + # in order to persist files across build step execution. + # @!attribute [rw] name + # @return [::String] + # Name of the volume to mount. + # + # Volume names must be unique per build step and must be valid names for + # Docker volumes. Each named volume must be used by at least two build steps. + # @!attribute [rw] path + # @return [::String] + # Path at which to mount the volume. + # + # Paths must be absolute and cannot conflict with other volume paths on the + # same build step or with certain reserved volume paths. + class Volume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Artifacts created by the build pipeline. + # @!attribute [rw] images + # @return [::Array<::Google::Cloud::Build::V1::BuiltImage>] + # Container images that were built as a part of the build. + # @!attribute [rw] build_step_images + # @return [::Array<::String>] + # List of build step digests, in the order corresponding to build step + # indices. + # @!attribute [rw] artifact_manifest + # @return [::String] + # Path to the artifact manifest for non-container artifacts uploaded to Cloud + # Storage. Only populated when artifacts are uploaded to Cloud Storage. + # @!attribute [rw] num_artifacts + # @return [::Integer] + # Number of non-container artifacts uploaded to Cloud Storage. Only populated + # when artifacts are uploaded to Cloud Storage. + # @!attribute [rw] build_step_outputs + # @return [::Array<::String>] + # List of build step outputs, produced by builder images, in the order + # corresponding to build step indices. + # + # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) + # can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the + # first 50KB of data is stored. Note that the `$BUILDER_OUTPUT` variable is + # read-only and can't be substituted. + # @!attribute [rw] artifact_timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Time to push all non-container artifacts to Cloud Storage. + # @!attribute [rw] python_packages + # @return [::Array<::Google::Cloud::Build::V1::UploadedPythonPackage>] + # Python artifacts uploaded to Artifact Registry at the end of the build. + # @!attribute [rw] maven_artifacts + # @return [::Array<::Google::Cloud::Build::V1::UploadedMavenArtifact>] + # Maven artifacts uploaded to Artifact Registry at the end of the build. + # @!attribute [rw] go_modules + # @return [::Array<::Google::Cloud::Build::V1::UploadedGoModule>] + # Optional. Go module artifacts uploaded to Artifact Registry at the end of + # the build. + # @!attribute [rw] npm_packages + # @return [::Array<::Google::Cloud::Build::V1::UploadedNpmPackage>] + # Npm packages uploaded to Artifact Registry at the end of the build. + class Results + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An artifact that was uploaded during a build. This + # is a single record in the artifact manifest JSON file. + # @!attribute [rw] location + # @return [::String] + # The path of an artifact in a Cloud Storage bucket, with the + # generation number. For example, + # `gs://mybucket/path/to/output.jar#generation`. + # @!attribute [rw] file_hash + # @return [::Array<::Google::Cloud::Build::V1::FileHashes>] + # The file hash of the artifact. + class ArtifactResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A build resource in the Cloud Build API. + # + # At a high level, a `Build` describes where to find source code, how to build + # it (for example, the builder image to run on the source), and where to store + # the built artifacts. + # + # Fields can include the following variables, which will be expanded when the + # build is created: + # + # - $PROJECT_ID: the project ID of the build. + # - $PROJECT_NUMBER: the project number of the build. + # - $LOCATION: the location/region of the build. + # - $BUILD_ID: the autogenerated ID of the build. + # - $REPO_NAME: the source repository name specified by RepoSource. + # - $BRANCH_NAME: the branch name specified by RepoSource. + # - $TAG_NAME: the tag name specified by RepoSource. + # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or + # resolved from the specified branch or tag. + # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. + # @!attribute [r] name + # @return [::String] + # Output only. The 'Build' name with format: + # `projects/{project}/locations/{location}/builds/{build}`, where \\{build} + # is a unique identifier generated by the service. + # @!attribute [r] id + # @return [::String] + # Output only. Unique identifier of the build. + # @!attribute [r] project_id + # @return [::String] + # Output only. ID of the project. + # @!attribute [r] status + # @return [::Google::Cloud::Build::V1::Build::Status] + # Output only. Status of the build. + # @!attribute [r] status_detail + # @return [::String] + # Output only. Customer-readable message about the current status. + # @!attribute [rw] source + # @return [::Google::Cloud::Build::V1::Source] + # Optional. The location of the source files to build. + # @!attribute [rw] steps + # @return [::Array<::Google::Cloud::Build::V1::BuildStep>] + # Required. The operations to be performed on the workspace. + # @!attribute [r] results + # @return [::Google::Cloud::Build::V1::Results] + # Output only. Results of the build. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which the request to create the build was received. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which execution of the build was started. + # @!attribute [r] finish_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which execution of the build was finished. + # + # The difference between finish_time and start_time is the duration of the + # build's execution. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # Amount of time that this build should be allowed to run, to second + # granularity. If this amount of time elapses, work on the build will cease + # and the build status will be `TIMEOUT`. + # + # `timeout` starts ticking from `startTime`. + # + # Default time is 60 minutes. + # @!attribute [rw] images + # @return [::Array<::String>] + # A list of images to be pushed upon the successful completion of all build + # steps. + # + # The images are pushed using the builder service account's credentials. + # + # The digests of the pushed images will be stored in the `Build` resource's + # results field. + # + # If any of the images fail to be pushed, the build status is marked + # `FAILURE`. + # @!attribute [rw] queue_ttl + # @return [::Google::Protobuf::Duration] + # TTL in queue for this build. If provided and the build is enqueued longer + # than this value, the build will expire and the build status will be + # `EXPIRED`. + # + # The TTL starts ticking from create_time. + # @!attribute [rw] artifacts + # @return [::Google::Cloud::Build::V1::Artifacts] + # Artifacts produced by the build that should be uploaded upon + # successful completion of all build steps. + # @!attribute [rw] logs_bucket + # @return [::String] + # Cloud Storage bucket where logs should be written (see + # [Bucket Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + # @!attribute [r] source_provenance + # @return [::Google::Cloud::Build::V1::SourceProvenance] + # Output only. A permanent fixed identifier for source. + # @!attribute [r] build_trigger_id + # @return [::String] + # Output only. The ID of the `BuildTrigger` that triggered this build, if it + # was triggered automatically. + # @!attribute [rw] options + # @return [::Google::Cloud::Build::V1::BuildOptions] + # Special options for this build. + # @!attribute [r] log_url + # @return [::String] + # Output only. URL to logs for this build in Google Cloud Console. + # @!attribute [rw] substitutions + # @return [::Google::Protobuf::Map{::String => ::String}] + # Substitutions data for `Build` resource. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Tags for annotation of a `Build`. These are not docker tags. + # @!attribute [rw] secrets + # @return [::Array<::Google::Cloud::Build::V1::Secret>] + # Secrets to decrypt using Cloud Key Management Service. + # Note: Secret Manager is the recommended technique + # for managing sensitive data with Cloud Build. Use `available_secrets` to + # configure builds to access secrets from Secret Manager. For instructions, + # see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets + # @!attribute [r] timing + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::TimeSpan}] + # Output only. Stores timing information for phases of the build. Valid keys + # are: + # + # * BUILD: time to execute all build steps. + # * PUSH: time to push all artifacts including docker images and non docker + # artifacts. + # * FETCHSOURCE: time to fetch source. + # * SETUPBUILD: time to set up build. + # + # If the build does not specify source or images, + # these keys will not be included. + # @!attribute [r] approval + # @return [::Google::Cloud::Build::V1::BuildApproval] + # Output only. Describes this build's approval configuration, status, + # and result. + # @!attribute [rw] service_account + # @return [::String] + # IAM service account whose credentials will be used at build runtime. + # Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + # ACCOUNT can be email address or uniqueId of the service account. + # @!attribute [rw] available_secrets + # @return [::Google::Cloud::Build::V1::Secrets] + # Secrets and secret environment variables. + # @!attribute [r] warnings + # @return [::Array<::Google::Cloud::Build::V1::Build::Warning>] + # Output only. Non-fatal problems encountered during the execution of the + # build. + # @!attribute [rw] git_config + # @return [::Google::Cloud::Build::V1::GitConfig] + # Optional. Configuration for git operations. + # @!attribute [r] failure_info + # @return [::Google::Cloud::Build::V1::Build::FailureInfo] + # Output only. Contains information about the build when status=FAILURE. + # @!attribute [rw] dependencies + # @return [::Array<::Google::Cloud::Build::V1::Dependency>] + # Optional. Dependencies that the Cloud Build worker will fetch before + # executing user steps. + class Build + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A non-fatal problem encountered during the execution of the build. + # @!attribute [rw] text + # @return [::String] + # Explanation of the warning generated. + # @!attribute [rw] priority + # @return [::Google::Cloud::Build::V1::Build::Warning::Priority] + # The priority for this warning. + class Warning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The relative importance of this warning. + module Priority + # Should not be used. + PRIORITY_UNSPECIFIED = 0 + + # e.g. deprecation warnings and alternative feature highlights. + INFO = 1 + + # e.g. automated detection of possible issues with the build. + WARNING = 2 + + # e.g. alerts that a feature used in the build is pending removal + ALERT = 3 + end + end + + # A fatal problem encountered during the execution of the build. + # @!attribute [rw] type + # @return [::Google::Cloud::Build::V1::Build::FailureInfo::FailureType] + # The name of the failure. + # @!attribute [rw] detail + # @return [::String] + # Explains the failure issue in more detail using hard-coded text. + class FailureInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The name of a fatal problem encountered during the execution of the + # build. + module FailureType + # Type unspecified + FAILURE_TYPE_UNSPECIFIED = 0 + + # Unable to push the image to the repository. + PUSH_FAILED = 1 + + # Final image not found. + PUSH_IMAGE_NOT_FOUND = 2 + + # Unauthorized push of the final image. + PUSH_NOT_AUTHORIZED = 3 + + # Backend logging failures. Should retry. + LOGGING_FAILURE = 4 + + # A build step has failed. + USER_BUILD_STEP = 5 + + # The source fetching has failed. + FETCH_SOURCE_FAILED = 6 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SubstitutionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Build::V1::TimeSpan] + class TimingEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Possible status of a build or build step. + module Status + # Status of the build is unknown. + STATUS_UNKNOWN = 0 + + # Build has been created and is pending execution and queuing. It has not + # been queued. + PENDING = 10 + + # Build or step is queued; work has not yet begun. + QUEUED = 1 + + # Build or step is being executed. + WORKING = 2 + + # Build or step finished successfully. + SUCCESS = 3 + + # Build or step failed to complete successfully. + FAILURE = 4 + + # Build or step failed due to an internal cause. + INTERNAL_ERROR = 5 + + # Build or step took longer than was allowed. + TIMEOUT = 6 + + # Build or step was canceled by a user. + CANCELLED = 7 + + # Build was enqueued for longer than the value of `queue_ttl`. + EXPIRED = 9 + end + end + + # A dependency that the Cloud Build worker will fetch before executing user + # steps. + # @!attribute [rw] empty + # @return [::Boolean] + # If set to true disable all dependency fetching (ignoring the default + # source as well). + # + # Note: The following fields are mutually exclusive: `empty`, `git_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] git_source + # @return [::Google::Cloud::Build::V1::Dependency::GitSourceDependency] + # Represents a git repository as a build dependency. + # + # Note: The following fields are mutually exclusive: `git_source`, `empty`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Dependency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a git repository as a build dependency. + # @!attribute [rw] repository + # @return [::Google::Cloud::Build::V1::Dependency::GitSourceRepository] + # Required. The kind of repo (url or dev connect). + # @!attribute [rw] revision + # @return [::String] + # Required. The revision that we will fetch the repo at. + # @!attribute [rw] recurse_submodules + # @return [::Boolean] + # Optional. True if submodules should be fetched too (default false). + # @!attribute [rw] depth + # @return [::Integer] + # Optional. How much history should be fetched for the build (default 1, -1 + # for all history). + # @!attribute [rw] dest_path + # @return [::String] + # Required. Where should the files be placed on the worker. + class GitSourceDependency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A repository for a git source. + # @!attribute [rw] url + # @return [::String] + # Location of the Git repository. + # + # Note: The following fields are mutually exclusive: `url`, `developer_connect`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] developer_connect + # @return [::String] + # The Developer Connect Git repository link formatted as + # `projects/*/locations/*/connections/*/gitRepositoryLink/*` + # + # Note: The following fields are mutually exclusive: `developer_connect`, `url`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class GitSourceRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # GitConfig is a configuration for git operations. + # @!attribute [rw] http + # @return [::Google::Cloud::Build::V1::GitConfig::HttpConfig] + # Configuration for HTTP related git operations. + class GitConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # HttpConfig is a configuration for HTTP related git operations. + # @!attribute [rw] proxy_secret_version_name + # @return [::String] + # SecretVersion resource of the HTTP proxy URL. The Service Account used in + # the build (either the default Service Account or + # user-specified Service Account) should have + # `secretmanager.versions.access` permissions on this secret. The proxy URL + # should be in format `[protocol://][user[:password]@]proxyhost[:port]`. + class HttpConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Artifacts produced by a build that should be uploaded upon + # successful completion of all build steps. + # @!attribute [rw] images + # @return [::Array<::String>] + # A list of images to be pushed upon the successful completion of all build + # steps. + # + # The images will be pushed using the builder service account's credentials. + # + # The digests of the pushed images will be stored in the Build resource's + # results field. + # + # If any of the images fail to be pushed, the build is marked FAILURE. + # @!attribute [rw] objects + # @return [::Google::Cloud::Build::V1::Artifacts::ArtifactObjects] + # A list of objects to be uploaded to Cloud Storage upon successful + # completion of all build steps. + # + # Files in the workspace matching specified paths globs will be uploaded to + # the specified Cloud Storage location using the builder service account's + # credentials. + # + # The location and generation of the uploaded objects will be stored in the + # Build resource's results field. + # + # If any objects fail to be pushed, the build is marked FAILURE. + # @!attribute [rw] maven_artifacts + # @return [::Array<::Google::Cloud::Build::V1::Artifacts::MavenArtifact>] + # A list of Maven artifacts to be uploaded to Artifact Registry upon + # successful completion of all build steps. + # + # Artifacts in the workspace matching specified paths globs will be uploaded + # to the specified Artifact Registry repository using the builder service + # account's credentials. + # + # If any artifacts fail to be pushed, the build is marked FAILURE. + # @!attribute [rw] go_modules + # @return [::Array<::Google::Cloud::Build::V1::Artifacts::GoModule>] + # Optional. A list of Go modules to be uploaded to Artifact Registry upon + # successful completion of all build steps. + # + # If any objects fail to be pushed, the build is marked FAILURE. + # @!attribute [rw] python_packages + # @return [::Array<::Google::Cloud::Build::V1::Artifacts::PythonPackage>] + # A list of Python packages to be uploaded to Artifact Registry upon + # successful completion of all build steps. + # + # The build service account credentials will be used to perform the upload. + # + # If any objects fail to be pushed, the build is marked FAILURE. + # @!attribute [rw] npm_packages + # @return [::Array<::Google::Cloud::Build::V1::Artifacts::NpmPackage>] + # A list of npm packages to be uploaded to Artifact Registry upon + # successful completion of all build steps. + # + # Npm packages in the specified paths will be uploaded + # to the specified Artifact Registry repository using the builder service + # account's credentials. + # + # If any packages fail to be pushed, the build is marked FAILURE. + class Artifacts + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Files in the workspace to upload to Cloud Storage upon successful + # completion of all build steps. + # @!attribute [rw] location + # @return [::String] + # Cloud Storage bucket and optional object path, in the form + # "gs://bucket/path/to/somewhere/". (see [Bucket Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + # + # Files in the workspace matching any path pattern will be uploaded to + # Cloud Storage with this location as a prefix. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Path globs used to match files in the build's workspace. + # @!attribute [r] timing + # @return [::Google::Cloud::Build::V1::TimeSpan] + # Output only. Stores timing information for pushing all artifact objects. + class ArtifactObjects + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Maven artifact to upload to Artifact Registry upon successful completion + # of all build steps. + # @!attribute [rw] repository + # @return [::String] + # Artifact Registry repository, in the form + # "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" + # + # Artifact in the workspace specified by path will be uploaded to + # Artifact Registry with this location as a prefix. + # @!attribute [rw] path + # @return [::String] + # Optional. Path to an artifact in the build's workspace to be uploaded to + # Artifact Registry. + # This can be either an absolute path, + # e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar + # or a relative path from /workspace, + # e.g. my-app/target/my-app-1.0.SNAPSHOT.jar. + # @!attribute [rw] artifact_id + # @return [::String] + # Maven `artifactId` value used when uploading the artifact to Artifact + # Registry. + # @!attribute [rw] group_id + # @return [::String] + # Maven `groupId` value used when uploading the artifact to Artifact + # Registry. + # @!attribute [rw] version + # @return [::String] + # Maven `version` value used when uploading the artifact to Artifact + # Registry. + class MavenArtifact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Go module to upload to Artifact Registry upon successful completion of all + # build steps. A module refers to all dependencies in a go.mod file. + # @!attribute [rw] repository_name + # @return [::String] + # Optional. Artifact Registry repository name. + # + # Specified Go modules will be zipped and uploaded to Artifact Registry + # with this location as a prefix. + # e.g. my-go-repo + # @!attribute [rw] repository_location + # @return [::String] + # Optional. Location of the Artifact Registry repository. i.e. us-east1 + # Defaults to the build’s location. + # @!attribute [rw] repository_project_id + # @return [::String] + # Optional. Project ID of the Artifact Registry repository. + # Defaults to the build project. + # @!attribute [rw] source_path + # @return [::String] + # Optional. Source path of the go.mod file in the build's workspace. If not + # specified, this will default to the current directory. + # e.g. ~/code/go/mypackage + # @!attribute [rw] module_path + # @return [::String] + # Optional. The Go module's "module path". + # e.g. example.com/foo/v2 + # @!attribute [rw] module_version + # @return [::String] + # Optional. The Go module's semantic version in the form vX.Y.Z. e.g. + # v0.1.1 Pre-release identifiers can also be added by appending a dash and + # dot separated ASCII alphanumeric characters and hyphens. + # e.g. v0.2.3-alpha.x.12m.5 + class GoModule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Python package to upload to Artifact Registry upon successful completion + # of all build steps. A package can encapsulate multiple objects to be + # uploaded to a single repository. + # @!attribute [rw] repository + # @return [::String] + # Artifact Registry repository, in the form + # "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" + # + # Files in the workspace matching any path pattern will be uploaded to + # Artifact Registry with this location as a prefix. + # @!attribute [rw] paths + # @return [::Array<::String>] + # Path globs used to match files in the build's workspace. For Python/ + # Twine, this is usually `dist/*`, and sometimes additionally an `.asc` + # file. + class PythonPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Npm package to upload to Artifact Registry upon successful completion + # of all build steps. + # @!attribute [rw] repository + # @return [::String] + # Artifact Registry repository, in the form + # "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" + # + # Npm package in the workspace specified by path will be zipped and + # uploaded to Artifact Registry with this location as a prefix. + # @!attribute [rw] package_path + # @return [::String] + # Optional. Path to the package.json. + # e.g. workspace/path/to/package + # + # Only one of `archive` or `package_path` can be specified. + class NpmPackage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Start and end times for a build execution phase. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start of time span. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End of time span. + class TimeSpan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for build operations. + # @!attribute [rw] build + # @return [::Google::Cloud::Build::V1::Build] + # The build that the operation is tracking. + class BuildOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provenance of the source. Ways to find the original source, or verify that + # some source was used for this build. + # @!attribute [rw] resolved_storage_source + # @return [::Google::Cloud::Build::V1::StorageSource] + # A copy of the build's `source.storage_source`, if exists, with any + # generations resolved. + # @!attribute [rw] resolved_repo_source + # @return [::Google::Cloud::Build::V1::RepoSource] + # A copy of the build's `source.repo_source`, if exists, with any + # revisions resolved. + # @!attribute [rw] resolved_storage_source_manifest + # @return [::Google::Cloud::Build::V1::StorageSourceManifest] + # A copy of the build's `source.storage_source_manifest`, if exists, with any + # revisions resolved. + # This feature is in Preview. + # @!attribute [r] resolved_connected_repository + # @return [::Google::Cloud::Build::V1::ConnectedRepository] + # Output only. A copy of the build's `source.connected_repository`, if + # exists, with any revisions resolved. + # @!attribute [r] resolved_git_source + # @return [::Google::Cloud::Build::V1::GitSource] + # Output only. A copy of the build's `source.git_source`, if exists, with any + # revisions resolved. + # @!attribute [r] file_hashes + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::FileHashes}] + # Output only. Hash(es) of the build source, which can be used to verify that + # the original source integrity was maintained in the build. Note that + # `FileHashes` will only be populated if `BuildOptions` has requested a + # `SourceProvenanceHash`. + # + # The keys to this map are file paths used as build source and the values + # contain the hash values for those files. + # + # If the build source came in a single package such as a gzipped tarfile + # (`.tar.gz`), the `FileHash` will be for the single path to that file. + class SourceProvenance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Build::V1::FileHashes] + class FileHashesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Container message for hashes of byte content of files, used in + # SourceProvenance messages to verify integrity of source input to the build. + # @!attribute [rw] file_hash + # @return [::Array<::Google::Cloud::Build::V1::Hash>] + # Collection of file hashes. + class FileHashes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container message for hash values. + # @!attribute [rw] type + # @return [::Google::Cloud::Build::V1::Hash::HashType] + # The type of hash that was performed. + # @!attribute [rw] value + # @return [::String] + # The hash value. + class Hash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the hash algorithm, if any. + module HashType + # No hash requested. + NONE = 0 + + # Use a sha256 hash. + SHA256 = 1 + + # Use a md5 hash. + MD5 = 2 + + # Dirhash of a Go module's source code which is then hex-encoded. + GO_MODULE_H1 = 3 + + # Use a sha512 hash. + SHA512 = 4 + end + end + + # Secrets and secret environment variables. + # @!attribute [rw] secret_manager + # @return [::Array<::Google::Cloud::Build::V1::SecretManagerSecret>] + # Secrets in Secret Manager and associated secret environment variable. + # @!attribute [rw] inline + # @return [::Array<::Google::Cloud::Build::V1::InlineSecret>] + # Secrets encrypted with KMS key and the associated secret environment + # variable. + class Secrets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Pairs a set of secret environment variables mapped to encrypted + # values with the Cloud KMS key to use to decrypt the value. + # @!attribute [rw] kms_key_name + # @return [::String] + # Resource name of Cloud KMS crypto key to decrypt the encrypted value. + # In format: projects/*/locations/*/keyRings/*/cryptoKeys/* + # @!attribute [rw] env_map + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of environment variable name to its encrypted value. + # + # Secret environment variables must be unique across all of a build's + # secrets, and must be used by at least one build step. Values can be at most + # 64 KB in size. There can be at most 100 secret values across all of a + # build's secrets. + class InlineSecret + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvMapEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Pairs a secret environment variable with a SecretVersion in Secret Manager. + # @!attribute [rw] version_name + # @return [::String] + # Resource name of the SecretVersion. In format: + # projects/*/secrets/*/versions/* + # @!attribute [rw] env + # @return [::String] + # Environment variable name to associate with the secret. + # Secret environment variables must be unique across all of a build's + # secrets, and must be used by at least one build step. + class SecretManagerSecret + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Pairs a set of secret environment variables containing encrypted + # values with the Cloud KMS key to use to decrypt the value. + # Note: Use `kmsKeyName` with `available_secrets` instead of using + # `kmsKeyName` with `secret`. For instructions see: + # https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials. + # @!attribute [rw] kms_key_name + # @return [::String] + # Cloud KMS key name to use to decrypt these envs. + # @!attribute [rw] secret_env + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of environment variable name to its encrypted value. + # + # Secret environment variables must be unique across all of a build's + # secrets, and must be used by at least one build step. Values can be at most + # 64 KB in size. There can be at most 100 secret values across all of a + # build's secrets. + class Secret + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SecretEnvEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request to create a new build. + # @!attribute [rw] parent + # @return [::String] + # The parent resource where this build will be created. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project. + # @!attribute [rw] build + # @return [::Google::Cloud::Build::V1::Build] + # Required. Build resource to create. + class CreateBuildRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a build. + # @!attribute [rw] name + # @return [::String] + # The name of the `Build` to retrieve. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project. + # @!attribute [rw] id + # @return [::String] + # Required. ID of the build. + class GetBuildRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list builds. + # @!attribute [rw] parent + # @return [::String] + # The parent of the collection of `Builds`. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of results to return in the list. + # @!attribute [rw] page_token + # @return [::String] + # The page token for the next page of Builds. + # + # If unspecified, the first page of results is returned. + # + # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + # In this case, the token should be discarded, and pagination should be + # restarted from the first page of results. + # + # See https://google.aip.dev/158 for more. + # @!attribute [rw] filter + # @return [::String] + # The raw filter text to constrain the results. + class ListBuildsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response including listed builds. + # @!attribute [rw] builds + # @return [::Array<::Google::Cloud::Build::V1::Build>] + # Builds will be sorted by `create_time`, descending. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to receive the next page of results. + # This will be absent if the end of the response list has been reached. + class ListBuildsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to cancel an ongoing build. + # @!attribute [rw] name + # @return [::String] + # The name of the `Build` to cancel. + # Format: `projects/{project}/locations/{location}/builds/{build}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project. + # @!attribute [rw] id + # @return [::String] + # Required. ID of the build. + class CancelBuildRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to approve or reject a pending build. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the target build. + # For example: "projects/\\{$project_id}/builds/\\{$build_id}" + # @!attribute [rw] approval_result + # @return [::Google::Cloud::Build::V1::ApprovalResult] + # Approval decision and metadata. + class ApproveBuildRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BuildApproval describes a build's approval configuration, state, and + # result. + # @!attribute [r] state + # @return [::Google::Cloud::Build::V1::BuildApproval::State] + # Output only. The state of this build's approval. + # @!attribute [r] config + # @return [::Google::Cloud::Build::V1::ApprovalConfig] + # Output only. Configuration for manual approval of this build. + # @!attribute [r] result + # @return [::Google::Cloud::Build::V1::ApprovalResult] + # Output only. Result of manual approval for this Build. + class BuildApproval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies the current state of a build's approval. + module State + # Default enum type. This should not be used. + STATE_UNSPECIFIED = 0 + + # Build approval is pending. + PENDING = 1 + + # Build approval has been approved. + APPROVED = 2 + + # Build approval has been rejected. + REJECTED = 3 + + # Build was cancelled while it was still pending approval. + CANCELLED = 5 + end + end + + # ApprovalConfig describes configuration for manual approval of a build. + # @!attribute [rw] approval_required + # @return [::Boolean] + # Whether or not approval is needed. If this is set on a build, it will + # become pending when created, and will need to be explicitly approved + # to start. + class ApprovalConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ApprovalResult describes the decision and associated metadata of a manual + # approval of a build. + # @!attribute [r] approver_account + # @return [::String] + # Output only. Email of the user that called the ApproveBuild API to + # approve or reject a build at the time that the API was called. + # @!attribute [r] approval_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the approval decision was made. + # @!attribute [rw] decision + # @return [::Google::Cloud::Build::V1::ApprovalResult::Decision] + # Required. The decision of this manual approval. + # @!attribute [rw] comment + # @return [::String] + # Optional. An optional comment for this manual approval result. + # @!attribute [rw] url + # @return [::String] + # Optional. An optional URL tied to this manual approval result. This field + # is essentially the same as comment, except that it will be rendered by the + # UI differently. An example use case is a link to an external job that + # approved this Build. + class ApprovalResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies whether or not this manual approval result is to approve + # or reject a build. + module Decision + # Default enum type. This should not be used. + DECISION_UNSPECIFIED = 0 + + # Build is approved. + APPROVED = 1 + + # Build is rejected. + REJECTED = 2 + end + end + + # GitRepoSource describes a repo and ref of a code repository. + # @!attribute [rw] uri + # @return [::String] + # The URI of the repo (e.g. https://github.com/user/repo.git). + # Either `uri` or `repository` can be specified and is required. + # @!attribute [rw] repository + # @return [::String] + # The connected repository resource name, in the format + # `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or + # `repository` can be specified and is required. + # @!attribute [rw] ref + # @return [::String] + # The branch or tag to use. Must start with "refs/" (required). + # @!attribute [rw] repo_type + # @return [::Google::Cloud::Build::V1::GitFileSource::RepoType] + # See RepoType below. + # @!attribute [rw] github_enterprise_config + # @return [::String] + # The full resource name of the github enterprise config. + # Format: + # `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`. + # `projects/{project}/githubEnterpriseConfigs/{id}`. + class GitRepoSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GitFileSource describes a file within a (possibly remote) code repository. + # @!attribute [rw] path + # @return [::String] + # The path of the file, with the repo root as the root of the path. + # @!attribute [rw] uri + # @return [::String] + # The URI of the repo. + # Either uri or repository can be specified. + # If unspecified, the repo from which the trigger invocation originated is + # assumed to be the repo from which to read the specified path. + # @!attribute [rw] repository + # @return [::String] + # The fully qualified resource name of the Repos API repository. + # Either URI or repository can be specified. + # If unspecified, the repo from which the trigger invocation originated is + # assumed to be the repo from which to read the specified path. + # @!attribute [rw] repo_type + # @return [::Google::Cloud::Build::V1::GitFileSource::RepoType] + # See RepoType above. + # @!attribute [rw] revision + # @return [::String] + # The branch, tag, arbitrary ref, or SHA version of the repo to use when + # resolving the filename (optional). + # This field respects the same syntax/resolution as described here: + # https://git-scm.com/docs/gitrevisions + # If unspecified, the revision from which the trigger invocation originated + # is assumed to be the revision from which to read the specified path. + # @!attribute [rw] github_enterprise_config + # @return [::String] + # The full resource name of the github enterprise config. + # Format: + # `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`. + # `projects/{project}/githubEnterpriseConfigs/{id}`. + class GitFileSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the repo, since it may not be explicit from the `repo` field + # (e.g from a URL). + module RepoType + # The default, unknown repo type. Don't use it, instead use one of + # the other repo types. + UNKNOWN = 0 + + # A Google Cloud Source Repositories-hosted repo. + CLOUD_SOURCE_REPOSITORIES = 1 + + # A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub + # Enterprise). + GITHUB = 2 + + # A Bitbucket Server-hosted repo. + BITBUCKET_SERVER = 3 + + # A GitLab-hosted repo. + GITLAB = 4 + end + end + + # Configuration for an automated build in response to source repository + # changes. + # @!attribute [rw] resource_name + # @return [::String] + # The `Trigger` name with format: + # `projects/{project}/locations/{location}/triggers/{trigger}`, where + # \\{trigger} is a unique identifier generated by the service. + # @!attribute [r] id + # @return [::String] + # Output only. Unique identifier of the trigger. + # @!attribute [rw] description + # @return [::String] + # Human-readable description of this trigger. + # @!attribute [rw] name + # @return [::String] + # User-assigned name of the trigger. Must be unique within the project. + # Trigger names must meet the following requirements: + # + # + They must contain only alphanumeric characters and dashes. + # + They can be 1-64 characters long. + # + They must begin and end with an alphanumeric character. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Tags for annotation of a `BuildTrigger` + # @!attribute [rw] trigger_template + # @return [::Google::Cloud::Build::V1::RepoSource] + # Template describing the types of source changes to trigger a build. + # + # Branch and tag names in trigger templates are interpreted as regular + # expressions. Any branch or tag change that matches that regular expression + # will trigger a build. + # + # Mutually exclusive with `github`. + # @!attribute [rw] github + # @return [::Google::Cloud::Build::V1::GitHubEventsConfig] + # GitHubEventsConfig describes the configuration of a trigger that creates + # a build whenever a GitHub event is received. + # + # Mutually exclusive with `trigger_template`. + # @!attribute [rw] pubsub_config + # @return [::Google::Cloud::Build::V1::PubsubConfig] + # PubsubConfig describes the configuration of a trigger that + # creates a build whenever a Pub/Sub message is published. + # @!attribute [rw] webhook_config + # @return [::Google::Cloud::Build::V1::WebhookConfig] + # WebhookConfig describes the configuration of a trigger that + # creates a build whenever a webhook is sent to a trigger's webhook URL. + # @!attribute [rw] autodetect + # @return [::Boolean] + # Autodetect build configuration. The following precedence is used (case + # insensitive): + # + # 1. cloudbuild.yaml + # 2. cloudbuild.yml + # 3. cloudbuild.json + # 4. Dockerfile + # + # Currently only available for GitHub App Triggers. + # + # Note: The following fields are mutually exclusive: `autodetect`, `build`, `filename`, `git_file_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] build + # @return [::Google::Cloud::Build::V1::Build] + # Contents of the build template. + # + # Note: The following fields are mutually exclusive: `build`, `autodetect`, `filename`, `git_file_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] filename + # @return [::String] + # Path, from the source root, to the build configuration file + # (i.e. cloudbuild.yaml). + # + # Note: The following fields are mutually exclusive: `filename`, `autodetect`, `build`, `git_file_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] git_file_source + # @return [::Google::Cloud::Build::V1::GitFileSource] + # The file source describing the local or remote Build template. + # + # Note: The following fields are mutually exclusive: `git_file_source`, `autodetect`, `build`, `filename`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the trigger was created. + # @!attribute [rw] disabled + # @return [::Boolean] + # If true, the trigger will never automatically execute a build. + # @!attribute [rw] substitutions + # @return [::Google::Protobuf::Map{::String => ::String}] + # Substitutions for Build resource. The keys must match the following + # regular expression: `^_[A-Z0-9_]+$`. + # @!attribute [rw] ignored_files + # @return [::Array<::String>] + # ignored_files and included_files are file glob matches using + # https://golang.org/pkg/path/filepath/#Match extended with support for "**". + # + # If ignored_files and changed files are both empty, then they are + # not used to determine whether or not to trigger a build. + # + # If ignored_files is not empty, then we ignore any files that match + # any of the ignored_file globs. If the change has no files that are + # outside of the ignored_files globs, then we do not trigger a build. + # @!attribute [rw] included_files + # @return [::Array<::String>] + # If any of the files altered in the commit pass the ignored_files + # filter and included_files is empty, then as far as this filter is + # concerned, we should trigger the build. + # + # If any of the files altered in the commit pass the ignored_files + # filter and included_files is not empty, then we make sure that at + # least one of those files matches a included_files glob. If not, + # then we do not trigger a build. + # @!attribute [rw] filter + # @return [::String] + # Optional. A Common Expression Language string. + # @!attribute [rw] source_to_build + # @return [::Google::Cloud::Build::V1::GitRepoSource] + # The repo and ref of the repository from which to build. This field + # is used only for those triggers that do not respond to SCM events. + # Triggers that respond to such events build source at whatever commit + # caused the event. + # This field is currently only used by Webhook, Pub/Sub, Manual, and Cron + # triggers. + # @!attribute [rw] service_account + # @return [::String] + # The service account used for all user-controlled operations including + # UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. + # If no service account is set and the legacy Cloud Build service account + # (`[PROJECT_NUM]@cloudbuild.gserviceaccount.com`) is the default for the + # project then it will be used instead. + # Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` + # @!attribute [rw] repository_event_config + # @return [::Google::Cloud::Build::V1::RepositoryEventConfig] + # The configuration of a trigger that creates a build whenever an event from + # Repo API is received. + class BuildTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class SubstitutionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The configuration of a trigger that creates a build whenever an event from + # Repo API is received. + # @!attribute [rw] repository + # @return [::String] + # The resource name of the Repo API resource. + # @!attribute [r] repository_type + # @return [::Google::Cloud::Build::V1::RepositoryEventConfig::RepositoryType] + # Output only. The type of the SCM vendor the repository points to. + # @!attribute [rw] pull_request + # @return [::Google::Cloud::Build::V1::PullRequestFilter] + # Filter to match changes in pull requests. + # + # Note: The following fields are mutually exclusive: `pull_request`, `push`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] push + # @return [::Google::Cloud::Build::V1::PushFilter] + # Filter to match changes in refs like branches, tags. + # + # Note: The following fields are mutually exclusive: `push`, `pull_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class RepositoryEventConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # All possible SCM repo types from Repo API. + module RepositoryType + # If unspecified, RepositoryType defaults to GITHUB. + REPOSITORY_TYPE_UNSPECIFIED = 0 + + # The SCM repo is GITHUB. + GITHUB = 1 + + # The SCM repo is GITHUB Enterprise. + GITHUB_ENTERPRISE = 2 + + # The SCM repo is GITLAB Enterprise. + GITLAB_ENTERPRISE = 3 + end + end + + # GitHubEventsConfig describes the configuration of a trigger that creates a + # build whenever a GitHub event is received. + # @!attribute [rw] installation_id + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Integer] + # The installationID that emits the GitHub event. + # @!attribute [rw] owner + # @return [::String] + # Owner of the repository. For example: The owner for + # https://github.com/googlecloudplatform/cloud-builders is + # "googlecloudplatform". + # @!attribute [rw] name + # @return [::String] + # Name of the repository. For example: The name for + # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". + # @!attribute [rw] pull_request + # @return [::Google::Cloud::Build::V1::PullRequestFilter] + # filter to match changes in pull requests. + # + # Note: The following fields are mutually exclusive: `pull_request`, `push`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] push + # @return [::Google::Cloud::Build::V1::PushFilter] + # filter to match changes in refs like branches, tags. + # + # Note: The following fields are mutually exclusive: `push`, `pull_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class GitHubEventsConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PubsubConfig describes the configuration of a trigger that + # creates a build whenever a Pub/Sub message is published. + # @!attribute [r] subscription + # @return [::String] + # Output only. Name of the subscription. Format is + # `projects/{project}/subscriptions/{subscription}`. + # @!attribute [rw] topic + # @return [::String] + # Optional. The name of the topic from which this subscription is receiving + # messages. Format is `projects/{project}/topics/{topic}`. + # @!attribute [rw] service_account_email + # @return [::String] + # Service account that will make the push request. + # @!attribute [rw] state + # @return [::Google::Cloud::Build::V1::PubsubConfig::State] + # Potential issues with the underlying Pub/Sub subscription configuration. + # Only populated on get requests. + class PubsubConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enumerates potential issues with the underlying Pub/Sub subscription + # configuration. + module State + # The subscription configuration has not been checked. + STATE_UNSPECIFIED = 0 + + # The Pub/Sub subscription is properly configured. + OK = 1 + + # The subscription has been deleted. + SUBSCRIPTION_DELETED = 2 + + # The topic has been deleted. + TOPIC_DELETED = 3 + + # Some of the subscription's field are misconfigured. + SUBSCRIPTION_MISCONFIGURED = 4 + end + end + + # WebhookConfig describes the configuration of a trigger that + # creates a build whenever a webhook is sent to a trigger's webhook URL. + # @!attribute [rw] secret + # @return [::String] + # Required. Resource name for the secret required as a URL parameter. + # @!attribute [rw] state + # @return [::Google::Cloud::Build::V1::WebhookConfig::State] + # Potential issues with the underlying Pub/Sub subscription configuration. + # Only populated on get requests. + class WebhookConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enumerates potential issues with the Secret Manager secret provided by the + # user. + module State + # The webhook auth configuration not been checked. + STATE_UNSPECIFIED = 0 + + # The auth configuration is properly setup. + OK = 1 + + # The secret provided in auth_method has been deleted. + SECRET_DELETED = 2 + end + end + + # PullRequestFilter contains filter properties for matching GitHub Pull + # Requests. + # @!attribute [rw] branch + # @return [::String] + # Regex of branches to match. + # + # The syntax of the regular expressions accepted is the syntax accepted by + # RE2 and described at https://github.com/google/re2/wiki/Syntax + # @!attribute [rw] comment_control + # @return [::Google::Cloud::Build::V1::PullRequestFilter::CommentControl] + # If CommentControl is enabled, depending on the setting, builds may not + # fire until a repository writer comments `/gcbrun` on a pull + # request or `/gcbrun` is in the pull request description. + # Only PR comments that contain `/gcbrun` will trigger builds. + # + # If CommentControl is set to disabled, comments with `/gcbrun` from a user + # with repository write permission or above will + # still trigger builds to run. + # @!attribute [rw] invert_regex + # @return [::Boolean] + # If true, branches that do NOT match the git_ref will trigger a build. + class PullRequestFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Controls whether or not a `/gcbrun` comment is required from a user with + # repository write permission or above in order to + # trigger Build runs for pull requests. Pull Request update events differ + # between repo types. + # Check repo specific guides + # ([GitHub](https://cloud.google.com/build/docs/automating-builds/github/build-repos-from-github-enterprise#creating_a_github_enterprise_trigger), + # [Bitbucket](https://cloud.google.com/build/docs/automating-builds/bitbucket/build-repos-from-bitbucket-server#creating_a_bitbucket_server_trigger), + # [GitLab](https://cloud.google.com/build/docs/automating-builds/gitlab/build-repos-from-gitlab#creating_a_gitlab_trigger) + # for details. + module CommentControl + # Do not require `/gcbrun` comments from a user with repository write + # permission or above on pull requests before builds are triggered. + # Comments that contain `/gcbrun` will still fire builds so this should + # be thought of as comments not required. + COMMENTS_DISABLED = 0 + + # Builds will only fire in response to pull requests if: + # 1. The pull request author has repository write permission or above and + # `/gcbrun` is in the PR description. + # 2. A user with repository writer permissions or above comments `/gcbrun` + # on a pull request authored by any user. + COMMENTS_ENABLED = 1 + + # Builds will only fire in response to pull requests if: + # 1. The pull request author is a repository writer or above. + # 2. If the author does not have write permissions, a user with write + # permissions or above must comment `/gcbrun` in order to fire a build. + COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2 + end + end + + # Push contains filter properties for matching GitHub git pushes. + # @!attribute [rw] branch + # @return [::String] + # Regexes matching branches to build. + # + # The syntax of the regular expressions accepted is the syntax accepted by + # RE2 and described at https://github.com/google/re2/wiki/Syntax + # + # Note: The following fields are mutually exclusive: `branch`, `tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tag + # @return [::String] + # Regexes matching tags to build. + # + # The syntax of the regular expressions accepted is the syntax accepted by + # RE2 and described at https://github.com/google/re2/wiki/Syntax + # + # Note: The following fields are mutually exclusive: `tag`, `branch`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] invert_regex + # @return [::Boolean] + # When true, only trigger a build if the revision regex does NOT match the + # git_ref regex. + class PushFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a new `BuildTrigger`. + # @!attribute [rw] parent + # @return [::String] + # The parent resource where this trigger will be created. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project for which to configure automatic builds. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # Required. `BuildTrigger` to create. + class CreateBuildTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Returns the `BuildTrigger` with the specified ID. + # @!attribute [rw] name + # @return [::String] + # The name of the `Trigger` to retrieve. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project that owns the trigger. + # @!attribute [rw] trigger_id + # @return [::String] + # Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. + class GetBuildTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list existing `BuildTriggers`. + # @!attribute [rw] parent + # @return [::String] + # The parent of the collection of `Triggers`. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project for which to list BuildTriggers. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of results to return in the list. + # @!attribute [rw] page_token + # @return [::String] + # Token to provide to skip to a particular spot in the list. + class ListBuildTriggersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response containing existing `BuildTriggers`. + # @!attribute [rw] triggers + # @return [::Array<::Google::Cloud::Build::V1::BuildTrigger>] + # `BuildTriggers` for the project, sorted by `create_time` descending. + # @!attribute [rw] next_page_token + # @return [::String] + # Token to receive the next page of results. + class ListBuildTriggersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a `BuildTrigger`. + # @!attribute [rw] name + # @return [::String] + # The name of the `Trigger` to delete. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project that owns the trigger. + # @!attribute [rw] trigger_id + # @return [::String] + # Required. ID of the `BuildTrigger` to delete. + class DeleteBuildTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update an existing `BuildTrigger`. + # @!attribute [rw] project_id + # @return [::String] + # Required. ID of the project that owns the trigger. + # @!attribute [rw] trigger_id + # @return [::String] + # Required. ID of the `BuildTrigger` to update. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Build::V1::BuildTrigger] + # Required. `BuildTrigger` to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Update mask for the resource. If this is set, + # the server will only update the fields specified in the field mask. + # Otherwise, a full update of the mutable resource fields will be performed. + class UpdateBuildTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Optional arguments to enable specific features of builds. + # @!attribute [rw] source_provenance_hash + # @return [::Array<::Google::Cloud::Build::V1::Hash::HashType>] + # Requested hash for SourceProvenance. + # @!attribute [rw] requested_verify_option + # @return [::Google::Cloud::Build::V1::BuildOptions::VerifyOption] + # Requested verifiability options. + # @!attribute [rw] machine_type + # @return [::Google::Cloud::Build::V1::BuildOptions::MachineType] + # Compute Engine machine type on which to run the build. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Requested disk size for the VM that runs the build. Note that this is *NOT* + # "disk free"; some of the space will be used by the operating system and + # build utilities. Also note that this is the minimum disk size that will be + # allocated for the build -- the build may run with a larger disk than + # requested. At present, the maximum disk size is 4000GB; builds that request + # more than the maximum are rejected with an error. + # @!attribute [rw] substitution_option + # @return [::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption] + # Option to specify behavior when there is an error in the substitution + # checks. + # + # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot + # be overridden in the build configuration file. + # @!attribute [rw] dynamic_substitutions + # @return [::Boolean] + # Option to specify whether or not to apply bash style string + # operations to the substitutions. + # + # NOTE: this is always enabled for triggered builds and cannot be + # overridden in the build configuration file. + # @!attribute [rw] automap_substitutions + # @return [::Boolean] + # Option to include built-in and custom substitutions as env variables + # for all build steps. + # @!attribute [rw] log_streaming_option + # @return [::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption] + # Option to define build log streaming behavior to Cloud + # Storage. + # @!attribute [rw] worker_pool + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # This field deprecated; please use `pool.name` instead. + # @!attribute [rw] pool + # @return [::Google::Cloud::Build::V1::BuildOptions::PoolOption] + # Optional. Specification for execution on a `WorkerPool`. + # + # See [running builds in a private + # pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) + # for more information. + # @!attribute [rw] logging + # @return [::Google::Cloud::Build::V1::BuildOptions::LoggingMode] + # Option to specify the logging mode, which determines if and where build + # logs are stored. + # @!attribute [rw] env + # @return [::Array<::String>] + # A list of global environment variable definitions that will exist for all + # build steps in this build. If a variable is defined in both globally and in + # a build step, the variable will use the build step value. + # + # The elements are of the form "KEY=VALUE" for the environment variable "KEY" + # being given the value "VALUE". + # @!attribute [rw] secret_env + # @return [::Array<::String>] + # A list of global environment variables, which are encrypted using a Cloud + # Key Management Service crypto key. These values must be specified in the + # build's `Secret`. These variables will be available to all build steps + # in this build. + # @!attribute [rw] volumes + # @return [::Array<::Google::Cloud::Build::V1::Volume>] + # Global list of volumes to mount for ALL build steps + # + # Each volume is created as an empty volume prior to starting the build + # process. Upon completion of the build, volumes and their contents are + # discarded. Global volume names and paths cannot conflict with the volumes + # defined a build step. + # + # Using a global volume in a build with only one step is not valid as + # it is indicative of a build request with an incorrect configuration. + # @!attribute [rw] default_logs_bucket_behavior + # @return [::Google::Cloud::Build::V1::BuildOptions::DefaultLogsBucketBehavior] + # Optional. Option to specify how default logs buckets are setup. + # @!attribute [rw] enable_structured_logging + # @return [::Boolean] + # Optional. Option to specify whether structured logging is enabled. + # + # If true, JSON-formatted logs are parsed as structured logs. + class BuildOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Details about how a build should be executed on a `WorkerPool`. + # + # See [running builds in a private + # pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) + # for more information. + # @!attribute [rw] name + # @return [::String] + # The `WorkerPool` resource to execute the build on. + # You must have `cloudbuild.workerpools.use` on the project hosting the + # WorkerPool. + # + # Format projects/\\{project}/locations/\\{location}/workerPools/\\{workerPoolId} + class PoolOption + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specifies the manner in which the build should be verified, if at all. + # + # If a verified build is requested, and any part of the process to generate + # and upload provenance fails, the build will also fail. + # + # If the build does not request verification then that process may occur, but + # is not guaranteed to. If it does occur and fails, the build will not fail. + # + # For more information, see [Viewing Build + # Provenance](https://cloud.google.com/build/docs/securing-builds/view-build-provenance). + module VerifyOption + # Not a verifiable build (the default). + NOT_VERIFIED = 0 + + # Build must be verified. + VERIFIED = 1 + end + + # Supported Compute Engine machine types. + # For more information, see [Machine + # types](https://cloud.google.com/compute/docs/machine-types). + module MachineType + # Standard machine type. + UNSPECIFIED = 0 + + # Highcpu machine with 8 CPUs. + N1_HIGHCPU_8 = 1 + + # Highcpu machine with 32 CPUs. + N1_HIGHCPU_32 = 2 + + # Highcpu e2 machine with 8 CPUs. + E2_HIGHCPU_8 = 5 + + # Highcpu e2 machine with 32 CPUs. + E2_HIGHCPU_32 = 6 + + # E2 machine with 1 CPU. + E2_MEDIUM = 7 + end + + # Specifies the behavior when there is an error in the substitution checks. + module SubstitutionOption + # Fails the build if error in substitutions checks, like missing + # a substitution in the template or in the map. + MUST_MATCH = 0 + + # Do not fail the build if error in substitutions checks. + ALLOW_LOOSE = 1 + end + + # Specifies the behavior when writing build logs to Cloud Storage. + module LogStreamingOption + # Service may automatically determine build log streaming behavior. + STREAM_DEFAULT = 0 + + # Build logs should be streamed to Cloud Storage. + STREAM_ON = 1 + + # Build logs should not be streamed to Cloud Storage; they will be + # written when the build is completed. + STREAM_OFF = 2 + end + + # Specifies the logging mode. + module LoggingMode + # The service determines the logging mode. The default is `LEGACY`. Do not + # rely on the default logging behavior as it may change in the future. + LOGGING_UNSPECIFIED = 0 + + # Build logs are stored in Cloud Logging and Cloud Storage. + LEGACY = 1 + + # Build logs are stored in Cloud Storage. + GCS_ONLY = 2 + + # This option is the same as CLOUD_LOGGING_ONLY. + STACKDRIVER_ONLY = 3 + + # Build logs are stored in Cloud Logging. Selecting this option will not + # allow [logs + # streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). + CLOUD_LOGGING_ONLY = 5 + + # Turn off all logging. No build logs will be captured. + NONE = 4 + end + + # Default Cloud Storage log bucket behavior options. + module DefaultLogsBucketBehavior + # Unspecified. + DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED = 0 + + # Bucket is located in user-owned project in the same region as the + # build. The builder service account must have access to create and write + # to Cloud Storage buckets in the build project. + REGIONAL_USER_OWNED_BUCKET = 1 + + # Bucket is located in a Google-owned project and is not regionalized. + LEGACY_BUCKET = 2 + end + end + + # ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by + # the ReceiveTriggerWebhook method. + # @!attribute [rw] name + # @return [::String] + # The name of the `ReceiveTriggerWebhook` to retrieve. + # Format: `projects/{project}/locations/{location}/triggers/{trigger}` + # @!attribute [rw] body + # @return [::Google::Api::HttpBody] + # HTTP request body. + # @!attribute [rw] project_id + # @return [::String] + # Project in which the specified trigger lives + # @!attribute [rw] trigger + # @return [::String] + # Name of the trigger to run the payload against + # @!attribute [rw] secret + # @return [::String] + # Secret token used for authorization if an OAuth token isn't provided. + class ReceiveTriggerWebhookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReceiveTriggerWebhookResponse [Experimental] is the response object for the + # ReceiveTriggerWebhook method. + class ReceiveTriggerWebhookResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GitHubEnterpriseConfig represents a configuration for a GitHub Enterprise + # server. + # @!attribute [rw] name + # @return [::String] + # The full resource name for the GitHubEnterpriseConfig + # For example: + # "projects/\\{$project_id}/locations/\\{$location_id}/githubEnterpriseConfigs/\\{$config_id}" + # @!attribute [rw] host_url + # @return [::String] + # The URL of the github enterprise host the configuration is for. + # @!attribute [rw] app_id + # @return [::Integer] + # Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise + # server. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the installation was associated with the project. + # @!attribute [rw] webhook_key + # @return [::String] + # The key that should be attached to webhook calls to the ReceiveWebhook + # endpoint. + # @!attribute [rw] peered_network + # @return [::String] + # Optional. The network to be used when reaching out to the GitHub + # Enterprise server. The VPC network must be enabled for private + # service connection. This should be set if the GitHub Enterprise server is + # hosted on-premises and not reachable by public internet. + # If this field is left empty, no network peering will occur and calls to + # the GitHub Enterprise server will be made over the public internet. + # Must be in the format + # `projects/{project}/global/networks/{network}`, where \\{project} + # is a project number or id and \\{network} is the name of a + # VPC network in the project. + # @!attribute [rw] secrets + # @return [::Google::Cloud::Build::V1::GitHubEnterpriseSecrets] + # Optional. Names of secrets in Secret Manager. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Name to display for this config. + # @!attribute [rw] ssl_ca + # @return [::String] + # Optional. SSL certificate to use for requests to GitHub Enterprise. + class GitHubEnterpriseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GitHubEnterpriseSecrets represents the names of all necessary secrets in + # Secret Manager for a GitHub Enterprise server. + # Format is: projects//secrets/. + # @!attribute [rw] private_key_version_name + # @return [::String] + # The resource name for the private key secret version. + # @!attribute [rw] webhook_secret_version_name + # @return [::String] + # The resource name for the webhook secret secret version in Secret Manager. + # @!attribute [rw] oauth_secret_version_name + # @return [::String] + # The resource name for the OAuth secret secret version in Secret Manager. + # @!attribute [rw] oauth_client_id_version_name + # @return [::String] + # The resource name for the OAuth client ID secret version in Secret Manager. + class GitHubEnterpriseSecrets + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a `WorkerPool`. + # + # Cloud Build owns and maintains a pool of workers for general use and have no + # access to a project's private network. By default, builds submitted to + # Cloud Build will use a worker from this pool. + # + # If your build needs access to resources on a private network, + # create and use a `WorkerPool` to run your builds. Private `WorkerPool`s give + # your builds access to any single VPC network that you + # administer, including any on-prem resources connected to that VPC + # network. For an overview of private pools, see + # [Private pools + # overview](https://cloud.google.com/build/docs/private-pools/private-pools-overview). + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the `WorkerPool`, with format + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + # The value of `{worker_pool}` is provided by `worker_pool_id` in + # `CreateWorkerPool` request and the value of `{location}` is determined by + # the endpoint accessed. + # @!attribute [rw] display_name + # @return [::String] + # A user-specified, human-readable name for the `WorkerPool`. If provided, + # this value must be 1-63 characters. + # @!attribute [r] uid + # @return [::String] + # Output only. A unique identifier for the `WorkerPool`. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # User specified annotations. See https://google.aip.dev/128#annotations + # for more details such as format and size limitations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which the request to create the `WorkerPool` was + # received. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which the request to update the `WorkerPool` was + # received. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time at which the request to delete the `WorkerPool` was + # received. + # @!attribute [r] state + # @return [::Google::Cloud::Build::V1::WorkerPool::State] + # Output only. `WorkerPool` state. + # @!attribute [rw] private_pool_v1_config + # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config] + # Private Pool configuration. + # @!attribute [r] etag + # @return [::String] + # Output only. Checksum computed by the server. May be sent on update and + # delete requests to ensure that the client has an up-to-date value before + # proceeding. + class WorkerPool + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of the `WorkerPool`. + module State + # State of the `WorkerPool` is unknown. + STATE_UNSPECIFIED = 0 + + # `WorkerPool` is being created. + CREATING = 1 + + # `WorkerPool` is running. + RUNNING = 2 + + # `WorkerPool` is being deleted: cancelling builds and draining workers. + DELETING = 3 + + # `WorkerPool` is deleted. + DELETED = 4 + + # `WorkerPool` is being updated; new builds cannot be run. + UPDATING = 5 + end + end + + # Configuration for a V1 `PrivatePool`. + # @!attribute [rw] worker_config + # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::WorkerConfig] + # Machine configuration for the workers in the pool. + # @!attribute [rw] network_config + # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::NetworkConfig] + # Network configuration for the pool. + # @!attribute [rw] private_service_connect + # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::PrivateServiceConnect] + # Immutable. Private Service Connect(PSC) Network configuration for the pool. + class PrivatePoolV1Config + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the configuration to be used for creating workers in + # the pool. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. Machine type of a worker, such as `e2-medium`. + # See [Worker pool config + # file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). + # If left blank, Cloud Build will use a sensible default. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Size of the disk attached to the worker, in GB. + # See [Worker pool config + # file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). + # Specify a value of up to 4000. If `0` is specified, Cloud Build will use + # a standard disk size. + # @!attribute [rw] enable_nested_virtualization + # @return [::Boolean] + # Optional. Enable nested virtualization on the worker, if supported by the + # machine type. By default, nested virtualization is disabled. + class WorkerConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the network configuration for the pool. + # @!attribute [rw] peered_network + # @return [::String] + # Required. Immutable. The network definition that the workers are peered + # to. If this section is left empty, the workers will be peered to + # `WorkerPool.project_id` on the service producer network. Must be in the + # format `projects/{project}/global/networks/{network}`, where `{project}` + # is a project number, such as `12345`, and `{network}` is the name of a + # VPC network in the project. See + # [Understanding network configuration + # options](https://cloud.google.com/build/docs/private-pools/set-up-private-pool-environment) + # @!attribute [rw] egress_option + # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::NetworkConfig::EgressOption] + # Option to configure network egress for the workers. + # @!attribute [rw] peered_network_ip_range + # @return [::String] + # Immutable. Subnet IP range within the peered network. This is specified + # in CIDR notation with a slash and the subnet prefix size. You can + # optionally specify an IP address before the subnet prefix value. e.g. + # `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a + # prefix size of 29 bits. + # `/16` would specify a prefix size of 16 bits, with an automatically + # determined IP within the peered VPC. + # If unspecified, a value of `/24` will be used. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the egress option for the pool. + module EgressOption + # If set, defaults to PUBLIC_EGRESS. + EGRESS_OPTION_UNSPECIFIED = 0 + + # If set, workers are created without any public address, which prevents + # network egress to public IPs unless a network proxy is configured. + NO_PUBLIC_EGRESS = 1 + + # If set, workers are created with a public address which allows for + # public internet egress. + PUBLIC_EGRESS = 2 + end + end + + # Defines the Private Service Connect network configuration for the pool. + # @!attribute [rw] network_attachment + # @return [::String] + # Required. Immutable. The network attachment that the worker network + # interface is peered to. Must be in the format + # `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. + # The region of network attachment must be the same as the worker pool. + # See [Network + # Attachments](https://cloud.google.com/vpc/docs/about-network-attachments) + # @!attribute [rw] public_ip_address_disabled + # @return [::Boolean] + # Required. Immutable. Disable public IP on the primary network interface. + # + # If true, workers are created without any public address, which prevents + # network egress to public IPs unless a network proxy is configured. + # If false, workers are created with a public address which allows for + # public internet egress. The public address only applies to traffic + # through the primary network interface. + # If `route_all_traffic` is set to true, all traffic will go through the + # non-primary network interface, this boolean has no effect. + # @!attribute [rw] route_all_traffic + # @return [::Boolean] + # Immutable. Route all traffic through PSC interface. Enable this if you + # want full control of traffic in the private pool. Configure Cloud NAT for + # the subnet of network attachment if you need to access public Internet. + # + # If false, Only route RFC 1918 (10.0.0.0/8, 172.16.0.0/12, and + # 192.168.0.0/16) and RFC 6598 (100.64.0.0/10) through PSC interface. + class PrivateServiceConnect + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request to create a new `WorkerPool`. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this worker pool will be created. + # Format: `projects/{project}/locations/{location}`. + # @!attribute [rw] worker_pool + # @return [::Google::Cloud::Build::V1::WorkerPool] + # Required. `WorkerPool` resource to create. + # @!attribute [rw] worker_pool_id + # @return [::String] + # Required. Immutable. The ID to use for the `WorkerPool`, which will become + # the final component of the resource name. + # + # This value should be 1-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @!attribute [rw] validate_only + # @return [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + class CreateWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a `WorkerPool` with the specified name. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `WorkerPool` to retrieve. + # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + class GetWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a `WorkerPool`. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the `WorkerPool` to delete. + # Format: + # `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, it must match the server's etag on the workerpool + # for the request to be processed. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the `WorkerPool` is not found, the request will succeed + # but no action will be taken on the server. + # @!attribute [rw] validate_only + # @return [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + class DeleteWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a `WorkerPool`. + # @!attribute [rw] worker_pool + # @return [::Google::Cloud::Build::V1::WorkerPool] + # Required. The `WorkerPool` to update. + # + # The `name` field is used to identify the `WorkerPool` to update. + # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. A mask specifying which fields in `worker_pool` to update. + # @!attribute [rw] validate_only + # @return [::Boolean] + # If set, validate the request and preview the response, but do not actually + # post it. + class UpdateWorkerPoolRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list `WorkerPool`s. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the collection of `WorkerPools`. + # Format: `projects/{project}/locations/{location}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of `WorkerPool`s to return. The service may return + # fewer than this value. If omitted, the server will use a sensible default. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListWorkerPools` call. Provide this + # to retrieve the subsequent page. + class ListWorkerPoolsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response containing existing `WorkerPools`. + # @!attribute [rw] worker_pools + # @return [::Array<::Google::Cloud::Build::V1::WorkerPool>] + # `WorkerPools` for the specified project. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token used to page through large result sets. Provide this + # value in a subsequent ListWorkerPoolsRequest to return the next page of + # results. + class ListWorkerPoolsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the `CreateWorkerPool` operation. + # @!attribute [rw] worker_pool + # @return [::String] + # The resource name of the `WorkerPool` to create. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time the operation was created. + # @!attribute [rw] complete_time + # @return [::Google::Protobuf::Timestamp] + # Time the operation was completed. + class CreateWorkerPoolOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the `UpdateWorkerPool` operation. + # @!attribute [rw] worker_pool + # @return [::String] + # The resource name of the `WorkerPool` being updated. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time the operation was created. + # @!attribute [rw] complete_time + # @return [::Google::Protobuf::Timestamp] + # Time the operation was completed. + class UpdateWorkerPoolOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the `DeleteWorkerPool` operation. + # @!attribute [rw] worker_pool + # @return [::String] + # The resource name of the `WorkerPool` being deleted. + # Format: + # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Time the operation was created. + # @!attribute [rw] complete_time + # @return [::Google::Protobuf::Timestamp] + # Time the operation was completed. + class DeleteWorkerPoolOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-build-v1/snippets/Gemfile new file mode 100644 index 000000000000..c6bb4e58985f --- /dev/null +++ b/owl-bot-staging/google-cloud-build-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-build-v1", path: "../" +else + gem "google-cloud-build-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-build-v1/snippets/cloud_build/approve_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/approve_build.rb new file mode 100644 index 000000000000..e424de0c8959 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/approve_build.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 cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync] +require "google/cloud/build/v1" + +## +# Snippet for the approve_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#approve_build. +# +def approve_build + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::ApproveBuildRequest.new + + # Call the approve_build method. + result = client.approve_build 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 cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.rb new file mode 100644 index 000000000000..ec06123f2425 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.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 cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] +require "google/cloud/build/v1" + +## +# Snippet for the cancel_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#cancel_build. +# +def cancel_build + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::CancelBuildRequest.new + + # Call the cancel_build method. + result = client.cancel_build request + + # The returned object is of type Google::Cloud::Build::V1::Build. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.rb new file mode 100644 index 000000000000..2eae7c35b4c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.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 cloudbuild_v1_generated_CloudBuild_CreateBuild_sync] +require "google/cloud/build/v1" + +## +# Snippet for the create_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#create_build. +# +def create_build + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::CreateBuildRequest.new + + # Call the create_build method. + result = client.create_build 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 cloudbuild_v1_generated_CloudBuild_CreateBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.rb new file mode 100644 index 000000000000..57fe32267861 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.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 cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync] +require "google/cloud/build/v1" + +## +# Snippet for the create_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#create_build_trigger. +# +def create_build_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new + + # Call the create_build_trigger method. + result = client.create_build_trigger request + + # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.rb new file mode 100644 index 000000000000..5cefef7e72b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.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 cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync] +require "google/cloud/build/v1" + +## +# Snippet for the create_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#create_worker_pool. +# +def create_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new + + # Call the create_worker_pool method. + result = client.create_worker_pool 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 cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.rb new file mode 100644 index 000000000000..4eea1a67c9b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.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 cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync] +require "google/cloud/build/v1" + +## +# Snippet for the delete_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#delete_build_trigger. +# +def delete_build_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new + + # Call the delete_build_trigger method. + result = client.delete_build_trigger request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.rb new file mode 100644 index 000000000000..d470ab6dad08 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.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 cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync] +require "google/cloud/build/v1" + +## +# Snippet for the delete_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#delete_worker_pool. +# +def delete_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new + + # Call the delete_worker_pool method. + result = client.delete_worker_pool 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 cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.rb new file mode 100644 index 000000000000..c121d027634c --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.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 cloudbuild_v1_generated_CloudBuild_GetBuild_sync] +require "google/cloud/build/v1" + +## +# Snippet for the get_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_build. +# +def get_build + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::GetBuildRequest.new + + # Call the get_build method. + result = client.get_build request + + # The returned object is of type Google::Cloud::Build::V1::Build. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_GetBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.rb new file mode 100644 index 000000000000..23b6faad3724 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.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 cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync] +require "google/cloud/build/v1" + +## +# Snippet for the get_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_build_trigger. +# +def get_build_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new + + # Call the get_build_trigger method. + result = client.get_build_trigger request + + # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.rb new file mode 100644 index 000000000000..688cd61210ea --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.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 cloudbuild_v1_generated_CloudBuild_GetDefaultServiceAccount_sync] +require "google/cloud/build/v1" + +## +# Snippet for the get_default_service_account call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_default_service_account. +# +def get_default_service_account + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new + + # Call the get_default_service_account method. + result = client.get_default_service_account request + + # The returned object is of type Google::Cloud::Build::V1::DefaultServiceAccount. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_GetDefaultServiceAccount_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.rb new file mode 100644 index 000000000000..dad3ab613da1 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.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 cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync] +require "google/cloud/build/v1" + +## +# Snippet for the get_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_worker_pool. +# +def get_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new + + # Call the get_worker_pool method. + result = client.get_worker_pool request + + # The returned object is of type Google::Cloud::Build::V1::WorkerPool. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.rb new file mode 100644 index 000000000000..d4d1c611ee07 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.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 cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync] +require "google/cloud/build/v1" + +## +# Snippet for the list_build_triggers call in the CloudBuild 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::Build::V1::CloudBuild::Client#list_build_triggers. +# +def list_build_triggers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new + + # Call the list_build_triggers method. + result = client.list_build_triggers 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::Build::V1::BuildTrigger. + p item + end +end +# [END cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.rb new file mode 100644 index 000000000000..10cec68dc051 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.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 cloudbuild_v1_generated_CloudBuild_ListBuilds_sync] +require "google/cloud/build/v1" + +## +# Snippet for the list_builds call in the CloudBuild 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::Build::V1::CloudBuild::Client#list_builds. +# +def list_builds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::ListBuildsRequest.new + + # Call the list_builds method. + result = client.list_builds 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::Build::V1::Build. + p item + end +end +# [END cloudbuild_v1_generated_CloudBuild_ListBuilds_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.rb new file mode 100644 index 000000000000..243a645bf8eb --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.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 cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync] +require "google/cloud/build/v1" + +## +# Snippet for the list_worker_pools call in the CloudBuild 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::Build::V1::CloudBuild::Client#list_worker_pools. +# +def list_worker_pools + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new + + # Call the list_worker_pools method. + result = client.list_worker_pools 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::Build::V1::WorkerPool. + p item + end +end +# [END cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.rb new file mode 100644 index 000000000000..b62cfe9b3528 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.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 cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync] +require "google/cloud/build/v1" + +## +# Snippet for the receive_trigger_webhook call in the CloudBuild 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::Build::V1::CloudBuild::Client#receive_trigger_webhook. +# +def receive_trigger_webhook + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new + + # Call the receive_trigger_webhook method. + result = client.receive_trigger_webhook request + + # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.rb new file mode 100644 index 000000000000..e3f76d14a6cc --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.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 cloudbuild_v1_generated_CloudBuild_RetryBuild_sync] +require "google/cloud/build/v1" + +## +# Snippet for the retry_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#retry_build. +# +def retry_build + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::RetryBuildRequest.new + + # Call the retry_build method. + result = client.retry_build 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 cloudbuild_v1_generated_CloudBuild_RetryBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.rb new file mode 100644 index 000000000000..d5ed514267df --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.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 cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync] +require "google/cloud/build/v1" + +## +# Snippet for the run_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#run_build_trigger. +# +def run_build_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new + + # Call the run_build_trigger method. + result = client.run_build_trigger 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 cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.rb new file mode 100644 index 000000000000..726721e34492 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.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 cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync] +require "google/cloud/build/v1" + +## +# Snippet for the update_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#update_build_trigger. +# +def update_build_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new + + # Call the update_build_trigger method. + result = client.update_build_trigger request + + # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. + p result +end +# [END cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.rb new file mode 100644 index 000000000000..2ec501e5019d --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.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 cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync] +require "google/cloud/build/v1" + +## +# Snippet for the update_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#update_worker_pool. +# +def update_worker_pool + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V1::CloudBuild::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new + + # Call the update_worker_pool method. + result = client.update_worker_pool 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 cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json b/owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json new file mode 100644 index 000000000000..0d23f6edb197 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -0,0 +1,775 @@ +{ + "client_library": { + "name": "google-cloud-build-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.cloudbuild.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_CreateBuild_sync", + "title": "Snippet for the create_build call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#create_build.", + "file": "cloud_build/create_build.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_build", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#create_build", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::CreateBuildRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "CreateBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_GetBuild_sync", + "title": "Snippet for the get_build call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_build.", + "file": "cloud_build/get_build.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_build", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_build", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::GetBuildRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::Build", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "GetBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_ListBuilds_sync", + "title": "Snippet for the list_builds call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#list_builds.", + "file": "cloud_build/list_builds.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_builds", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#list_builds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::ListBuildsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::ListBuildsResponse", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "ListBuilds", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_CancelBuild_sync", + "title": "Snippet for the cancel_build call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#cancel_build.", + "file": "cloud_build/cancel_build.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_build", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#cancel_build", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::CancelBuildRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::Build", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "CancelBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_RetryBuild_sync", + "title": "Snippet for the retry_build call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#retry_build.", + "file": "cloud_build/retry_build.rb", + "language": "RUBY", + "client_method": { + "short_name": "retry_build", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#retry_build", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::RetryBuildRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "RetryBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync", + "title": "Snippet for the approve_build call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#approve_build.", + "file": "cloud_build/approve_build.rb", + "language": "RUBY", + "client_method": { + "short_name": "approve_build", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#approve_build", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::ApproveBuildRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "ApproveBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync", + "title": "Snippet for the create_build_trigger call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#create_build_trigger.", + "file": "cloud_build/create_build_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_build_trigger", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#create_build_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::CreateBuildTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::BuildTrigger", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "CreateBuildTrigger", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync", + "title": "Snippet for the get_build_trigger call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_build_trigger.", + "file": "cloud_build/get_build_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_build_trigger", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_build_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::GetBuildTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::BuildTrigger", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "GetBuildTrigger", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync", + "title": "Snippet for the list_build_triggers call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#list_build_triggers.", + "file": "cloud_build/list_build_triggers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_build_triggers", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#list_build_triggers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::ListBuildTriggersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::ListBuildTriggersResponse", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "ListBuildTriggers", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync", + "title": "Snippet for the delete_build_trigger call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#delete_build_trigger.", + "file": "cloud_build/delete_build_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_build_trigger", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#delete_build_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::DeleteBuildTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "DeleteBuildTrigger", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync", + "title": "Snippet for the update_build_trigger call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#update_build_trigger.", + "file": "cloud_build/update_build_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_build_trigger", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#update_build_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::UpdateBuildTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::BuildTrigger", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "UpdateBuildTrigger", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync", + "title": "Snippet for the run_build_trigger call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#run_build_trigger.", + "file": "cloud_build/run_build_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_build_trigger", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#run_build_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::RunBuildTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "RunBuildTrigger", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync", + "title": "Snippet for the receive_trigger_webhook call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#receive_trigger_webhook.", + "file": "cloud_build/receive_trigger_webhook.rb", + "language": "RUBY", + "client_method": { + "short_name": "receive_trigger_webhook", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#receive_trigger_webhook", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "ReceiveTriggerWebhook", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync", + "title": "Snippet for the create_worker_pool call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#create_worker_pool.", + "file": "cloud_build/create_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_worker_pool", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#create_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::CreateWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "CreateWorkerPool", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync", + "title": "Snippet for the get_worker_pool call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_worker_pool.", + "file": "cloud_build/get_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_worker_pool", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::GetWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::WorkerPool", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "GetWorkerPool", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync", + "title": "Snippet for the delete_worker_pool call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#delete_worker_pool.", + "file": "cloud_build/delete_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_worker_pool", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#delete_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::DeleteWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "DeleteWorkerPool", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync", + "title": "Snippet for the update_worker_pool call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#update_worker_pool.", + "file": "cloud_build/update_worker_pool.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_worker_pool", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#update_worker_pool", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::UpdateWorkerPoolRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "UpdateWorkerPool", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync", + "title": "Snippet for the list_worker_pools call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#list_worker_pools.", + "file": "cloud_build/list_worker_pools.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_worker_pools", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#list_worker_pools", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::ListWorkerPoolsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::ListWorkerPoolsResponse", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "ListWorkerPools", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v1_generated_CloudBuild_GetDefaultServiceAccount_sync", + "title": "Snippet for the get_default_service_account call in the CloudBuild service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_default_service_account.", + "file": "cloud_build/get_default_service_account.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_default_service_account", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_default_service_account", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V1::DefaultServiceAccount", + "client": { + "short_name": "CloudBuild::Client", + "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" + }, + "method": { + "short_name": "GetDefaultServiceAccount", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetDefaultServiceAccount", + "service": { + "short_name": "CloudBuild", + "full_name": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + }, + "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-build-v1/test/google/cloud/build/v1/cloud_build_operations_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_operations_test.rb new file mode 100644 index 000000000000..2950d7bfdae9 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_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/devtools/cloudbuild/v1/cloudbuild_pb" +require "google/devtools/cloudbuild/v1/cloudbuild_services_pb" +require "google/cloud/build/v1/cloud_build" + +class ::Google::Cloud::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb new file mode 100644 index 000000000000..23103029b01b --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb @@ -0,0 +1,244 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/build/v1/cloud_build" + +class ::Google::Cloud::Build::V1::CloudBuild::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_build_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.build_path project: "value0", build: "value1" + assert_equal "projects/value0/builds/value1", path + + path = client.build_path project: "value0", location: "value1", build: "value2" + assert_equal "projects/value0/locations/value1/builds/value2", path + end + end + + def test_build_trigger_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.build_trigger_path project: "value0", trigger: "value1" + assert_equal "projects/value0/triggers/value1", path + + path = client.build_trigger_path project: "value0", location: "value1", trigger: "value2" + assert_equal "projects/value0/locations/value1/triggers/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", keyring: "value2", key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_default_service_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.default_service_account_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/defaultServiceAccount", path + end + end + + def test_git_repository_link_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.git_repository_link_path project: "value0", location: "value1", connection: "value2", git_repository_link: "value3" + assert_equal "projects/value0/locations/value1/connections/value2/gitRepositoryLinks/value3", path + end + end + + def test_github_enterprise_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.github_enterprise_config_path project: "value0", config: "value1" + assert_equal "projects/value0/githubEnterpriseConfigs/value1", path + + path = client.github_enterprise_config_path project: "value0", location: "value1", config: "value2" + assert_equal "projects/value0/locations/value1/githubEnterpriseConfigs/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::Build::V1::CloudBuild::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_network_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_path project: "value0", network: "value1" + assert_equal "projects/value0/global/networks/value1", path + end + end + + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", connection: "value2", repository: "value3" + assert_equal "projects/value0/locations/value1/connections/value2/repositories/value3", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + end + end + + def test_service_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_account_path project: "value0", service_account: "value1" + assert_equal "projects/value0/serviceAccounts/value1", path + end + end + + def test_subscription_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.subscription_path project: "value0", subscription: "value1" + assert_equal "projects/value0/subscriptions/value1", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end + + def test_worker_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.worker_pool_path project: "value0", location: "value1", worker_pool: "value2" + assert_equal "projects/value0/locations/value1/workerPools/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb new file mode 100644 index 000000000000..e61bb210e750 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb @@ -0,0 +1,1167 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/devtools/cloudbuild/v1/cloudbuild_pb" +require "google/cloud/build/v1/cloud_build/rest" + + +class ::Google::Cloud::Build::V1::CloudBuild::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_create_build + # 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" + project_id = "hello world" + build = {} + + create_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_create_build_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_build({ parent: parent, project_id: project_id, build: build }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_build parent: parent, project_id: project_id, build: build do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_build ::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_build({ parent: parent, project_id: project_id, build: build }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_build(::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_build_client_stub.call_count + end + end + end + + def test_get_build + # Create test objects. + client_result = ::Google::Cloud::Build::V1::Build.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + project_id = "hello world" + id = "hello world" + + get_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_build_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_build({ name: name, project_id: project_id, id: id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_build name: name, project_id: project_id, id: id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_build ::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_build({ name: name, project_id: project_id, id: id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_build(::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_build_client_stub.call_count + end + end + end + + def test_list_builds + # Create test objects. + client_result = ::Google::Cloud::Build::V1::ListBuildsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + project_id = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_builds_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_list_builds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_builds_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_builds({ parent: parent, project_id: project_id, 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_builds parent: parent, project_id: project_id, 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_builds ::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds({ parent: parent, project_id: project_id, 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_builds(::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds_client_stub.call_count + end + end + end + + def test_cancel_build + # Create test objects. + client_result = ::Google::Cloud::Build::V1::Build.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + project_id = "hello world" + id = "hello world" + + cancel_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_cancel_build_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_build({ name: name, project_id: project_id, id: id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_build name: name, project_id: project_id, id: id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_build ::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_build({ name: name, project_id: project_id, id: id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_build(::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_build_client_stub.call_count + end + end + end + + def test_retry_build + # 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" + project_id = "hello world" + id = "hello world" + + retry_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_retry_build_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, retry_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.retry_build({ name: name, project_id: project_id, id: id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.retry_build name: name, project_id: project_id, id: id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.retry_build ::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.retry_build({ name: name, project_id: project_id, id: id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.retry_build(::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, retry_build_client_stub.call_count + end + end + end + + def test_approve_build + # 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" + approval_result = {} + + approve_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_approve_build_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, approve_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.approve_build({ name: name, approval_result: approval_result }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.approve_build name: name, approval_result: approval_result do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.approve_build ::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.approve_build({ name: name, approval_result: approval_result }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.approve_build(::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, approve_build_client_stub.call_count + end + end + end + + def test_create_build_trigger + # Create test objects. + client_result = ::Google::Cloud::Build::V1::BuildTrigger.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + project_id = "hello world" + trigger = {} + + create_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_create_build_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_build_trigger parent: parent, project_id: project_id, trigger: trigger do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_build_trigger ::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_build_trigger(::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_build_trigger_client_stub.call_count + end + end + end + + def test_get_build_trigger + # Create test objects. + client_result = ::Google::Cloud::Build::V1::BuildTrigger.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + project_id = "hello world" + trigger_id = "hello world" + + get_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_build_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_build_trigger ::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_build_trigger(::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_build_trigger_client_stub.call_count + end + end + end + + def test_list_build_triggers + # Create test objects. + client_result = ::Google::Cloud::Build::V1::ListBuildTriggersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + project_id = "hello world" + page_size = 42 + page_token = "hello world" + + list_build_triggers_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_list_build_triggers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_build_triggers_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_build_triggers({ parent: parent, project_id: project_id, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_build_triggers parent: parent, project_id: project_id, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_build_triggers ::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers({ parent: parent, project_id: project_id, 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_build_triggers(::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers_client_stub.call_count + end + end + end + + def test_delete_build_trigger + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + project_id = "hello world" + trigger_id = "hello world" + + delete_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_delete_build_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_build_trigger ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_build_trigger(::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_build_trigger_client_stub.call_count + end + end + end + + def test_update_build_trigger + # Create test objects. + client_result = ::Google::Cloud::Build::V1::BuildTrigger.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + project_id = "hello world" + trigger_id = "hello world" + trigger = {} + update_mask = {} + + update_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_update_build_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_build_trigger project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_build_trigger ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_build_trigger(::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_build_trigger_client_stub.call_count + end + end + end + + def test_run_build_trigger + # 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" + project_id = "hello world" + trigger_id = "hello world" + source = {} + + run_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_run_build_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.run_build_trigger name: name, project_id: project_id, trigger_id: trigger_id, source: source do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.run_build_trigger ::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.run_build_trigger(::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, run_build_trigger_client_stub.call_count + end + end + end + + def test_receive_trigger_webhook + # Create test objects. + client_result = ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + body = {} + project_id = "hello world" + trigger = "hello world" + secret = "hello world" + + receive_trigger_webhook_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_receive_trigger_webhook_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, receive_trigger_webhook_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.receive_trigger_webhook name: name, body: body, project_id: project_id, trigger: trigger, secret: secret do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.receive_trigger_webhook ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.receive_trigger_webhook(::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, receive_trigger_webhook_client_stub.call_count + end + end + end + + def test_create_worker_pool + # 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" + worker_pool = {} + worker_pool_id = "hello world" + validate_only = true + + create_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_create_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_worker_pool parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_worker_pool ::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_worker_pool(::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_worker_pool_client_stub.call_count + end + end + end + + def test_get_worker_pool + # Create test objects. + client_result = ::Google::Cloud::Build::V1::WorkerPool.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_worker_pool({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_worker_pool name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_worker_pool ::Google::Cloud::Build::V1::GetWorkerPoolRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_worker_pool({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_worker_pool(::Google::Cloud::Build::V1::GetWorkerPoolRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_worker_pool_client_stub.call_count + end + end + end + + def test_delete_worker_pool + # 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" + etag = "hello world" + allow_missing = true + validate_only = true + + delete_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_delete_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_worker_pool name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_worker_pool ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_worker_pool(::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_worker_pool_client_stub.call_count + end + end + end + + def test_update_worker_pool + # 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. + worker_pool = {} + update_mask = {} + validate_only = true + + update_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_update_worker_pool_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_worker_pool worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_worker_pool ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_worker_pool(::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_worker_pool_client_stub.call_count + end + end + end + + def test_list_worker_pools + # Create test objects. + client_result = ::Google::Cloud::Build::V1::ListWorkerPoolsResponse.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_worker_pools_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_list_worker_pools_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_worker_pools_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_worker_pools({ 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_worker_pools 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_worker_pools ::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools({ 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_worker_pools(::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools_client_stub.call_count + end + end + end + + def test_get_default_service_account + # Create test objects. + client_result = ::Google::Cloud::Build::V1::DefaultServiceAccount.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_default_service_account_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_default_service_account_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_default_service_account_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_default_service_account({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_default_service_account name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_default_service_account ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_default_service_account({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_default_service_account(::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_default_service_account_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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb new file mode 100644 index 000000000000..feba90a1c9de --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb @@ -0,0 +1,1354 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/devtools/cloudbuild/v1/cloudbuild_pb" +require "google/cloud/build/v1/cloud_build" + +class ::Google::Cloud::Build::V1::CloudBuild::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_create_build + # 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" + project_id = "hello world" + build = {} + + create_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_build, name + assert_kind_of ::Google::Cloud::Build::V1::CreateBuildRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["project_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::Build), request["build"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_build({ parent: parent, project_id: project_id, build: build }) 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_build parent: parent, project_id: project_id, build: build 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_build ::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build) 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_build({ parent: parent, project_id: project_id, build: build }, 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_build(::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build), 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_build_client_stub.call_rpc_count + end + end + + def test_get_build + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::Build.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" + project_id = "hello world" + id = "hello world" + + get_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_build, name + assert_kind_of ::Google::Cloud::Build::V1::GetBuildRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_build({ name: name, project_id: project_id, id: id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_build name: name, project_id: project_id, id: id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_build ::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_build({ name: name, project_id: project_id, id: id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_build(::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_build_client_stub.call_rpc_count + end + end + + def test_list_builds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::ListBuildsResponse.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" + project_id = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_builds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_builds, name + assert_kind_of ::Google::Cloud::Build::V1::ListBuildsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["project_id"] + 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_builds_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_builds({ parent: parent, project_id: project_id, 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_builds parent: parent, project_id: project_id, 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_builds ::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds({ parent: parent, project_id: project_id, 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_builds(::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds_client_stub.call_rpc_count + end + end + + def test_cancel_build + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::Build.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" + project_id = "hello world" + id = "hello world" + + cancel_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_build, name + assert_kind_of ::Google::Cloud::Build::V1::CancelBuildRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_build({ name: name, project_id: project_id, id: id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_build name: name, project_id: project_id, id: id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_build ::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_build({ name: name, project_id: project_id, id: id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_build(::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_build_client_stub.call_rpc_count + end + end + + def test_retry_build + # 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" + project_id = "hello world" + id = "hello world" + + retry_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :retry_build, name + assert_kind_of ::Google::Cloud::Build::V1::RetryBuildRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, retry_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.retry_build({ name: name, project_id: project_id, id: 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.retry_build name: name, project_id: project_id, id: 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.retry_build ::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: 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.retry_build({ name: name, project_id: project_id, id: 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.retry_build(::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: 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, retry_build_client_stub.call_rpc_count + end + end + + def test_approve_build + # 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" + approval_result = {} + + approve_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :approve_build, name + assert_kind_of ::Google::Cloud::Build::V1::ApproveBuildRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::ApprovalResult), request["approval_result"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, approve_build_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.approve_build({ name: name, approval_result: approval_result }) 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.approve_build name: name, approval_result: approval_result 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.approve_build ::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result) 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.approve_build({ name: name, approval_result: approval_result }, 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.approve_build(::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result), 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, approve_build_client_stub.call_rpc_count + end + end + + def test_create_build_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::BuildTrigger.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" + project_id = "hello world" + trigger = {} + + create_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_build_trigger, name + assert_kind_of ::Google::Cloud::Build::V1::CreateBuildTriggerRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["project_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::BuildTrigger), request["trigger"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_build_trigger parent: parent, project_id: project_id, trigger: trigger do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_build_trigger ::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_build_trigger(::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_build_trigger_client_stub.call_rpc_count + end + end + + def test_get_build_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::BuildTrigger.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" + project_id = "hello world" + trigger_id = "hello world" + + get_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_build_trigger, name + assert_kind_of ::Google::Cloud::Build::V1::GetBuildTriggerRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["trigger_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_build_trigger ::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_build_trigger(::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_build_trigger_client_stub.call_rpc_count + end + end + + def test_list_build_triggers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::ListBuildTriggersResponse.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" + project_id = "hello world" + page_size = 42 + page_token = "hello world" + + list_build_triggers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_build_triggers, name + assert_kind_of ::Google::Cloud::Build::V1::ListBuildTriggersRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["project_id"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_build_triggers_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_build_triggers({ parent: parent, project_id: project_id, 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_build_triggers parent: parent, project_id: project_id, 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_build_triggers ::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers({ parent: parent, project_id: project_id, 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_build_triggers(::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers_client_stub.call_rpc_count + end + end + + def test_delete_build_trigger + # 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" + project_id = "hello world" + trigger_id = "hello world" + + delete_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_build_trigger, name + assert_kind_of ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["trigger_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_build_trigger ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_build_trigger(::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_build_trigger_client_stub.call_rpc_count + end + end + + def test_update_build_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::BuildTrigger.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. + project_id = "hello world" + trigger_id = "hello world" + trigger = {} + update_mask = {} + + update_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_build_trigger, name + assert_kind_of ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, request + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["trigger_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::BuildTrigger), request["trigger"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_build_trigger project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_build_trigger ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_build_trigger(::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_build_trigger_client_stub.call_rpc_count + end + end + + def test_run_build_trigger + # 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" + project_id = "hello world" + trigger_id = "hello world" + source = {} + + run_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :run_build_trigger, name + assert_kind_of ::Google::Cloud::Build::V1::RunBuildTriggerRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["trigger_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::RepoSource), request["source"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_build_trigger_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }) 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.run_build_trigger name: name, project_id: project_id, trigger_id: trigger_id, source: source 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.run_build_trigger ::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source) 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.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }, 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.run_build_trigger(::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source), 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, run_build_trigger_client_stub.call_rpc_count + end + end + + def test_receive_trigger_webhook + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.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" + body = {} + project_id = "hello world" + trigger = "hello world" + secret = "hello world" + + receive_trigger_webhook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :receive_trigger_webhook, name + assert_kind_of ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Api::HttpBody), request["body"] + assert_equal "hello world", request["project_id"] + assert_equal "hello world", request["trigger"] + assert_equal "hello world", request["secret"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, receive_trigger_webhook_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.receive_trigger_webhook name: name, body: body, project_id: project_id, trigger: trigger, secret: secret do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.receive_trigger_webhook ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.receive_trigger_webhook(::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, receive_trigger_webhook_client_stub.call_rpc_count + end + end + + def test_create_worker_pool + # 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" + worker_pool = {} + worker_pool_id = "hello world" + validate_only = true + + create_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_worker_pool, name + assert_kind_of ::Google::Cloud::Build::V1::CreateWorkerPoolRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::WorkerPool), request["worker_pool"] + assert_equal "hello world", request["worker_pool_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }) 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_worker_pool parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only 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_worker_pool ::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only) 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_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }, 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_worker_pool(::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only), 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_worker_pool_client_stub.call_rpc_count + end + end + + def test_get_worker_pool + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::WorkerPool.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_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_worker_pool, name + assert_kind_of ::Google::Cloud::Build::V1::GetWorkerPoolRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_worker_pool({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_worker_pool name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_worker_pool ::Google::Cloud::Build::V1::GetWorkerPoolRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_worker_pool({ 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_worker_pool(::Google::Cloud::Build::V1::GetWorkerPoolRequest.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_worker_pool_client_stub.call_rpc_count + end + end + + def test_delete_worker_pool + # 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" + etag = "hello world" + allow_missing = true + validate_only = true + + delete_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_worker_pool, name + assert_kind_of ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) 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_worker_pool name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only 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_worker_pool ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) 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_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, 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_worker_pool(::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), 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_worker_pool_client_stub.call_rpc_count + end + end + + def test_update_worker_pool + # 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. + worker_pool = {} + update_mask = {} + validate_only = true + + update_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_worker_pool, name + assert_kind_of ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::WorkerPool), request["worker_pool"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_worker_pool_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }) 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_worker_pool worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only 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_worker_pool ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only) 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_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }, 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_worker_pool(::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only), 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_worker_pool_client_stub.call_rpc_count + end + end + + def test_list_worker_pools + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::ListWorkerPoolsResponse.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_worker_pools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_worker_pools, name + assert_kind_of ::Google::Cloud::Build::V1::ListWorkerPoolsRequest, 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_worker_pools_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_worker_pools({ 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_worker_pools 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_worker_pools ::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools({ 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_worker_pools(::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools_client_stub.call_rpc_count + end + end + + def test_get_default_service_account + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V1::DefaultServiceAccount.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_default_service_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_default_service_account, name + assert_kind_of ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_default_service_account_client_stub do + # Create client + client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_default_service_account({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_default_service_account name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_default_service_account ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_default_service_account({ 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_default_service_account(::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.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_default_service_account_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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Build::V1::CloudBuild::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-build-v1/test/helper.rb b/owl-bot-staging/google-cloud-build-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-build-v2/.gitignore b/owl-bot-staging/google-cloud-build-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/.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-build-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-build-v2/.repo-metadata.json new file mode 100644 index 000000000000..11c06d24fb0c --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudbuild.googleapis.com", + "api_shortname": "cloudbuild", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-build-v2/latest", + "distribution_name": "google-cloud-build-v2", + "is_cloud": true, + "language": "ruby", + "name": "cloudbuild", + "name_pretty": "Cloud Build V2 API", + "product_documentation": "https://cloud.google.com/build/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details.", + "ruby-cloud-env-prefix": "CLOUD_BUILD", + "ruby-cloud-product-url": "https://cloud.google.com/build/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-build-v2/.rubocop.yml b/owl-bot-staging/google-cloud-build-v2/.rubocop.yml new file mode 100644 index 000000000000..e407577f8bf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-build-v2.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-build-v2.rb" diff --git a/owl-bot-staging/google-cloud-build-v2/.toys.rb b/owl-bot-staging/google-cloud-build-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/.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-build-v2/.yardopts b/owl-bot-staging/google-cloud-build-v2/.yardopts new file mode 100644 index 000000000000..db7e74f770c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Build V2 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-build-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-build-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..aea53e98f922 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-build-v2 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-build-v2 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/build/v2" + +client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/build/v2" + +::Google::Cloud::Build::V2::RepositoryManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Build::V2::RepositoryManager::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-build-v2 +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/build/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Build::V2::RepositoryManager::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-build-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-build-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-build-v2/Gemfile b/owl-bot-staging/google-cloud-build-v2/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-build-v2/LICENSE.md b/owl-bot-staging/google-cloud-build-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/README.md b/owl-bot-staging/google-cloud-build-v2/README.md new file mode 100644 index 000000000000..63b551c1e2f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Build V2 API + +Creates and manages builds on Google Cloud Platform. + +Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Build V2 API. Most users should consider using +the main client gem, +[google-cloud-build](https://rubygems.org/gems/google-cloud-build). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-build-v2 +``` + +## 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/cloudbuild.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/build/v2" + +client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new +request = ::Google::Cloud::Build::V2::CreateConnectionRequest.new # (request fields as keyword arguments...) +response = client.create_connection request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-build-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/build/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/build/v2" +require "logger" + +client = ::Google::Cloud::Build::V2::RepositoryManager::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-build`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-build-v2`. +_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-build`. +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-build-v2`. + +### 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-build-v2/Rakefile b/owl-bot-staging/google-cloud-build-v2/Rakefile new file mode 100644 index 000000000000..ca4692088f7a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["CLOUD_BUILD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["CLOUD_BUILD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["CLOUD_BUILD_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 CLOUD_BUILD_TEST_PROJECT=test123 CLOUD_BUILD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/build/v2/repository_manager/credentials" + ::Google::Cloud::Build::V2::RepositoryManager::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["CLOUD_BUILD_PROJECT"] = project + ENV["CLOUD_BUILD_TEST_PROJECT"] = project + ENV["CLOUD_BUILD_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-build-v2 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-build-v2 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-build-v2 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-build-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-build-v2" + header "google-cloud-build-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-build-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-build-v2 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-build-v2 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-build-v2 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-build-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-build-v2/gapic_metadata.json new file mode 100644 index 000000000000..3428c1b72d41 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/gapic_metadata.json @@ -0,0 +1,88 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.devtools.cloudbuild.v2", + "libraryPackage": "::Google::Cloud::Build::V2", + "services": { + "RepositoryManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Build::V2::RepositoryManager::Client", + "rpcs": { + "CreateConnection": { + "methods": [ + "create_connection" + ] + }, + "GetConnection": { + "methods": [ + "get_connection" + ] + }, + "ListConnections": { + "methods": [ + "list_connections" + ] + }, + "UpdateConnection": { + "methods": [ + "update_connection" + ] + }, + "DeleteConnection": { + "methods": [ + "delete_connection" + ] + }, + "CreateRepository": { + "methods": [ + "create_repository" + ] + }, + "BatchCreateRepositories": { + "methods": [ + "batch_create_repositories" + ] + }, + "GetRepository": { + "methods": [ + "get_repository" + ] + }, + "ListRepositories": { + "methods": [ + "list_repositories" + ] + }, + "DeleteRepository": { + "methods": [ + "delete_repository" + ] + }, + "FetchReadWriteToken": { + "methods": [ + "fetch_read_write_token" + ] + }, + "FetchReadToken": { + "methods": [ + "fetch_read_token" + ] + }, + "FetchLinkableRepositories": { + "methods": [ + "fetch_linkable_repositories" + ] + }, + "FetchGitRefs": { + "methods": [ + "fetch_git_refs" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec b/owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec new file mode 100644 index 000000000000..c658c1ce0fe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/build/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-build-v2" + gem.version = Google::Cloud::Build::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details." + gem.summary = "Creates and manages builds on Google Cloud Platform." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.rb b/owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.rb new file mode 100644 index 000000000000..4fe9d0c129b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.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/build/v2" diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb new file mode 100644 index 000000000000..39c4f83973b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/build/v2/repository_manager" +require "google/cloud/build/v2/version" + +module Google + module Cloud + module Build + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/build/v2" + # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/build/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb new file mode 100644 index 000000000000..0080bb409f2e --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/build/v2/version" + +require "google/cloud/build/v2/repository_manager/credentials" +require "google/cloud/build/v2/repository_manager/paths" +require "google/cloud/build/v2/repository_manager/operations" +require "google/cloud/build/v2/repository_manager/client" + +module Google + module Cloud + module Build + module V2 + ## + # Manages connections to source code repositories. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/build/v2/repository_manager" + # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new + # + module RepositoryManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "repository_manager", "helpers.rb" +require "google/cloud/build/v2/repository_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb new file mode 100644 index 000000000000..1df019e81342 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb @@ -0,0 +1,1909 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/devtools/cloudbuild/v2/repositories_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Build + module V2 + module RepositoryManager + ## + # Client for the RepositoryManager service. + # + # Manages connections to source code repositories. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :repository_manager_stub + + ## + # Configure the RepositoryManager Client class. + # + # See {::Google::Cloud::Build::V2::RepositoryManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RepositoryManager clients + # ::Google::Cloud::Build::V2::RepositoryManager::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", "Build", "V2"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_connection.timeout = 60.0 + + default_config.rpcs.get_connection.timeout = 60.0 + default_config.rpcs.get_connection.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_connections.timeout = 60.0 + default_config.rpcs.list_connections.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_connection.timeout = 60.0 + + default_config.rpcs.delete_connection.timeout = 60.0 + + default_config.rpcs.create_repository.timeout = 60.0 + + default_config.rpcs.get_repository.timeout = 60.0 + default_config.rpcs.get_repository.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_repositories.timeout = 60.0 + default_config.rpcs.list_repositories.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_repository.timeout = 60.0 + + default_config.rpcs.fetch_read_write_token.timeout = 60.0 + default_config.rpcs.fetch_read_write_token.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_read_token.timeout = 60.0 + default_config.rpcs.fetch_read_token.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.fetch_linkable_repositories.timeout = 60.0 + default_config.rpcs.fetch_linkable_repositories.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 RepositoryManager 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::Build::V2::RepositoryManager::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 + @repository_manager_stub.universe_domain + end + + ## + # Create a new RepositoryManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RepositoryManager 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/devtools/cloudbuild/v2/repositories_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 + + @repository_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Build::V2::RepositoryManager::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 + ) + + @repository_manager_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @repository_manager_stub.endpoint + config.universe_domain = @repository_manager_stub.universe_domain + config.logger = @repository_manager_stub.logger if config.respond_to? :logger= + end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @repository_manager_stub.endpoint + config.universe_domain = @repository_manager_stub.universe_domain + config.logger = @repository_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Build::V2::RepositoryManager::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @repository_manager_stub.logger + end + + # Service calls + + ## + # Creates a Connection. + # + # @overload create_connection(request, options = nil) + # Pass arguments to `create_connection` via a request object, either of type + # {::Google::Cloud::Build::V2::CreateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::CreateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_connection(parent: nil, connection: nil, connection_id: nil) + # Pass arguments to `create_connection` via keyword arguments. Note that at + # least one keyword argument is 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. Project and location where the connection will be created. + # Format: `projects/*/locations/*`. + # @param connection [::Google::Cloud::Build::V2::Connection, ::Hash] + # Required. The Connection to create. + # @param connection_id [::String] + # Required. The ID to use for the Connection, which will become the final + # component of the Connection's resource name. Names must be unique + # per-project per-location. Allows alphanumeric characters and any of + # -._~%!$&'()*+,;=@. + # + # @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/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::CreateConnectionRequest.new + # + # # Call the create_connection method. + # result = client.create_connection 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_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::CreateConnectionRequest + + # Converts hash 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_connection.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::Build::V2::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_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :create_connection, 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 + + ## + # Gets details of a single connection. + # + # @overload get_connection(request, options = nil) + # Pass arguments to `get_connection` via a request object, either of type + # {::Google::Cloud::Build::V2::GetConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::GetConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_connection(name: nil) + # Pass arguments to `get_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Connection to retrieve. + # Format: `projects/*/locations/*/connections/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V2::Connection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V2::Connection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::GetConnectionRequest.new + # + # # Call the get_connection method. + # result = client.get_connection request + # + # # The returned object is of type Google::Cloud::Build::V2::Connection. + # p result + # + def get_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::GetConnectionRequest + + # Converts hash 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_connection.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::Build::V2::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_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :get_connection, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Connections in a given project and location. + # + # @overload list_connections(request, options = nil) + # Pass arguments to `list_connections` via a request object, either of type + # {::Google::Cloud::Build::V2::ListConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::ListConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_connections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_connections` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of Connections. + # Format: `projects/*/locations/*`. + # @param page_size [::Integer] + # Number of results to return in the list. + # @param page_token [::String] + # Page start. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::ListConnectionsRequest.new + # + # # Call the list_connections method. + # result = client.list_connections 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::Build::V2::Connection. + # p item + # end + # + def list_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::ListConnectionsRequest + + # Converts hash 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_connections.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::Build::V2::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_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :list_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @repository_manager_stub, :list_connections, 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 + + ## + # Updates a single connection. + # + # @overload update_connection(request, options = nil) + # Pass arguments to `update_connection` via a request object, either of type + # {::Google::Cloud::Build::V2::UpdateConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::UpdateConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_connection(connection: nil, update_mask: nil, allow_missing: nil, etag: nil) + # Pass arguments to `update_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param connection [::Google::Cloud::Build::V2::Connection, ::Hash] + # Required. The Connection to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @param allow_missing [::Boolean] + # If set to true, and the connection is not found a new connection + # will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input connection has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @param etag [::String] + # The current etag of the connection. + # If an etag is provided and does not match the current etag of the + # connection, update will be blocked and an ABORTED error will be returned. + # + # @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/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::UpdateConnectionRequest.new + # + # # Call the update_connection method. + # result = client.update_connection 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_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::UpdateConnectionRequest + + # Converts hash 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_connection.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::Build::V2::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.connection&.name + header_params["connection.name"] = request.connection.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_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :update_connection, 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 single connection. + # + # @overload delete_connection(request, options = nil) + # Pass arguments to `delete_connection` via a request object, either of type + # {::Google::Cloud::Build::V2::DeleteConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::DeleteConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_connection(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Connection to delete. + # Format: `projects/*/locations/*/connections/*`. + # @param etag [::String] + # The current etag of the connection. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked and an ABORTED error will be returned. + # @param validate_only [::Boolean] + # If set, validate the request, but do not actually post it. + # + # @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/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::DeleteConnectionRequest.new + # + # # Call the delete_connection method. + # result = client.delete_connection 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_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::DeleteConnectionRequest + + # Converts hash 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_connection.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::Build::V2::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_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :delete_connection, 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 + + ## + # Creates a Repository. + # + # @overload create_repository(request, options = nil) + # Pass arguments to `create_repository` via a request object, either of type + # {::Google::Cloud::Build::V2::CreateRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_repository(parent: nil, repository: nil, repository_id: nil) + # Pass arguments to `create_repository` via keyword arguments. Note that at + # least one keyword argument is 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 connection to contain the repository. If the request is part + # of a BatchCreateRepositoriesRequest, this field should be empty or match + # the parent specified there. + # @param repository [::Google::Cloud::Build::V2::Repository, ::Hash] + # Required. The repository to create. + # @param repository_id [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This ID should be unique in + # the connection. Allows alphanumeric characters and any of + # -._~%!$&'()*+,;=@. + # + # @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/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::CreateRepositoryRequest.new + # + # # Call the create_repository method. + # result = client.create_repository 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_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::CreateRepositoryRequest + + # Converts hash 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_repository.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::Build::V2::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_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :create_repository, 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 + + ## + # Creates multiple repositories inside a connection. + # + # @overload batch_create_repositories(request, options = nil) + # Pass arguments to `batch_create_repositories` via a request object, either of type + # {::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_create_repositories(parent: nil, requests: nil) + # Pass arguments to `batch_create_repositories` via keyword arguments. Note that at + # least one keyword argument is 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 connection to contain all the repositories being created. + # Format: projects/*/locations/*/connections/* + # The parent field in the CreateRepositoryRequest messages + # must either be empty or match this field. + # @param requests [::Array<::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Hash>] + # Required. The request messages specifying the repositories 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/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new + # + # # Call the batch_create_repositories method. + # result = client.batch_create_repositories 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 batch_create_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest + + # Converts hash 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.batch_create_repositories.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::Build::V2::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.batch_create_repositories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_create_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :batch_create_repositories, 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 + + ## + # Gets details of a single repository. + # + # @overload get_repository(request, options = nil) + # Pass arguments to `get_repository` via a request object, either of type + # {::Google::Cloud::Build::V2::GetRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::GetRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_repository(name: nil) + # Pass arguments to `get_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Repository to retrieve. + # Format: `projects/*/locations/*/connections/*/repositories/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V2::Repository] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V2::Repository] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::GetRepositoryRequest.new + # + # # Call the get_repository method. + # result = client.get_repository request + # + # # The returned object is of type Google::Cloud::Build::V2::Repository. + # p result + # + def get_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::GetRepositoryRequest + + # Converts hash 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_repository.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::Build::V2::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_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :get_repository, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Repositories in a given connection. + # + # @overload list_repositories(request, options = nil) + # Pass arguments to `list_repositories` via a request object, either of type + # {::Google::Cloud::Build::V2::ListRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::ListRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_repositories` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of Repositories. + # Format: `projects/*/locations/*/connections/*`. + # @param page_size [::Integer] + # Number of results to return in the list. + # @param page_token [::String] + # Page start. + # @param filter [::String] + # A filter expression that filters resources listed in the response. + # Expressions must follow API improvement proposal + # [AIP-160](https://google.aip.dev/160). e.g. + # `remote_uri:"https://github.com*"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::ListRepositoriesRequest.new + # + # # Call the list_repositories method. + # result = client.list_repositories 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::Build::V2::Repository. + # p item + # end + # + def list_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::ListRepositoriesRequest + + # Converts hash 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_repositories.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::Build::V2::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_repositories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :list_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @repository_manager_stub, :list_repositories, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a single repository. + # + # @overload delete_repository(request, options = nil) + # Pass arguments to `delete_repository` via a request object, either of type + # {::Google::Cloud::Build::V2::DeleteRepositoryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::DeleteRepositoryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_repository(name: nil, etag: nil, validate_only: nil) + # Pass arguments to `delete_repository` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the Repository to delete. + # Format: `projects/*/locations/*/connections/*/repositories/*`. + # @param etag [::String] + # The current etag of the repository. + # If an etag is provided and does not match the current etag of the + # repository, deletion will be blocked and an ABORTED error will be returned. + # @param validate_only [::Boolean] + # If set, validate the request, but do not actually post it. + # + # @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/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::DeleteRepositoryRequest.new + # + # # Call the delete_repository method. + # result = client.delete_repository 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_repository request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::DeleteRepositoryRequest + + # Converts hash 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_repository.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::Build::V2::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_repository.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_repository.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :delete_repository, 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 + + ## + # Fetches read/write token of a given repository. + # + # @overload fetch_read_write_token(request, options = nil) + # Pass arguments to `fetch_read_write_token` via a request object, either of type + # {::Google::Cloud::Build::V2::FetchReadWriteTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::FetchReadWriteTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_read_write_token(repository: nil) + # Pass arguments to `fetch_read_write_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::String] + # Required. The resource name of the repository in the format + # `projects/*/locations/*/connections/*/repositories/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V2::FetchReadWriteTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V2::FetchReadWriteTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new + # + # # Call the fetch_read_write_token method. + # result = client.fetch_read_write_token request + # + # # The returned object is of type Google::Cloud::Build::V2::FetchReadWriteTokenResponse. + # p result + # + def fetch_read_write_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest + + # Converts hash 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.fetch_read_write_token.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::Build::V2::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.repository + header_params["repository"] = request.repository + 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.fetch_read_write_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_read_write_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :fetch_read_write_token, 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 + + ## + # Fetches read token of a given repository. + # + # @overload fetch_read_token(request, options = nil) + # Pass arguments to `fetch_read_token` via a request object, either of type + # {::Google::Cloud::Build::V2::FetchReadTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::FetchReadTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_read_token(repository: nil) + # Pass arguments to `fetch_read_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::String] + # Required. The resource name of the repository in the format + # `projects/*/locations/*/connections/*/repositories/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V2::FetchReadTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V2::FetchReadTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::FetchReadTokenRequest.new + # + # # Call the fetch_read_token method. + # result = client.fetch_read_token request + # + # # The returned object is of type Google::Cloud::Build::V2::FetchReadTokenResponse. + # p result + # + def fetch_read_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchReadTokenRequest + + # Converts hash 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.fetch_read_token.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::Build::V2::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.repository + header_params["repository"] = request.repository + 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.fetch_read_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_read_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :fetch_read_token, 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 + + ## + # FetchLinkableRepositories get repositories from SCM that are + # accessible and could be added to the connection. + # + # @overload fetch_linkable_repositories(request, options = nil) + # Pass arguments to `fetch_linkable_repositories` via a request object, either of type + # {::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_linkable_repositories(connection: nil, page_size: nil, page_token: nil) + # Pass arguments to `fetch_linkable_repositories` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param connection [::String] + # Required. The name of the Connection. + # Format: `projects/*/locations/*/connections/*`. + # @param page_size [::Integer] + # Number of results to return in the list. Default to 20. + # @param page_token [::String] + # Page start. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new + # + # # Call the fetch_linkable_repositories method. + # result = client.fetch_linkable_repositories 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::Build::V2::Repository. + # p item + # end + # + def fetch_linkable_repositories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest + + # Converts hash 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.fetch_linkable_repositories.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::Build::V2::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.connection + header_params["connection"] = request.connection + 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.fetch_linkable_repositories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_linkable_repositories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :fetch_linkable_repositories, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @repository_manager_stub, :fetch_linkable_repositories, 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 + + ## + # Fetch the list of branches or tags for a given repository. + # + # @overload fetch_git_refs(request, options = nil) + # Pass arguments to `fetch_git_refs` via a request object, either of type + # {::Google::Cloud::Build::V2::FetchGitRefsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Build::V2::FetchGitRefsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload fetch_git_refs(repository: nil, ref_type: nil) + # Pass arguments to `fetch_git_refs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param repository [::String] + # Required. The resource name of the repository in the format + # `projects/*/locations/*/connections/*/repositories/*`. + # @param ref_type [::Google::Cloud::Build::V2::FetchGitRefsRequest::RefType] + # Type of refs to fetch + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Build::V2::FetchGitRefsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Build::V2::FetchGitRefsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/build/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Build::V2::RepositoryManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Build::V2::FetchGitRefsRequest.new + # + # # Call the fetch_git_refs method. + # result = client.fetch_git_refs request + # + # # The returned object is of type Google::Cloud::Build::V2::FetchGitRefsResponse. + # p result + # + def fetch_git_refs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchGitRefsRequest + + # Converts hash 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.fetch_git_refs.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::Build::V2::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.repository + header_params["repository"] = request.repository + 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.fetch_git_refs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.fetch_git_refs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @repository_manager_stub.call_rpc :fetch_git_refs, 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 RepositoryManager API. + # + # This class represents the configuration for RepositoryManager, + # 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::Build::V2::RepositoryManager::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 + # # create_connection to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Build::V2::RepositoryManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_connection.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_connection.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::Build::V2::RepositoryManager::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 = "cloudbuild.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 RepositoryManager 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 `create_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connection + ## + # RPC-specific configuration for `get_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connection + ## + # RPC-specific configuration for `list_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connections + ## + # RPC-specific configuration for `update_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :update_connection + ## + # RPC-specific configuration for `delete_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connection + ## + # RPC-specific configuration for `create_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :create_repository + ## + # RPC-specific configuration for `batch_create_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_create_repositories + ## + # RPC-specific configuration for `get_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :get_repository + ## + # RPC-specific configuration for `list_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :list_repositories + ## + # RPC-specific configuration for `delete_repository` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_repository + ## + # RPC-specific configuration for `fetch_read_write_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_read_write_token + ## + # RPC-specific configuration for `fetch_read_token` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_read_token + ## + # RPC-specific configuration for `fetch_linkable_repositories` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_linkable_repositories + ## + # RPC-specific configuration for `fetch_git_refs` + # @return [::Gapic::Config::Method] + # + attr_reader :fetch_git_refs + + # @private + def initialize parent_rpcs = nil + create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection + @create_connection = ::Gapic::Config::Method.new create_connection_config + get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection + @get_connection = ::Gapic::Config::Method.new get_connection_config + list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections + @list_connections = ::Gapic::Config::Method.new list_connections_config + update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection + @update_connection = ::Gapic::Config::Method.new update_connection_config + delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection + @delete_connection = ::Gapic::Config::Method.new delete_connection_config + create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository + @create_repository = ::Gapic::Config::Method.new create_repository_config + batch_create_repositories_config = parent_rpcs.batch_create_repositories if parent_rpcs.respond_to? :batch_create_repositories + @batch_create_repositories = ::Gapic::Config::Method.new batch_create_repositories_config + get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository + @get_repository = ::Gapic::Config::Method.new get_repository_config + list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories + @list_repositories = ::Gapic::Config::Method.new list_repositories_config + delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository + @delete_repository = ::Gapic::Config::Method.new delete_repository_config + fetch_read_write_token_config = parent_rpcs.fetch_read_write_token if parent_rpcs.respond_to? :fetch_read_write_token + @fetch_read_write_token = ::Gapic::Config::Method.new fetch_read_write_token_config + fetch_read_token_config = parent_rpcs.fetch_read_token if parent_rpcs.respond_to? :fetch_read_token + @fetch_read_token = ::Gapic::Config::Method.new fetch_read_token_config + fetch_linkable_repositories_config = parent_rpcs.fetch_linkable_repositories if parent_rpcs.respond_to? :fetch_linkable_repositories + @fetch_linkable_repositories = ::Gapic::Config::Method.new fetch_linkable_repositories_config + fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs + @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/credentials.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/credentials.rb new file mode 100644 index 000000000000..b1699b2a504f --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/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 Build + module V2 + module RepositoryManager + # Credentials for the RepositoryManager API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "CLOUD_BUILD_CREDENTIALS", + "CLOUD_BUILD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "CLOUD_BUILD_CREDENTIALS_JSON", + "CLOUD_BUILD_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-build-v2/lib/google/cloud/build/v2/repository_manager/operations.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/operations.rb new file mode 100644 index 000000000000..31248dd814a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/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 Build + module V2 + module RepositoryManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the RepositoryManager 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 RepositoryManager 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::Build::V2::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::Build::V2::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::Build::V2::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::Build::V2::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::Build::V2::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 = "cloudbuild.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-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb new file mode 100644 index 000000000000..25ea6dd0f83a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb @@ -0,0 +1,130 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Build + module V2 + module RepositoryManager + # Path helper methods for the RepositoryManager API. + module Paths + ## + # Create a fully-qualified Connection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # + # @return [::String] + def connection_path project:, location:, connection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}" + 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 Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param connection [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, connection:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}" + end + + ## + # Create a fully-qualified SecretVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/secrets/{secret}/versions/{version}` + # + # @param project [String] + # @param secret [String] + # @param version [String] + # + # @return [::String] + def secret_version_path project:, secret:, version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" + + "projects/#{project}/secrets/#{secret}/versions/#{version}" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param namespace [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, namespace:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" + + "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/version.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/version.rb new file mode 100644 index 000000000000..eb34d4813441 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/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 Build + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb new file mode 100644 index 000000000000..15a4ee1344fc --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/cloudbuild/v2/cloudbuild.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/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/devtools/cloudbuild/v2/cloudbuild.proto\x12\x1dgoogle.devtools.cloudbuild.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\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\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x92\x02\n\"RunWorkflowCustomOperationMetadata\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\x11\n\x04verb\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fpipeline_run_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\xa3\x05\n\x18\x63om.google.cloudbuild.v2B\x0f\x43loudBuildProtoP\x01Z>cloud.google.com/go/cloudbuild/apiv2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V2\xca\x02\x15Google\\Cloud\\Build\\V2\xea\x02\x18Google::Cloud::Build::V2\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41|\n0cloudbuild.googleapis.com/githubEnterpriseConfig\x12Hprojects/{project}/locations/{location}/githubEnterpriseConfigs/{config}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Build + module V2 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.OperationMetadata").msgclass + RunWorkflowCustomOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb new file mode 100644 index 000000000000..3ab0bc3787cb --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb @@ -0,0 +1,66 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/devtools/cloudbuild/v2/repositories.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/httpbody_pb' +require 'google/api/resource_pb' +require 'google/devtools/cloudbuild/v2/cloudbuild_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/devtools/cloudbuild/v2/repositories.proto\x12\x1dgoogle.devtools.cloudbuild.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/cloudbuild/v2/cloudbuild.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdd\x07\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\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\x44\n\rgithub_config\x18\x05 \x01(\x0b\x32+.google.devtools.cloudbuild.v2.GitHubConfigH\x00\x12Y\n\x18github_enterprise_config\x18\x06 \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.GitHubEnterpriseConfigH\x00\x12\x44\n\rgitlab_config\x18\x07 \x01(\x0b\x32+.google.devtools.cloudbuild.v2.GitLabConfigH\x00\x12`\n\x1c\x62itbucket_data_center_config\x18\x08 \x01(\x0b\x32\x38.google.devtools.cloudbuild.v2.BitbucketDataCenterConfigH\x00\x12U\n\x16\x62itbucket_cloud_config\x18\t \x01(\x0b\x32\x33.google.devtools.cloudbuild.v2.BitbucketCloudConfigH\x00\x12Q\n\x12installation_state\x18\x0c \x01(\x0b\x32\x30.google.devtools.cloudbuild.v2.InstallationStateB\x03\xe0\x41\x03\x12\x10\n\x08\x64isabled\x18\r \x01(\x08\x12\x18\n\x0breconciling\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x0f \x03(\x0b\x32:.google.devtools.cloudbuild.v2.Connection.AnnotationsEntry\x12\x0c\n\x04\x65tag\x18\x10 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x88\x01\xea\x41\x84\x01\n$cloudbuild.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"\x85\x02\n\x11InstallationState\x12J\n\x05stage\x18\x01 \x01(\x0e\x32\x36.google.devtools.cloudbuild.v2.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\x8b\x01\n FetchLinkableRepositoriesRequest\x12@\n\nconnection\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"}\n!FetchLinkableRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"z\n\x0cGitHubConfig\x12M\n\x15\x61uthorizer_credential\x18\x01 \x01(\x0b\x32..google.devtools.cloudbuild.v2.OAuthCredential\x12\x1b\n\x13\x61pp_installation_id\x18\x02 \x01(\x03\"\xb7\x03\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x61pi_key\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\x03\x12\x10\n\x08\x61pp_slug\x18\r \x01(\t\x12S\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x1b\n\x13\x61pp_installation_id\x18\t \x01(\x03\x12W\n\x18service_directory_config\x18\n \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.ServiceDirectoryConfig\x12\x0e\n\x06ssl_ca\x18\x0b \x01(\t\x12\x1b\n\x0eserver_version\x18\x0e \x01(\tB\x03\xe0\x41\x03\"\xaf\x03\n\x0cGitLabConfig\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12Q\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12W\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.ServiceDirectoryConfig\x12\x0e\n\x06ssl_ca\x18\x06 \x01(\t\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xcb\x03\n\x19\x42itbucketDataCenterConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12Q\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12\\\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x13\n\x06ssl_ca\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xb4\x02\n\x14\x42itbucketCloudConfig\x12\x16\n\tworkspace\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12Q\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\xf6\x03\n\nRepository\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x17\n\nremote_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32:.google.devtools.cloudbuild.v2.Repository.AnnotationsEntry\x12\x0c\n\x04\x65tag\x18\x07 \x01(\t\x12\x17\n\nwebhook_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa3\x01\xea\x41\x9f\x01\n$cloudbuild.googleapis.com/Repository\x12Zprojects/{project}/locations/{location}/connections/{connection}/repositories/{repository}*\x0crepositories2\nrepositoryR\x01\x01\"}\n\x0fOAuthCredential\x12S\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xb7\x01\n\x17\x43reateConnectionRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Connection\x12\x42\n\nconnection\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v2.ConnectionB\x03\xe0\x41\x02\x12\x1a\n\rconnection_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"R\n\x14GetConnectionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\"}\n\x16ListConnectionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Connection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x17ListConnectionsResponse\x12>\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n\x17UpdateConnectionRequest\x12\x42\n\nconnection\x18\x01 \x01(\x0b\x32).google.devtools.cloudbuild.v2.ConnectionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"z\n\x17\x44\x65leteConnectionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xb7\x01\n\x17\x43reateRepositoryRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12\x42\n\nrepository\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v2.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xad\x01\n\x1e\x42\x61tchCreateRepositoriesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12M\n\x08requests\x18\x02 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v2.CreateRepositoryRequestB\x03\xe0\x41\x02\"b\n\x1f\x42\x61tchCreateRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Repository\"R\n\x14GetRepositoryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\"\x8e\x01\n\x17ListRepositoriesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Repository\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\"t\n\x18ListRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"z\n\x17\x44\x65leteRepositoryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"^\n\x1a\x46\x65tchReadWriteTokenRequest\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\"Y\n\x15\x46\x65tchReadTokenRequest\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\"\\\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"a\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8e\x01\n\x15ProcessWebhookRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Connection\x12\"\n\x04\x62ody\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\x12\x13\n\x0bwebhook_key\x18\x03 \x01(\t\"\xdf\x01\n\x13\x46\x65tchGitRefsRequest\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12L\n\x08ref_type\x18\x02 \x01(\x0e\x32:.google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\")\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t2\xc2\x1b\n\x11RepositoryManager\x12\x91\x02\n\x10\x43reateConnection\x12\x36.google.devtools.cloudbuild.v2.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41=\n\nConnection\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v2/{parent=projects/*/locations/*}/connections:\nconnection\x12\xaf\x01\n\rGetConnection\x12\x33.google.devtools.cloudbuild.v2.GetConnectionRequest\x1a).google.devtools.cloudbuild.v2.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2/{name=projects/*/locations/*/connections/*}\x12\xc2\x01\n\x0fListConnections\x12\x35.google.devtools.cloudbuild.v2.ListConnectionsRequest\x1a\x36.google.devtools.cloudbuild.v2.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2/{parent=projects/*/locations/*}/connections\x12\x93\x02\n\x10UpdateConnection\x12\x36.google.devtools.cloudbuild.v2.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41=\n\nConnection\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v2/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xf5\x01\n\x10\x44\x65leteConnection\x12\x36.google.devtools.cloudbuild.v2.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41H\n\x15google.protobuf.Empty\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2/{name=projects/*/locations/*/connections/*}\x12\xa0\x02\n\x10\x43reateRepository\x12\x36.google.devtools.cloudbuild.v2.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41=\n\nRepository\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02L\">/v2/{parent=projects/*/locations/*/connections/*}/repositories:\nrepository\x12\xb6\x02\n\x17\x42\x61tchCreateRepositories\x12=.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41R\n\x1f\x42\x61tchCreateRepositoriesResponse\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02O\"J/v2/{parent=projects/*/locations/*/connections/*}/repositories:batchCreate:\x01*\x12\xbe\x01\n\rGetRepository\x12\x33.google.devtools.cloudbuild.v2.GetRepositoryRequest\x1a).google.devtools.cloudbuild.v2.Repository\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v2/{name=projects/*/locations/*/connections/*/repositories/*}\x12\xd4\x01\n\x10ListRepositories\x12\x36.google.devtools.cloudbuild.v2.ListRepositoriesRequest\x1a\x37.google.devtools.cloudbuild.v2.ListRepositoriesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v2/{parent=projects/*/locations/*/connections/*}/repositories\x12\x84\x02\n\x10\x44\x65leteRepository\x12\x36.google.devtools.cloudbuild.v2.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41H\n\x15google.protobuf.Empty\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v2/{name=projects/*/locations/*/connections/*/repositories/*}\x12\xff\x01\n\x13\x46\x65tchReadWriteToken\x12\x39.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest\x1a:.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse\"q\xda\x41\nrepository\x82\xd3\xe4\x93\x02^\"Y/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadWriteToken:\x01*\x12\xeb\x01\n\x0e\x46\x65tchReadToken\x12\x34.google.devtools.cloudbuild.v2.FetchReadTokenRequest\x1a\x35.google.devtools.cloudbuild.v2.FetchReadTokenResponse\"l\xda\x41\nrepository\x82\xd3\xe4\x93\x02Y\"T/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadToken:\x01*\x12\xf7\x01\n\x19\x46\x65tchLinkableRepositories\x12?.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest\x1a@.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse\"W\x82\xd3\xe4\x93\x02Q\x12O/v2/{connection=projects/*/locations/*/connections/*}:fetchLinkableRepositories\x12\xdf\x01\n\x0c\x46\x65tchGitRefs\x12\x32.google.devtools.cloudbuild.v2.FetchGitRefsRequest\x1a\x33.google.devtools.cloudbuild.v2.FetchGitRefsResponse\"f\xda\x41\nrepository\x82\xd3\xe4\x93\x02S\x12Q/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:fetchGitRefs\x1aM\xca\x41\x19\x63loudbuild.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x02\n\x18\x63om.google.cloudbuild.v2B\x16RepositoryManagerProtoP\x01Z>cloud.google.com/go/cloudbuild/apiv2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V2\xca\x02\x15Google\\Cloud\\Build\\V2\xea\x02\x18Google::Cloud::Build::V2\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Build + module V2 + Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.Connection").msgclass + InstallationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.InstallationState").msgclass + InstallationState::Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.InstallationState.Stage").enummodule + FetchLinkableRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest").msgclass + FetchLinkableRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse").msgclass + GitHubConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GitHubConfig").msgclass + GitHubEnterpriseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GitHubEnterpriseConfig").msgclass + GitLabConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GitLabConfig").msgclass + BitbucketDataCenterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BitbucketDataCenterConfig").msgclass + BitbucketCloudConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BitbucketCloudConfig").msgclass + ServiceDirectoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ServiceDirectoryConfig").msgclass + Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.Repository").msgclass + OAuthCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.OAuthCredential").msgclass + UserCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.UserCredential").msgclass + CreateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.CreateConnectionRequest").msgclass + GetConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GetConnectionRequest").msgclass + ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListConnectionsRequest").msgclass + ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListConnectionsResponse").msgclass + UpdateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.UpdateConnectionRequest").msgclass + DeleteConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.DeleteConnectionRequest").msgclass + CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.CreateRepositoryRequest").msgclass + BatchCreateRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest").msgclass + BatchCreateRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse").msgclass + GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GetRepositoryRequest").msgclass + ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListRepositoriesRequest").msgclass + ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListRepositoriesResponse").msgclass + DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.DeleteRepositoryRequest").msgclass + FetchReadWriteTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest").msgclass + FetchReadTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadTokenRequest").msgclass + FetchReadTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadTokenResponse").msgclass + FetchReadWriteTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse").msgclass + ProcessWebhookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ProcessWebhookRequest").msgclass + FetchGitRefsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchGitRefsRequest").msgclass + FetchGitRefsRequest::RefType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType").enummodule + FetchGitRefsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchGitRefsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb new file mode 100644 index 000000000000..12d74525ede6 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb @@ -0,0 +1,72 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/devtools/cloudbuild/v2/repositories.proto for package 'Google.Cloud.Build.V2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/devtools/cloudbuild/v2/repositories_pb' + +module Google + module Cloud + module Build + module V2 + module RepositoryManager + # Manages connections to source code repositories. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.devtools.cloudbuild.v2.RepositoryManager' + + # Creates a Connection. + rpc :CreateConnection, ::Google::Cloud::Build::V2::CreateConnectionRequest, ::Google::Longrunning::Operation + # Gets details of a single connection. + rpc :GetConnection, ::Google::Cloud::Build::V2::GetConnectionRequest, ::Google::Cloud::Build::V2::Connection + # Lists Connections in a given project and location. + rpc :ListConnections, ::Google::Cloud::Build::V2::ListConnectionsRequest, ::Google::Cloud::Build::V2::ListConnectionsResponse + # Updates a single connection. + rpc :UpdateConnection, ::Google::Cloud::Build::V2::UpdateConnectionRequest, ::Google::Longrunning::Operation + # Deletes a single connection. + rpc :DeleteConnection, ::Google::Cloud::Build::V2::DeleteConnectionRequest, ::Google::Longrunning::Operation + # Creates a Repository. + rpc :CreateRepository, ::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Google::Longrunning::Operation + # Creates multiple repositories inside a connection. + rpc :BatchCreateRepositories, ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest, ::Google::Longrunning::Operation + # Gets details of a single repository. + rpc :GetRepository, ::Google::Cloud::Build::V2::GetRepositoryRequest, ::Google::Cloud::Build::V2::Repository + # Lists Repositories in a given connection. + rpc :ListRepositories, ::Google::Cloud::Build::V2::ListRepositoriesRequest, ::Google::Cloud::Build::V2::ListRepositoriesResponse + # Deletes a single repository. + rpc :DeleteRepository, ::Google::Cloud::Build::V2::DeleteRepositoryRequest, ::Google::Longrunning::Operation + # Fetches read/write token of a given repository. + rpc :FetchReadWriteToken, ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest, ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse + # Fetches read token of a given repository. + rpc :FetchReadToken, ::Google::Cloud::Build::V2::FetchReadTokenRequest, ::Google::Cloud::Build::V2::FetchReadTokenResponse + # FetchLinkableRepositories get repositories from SCM that are + # accessible and could be added to the connection. + rpc :FetchLinkableRepositories, ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest, ::Google::Cloud::Build::V2::FetchLinkableRepositoriesResponse + # Fetch the list of branches or tags for a given repository. + rpc :FetchGitRefs, ::Google::Cloud::Build::V2::FetchGitRefsRequest, ::Google::Cloud::Build::V2::FetchGitRefsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-build-v2/proto_docs/README.md new file mode 100644 index 000000000000..8de62a92aeae --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Build V2 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-build-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/httpbody.rb new file mode 100644 index 000000000000..938f7ac6b2fd --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/httpbody.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Message that represents an arbitrary HTTP body. It should only be used for + # payload formats that can't be represented as JSON, such as raw binary or + # an HTML page. + # + # + # This message can be used both in streaming and non-streaming API methods in + # the request as well as the response. + # + # It can be used as a top-level request field, which is convenient if one + # wants to extract parameters from either the URL or HTTP template into the + # request fields and also want access to the raw HTTP body. + # + # Example: + # + # message GetResourceRequest { + # // A unique request id. + # string request_id = 1; + # + # // The raw HTTP body is bound to this field. + # google.api.HttpBody http_body = 2; + # + # } + # + # service ResourceService { + # rpc GetResource(GetResourceRequest) + # returns (google.api.HttpBody); + # rpc UpdateResource(google.api.HttpBody) + # returns (google.protobuf.Empty); + # + # } + # + # Example with streaming methods: + # + # service CaldavService { + # rpc GetCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # rpc UpdateCalendar(stream google.api.HttpBody) + # returns (stream google.api.HttpBody); + # + # } + # + # Use of this type only changes how the request and response bodies are + # handled, all other features will continue to work unchanged. + # @!attribute [rw] content_type + # @return [::String] + # The HTTP Content-Type header value specifying the content type of the body. + # @!attribute [rw] data + # @return [::String] + # The HTTP request/response body as raw binary. + # @!attribute [rw] extensions + # @return [::Array<::Google::Protobuf::Any>] + # Application specific response metadata. Must be set in the first response + # for streaming APIs. + class HttpBody + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb new file mode 100644 index 000000000000..d7498cede886 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb @@ -0,0 +1,88 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Build + module V2 + # 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_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @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`. + # @!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 + + # Represents the custom metadata of the RunWorkflow 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] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] requested_cancellation + # @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`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] pipeline_run_id + # @return [::String] + # Output only. ID of the pipeline run created by RunWorkflow. + class RunWorkflowCustomOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb new file mode 100644 index 000000000000..a361ac6a7358 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb @@ -0,0 +1,697 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Build + module V2 + # A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center, + # Bitbucket Cloud or GitLab. + # @!attribute [rw] name + # @return [::String] + # Immutable. The resource name of the connection, in the format + # `projects/{project}/locations/{location}/connections/{connection_id}`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Server assigned timestamp for when the connection was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Server assigned timestamp for when the connection was updated. + # @!attribute [rw] github_config + # @return [::Google::Cloud::Build::V2::GitHubConfig] + # Configuration for connections to github.com. + # + # Note: The following fields are mutually exclusive: `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] github_enterprise_config + # @return [::Google::Cloud::Build::V2::GitHubEnterpriseConfig] + # Configuration for connections to an instance of GitHub Enterprise. + # + # Note: The following fields are mutually exclusive: `github_enterprise_config`, `github_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gitlab_config + # @return [::Google::Cloud::Build::V2::GitLabConfig] + # Configuration for connections to gitlab.com or an instance of GitLab + # Enterprise. + # + # Note: The following fields are mutually exclusive: `gitlab_config`, `github_config`, `github_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bitbucket_data_center_config + # @return [::Google::Cloud::Build::V2::BitbucketDataCenterConfig] + # Configuration for connections to Bitbucket Data Center. + # + # Note: The following fields are mutually exclusive: `bitbucket_data_center_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bitbucket_cloud_config + # @return [::Google::Cloud::Build::V2::BitbucketCloudConfig] + # Configuration for connections to Bitbucket Cloud. + # + # Note: The following fields are mutually exclusive: `bitbucket_cloud_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] installation_state + # @return [::Google::Cloud::Build::V2::InstallationState] + # Output only. Installation state of the Connection. + # @!attribute [rw] disabled + # @return [::Boolean] + # If disabled is set to true, functionality is disabled for this connection. + # Repository based API methods and webhooks processing for repositories in + # this connection will be disabled. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Set to true when the connection is being set up or updated in + # the background. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Allows clients to store small amounts of arbitrary data. + # @!attribute [rw] etag + # @return [::String] + # This checksum is computed by the server based on the value of other + # fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + class Connection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes stage and necessary actions to be taken by the + # user to complete the installation. Used for GitHub and GitHub Enterprise + # based connections. + # @!attribute [r] stage + # @return [::Google::Cloud::Build::V2::InstallationState::Stage] + # Output only. Current step of the installation process. + # @!attribute [r] message + # @return [::String] + # Output only. Message of what the user should do next to continue the + # installation. Empty string if the installation is already complete. + # @!attribute [r] action_uri + # @return [::String] + # Output only. Link to follow for next action. Empty string if the + # installation is already complete. + class InstallationState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Stage of the installation process. + module Stage + # No stage specified. + STAGE_UNSPECIFIED = 0 + + # Only for GitHub Enterprise. An App creation has been requested. + # The user needs to confirm the creation in their GitHub enterprise host. + PENDING_CREATE_APP = 1 + + # User needs to authorize the GitHub (or Enterprise) App via OAuth. + PENDING_USER_OAUTH = 2 + + # User needs to follow the link to install the GitHub (or Enterprise) App. + PENDING_INSTALL_APP = 3 + + # Installation process has been completed. + COMPLETE = 10 + end + end + + # Request message for FetchLinkableRepositories. + # @!attribute [rw] connection + # @return [::String] + # Required. The name of the Connection. + # Format: `projects/*/locations/*/connections/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of results to return in the list. Default to 20. + # @!attribute [rw] page_token + # @return [::String] + # Page start. + class FetchLinkableRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for FetchLinkableRepositories. + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::Build::V2::Repository>] + # repositories ready to be created. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class FetchLinkableRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to github.com. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::Build::V2::OAuthCredential] + # OAuth credential of the account that authorized the Cloud Build GitHub App. + # It is recommended to use a robot account instead of a human user account. + # The OAuth token must be tied to the Cloud Build GitHub App. + # @!attribute [rw] app_installation_id + # @return [::Integer] + # GitHub App installation id. + class GitHubConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to an instance of GitHub Enterprise. + # @!attribute [rw] host_uri + # @return [::String] + # Required. The URI of the GitHub Enterprise host this connection is for. + # @!attribute [rw] api_key + # @return [::String] + # Required. API Key used for authentication of webhook events. + # @!attribute [rw] app_id + # @return [::Integer] + # Id of the GitHub App created from the manifest. + # @!attribute [rw] app_slug + # @return [::String] + # The URL-friendly name of the GitHub App. + # @!attribute [rw] private_key_secret_version + # @return [::String] + # SecretManager resource containing the private key of the GitHub App, + # formatted as `projects/*/secrets/*/versions/*`. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # SecretManager resource containing the webhook secret of the GitHub App, + # formatted as `projects/*/secrets/*/versions/*`. + # @!attribute [rw] app_installation_id + # @return [::Integer] + # ID of the installation of the GitHub App. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Build::V2::ServiceDirectoryConfig] + # Configuration for using Service Directory to privately connect to a GitHub + # Enterprise server. This should only be set if the GitHub Enterprise server + # is hosted on-premises and not reachable by public internet. If this field + # is left empty, calls to the GitHub Enterprise server will be made over the + # public internet. + # @!attribute [rw] ssl_ca + # @return [::String] + # SSL certificate to use for requests to GitHub Enterprise. + # @!attribute [r] server_version + # @return [::String] + # Output only. GitHub Enterprise version installed at the host_uri. + class GitHubEnterpriseConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to gitlab.com or an instance of GitLab + # Enterprise. + # @!attribute [rw] host_uri + # @return [::String] + # The URI of the GitLab Enterprise host this connection is for. + # If not specified, the default value is https://gitlab.com. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # of a GitLab Enterprise project, formatted as + # `projects/*/secrets/*/versions/*`. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::Build::V2::UserCredential] + # Required. A GitLab personal access token with the minimum `read_api` scope + # access. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::Build::V2::UserCredential] + # Required. A GitLab personal access token with the `api` scope access. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Build::V2::ServiceDirectoryConfig] + # Configuration for using Service Directory to privately connect to a GitLab + # Enterprise server. This should only be set if the GitLab Enterprise server + # is hosted on-premises and not reachable by public internet. If this field + # is left empty, calls to the GitLab Enterprise server will be made over the + # public internet. + # @!attribute [rw] ssl_ca + # @return [::String] + # SSL certificate to use for requests to GitLab Enterprise. + # @!attribute [r] server_version + # @return [::String] + # Output only. Version of the GitLab Enterprise server running on the + # `host_uri`. + class GitLabConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to Bitbucket Data Center. + # @!attribute [rw] host_uri + # @return [::String] + # Required. The URI of the Bitbucket Data Center instance or cluster this + # connection is for. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. Immutable. SecretManager resource containing the webhook secret + # used to verify webhook events, formatted as + # `projects/*/secrets/*/versions/*`. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::Build::V2::UserCredential] + # Required. A http access token with the `REPO_READ` access. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::Build::V2::UserCredential] + # Required. A http access token with the `REPO_ADMIN` scope access. + # @!attribute [rw] service_directory_config + # @return [::Google::Cloud::Build::V2::ServiceDirectoryConfig] + # Optional. Configuration for using Service Directory to privately connect to + # a Bitbucket Data Center. This should only be set if the Bitbucket Data + # Center is hosted on-premises and not reachable by public internet. If this + # field is left empty, calls to the Bitbucket Data Center will be made over + # the public internet. + # @!attribute [rw] ssl_ca + # @return [::String] + # Optional. SSL certificate to use for requests to the Bitbucket Data Center. + # @!attribute [r] server_version + # @return [::String] + # Output only. Version of the Bitbucket Data Center running on the + # `host_uri`. + class BitbucketDataCenterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for connections to Bitbucket Cloud. + # @!attribute [rw] workspace + # @return [::String] + # Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud + # Platform. + # @!attribute [rw] webhook_secret_secret_version + # @return [::String] + # Required. SecretManager resource containing the webhook secret used to + # verify webhook events, formatted as `projects/*/secrets/*/versions/*`. + # @!attribute [rw] read_authorizer_credential + # @return [::Google::Cloud::Build::V2::UserCredential] + # Required. An access token with the `repository` access. It can be either a + # workspace, project or repository access token. It's recommended to use a + # system account to generate the credentials. + # @!attribute [rw] authorizer_credential + # @return [::Google::Cloud::Build::V2::UserCredential] + # Required. An access token with the `webhook`, `repository`, + # `repository:admin` and `pullrequest` scope access. It can be either a + # workspace, project or repository access token. It's recommended to use a + # system account to generate these credentials. + class BitbucketCloudConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ServiceDirectoryConfig represents Service Directory configuration for a + # connection. + # @!attribute [rw] service + # @return [::String] + # Required. The Service Directory service name. + # Format: + # projects/\\{project}/locations/\\{location}/namespaces/\\{namespace}/services/\\{service}. + class ServiceDirectoryConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A repository associated to a parent connection. + # @!attribute [rw] name + # @return [::String] + # Immutable. Resource name of the repository, in the format + # `projects/*/locations/*/connections/*/repositories/*`. + # @!attribute [rw] remote_uri + # @return [::String] + # Required. Git Clone HTTPS URI. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Server assigned timestamp for when the connection was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Server assigned timestamp for when the connection was updated. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Allows clients to store small amounts of arbitrary data. + # @!attribute [rw] etag + # @return [::String] + # This checksum is computed by the server based on the value of other + # fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [r] webhook_id + # @return [::String] + # Output only. External ID of the webhook created for the repository. + class Repository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents an OAuth token of the account that authorized the Connection, + # and associated metadata. + # @!attribute [rw] oauth_token_secret_version + # @return [::String] + # A SecretManager resource containing the OAuth token that authorizes + # the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`. + # @!attribute [r] username + # @return [::String] + # Output only. The username associated to this token. + class OAuthCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a personal access token that authorized the Connection, + # and associated metadata. + # @!attribute [rw] user_token_secret_version + # @return [::String] + # Required. A SecretManager resource containing the user token that + # authorizes the Cloud Build connection. Format: + # `projects/*/secrets/*/versions/*`. + # @!attribute [r] username + # @return [::String] + # Output only. The username associated to this token. + class UserCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a Connection + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location where the connection will be created. + # Format: `projects/*/locations/*`. + # @!attribute [rw] connection + # @return [::Google::Cloud::Build::V2::Connection] + # Required. The Connection to create. + # @!attribute [rw] connection_id + # @return [::String] + # Required. The ID to use for the Connection, which will become the final + # component of the Connection's resource name. Names must be unique + # per-project per-location. Allows alphanumeric characters and any of + # -._~%!$&'()*+,;=@. + class CreateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting the details of a Connection. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Connection to retrieve. + # Format: `projects/*/locations/*/connections/*`. + class GetConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of Connections. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of Connections. + # Format: `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of results to return in the list. + # @!attribute [rw] page_token + # @return [::String] + # Page start. + class ListConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Connections. + # @!attribute [rw] connections + # @return [::Array<::Google::Cloud::Build::V2::Connection>] + # The list of Connections. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a Connection. + # @!attribute [rw] connection + # @return [::Google::Cloud::Build::V2::Connection] + # Required. The Connection to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the connection is not found a new connection + # will be created. In this situation `update_mask` is ignored. + # The creation will succeed only if the input connection has all the + # necessary information (e.g a github_config with both user_oauth_token and + # installation_id properties). + # @!attribute [rw] etag + # @return [::String] + # The current etag of the connection. + # If an etag is provided and does not match the current etag of the + # connection, update will be blocked and an ABORTED error will be returned. + class UpdateConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Connection. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Connection to delete. + # Format: `projects/*/locations/*/connections/*`. + # @!attribute [rw] etag + # @return [::String] + # The current etag of the connection. + # If an etag is provided and does not match the current etag of the + # connection, deletion will be blocked and an ABORTED error will be returned. + # @!attribute [rw] validate_only + # @return [::Boolean] + # If set, validate the request, but do not actually post it. + class DeleteConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a Repository. + # @!attribute [rw] parent + # @return [::String] + # Required. The connection to contain the repository. If the request is part + # of a BatchCreateRepositoriesRequest, this field should be empty or match + # the parent specified there. + # @!attribute [rw] repository + # @return [::Google::Cloud::Build::V2::Repository] + # Required. The repository to create. + # @!attribute [rw] repository_id + # @return [::String] + # Required. The ID to use for the repository, which will become the final + # component of the repository's resource name. This ID should be unique in + # the connection. Allows alphanumeric characters and any of + # -._~%!$&'()*+,;=@. + class CreateRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating repositoritories in batch. + # @!attribute [rw] parent + # @return [::String] + # Required. The connection to contain all the repositories being created. + # Format: projects/*/locations/*/connections/* + # The parent field in the CreateRepositoryRequest messages + # must either be empty or match this field. + # @!attribute [rw] requests + # @return [::Array<::Google::Cloud::Build::V2::CreateRepositoryRequest>] + # Required. The request messages specifying the repositories to create. + class BatchCreateRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response of creating repositories in batch. + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::Build::V2::Repository>] + # Repository resources created. + class BatchCreateRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting the details of a Repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Repository to retrieve. + # Format: `projects/*/locations/*/connections/*/repositories/*`. + class GetRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of Repositories. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of Repositories. + # Format: `projects/*/locations/*/connections/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Number of results to return in the list. + # @!attribute [rw] page_token + # @return [::String] + # Page start. + # @!attribute [rw] filter + # @return [::String] + # A filter expression that filters resources listed in the response. + # Expressions must follow API improvement proposal + # [AIP-160](https://google.aip.dev/160). e.g. + # `remote_uri:"https://github.com*"`. + class ListRepositoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Repositories. + # @!attribute [rw] repositories + # @return [::Array<::Google::Cloud::Build::V2::Repository>] + # The list of Repositories. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + class ListRepositoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a Repository. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Repository to delete. + # Format: `projects/*/locations/*/connections/*/repositories/*`. + # @!attribute [rw] etag + # @return [::String] + # The current etag of the repository. + # If an etag is provided and does not match the current etag of the + # repository, deletion will be blocked and an ABORTED error will be returned. + # @!attribute [rw] validate_only + # @return [::Boolean] + # If set, validate the request, but do not actually post it. + class DeleteRepositoryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for fetching SCM read/write token. + # @!attribute [rw] repository + # @return [::String] + # Required. The resource name of the repository in the format + # `projects/*/locations/*/connections/*/repositories/*`. + class FetchReadWriteTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for fetching SCM read token. + # @!attribute [rw] repository + # @return [::String] + # Required. The resource name of the repository in the format + # `projects/*/locations/*/connections/*/repositories/*`. + class FetchReadTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to get read token. + # @!attribute [rw] token + # @return [::String] + # The token content. + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Expiration timestamp. Can be empty if unknown or non-expiring. + class FetchReadTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for responding to get read/write token. + # @!attribute [rw] token + # @return [::String] + # The token content. + # @!attribute [rw] expiration_time + # @return [::Google::Protobuf::Timestamp] + # Expiration timestamp. Can be empty if unknown or non-expiring. + class FetchReadWriteTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RPC request object accepted by the ProcessWebhook RPC method. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location where the webhook will be received. + # Format: `projects/*/locations/*`. + # @!attribute [rw] body + # @return [::Google::Api::HttpBody] + # HTTP request body. + # @!attribute [rw] webhook_key + # @return [::String] + # Arbitrary additional key to find the maching repository for a webhook event + # if needed. + class ProcessWebhookRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for fetching git refs + # @!attribute [rw] repository + # @return [::String] + # Required. The resource name of the repository in the format + # `projects/*/locations/*/connections/*/repositories/*`. + # @!attribute [rw] ref_type + # @return [::Google::Cloud::Build::V2::FetchGitRefsRequest::RefType] + # Type of refs to fetch + class FetchGitRefsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of refs + module RefType + # No type specified. + REF_TYPE_UNSPECIFIED = 0 + + # To fetch tags. + TAG = 1 + + # To fetch branches. + BRANCH = 2 + end + end + + # Response for fetching git refs + # @!attribute [rw] ref_names + # @return [::Array<::String>] + # Name of the refs fetched. + class FetchGitRefsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-build-v2/snippets/Gemfile new file mode 100644 index 000000000000..30861e09dd7f --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/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-build-v2", path: "../" +else + gem "google-cloud-build-v2" +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-build-v2/snippets/repository_manager/batch_create_repositories.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/batch_create_repositories.rb new file mode 100644 index 000000000000..28a6e3545aca --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/batch_create_repositories.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 cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_sync] +require "google/cloud/build/v2" + +## +# Snippet for the batch_create_repositories call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#batch_create_repositories. +# +def batch_create_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new + + # Call the batch_create_repositories method. + result = client.batch_create_repositories 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 cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.rb new file mode 100644 index 000000000000..15718d8c525b --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.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 cloudbuild_v2_generated_RepositoryManager_CreateConnection_sync] +require "google/cloud/build/v2" + +## +# Snippet for the create_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#create_connection. +# +def create_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::CreateConnectionRequest.new + + # Call the create_connection method. + result = client.create_connection 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 cloudbuild_v2_generated_RepositoryManager_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.rb new file mode 100644 index 000000000000..de9264226874 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.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 cloudbuild_v2_generated_RepositoryManager_CreateRepository_sync] +require "google/cloud/build/v2" + +## +# Snippet for the create_repository call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#create_repository. +# +def create_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::CreateRepositoryRequest.new + + # Call the create_repository method. + result = client.create_repository 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 cloudbuild_v2_generated_RepositoryManager_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.rb new file mode 100644 index 000000000000..55cde02e5910 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.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 cloudbuild_v2_generated_RepositoryManager_DeleteConnection_sync] +require "google/cloud/build/v2" + +## +# Snippet for the delete_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#delete_connection. +# +def delete_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::DeleteConnectionRequest.new + + # Call the delete_connection method. + result = client.delete_connection 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 cloudbuild_v2_generated_RepositoryManager_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.rb new file mode 100644 index 000000000000..58f8738bceb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.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 cloudbuild_v2_generated_RepositoryManager_DeleteRepository_sync] +require "google/cloud/build/v2" + +## +# Snippet for the delete_repository call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#delete_repository. +# +def delete_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::DeleteRepositoryRequest.new + + # Call the delete_repository method. + result = client.delete_repository 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 cloudbuild_v2_generated_RepositoryManager_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.rb new file mode 100644 index 000000000000..8a82ee99bfb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.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 cloudbuild_v2_generated_RepositoryManager_FetchGitRefs_sync] +require "google/cloud/build/v2" + +## +# Snippet for the fetch_git_refs call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_git_refs. +# +def fetch_git_refs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::FetchGitRefsRequest.new + + # Call the fetch_git_refs method. + result = client.fetch_git_refs request + + # The returned object is of type Google::Cloud::Build::V2::FetchGitRefsResponse. + p result +end +# [END cloudbuild_v2_generated_RepositoryManager_FetchGitRefs_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.rb new file mode 100644 index 000000000000..1e4fc8e2d17e --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.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 cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_sync] +require "google/cloud/build/v2" + +## +# Snippet for the fetch_linkable_repositories call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_linkable_repositories. +# +def fetch_linkable_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new + + # Call the fetch_linkable_repositories method. + result = client.fetch_linkable_repositories 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::Build::V2::Repository. + p item + end +end +# [END cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.rb new file mode 100644 index 000000000000..fb7191aee0d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.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 cloudbuild_v2_generated_RepositoryManager_FetchReadToken_sync] +require "google/cloud/build/v2" + +## +# Snippet for the fetch_read_token call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_read_token. +# +def fetch_read_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::FetchReadTokenRequest.new + + # Call the fetch_read_token method. + result = client.fetch_read_token request + + # The returned object is of type Google::Cloud::Build::V2::FetchReadTokenResponse. + p result +end +# [END cloudbuild_v2_generated_RepositoryManager_FetchReadToken_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.rb new file mode 100644 index 000000000000..936bfb83d48a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.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 cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_sync] +require "google/cloud/build/v2" + +## +# Snippet for the fetch_read_write_token call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_read_write_token. +# +def fetch_read_write_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new + + # Call the fetch_read_write_token method. + result = client.fetch_read_write_token request + + # The returned object is of type Google::Cloud::Build::V2::FetchReadWriteTokenResponse. + p result +end +# [END cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.rb new file mode 100644 index 000000000000..043b941a166e --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.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 cloudbuild_v2_generated_RepositoryManager_GetConnection_sync] +require "google/cloud/build/v2" + +## +# Snippet for the get_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#get_connection. +# +def get_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::GetConnectionRequest.new + + # Call the get_connection method. + result = client.get_connection request + + # The returned object is of type Google::Cloud::Build::V2::Connection. + p result +end +# [END cloudbuild_v2_generated_RepositoryManager_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.rb new file mode 100644 index 000000000000..53c1dc350fcd --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.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 cloudbuild_v2_generated_RepositoryManager_GetRepository_sync] +require "google/cloud/build/v2" + +## +# Snippet for the get_repository call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#get_repository. +# +def get_repository + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::GetRepositoryRequest.new + + # Call the get_repository method. + result = client.get_repository request + + # The returned object is of type Google::Cloud::Build::V2::Repository. + p result +end +# [END cloudbuild_v2_generated_RepositoryManager_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.rb new file mode 100644 index 000000000000..546b5a054689 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.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 cloudbuild_v2_generated_RepositoryManager_ListConnections_sync] +require "google/cloud/build/v2" + +## +# Snippet for the list_connections call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#list_connections. +# +def list_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::ListConnectionsRequest.new + + # Call the list_connections method. + result = client.list_connections 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::Build::V2::Connection. + p item + end +end +# [END cloudbuild_v2_generated_RepositoryManager_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.rb new file mode 100644 index 000000000000..cb85e5e02018 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.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 cloudbuild_v2_generated_RepositoryManager_ListRepositories_sync] +require "google/cloud/build/v2" + +## +# Snippet for the list_repositories call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#list_repositories. +# +def list_repositories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::ListRepositoriesRequest.new + + # Call the list_repositories method. + result = client.list_repositories 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::Build::V2::Repository. + p item + end +end +# [END cloudbuild_v2_generated_RepositoryManager_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.rb new file mode 100644 index 000000000000..a96fda832e9c --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.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 cloudbuild_v2_generated_RepositoryManager_UpdateConnection_sync] +require "google/cloud/build/v2" + +## +# Snippet for the update_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#update_connection. +# +def update_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Build::V2::RepositoryManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Build::V2::UpdateConnectionRequest.new + + # Call the update_connection method. + result = client.update_connection 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 cloudbuild_v2_generated_RepositoryManager_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json b/owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json new file mode 100644 index 000000000000..81c546b62e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -0,0 +1,575 @@ +{ + "client_library": { + "name": "google-cloud-build-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.devtools.cloudbuild.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_CreateConnection_sync", + "title": "Snippet for the create_connection call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#create_connection.", + "file": "repository_manager/create_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_connection", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#create_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::CreateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "CreateConnection", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.CreateConnection", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_GetConnection_sync", + "title": "Snippet for the get_connection call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#get_connection.", + "file": "repository_manager/get_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_connection", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#get_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::GetConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::Connection", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "GetConnection", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.GetConnection", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_ListConnections_sync", + "title": "Snippet for the list_connections call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#list_connections.", + "file": "repository_manager/list_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_connections", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#list_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::ListConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::ListConnectionsResponse", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "ListConnections", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.ListConnections", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_UpdateConnection_sync", + "title": "Snippet for the update_connection call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#update_connection.", + "file": "repository_manager/update_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_connection", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#update_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::UpdateConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "UpdateConnection", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.UpdateConnection", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_DeleteConnection_sync", + "title": "Snippet for the delete_connection call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#delete_connection.", + "file": "repository_manager/delete_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_connection", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#delete_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::DeleteConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "DeleteConnection", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteConnection", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_CreateRepository_sync", + "title": "Snippet for the create_repository call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#create_repository.", + "file": "repository_manager/create_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_repository", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#create_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::CreateRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "CreateRepository", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.CreateRepository", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_sync", + "title": "Snippet for the batch_create_repositories call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#batch_create_repositories.", + "file": "repository_manager/batch_create_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_create_repositories", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#batch_create_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "BatchCreateRepositories", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.BatchCreateRepositories", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_GetRepository_sync", + "title": "Snippet for the get_repository call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#get_repository.", + "file": "repository_manager/get_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_repository", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#get_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::GetRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::Repository", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "GetRepository", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.GetRepository", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_ListRepositories_sync", + "title": "Snippet for the list_repositories call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#list_repositories.", + "file": "repository_manager/list_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_repositories", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#list_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::ListRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::ListRepositoriesResponse", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "ListRepositories", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.ListRepositories", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_DeleteRepository_sync", + "title": "Snippet for the delete_repository call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#delete_repository.", + "file": "repository_manager/delete_repository.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_repository", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#delete_repository", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::DeleteRepositoryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "DeleteRepository", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteRepository", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_sync", + "title": "Snippet for the fetch_read_write_token call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_write_token.", + "file": "repository_manager/fetch_read_write_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_read_write_token", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_write_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::FetchReadWriteTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::FetchReadWriteTokenResponse", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "FetchReadWriteToken", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadWriteToken", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchReadToken_sync", + "title": "Snippet for the fetch_read_token call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_token.", + "file": "repository_manager/fetch_read_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_read_token", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::FetchReadTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::FetchReadTokenResponse", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "FetchReadToken", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadToken", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_sync", + "title": "Snippet for the fetch_linkable_repositories call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_linkable_repositories.", + "file": "repository_manager/fetch_linkable_repositories.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_linkable_repositories", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_linkable_repositories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::FetchLinkableRepositoriesResponse", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "FetchLinkableRepositories", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchLinkableRepositories", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchGitRefs_sync", + "title": "Snippet for the fetch_git_refs call in the RepositoryManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_git_refs.", + "file": "repository_manager/fetch_git_refs.rb", + "language": "RUBY", + "client_method": { + "short_name": "fetch_git_refs", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_git_refs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Build::V2::FetchGitRefsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Build::V2::FetchGitRefsResponse", + "client": { + "short_name": "RepositoryManager::Client", + "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" + }, + "method": { + "short_name": "FetchGitRefs", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchGitRefs", + "service": { + "short_name": "RepositoryManager", + "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" + } + } + }, + "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-build-v2/test/google/cloud/build/v2/repository_manager_operations_test.rb b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_operations_test.rb new file mode 100644 index 000000000000..1cc010d62f14 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_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/devtools/cloudbuild/v2/repositories_pb" +require "google/devtools/cloudbuild/v2/repositories_services_pb" +require "google/cloud/build/v2/repository_manager" + +class ::Google::Cloud::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb new file mode 100644 index 000000000000..2ebac5a14766 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/build/v2/repository_manager" + +class ::Google::Cloud::Build::V2::RepositoryManager::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_connection_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connection_path project: "value0", location: "value1", connection: "value2" + assert_equal "projects/value0/locations/value1/connections/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::Build::V2::RepositoryManager::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_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", connection: "value2", repository: "value3" + assert_equal "projects/value0/locations/value1/connections/value2/repositories/value3", path + end + end + + def test_secret_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.secret_version_path project: "value0", secret: "value1", version: "value2" + assert_equal "projects/value0/secrets/value1/versions/value2", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" + assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb new file mode 100644 index 000000000000..9e0ff25af10e --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb @@ -0,0 +1,1015 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/devtools/cloudbuild/v2/repositories_pb" +require "google/cloud/build/v2/repository_manager" + +class ::Google::Cloud::Build::V2::RepositoryManager::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_create_connection + # 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" + connection = {} + connection_id = "hello world" + + create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_connection, name + assert_kind_of ::Google::Cloud::Build::V2::CreateConnectionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V2::Connection), request["connection"] + assert_equal "hello world", request["connection_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_connection_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_connection({ parent: parent, connection: connection, connection_id: connection_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_connection parent: parent, connection: connection, connection_id: connection_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_connection ::Google::Cloud::Build::V2::CreateConnectionRequest.new(parent: parent, connection: connection, connection_id: connection_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_connection({ parent: parent, connection: connection, connection_id: connection_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_connection(::Google::Cloud::Build::V2::CreateConnectionRequest.new(parent: parent, connection: connection, connection_id: connection_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_connection_client_stub.call_rpc_count + end + end + + def test_get_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::Connection.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_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_connection, name + assert_kind_of ::Google::Cloud::Build::V2::GetConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_connection_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_connection ::Google::Cloud::Build::V2::GetConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_connection({ 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_connection(::Google::Cloud::Build::V2::GetConnectionRequest.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_connection_client_stub.call_rpc_count + end + end + + def test_list_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::ListConnectionsResponse.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_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_connections, name + assert_kind_of ::Google::Cloud::Build::V2::ListConnectionsRequest, 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_connections_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_connections({ 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_connections 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_connections ::Google::Cloud::Build::V2::ListConnectionsRequest.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_connections({ 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_connections(::Google::Cloud::Build::V2::ListConnectionsRequest.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_connections_client_stub.call_rpc_count + end + end + + def test_update_connection + # 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. + connection = {} + update_mask = {} + allow_missing = true + etag = "hello world" + + update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_connection, name + assert_kind_of ::Google::Cloud::Build::V2::UpdateConnectionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V2::Connection), request["connection"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_connection_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_connection({ connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag }) 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_connection connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag 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_connection ::Google::Cloud::Build::V2::UpdateConnectionRequest.new(connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag) 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_connection({ connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag }, 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_connection(::Google::Cloud::Build::V2::UpdateConnectionRequest.new(connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag), 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_connection_client_stub.call_rpc_count + end + end + + def test_delete_connection + # 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" + etag = "hello world" + validate_only = true + + delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_connection, name + assert_kind_of ::Google::Cloud::Build::V2::DeleteConnectionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_connection_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_connection({ name: name, etag: etag, validate_only: validate_only }) 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_connection name: name, etag: etag, validate_only: validate_only 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_connection ::Google::Cloud::Build::V2::DeleteConnectionRequest.new(name: name, etag: etag, validate_only: validate_only) 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_connection({ name: name, etag: etag, validate_only: validate_only }, 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_connection(::Google::Cloud::Build::V2::DeleteConnectionRequest.new(name: name, etag: etag, validate_only: validate_only), 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_connection_client_stub.call_rpc_count + end + end + + def test_create_repository + # 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" + repository = {} + repository_id = "hello world" + + create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_repository, name + assert_kind_of ::Google::Cloud::Build::V2::CreateRepositoryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V2::Repository), request["repository"] + assert_equal "hello world", request["repository_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_repository_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_repository({ parent: parent, repository: repository, repository_id: repository_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_repository parent: parent, repository: repository, repository_id: repository_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_repository ::Google::Cloud::Build::V2::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_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_repository({ parent: parent, repository: repository, repository_id: repository_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_repository(::Google::Cloud::Build::V2::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_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_repository_client_stub.call_rpc_count + end + end + + def test_batch_create_repositories + # 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" + requests = [{}] + + batch_create_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_create_repositories, name + assert_kind_of ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest, request + assert_equal "hello world", request["parent"] + assert_kind_of ::Google::Cloud::Build::V2::CreateRepositoryRequest, request["requests"].first + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_create_repositories_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_create_repositories({ parent: parent, requests: requests }) 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.batch_create_repositories parent: parent, requests: requests 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.batch_create_repositories ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new(parent: parent, requests: requests) 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.batch_create_repositories({ parent: parent, requests: requests }, 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.batch_create_repositories(::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new(parent: parent, requests: requests), 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, batch_create_repositories_client_stub.call_rpc_count + end + end + + def test_get_repository + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::Repository.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_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_repository, name + assert_kind_of ::Google::Cloud::Build::V2::GetRepositoryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_repository_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_repository({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_repository name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_repository ::Google::Cloud::Build::V2::GetRepositoryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_repository({ 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_repository(::Google::Cloud::Build::V2::GetRepositoryRequest.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_repository_client_stub.call_rpc_count + end + end + + def test_list_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::ListRepositoriesResponse.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_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_repositories, name + assert_kind_of ::Google::Cloud::Build::V2::ListRepositoriesRequest, 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_repositories_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_repositories({ 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_repositories 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_repositories ::Google::Cloud::Build::V2::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::Build::V2::ListRepositoriesRequest.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_repositories_client_stub.call_rpc_count + end + end + + def test_delete_repository + # 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" + etag = "hello world" + validate_only = true + + delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_repository, name + assert_kind_of ::Google::Cloud::Build::V2::DeleteRepositoryRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_repository_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_repository({ name: name, etag: etag, validate_only: validate_only }) 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_repository name: name, etag: etag, validate_only: validate_only 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_repository ::Google::Cloud::Build::V2::DeleteRepositoryRequest.new(name: name, etag: etag, validate_only: validate_only) 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_repository({ name: name, etag: etag, validate_only: validate_only }, 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_repository(::Google::Cloud::Build::V2::DeleteRepositoryRequest.new(name: name, etag: etag, validate_only: validate_only), 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_repository_client_stub.call_rpc_count + end + end + + def test_fetch_read_write_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse.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. + repository = "hello world" + + fetch_read_write_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_read_write_token, name + assert_kind_of ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest, request + assert_equal "hello world", request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_read_write_token_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_read_write_token({ repository: repository }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_read_write_token repository: repository do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_read_write_token ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new(repository: repository) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_read_write_token({ repository: repository }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_read_write_token(::Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new(repository: repository), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_read_write_token_client_stub.call_rpc_count + end + end + + def test_fetch_read_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::FetchReadTokenResponse.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. + repository = "hello world" + + fetch_read_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_read_token, name + assert_kind_of ::Google::Cloud::Build::V2::FetchReadTokenRequest, request + assert_equal "hello world", request["repository"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_read_token_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_read_token({ repository: repository }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_read_token repository: repository do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_read_token ::Google::Cloud::Build::V2::FetchReadTokenRequest.new(repository: repository) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_read_token({ repository: repository }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_read_token(::Google::Cloud::Build::V2::FetchReadTokenRequest.new(repository: repository), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_read_token_client_stub.call_rpc_count + end + end + + def test_fetch_linkable_repositories + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::FetchLinkableRepositoriesResponse.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. + connection = "hello world" + page_size = 42 + page_token = "hello world" + + fetch_linkable_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_linkable_repositories, name + assert_kind_of ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest, request + assert_equal "hello world", request["connection"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_linkable_repositories_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_linkable_repositories({ connection: connection, 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.fetch_linkable_repositories connection: connection, 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.fetch_linkable_repositories ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new(connection: connection, 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.fetch_linkable_repositories({ connection: connection, 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.fetch_linkable_repositories(::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new(connection: connection, 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, fetch_linkable_repositories_client_stub.call_rpc_count + end + end + + def test_fetch_git_refs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Build::V2::FetchGitRefsResponse.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. + repository = "hello world" + ref_type = :REF_TYPE_UNSPECIFIED + + fetch_git_refs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :fetch_git_refs, name + assert_kind_of ::Google::Cloud::Build::V2::FetchGitRefsRequest, request + assert_equal "hello world", request["repository"] + assert_equal :REF_TYPE_UNSPECIFIED, request["ref_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, fetch_git_refs_client_stub do + # Create client + client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.fetch_git_refs({ repository: repository, ref_type: ref_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.fetch_git_refs repository: repository, ref_type: ref_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.fetch_git_refs ::Google::Cloud::Build::V2::FetchGitRefsRequest.new(repository: repository, ref_type: ref_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.fetch_git_refs({ repository: repository, ref_type: ref_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.fetch_git_refs(::Google::Cloud::Build::V2::FetchGitRefsRequest.new(repository: repository, ref_type: ref_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, fetch_git_refs_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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Build::V2::RepositoryManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-build-v2/test/helper.rb b/owl-bot-staging/google-cloud-build-v2/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-build-v2/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.gitignore b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.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-capacity_planner-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..3a03738d3f47 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "capacityplanner.googleapis.com", + "api_shortname": "capacityplanner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest", + "distribution_name": "google-cloud-capacity_planner-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "capacityplanner", + "name_pretty": "Capacity Planner V1BETA API", + "product_documentation": "https://cloud.google.com/capacity-planner/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Provides programmatic access to Capacity Planner features. Note that google-cloud-capacity_planner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-capacity_planner instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/capacity-planner/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml new file mode 100644 index 000000000000..6b6282d3d7ec --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-capacity_planner-v1beta.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-capacity_planner-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts new file mode 100644 index 000000000000..88faa0dc86f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Capacity Planner V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..836a733fc22f --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-capacity_planner-v1beta library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-capacity_planner-v1beta library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/capacity_planner/v1beta" + +client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/capacity_planner/v1beta" + +::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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-capacity_planner-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/capacity_planner/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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-capacity_planner-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile b/owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md new file mode 100644 index 000000000000..2cf86faff5a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Capacity Planner V1BETA API + +Provides programmatic access to Capacity Planner features. + + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Capacity Planner V1BETA API. Most users should consider using +the main client gem, +[google-cloud-capacity_planner](https://rubygems.org/gems/google-cloud-capacity_planner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-capacity_planner-v1beta +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/capacityplanner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/capacity_planner/v1beta" + +client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new +request = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new # (request fields as keyword arguments...) +response = client.query_usage_histories request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/capacity-planner/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/capacity_planner/v1beta" +require "logger" + +client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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-capacity_planner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-capacity_planner-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-capacity_planner`. +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-capacity_planner-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile b/owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile new file mode 100644 index 000000000000..deb10fb857f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-capacity_planner-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/capacity_planner/v1beta/usage_service/credentials" + ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-capacity_planner-v1beta gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-capacity_planner-v1beta gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-capacity_planner-v1beta gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-capacity_planner-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-capacity_planner-v1beta" + header "google-cloud-capacity_planner-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-capacity_planner-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-capacity_planner-v1beta test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-capacity_planner-v1beta smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-capacity_planner-v1beta acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..a1330da49c4c --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json @@ -0,0 +1,48 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.capacityplanner.v1beta", + "libraryPackage": "::Google::Cloud::CapacityPlanner::V1beta", + "services": { + "UsageService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client", + "rpcs": { + "QueryUsageHistories": { + "methods": [ + "query_usage_histories" + ] + }, + "QueryForecasts": { + "methods": [ + "query_forecasts" + ] + }, + "QueryReservations": { + "methods": [ + "query_reservations" + ] + }, + "ExportUsageHistories": { + "methods": [ + "export_usage_histories" + ] + }, + "ExportForecasts": { + "methods": [ + "export_forecasts" + ] + }, + "ExportReservationsUsage": { + "methods": [ + "export_reservations_usage" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec b/owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec new file mode 100644 index 000000000000..1f753214cac8 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/capacity_planner/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-capacity_planner-v1beta" + gem.version = Google::Cloud::CapacityPlanner::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Provides programmatic access to Capacity Planner features. Note that google-cloud-capacity_planner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-capacity_planner instead. See the readme for more details." + gem.summary = "Provides programmatic access to Capacity Planner features." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb new file mode 100644 index 000000000000..259df08043a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/capacity_planner/v1beta" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb new file mode 100644 index 000000000000..8e565c563f5a --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/capacity_planner/v1beta/usage_service" +require "google/cloud/capacity_planner/v1beta/version" + +module Google + module Cloud + module CapacityPlanner + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/capacity_planner/v1beta" + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/capacity_planner/v1beta" + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/capacity_planner/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/rest.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/rest.rb new file mode 100644 index 000000000000..b3f214c3645c --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/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/capacity_planner/v1beta/usage_service/rest" +require "google/cloud/capacity_planner/v1beta/version" + +module Google + module Cloud + module CapacityPlanner + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/capacity_planner/v1beta/rest" + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb new file mode 100644 index 000000000000..820d8a6c4028 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/capacity_planner/v1beta/version" + +require "google/cloud/capacity_planner/v1beta/usage_service/credentials" +require "google/cloud/capacity_planner/v1beta/usage_service/paths" +require "google/cloud/capacity_planner/v1beta/usage_service/operations" +require "google/cloud/capacity_planner/v1beta/usage_service/client" +require "google/cloud/capacity_planner/v1beta/usage_service/rest" + +module Google + module Cloud + module CapacityPlanner + module V1beta + ## + # Provides access to historical and forecasted usage data. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/capacity_planner/v1beta/usage_service" + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/capacity_planner/v1beta/usage_service/rest" + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + module UsageService + end + end + end + end +end + +helper_path = ::File.join __dir__, "usage_service", "helpers.rb" +require "google/cloud/capacity_planner/v1beta/usage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb new file mode 100644 index 000000000000..cffeda4412bb --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb @@ -0,0 +1,1231 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/capacityplanner/v1beta/usage_service_pb" + +module Google + module Cloud + module CapacityPlanner + module V1beta + module UsageService + ## + # Client for the UsageService service. + # + # Provides access to historical and forecasted usage data. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :usage_service_stub + + ## + # Configure the UsageService Client class. + # + # See {::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UsageService clients + # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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", "CapacityPlanner", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4, 13] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UsageService 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::CapacityPlanner::V1beta::UsageService::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 + @usage_service_stub.universe_domain + end + + ## + # Create a new UsageService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UsageService 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/capacityplanner/v1beta/usage_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 + + @usage_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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 + ) + + @usage_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @usage_service_stub.logger + end + + # Service calls + + ## + # Returns a list of the usage histories that are in the parent parameter + # and match your specified filters. + # + # @overload query_usage_histories(request, options = nil) + # Pass arguments to `query_usage_histories` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_usage_histories(parent: nil, location_level: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil) + # Pass arguments to `query_usage_histories` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # + # projects/{project}/locations/{location} or + # organizations/{organization}/locations/{location} or + # folders/{folder}/locations/{location} + # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @param is_spot [::Boolean] + # Optional. The is_spot flag is used to fetch the usage data for preemptible + # Resources. + # @param machine_family [::String] + # The machine family for the `UsageHistory` values to return. Possible values + # include "n1", and "n2d". See + # https://cloud.google.com/compute/docs/machine-types for more examples. + # Empty machine_family will return results matching all machine families. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the `UsageHistory` values to return. + # @param disk_type [::String] + # Optional. The disk_type for the `UsageHistory` values to return request + # with persistent-disk cloud_resource_type. Empty disk_type will return + # results matching all disk types. + # @param confidential_mode [::Boolean] + # Optional. Whether the persistent disk is in confidential mode. + # @param gpu_type [::String] + # Optional. The GPU type for the `UsageHistory` values to return. Sample + # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `UsageHistory` values to return. Empty + # tpu_type will return results matching all TPUs. + # @param cloud_resource_type [::String] + # Required. The resource for the `UsageHistory` values to return. Possible + # values include "gce-vcpus", "gce-ram", "gce-local-ssd", + # "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type + # will return results matching all resources. + # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # The method that should be used to convert sampled usage data to daily + # usage values. + # AGGREGATION_METHOD_UNSPECIFIED will return results matching all the + # aggregation methods. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of reservations usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of reservations usage. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new + # + # # Call the query_usage_histories method. + # result = client.query_usage_histories request + # + # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse. + # p result + # + def query_usage_histories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest + + # Converts hash 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.query_usage_histories.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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_usage_histories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_usage_histories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.call_rpc :query_usage_histories, 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 + + ## + # Returns a list of the forecasts that are in the parent parameter + # and match your specified filters. + # + # @overload query_forecasts(request, options = nil) + # Pass arguments to `query_forecasts` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, forecast_type: nil, prediction_interval: nil, aggregation_method: nil) + # Pass arguments to `query_forecasts` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param machine_family [::String] + # The machine family to use to select the `Forecast` values to return. + # Possible values include "n1", and "n2d". + # Empty machine_family will return results matching all machine families. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the time series values to return. + # @param disk_type [::String] + # Optional. The disk_type for the `Forecast` values to return with request + # persistent-disk cloud_resource_type. + # Empty disk_type will return results matching all disk types. + # @param confidential_mode [::Boolean] + # Optional. Whether the persistent disk is in confidential mode. + # @param gpu_type [::String] + # Optional. The GPU type for the `Forecast` values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type + # will return results matching all TPUs. + # @param cloud_resource_type [::String] + # Required. The resource for the `Forecast` values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", + # "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results + # matching all resources. + # @param forecast_type [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] + # The type of forecast to use to select the `Forecast` values to return. + # FORECAST_TYPE_UNSPECIFIED will return results matching all the forecast + # types. + # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] + # The prediction interval to use to select the `Forecast` values to return. + # PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction + # intervals. + # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Aggregation Method of the historical usage for which the forecast is + # generated + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new + # + # # Call the query_forecasts method. + # result = client.query_forecasts request + # + # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse. + # p result + # + def query_forecasts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest + + # Converts hash 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.query_forecasts.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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_forecasts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_forecasts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.call_rpc :query_forecasts, 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 + + ## + # Returns a list of the reservations that are in the parent parameter + # and match your specified filters. + # + # @overload query_reservations(request, options = nil) + # Pass arguments to `query_reservations` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload query_reservations(parent: nil, location_level: nil, machine_family: nil, machine_shape: nil, gpu_type: nil, cloud_resource_type: nil, reservation_type: nil, share_type: nil, ownership_type: nil, reservation_data_level: nil, include_unapproved_reservations: nil, aggregation_method: nil, start_date: nil, end_date: nil) + # Pass arguments to `query_reservations` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @param machine_family [::String] + # Optional. The machine family to use to select the aggregate reserved values + # to return. Possible values include "n1", and "n2d" etc. Empty + # machine_family will return results matching all machine families. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine_shape as a filter to select matching reservations. + # @param gpu_type [::String] + # Optional. The GPU type for the reserved values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param cloud_resource_type [::String] + # Required. The resource for the reserved values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm". + # @param reservation_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationType] + # Required. The Reservation type for example, future reservation request and + # allocation. If unspecified, all types are + # included. + # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ShareType] + # Optional. Types of share settings to filter reservations in response. If + # unspecified, all types are included. + # @param ownership_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::OwnershipType] + # Optional. Types of ownerships to filter reservations based on. + # In case of OWNED, it filters reservations which are owned by selected + # parent project/folder/organization. If unspecified, all types are + # included. + # @param reservation_data_level [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationDataLevel] + # Required. Reservations output data format. + # @param include_unapproved_reservations [::Boolean] + # Optional. Whether to include pending for approval reservations in the + # response. This field is only applicable for future reservations. + # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. Aggregation Method of the historical reservation usage + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of reservations usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of reservations usage. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new + # + # # Call the query_reservations method. + # result = client.query_reservations request + # + # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse. + # p result + # + def query_reservations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest + + # Converts hash 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.query_reservations.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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.query_reservations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.query_reservations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.call_rpc :query_reservations, 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 + + ## + # Exports historical usage data requested by user into either an existing + # Cloud Storage bucket or a BigQuery table. + # + # @overload export_usage_histories(request, options = nil) + # Pass arguments to `export_usage_histories` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_usage_histories(parent: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) + # Pass arguments to `export_usage_histories` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param is_spot [::Boolean] + # Optional. Set true to export usage for spot resources. + # @param machine_family [::String] + # Optional. The machine family for the `UsageHistory` values to return. + # Possible values include "n1", and "n2d". See + # https://cloud.google.com/compute/docs/machine-types for more examples. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the time series values to export. + # @param disk_type [::String] + # Optional. The disk_type for the `UsageHistory` values to return request + # with persistent-disk resource_type. Possible values include "pd-ssd", + # "pd-standard", "pd-balanced", and "pd-extreme". + # @param gpu_type [::String] + # Optional. The GPU type for the `UsageHistory` values to return. Sample + # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `UsageHistory` values to return. Empty + # tpu_type will return results matching all TPUs. + # @param resource_type [::String] + # Required. The resource for the `UsageHistory` values to return. Possible + # values include "gce-vcpus", "gce-ram", "gce-local-ssd", + # "gce-persistent-disk", "gce-gpu" and "gce-tpu". + # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. The method that should be used to convert sampled usage data to + # daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results + # matching all the aggregation methods. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of usage. + # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # + # @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/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new + # + # # Call the export_usage_histories method. + # result = client.export_usage_histories 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 export_usage_histories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest + + # Converts hash 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.export_usage_histories.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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_usage_histories.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_usage_histories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.call_rpc :export_usage_histories, 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 + + ## + # Exports forecasted usage data requested by user into either an existing + # Cloud Storage bucket or a BigQuery table. + # + # @overload export_forecasts(request, options = nil) + # Pass arguments to `export_forecasts` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, prediction_interval: nil, aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) + # Pass arguments to `export_forecasts` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param machine_family [::String] + # Optional. The machine family to use to select the `Forecast` values to + # return. Possible values include "n1", and "n2d". + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the time series values to export. + # @param disk_type [::String] + # Optional. The disk_type for the `Forecast` values to return with request + # persistent-disk resource_type. + # @param gpu_type [::String] + # Optional. The GPU type for the `Forecast` values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type + # will return results matching all TPUs. + # @param resource_type [::String] + # Required. The resource for the `Forecast` values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", + # "gce-gpu" and "gce-tpu". + # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] + # Optional. The prediction interval to use to select the `Forecast` values to + # return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all + # prediction intervals. + # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. Aggregation Method of the historical usage for which the forecast + # is generated. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of forecasts. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of forecasts. + # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # + # @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/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new + # + # # Call the export_forecasts method. + # result = client.export_forecasts 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 export_forecasts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest + + # Converts hash 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.export_forecasts.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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_forecasts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_forecasts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.call_rpc :export_forecasts, 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 + + ## + # Exports reservations usage data requested by user into either an existing + # Cloud Storage bucket or a new/existing BigQuery table. + # + # @overload export_reservations_usage(request, options = nil) + # Pass arguments to `export_reservations_usage` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_reservations_usage(machine_family: nil, machine_shape: nil, gpu_type: nil, parent: nil, location_level: nil, cloud_resource_type: nil, usage_aggregation_method: nil, share_type: nil, start_date: nil, end_date: nil, output_config: nil) + # Pass arguments to `export_reservations_usage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param machine_family [::String] + # Optional. The machine family to query reservations and usage by. For + # example: n1, n2d. + # + # Note: The following parameters are mutually exclusive: `machine_family`, `machine_shape`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine_shape as a filter to select matching reservations + # and its usage. + # + # Note: The following parameters are mutually exclusive: `machine_shape`, `machine_family`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param gpu_type [::String] + # Optional. The GPU type to query reservations and usage by. For example: + # NVIDIA T4. + # + # Note: The following parameters are mutually exclusive: `gpu_type`, `machine_family`, `machine_shape`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The compute engine resource and location of the + # reservationsusage. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @param cloud_resource_type [::String] + # Required. The resource for the `ReservationsUsage` values to return. + # Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and + # "gce-gpu". + # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Required. The method that should be used to convert sampled reservations + # data to daily usage values. + # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest::ShareType] + # Optional. Type of share settings to filter reservations in response. If + # unspecified, all types are included. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of reservations usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of reservations usage. + # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # + # @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/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new + # + # # Call the export_reservations_usage method. + # result = client.export_reservations_usage 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 export_reservations_usage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest + + # Converts hash 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.export_reservations_usage.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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_reservations_usage.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_reservations_usage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.call_rpc :export_reservations_usage, 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 UsageService API. + # + # This class represents the configuration for UsageService, + # 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::CapacityPlanner::V1beta::UsageService::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 + # # query_usage_histories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.query_usage_histories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.query_usage_histories.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::CapacityPlanner::V1beta::UsageService::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 = "capacityplanner.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 UsageService 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 `query_usage_histories` + # @return [::Gapic::Config::Method] + # + attr_reader :query_usage_histories + ## + # RPC-specific configuration for `query_forecasts` + # @return [::Gapic::Config::Method] + # + attr_reader :query_forecasts + ## + # RPC-specific configuration for `query_reservations` + # @return [::Gapic::Config::Method] + # + attr_reader :query_reservations + ## + # RPC-specific configuration for `export_usage_histories` + # @return [::Gapic::Config::Method] + # + attr_reader :export_usage_histories + ## + # RPC-specific configuration for `export_forecasts` + # @return [::Gapic::Config::Method] + # + attr_reader :export_forecasts + ## + # RPC-specific configuration for `export_reservations_usage` + # @return [::Gapic::Config::Method] + # + attr_reader :export_reservations_usage + + # @private + def initialize parent_rpcs = nil + query_usage_histories_config = parent_rpcs.query_usage_histories if parent_rpcs.respond_to? :query_usage_histories + @query_usage_histories = ::Gapic::Config::Method.new query_usage_histories_config + query_forecasts_config = parent_rpcs.query_forecasts if parent_rpcs.respond_to? :query_forecasts + @query_forecasts = ::Gapic::Config::Method.new query_forecasts_config + query_reservations_config = parent_rpcs.query_reservations if parent_rpcs.respond_to? :query_reservations + @query_reservations = ::Gapic::Config::Method.new query_reservations_config + export_usage_histories_config = parent_rpcs.export_usage_histories if parent_rpcs.respond_to? :export_usage_histories + @export_usage_histories = ::Gapic::Config::Method.new export_usage_histories_config + export_forecasts_config = parent_rpcs.export_forecasts if parent_rpcs.respond_to? :export_forecasts + @export_forecasts = ::Gapic::Config::Method.new export_forecasts_config + export_reservations_usage_config = parent_rpcs.export_reservations_usage if parent_rpcs.respond_to? :export_reservations_usage + @export_reservations_usage = ::Gapic::Config::Method.new export_reservations_usage_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.rb new file mode 100644 index 000000000000..ea4ccaef3e70 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module CapacityPlanner + module V1beta + module UsageService + # Credentials for the UsageService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/devstorage.full_control" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/operations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/operations.rb new file mode 100644 index 000000000000..0731abc7bbca --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/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 CapacityPlanner + module V1beta + module UsageService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the UsageService 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 UsageService 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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_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::CapacityPlanner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + 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 = "capacityplanner.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-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb new file mode 100644 index 000000000000..e80872a6f86f --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CapacityPlanner + module V1beta + module UsageService + # Path helper methods for the UsageService API. + module Paths + ## + # 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 + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb new file mode 100644 index 000000000000..47ef6d973505 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/capacity_planner/v1beta/version" + +require "google/cloud/capacity_planner/v1beta/usage_service/credentials" +require "google/cloud/capacity_planner/v1beta/usage_service/paths" +require "google/cloud/capacity_planner/v1beta/usage_service/rest/operations" +require "google/cloud/capacity_planner/v1beta/usage_service/rest/client" + +module Google + module Cloud + module CapacityPlanner + module V1beta + ## + # Provides access to historical and forecasted usage data. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/capacity_planner/v1beta/usage_service/rest" + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + module UsageService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/capacity_planner/v1beta/usage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb new file mode 100644 index 000000000000..948562c616db --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb @@ -0,0 +1,1146 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/capacityplanner/v1beta/usage_service_pb" +require "google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub" + +module Google + module Cloud + module CapacityPlanner + module V1beta + module UsageService + module Rest + ## + # REST client for the UsageService service. + # + # Provides access to historical and forecasted usage data. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :usage_service_stub + + ## + # Configure the UsageService Client class. + # + # See {::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all UsageService clients + # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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", "CapacityPlanner", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4, 13] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the UsageService 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::CapacityPlanner::V1beta::UsageService::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 + @usage_service_stub.universe_domain + end + + ## + # Create a new UsageService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the UsageService 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::CapacityPlanner::V1beta::UsageService::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 + + @usage_service_stub = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @usage_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @usage_service_stub.logger + end + + # Service calls + + ## + # Returns a list of the usage histories that are in the parent parameter + # and match your specified filters. + # + # @overload query_usage_histories(request, options = nil) + # Pass arguments to `query_usage_histories` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_usage_histories(parent: nil, location_level: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil) + # Pass arguments to `query_usage_histories` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # + # projects/{project}/locations/{location} or + # organizations/{organization}/locations/{location} or + # folders/{folder}/locations/{location} + # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @param is_spot [::Boolean] + # Optional. The is_spot flag is used to fetch the usage data for preemptible + # Resources. + # @param machine_family [::String] + # The machine family for the `UsageHistory` values to return. Possible values + # include "n1", and "n2d". See + # https://cloud.google.com/compute/docs/machine-types for more examples. + # Empty machine_family will return results matching all machine families. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the `UsageHistory` values to return. + # @param disk_type [::String] + # Optional. The disk_type for the `UsageHistory` values to return request + # with persistent-disk cloud_resource_type. Empty disk_type will return + # results matching all disk types. + # @param confidential_mode [::Boolean] + # Optional. Whether the persistent disk is in confidential mode. + # @param gpu_type [::String] + # Optional. The GPU type for the `UsageHistory` values to return. Sample + # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `UsageHistory` values to return. Empty + # tpu_type will return results matching all TPUs. + # @param cloud_resource_type [::String] + # Required. The resource for the `UsageHistory` values to return. Possible + # values include "gce-vcpus", "gce-ram", "gce-local-ssd", + # "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type + # will return results matching all resources. + # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # The method that should be used to convert sampled usage data to daily + # usage values. + # AGGREGATION_METHOD_UNSPECIFIED will return results matching all the + # aggregation methods. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of reservations usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of reservations usage. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new + # + # # Call the query_usage_histories method. + # result = client.query_usage_histories request + # + # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse. + # p result + # + def query_usage_histories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest + + # Converts hash 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.query_usage_histories.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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_usage_histories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_usage_histories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.query_usage_histories 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 + + ## + # Returns a list of the forecasts that are in the parent parameter + # and match your specified filters. + # + # @overload query_forecasts(request, options = nil) + # Pass arguments to `query_forecasts` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, forecast_type: nil, prediction_interval: nil, aggregation_method: nil) + # Pass arguments to `query_forecasts` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param machine_family [::String] + # The machine family to use to select the `Forecast` values to return. + # Possible values include "n1", and "n2d". + # Empty machine_family will return results matching all machine families. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the time series values to return. + # @param disk_type [::String] + # Optional. The disk_type for the `Forecast` values to return with request + # persistent-disk cloud_resource_type. + # Empty disk_type will return results matching all disk types. + # @param confidential_mode [::Boolean] + # Optional. Whether the persistent disk is in confidential mode. + # @param gpu_type [::String] + # Optional. The GPU type for the `Forecast` values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type + # will return results matching all TPUs. + # @param cloud_resource_type [::String] + # Required. The resource for the `Forecast` values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", + # "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results + # matching all resources. + # @param forecast_type [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] + # The type of forecast to use to select the `Forecast` values to return. + # FORECAST_TYPE_UNSPECIFIED will return results matching all the forecast + # types. + # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] + # The prediction interval to use to select the `Forecast` values to return. + # PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction + # intervals. + # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Aggregation Method of the historical usage for which the forecast is + # generated + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new + # + # # Call the query_forecasts method. + # result = client.query_forecasts request + # + # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse. + # p result + # + def query_forecasts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest + + # Converts hash 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.query_forecasts.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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_forecasts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_forecasts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.query_forecasts 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 + + ## + # Returns a list of the reservations that are in the parent parameter + # and match your specified filters. + # + # @overload query_reservations(request, options = nil) + # Pass arguments to `query_reservations` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload query_reservations(parent: nil, location_level: nil, machine_family: nil, machine_shape: nil, gpu_type: nil, cloud_resource_type: nil, reservation_type: nil, share_type: nil, ownership_type: nil, reservation_data_level: nil, include_unapproved_reservations: nil, aggregation_method: nil, start_date: nil, end_date: nil) + # Pass arguments to `query_reservations` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @param machine_family [::String] + # Optional. The machine family to use to select the aggregate reserved values + # to return. Possible values include "n1", and "n2d" etc. Empty + # machine_family will return results matching all machine families. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine_shape as a filter to select matching reservations. + # @param gpu_type [::String] + # Optional. The GPU type for the reserved values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param cloud_resource_type [::String] + # Required. The resource for the reserved values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm". + # @param reservation_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationType] + # Required. The Reservation type for example, future reservation request and + # allocation. If unspecified, all types are + # included. + # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ShareType] + # Optional. Types of share settings to filter reservations in response. If + # unspecified, all types are included. + # @param ownership_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::OwnershipType] + # Optional. Types of ownerships to filter reservations based on. + # In case of OWNED, it filters reservations which are owned by selected + # parent project/folder/organization. If unspecified, all types are + # included. + # @param reservation_data_level [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationDataLevel] + # Required. Reservations output data format. + # @param include_unapproved_reservations [::Boolean] + # Optional. Whether to include pending for approval reservations in the + # response. This field is only applicable for future reservations. + # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. Aggregation Method of the historical reservation usage + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of reservations usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of reservations usage. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new + # + # # Call the query_reservations method. + # result = client.query_reservations request + # + # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse. + # p result + # + def query_reservations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest + + # Converts hash 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.query_reservations.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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.query_reservations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.query_reservations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.query_reservations 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 + + ## + # Exports historical usage data requested by user into either an existing + # Cloud Storage bucket or a BigQuery table. + # + # @overload export_usage_histories(request, options = nil) + # Pass arguments to `export_usage_histories` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_usage_histories(parent: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) + # Pass arguments to `export_usage_histories` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param is_spot [::Boolean] + # Optional. Set true to export usage for spot resources. + # @param machine_family [::String] + # Optional. The machine family for the `UsageHistory` values to return. + # Possible values include "n1", and "n2d". See + # https://cloud.google.com/compute/docs/machine-types for more examples. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the time series values to export. + # @param disk_type [::String] + # Optional. The disk_type for the `UsageHistory` values to return request + # with persistent-disk resource_type. Possible values include "pd-ssd", + # "pd-standard", "pd-balanced", and "pd-extreme". + # @param gpu_type [::String] + # Optional. The GPU type for the `UsageHistory` values to return. Sample + # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `UsageHistory` values to return. Empty + # tpu_type will return results matching all TPUs. + # @param resource_type [::String] + # Required. The resource for the `UsageHistory` values to return. Possible + # values include "gce-vcpus", "gce-ram", "gce-local-ssd", + # "gce-persistent-disk", "gce-gpu" and "gce-tpu". + # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. The method that should be used to convert sampled usage data to + # daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results + # matching all the aggregation methods. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of usage. + # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # @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/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new + # + # # Call the export_usage_histories method. + # result = client.export_usage_histories 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 export_usage_histories request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest + + # Converts hash 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.export_usage_histories.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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_usage_histories.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_usage_histories.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.export_usage_histories 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 + + ## + # Exports forecasted usage data requested by user into either an existing + # Cloud Storage bucket or a BigQuery table. + # + # @overload export_forecasts(request, options = nil) + # Pass arguments to `export_forecasts` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, prediction_interval: nil, aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) + # Pass arguments to `export_forecasts` via keyword arguments. Note that at + # least one keyword argument is 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 compute engine resource and location for the time series + # values to return. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param machine_family [::String] + # Optional. The machine family to use to select the `Forecast` values to + # return. Possible values include "n1", and "n2d". + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine shape for the time series values to export. + # @param disk_type [::String] + # Optional. The disk_type for the `Forecast` values to return with request + # persistent-disk resource_type. + # @param gpu_type [::String] + # Optional. The GPU type for the `Forecast` values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @param tpu_type [::String] + # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type + # will return results matching all TPUs. + # @param resource_type [::String] + # Required. The resource for the `Forecast` values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", + # "gce-gpu" and "gce-tpu". + # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] + # Optional. The prediction interval to use to select the `Forecast` values to + # return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all + # prediction intervals. + # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. Aggregation Method of the historical usage for which the forecast + # is generated. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of forecasts. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of forecasts. + # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # @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/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new + # + # # Call the export_forecasts method. + # result = client.export_forecasts 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 export_forecasts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest + + # Converts hash 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.export_forecasts.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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_forecasts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_forecasts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.export_forecasts 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 + + ## + # Exports reservations usage data requested by user into either an existing + # Cloud Storage bucket or a new/existing BigQuery table. + # + # @overload export_reservations_usage(request, options = nil) + # Pass arguments to `export_reservations_usage` via a request object, either of type + # {::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_reservations_usage(machine_family: nil, machine_shape: nil, gpu_type: nil, parent: nil, location_level: nil, cloud_resource_type: nil, usage_aggregation_method: nil, share_type: nil, start_date: nil, end_date: nil, output_config: nil) + # Pass arguments to `export_reservations_usage` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param machine_family [::String] + # Optional. The machine family to query reservations and usage by. For + # example: n1, n2d. + # + # Note: The following parameters are mutually exclusive: `machine_family`, `machine_shape`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] + # Optional. The machine_shape as a filter to select matching reservations + # and its usage. + # + # Note: The following parameters are mutually exclusive: `machine_shape`, `machine_family`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param gpu_type [::String] + # Optional. The GPU type to query reservations and usage by. For example: + # NVIDIA T4. + # + # Note: The following parameters are mutually exclusive: `gpu_type`, `machine_family`, `machine_shape`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param parent [::String] + # Required. The compute engine resource and location of the + # reservationsusage. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @param cloud_resource_type [::String] + # Required. The resource for the `ReservationsUsage` values to return. + # Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and + # "gce-gpu". + # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Required. The method that should be used to convert sampled reservations + # data to daily usage values. + # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest::ShareType] + # Optional. Type of share settings to filter reservations in response. If + # unspecified, all types are included. + # @param start_date [::Google::Type::Date, ::Hash] + # Optional. The start date of reservations usage. + # @param end_date [::Google::Type::Date, ::Hash] + # Optional. The end date of reservations usage. + # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] + # Required. Output configuration indicating where the results will be output + # to. + # @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/capacity_planner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new + # + # # Call the export_reservations_usage method. + # result = client.export_reservations_usage 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 export_reservations_usage request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest + + # Converts hash 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.export_reservations_usage.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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_reservations_usage.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_reservations_usage.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @usage_service_stub.export_reservations_usage 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 class for the UsageService REST API. + # + # This class represents the configuration for UsageService 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::CapacityPlanner::V1beta::UsageService::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 + # # query_usage_histories to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.query_usage_histories.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.query_usage_histories.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 = "capacityplanner.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 UsageService 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 `query_usage_histories` + # @return [::Gapic::Config::Method] + # + attr_reader :query_usage_histories + ## + # RPC-specific configuration for `query_forecasts` + # @return [::Gapic::Config::Method] + # + attr_reader :query_forecasts + ## + # RPC-specific configuration for `query_reservations` + # @return [::Gapic::Config::Method] + # + attr_reader :query_reservations + ## + # RPC-specific configuration for `export_usage_histories` + # @return [::Gapic::Config::Method] + # + attr_reader :export_usage_histories + ## + # RPC-specific configuration for `export_forecasts` + # @return [::Gapic::Config::Method] + # + attr_reader :export_forecasts + ## + # RPC-specific configuration for `export_reservations_usage` + # @return [::Gapic::Config::Method] + # + attr_reader :export_reservations_usage + + # @private + def initialize parent_rpcs = nil + query_usage_histories_config = parent_rpcs.query_usage_histories if parent_rpcs.respond_to? :query_usage_histories + @query_usage_histories = ::Gapic::Config::Method.new query_usage_histories_config + query_forecasts_config = parent_rpcs.query_forecasts if parent_rpcs.respond_to? :query_forecasts + @query_forecasts = ::Gapic::Config::Method.new query_forecasts_config + query_reservations_config = parent_rpcs.query_reservations if parent_rpcs.respond_to? :query_reservations + @query_reservations = ::Gapic::Config::Method.new query_reservations_config + export_usage_histories_config = parent_rpcs.export_usage_histories if parent_rpcs.respond_to? :export_usage_histories + @export_usage_histories = ::Gapic::Config::Method.new export_usage_histories_config + export_forecasts_config = parent_rpcs.export_forecasts if parent_rpcs.respond_to? :export_forecasts + @export_forecasts = ::Gapic::Config::Method.new export_forecasts_config + export_reservations_usage_config = parent_rpcs.export_reservations_usage if parent_rpcs.respond_to? :export_reservations_usage + @export_reservations_usage = ::Gapic::Config::Method.new export_reservations_usage_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/operations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/operations.rb new file mode 100644 index 000000000000..197309513187 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/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 CapacityPlanner + module V1beta + module UsageService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the UsageService 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 UsageService 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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_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::CapacityPlanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_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 = "capacityplanner.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}", + matches: [ + ["name", %r{^operations/?$}, 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{^operations(?:/.*)?$}, true] + ] + ) + 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{^operations(?:/.*)?$}, true] + ] + ) + 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{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb new file mode 100644 index 000000000000..9cc72c0835fb --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb @@ -0,0 +1,546 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/capacityplanner/v1beta/usage_service_pb" + +module Google + module Cloud + module CapacityPlanner + module V1beta + module UsageService + module Rest + ## + # REST service stub for the UsageService 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 query_usage_histories REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest] + # 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::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] + # A result object deserialized from the server's reply + def query_usage_histories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_usage_histories_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: "query_usage_histories", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the query_forecasts REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest] + # 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::CapacityPlanner::V1beta::QueryForecastsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] + # A result object deserialized from the server's reply + def query_forecasts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_forecasts_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: "query_forecasts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the query_reservations REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest] + # 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::CapacityPlanner::V1beta::QueryReservationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] + # A result object deserialized from the server's reply + def query_reservations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_query_reservations_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: "query_reservations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_usage_histories REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest] + # 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 export_usage_histories request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_usage_histories_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: "export_usage_histories", + 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 export_forecasts REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest] + # 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 export_forecasts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_forecasts_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: "export_forecasts", + 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 export_reservations_usage REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest] + # 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 export_reservations_usage request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_reservations_usage_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: "export_reservations_usage", + 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 query_usage_histories REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_usage_histories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/usageHistories:query", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/usageHistories:query", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/usageHistories:query", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the query_forecasts REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_forecasts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/forecasts:query", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/forecasts:query", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/forecasts:query", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the query_reservations REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_query_reservations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/reservations:query", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/reservations:query", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/reservations:query", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_usage_histories REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_usage_histories_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/usageHistories:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/usageHistories:export", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/usageHistories:export", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_forecasts REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_forecasts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/forecasts:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/forecasts:export", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/forecasts:export", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_reservations_usage REST call + # + # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_reservations_usage_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/reservationsUsage:export", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/reservationsUsage:export", + body: "*", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/reservationsUsage:export", + body: "*", + matches: [ + ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb new file mode 100644 index 000000000000..6a241736f014 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CapacityPlanner + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb new file mode 100644 index 000000000000..6557df6e7ed4 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/capacityplanner/v1beta/allocation.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/capacityplanner/v1beta/allocation.proto\x12#google.cloud.capacityplanner.v1beta\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\r\n\nAllocation\x12\x64\n\x13specific_allocation\x18\x06 \x01(\x0b\x32\x45.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocationH\x00\x12\n\n\x02id\x18\x01 \x01(\x03\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04zone\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x12\n\nallocation\x18\x05 \x01(\t\x12\x18\n\x10owner_project_id\x18\n \x01(\t\x12\x46\n\x06status\x18\x07 \x01(\x0e\x32\x36.google.cloud.capacityplanner.v1beta.Allocation.Status\x12U\n\x0eshare_settings\x18\x08 \x01(\x0b\x32=.google.cloud.capacityplanner.v1beta.Allocation.ShareSettings\x12\x34\n\x10\x61uto_delete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x85\x07\n\x15SpecificSKUAllocation\x12~\n\x13instance_properties\x18\x01 \x01(\x0b\x32\x61.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x12\n\nused_count\x18\x03 \x01(\x03\x12\x15\n\rassured_count\x18\x04 \x01(\x03\x1a\xb1\x05\n\x1b\x41llocatedInstanceProperties\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x8e\x01\n\x11guest_accelerator\x18\x02 \x03(\x0b\x32s.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AcceleratorConfig\x12\x18\n\x10min_cpu_platform\x18\x03 \x01(\t\x12\x82\x01\n\tlocal_ssd\x18\x04 \x03(\x0b\x32o.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk\x1a\x30\n\x11\x41\x63\x63\x65leratorConfig\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x05\x1a\x99\x02\n\rAllocatedDisk\x12\x14\n\x0c\x64isk_size_gb\x18\x01 \x01(\x03\x12\x95\x01\n\x0e\x64isk_interface\x18\x02 \x01(\x0e\x32}.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk.DiskInterface\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\x1a\x88\x02\n\rShareSettings\x12[\n\nshare_type\x18\x01 \x01(\x0e\x32G.google.cloud.capacityplanner.v1beta.Allocation.ShareSettings.ShareType\x12\x10\n\x08projects\x18\x02 \x03(\t\"\x87\x01\n\tShareType\x12\x1a\n\x16SHARE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x15\n\x11SPECIFIC_PROJECTS\x10\x02\x12\t\n\x05LOCAL\x10\x03\x12*\n&DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS\x10\x04\"b\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07INVALID\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\x42\x06\n\x04typeB\x84\x02\n\'com.google.cloud.capacityplanner.v1betaB\x0f\x41llocationProtoP\x01ZQcloud.google.com/go/capacityplanner/apiv1beta/capacityplannerpb;capacityplannerpb\xaa\x02#Google.Cloud.CapacityPlanner.V1Beta\xca\x02#Google\\Cloud\\CapacityPlanner\\V1beta\xea\x02&Google::Cloud::CapacityPlanner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CapacityPlanner + module V1beta + Allocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation").msgclass + Allocation::SpecificSKUAllocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation").msgclass + Allocation::SpecificSKUAllocation::AllocatedInstanceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties").msgclass + Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AcceleratorConfig").msgclass + Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk").msgclass + Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk.DiskInterface").enummodule + Allocation::ShareSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.ShareSettings").msgclass + Allocation::ShareSettings::ShareType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.ShareSettings.ShareType").enummodule + Allocation::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.Status").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb new file mode 100644 index 000000000000..1dca0ce75e1f --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/capacityplanner/v1beta/future_reservation.proto + +require 'google/protobuf' + +require 'google/cloud/capacityplanner/v1beta/allocation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PROJECT\x10\x01\x12\n\n\x06\x46OLDER\x10\x02\x12\x07\n\x03ORG\x10\x03\"\x91\x01\n\rResourceIdKey\x12\x1c\n\rresource_code\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x12Q\n\x0bresource_id\x18\x01 \x01(\x0b\x32\x37.google.cloud.capacityplanner.v1beta.ResourceIdentifierB\x03\xe0\x41\x02\x42\x0f\n\rdemand_fields\"\x96\x01\n\x12ResourceIdentifier\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12\x15\n\rresource_name\x18\x02 \x01(\t\x12S\n\x13resource_attributes\x18\x03 \x03(\x0b\x32\x36.google.cloud.capacityplanner.v1beta.ResourceAttribute\"c\n\x11ResourceAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.capacityplanner.v1beta.ResourceValue\"\x83\x01\n\rResourceValue\x12\x37\n\x04unit\x18\x01 \x01(\x0e\x32).google.cloud.capacityplanner.v1beta.Unit\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.google.cloud.capacityplanner.v1beta.Value\"m\n\x05Value\x12\x15\n\x0bint64_value\x18\x01 \x01(\x03H\x00\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x42\x07\n\x05value*\xec\x01\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x0e\n\nUNIT_COUNT\x10\x01\x12\x06\n\x02KB\x10\x02\x12\x06\n\x02GB\x10\x03\x12\x06\n\x02TB\x10\x04\x12\x07\n\x03MIB\x10\x11\x12\x07\n\x03GIB\x10\x05\x12\x07\n\x03TIB\x10\x06\x12\x07\n\x03QPS\x10\x07\x12\x06\n\x02MB\x10\x08\x12\x07\n\x03PIB\x10\t\x12\x0c\n\x04TBPS\x10\n\x1a\x02\x08\x01\x12\r\n\tGBPS_BITS\x10\x0b\x12\x0c\n\x08GIB_BITS\x10\x0c\x12\r\n\tMBPS_BITS\x10\r\x12\x0e\n\nMBPS_BYTES\x10\x0e\x12\r\n\tTBPS_BITS\x10\x0f\x12\x0e\n\nTBPS_BYTES\x10\x10\x12\x08\n\x04KOPS\x10\x12\x42\x82\x02\n\'com.google.cloud.capacityplanner.v1betaB\rResourceProtoP\x01ZQcloud.google.com/go/capacityplanner/apiv1beta/capacityplannerpb;capacityplannerpb\xaa\x02#Google.Cloud.CapacityPlanner.V1Beta\xca\x02#Google\\Cloud\\CapacityPlanner\\V1beta\xea\x02&Google::Cloud::CapacityPlanner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CapacityPlanner + module V1beta + ResourceContainer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceContainer").msgclass + ResourceContainer::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceContainer.Type").enummodule + ResourceIdKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceIdKey").msgclass + ResourceIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceIdentifier").msgclass + ResourceAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceAttribute").msgclass + ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceValue").msgclass + Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Value").msgclass + Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Unit").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb new file mode 100644 index 000000000000..72d7c4b3a62e --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/capacityplanner/v1beta/usage_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/capacityplanner/v1beta/allocation_pb' +require 'google/cloud/capacityplanner/v1beta/future_reservation_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' + + +descriptor_data = "\n7google/cloud/capacityplanner/v1beta/usage_service.proto\x12#google.cloud.capacityplanner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/capacityplanner/v1beta/allocation.proto\x1a.google.cloud.capacityplanner.v1beta.QueryReservationsResponse\"\xcc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbc\x01\x12:/v1beta/{parent=projects/*/locations/*}/reservations:queryZA\x12?/v1beta/{parent=organizations/*/locations/*}/reservations:queryZ;\x12\x39/v1beta/{parent=folders/*/locations/*}/reservations:query\x12\x83\x03\n\x14\x45xportUsageHistories\x12@.google.cloud.capacityplanner.v1beta.ExportUsageHistoriesRequest\x1a\x1d.google.longrunning.Operation\"\x89\x02\xca\x41\x31\n\x1c\x45xportUsageHistoriesResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\xce\x01\"=/v1beta/{parent=projects/*/locations/*}/usageHistories:export:\x01*ZG\"B/v1beta/{parent=organizations/*/locations/*}/usageHistories:export:\x01*ZA\"] + # 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb new file mode 100644 index 000000000000..fd3d03327fdd --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb @@ -0,0 +1,206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CapacityPlanner + module V1beta + # Repesents Allocation which is part of aggregated + # reservations data response of "QueryReservations". + # @!attribute [rw] specific_allocation + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation] + # Reservation for instances with specific machine shapes. + # @!attribute [rw] id + # @return [::Integer] + # The unique identifier for the resource. This identifier is + # defined by the server. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation timestamp for this allocation. + # @!attribute [rw] zone + # @return [::String] + # Zone in which the reservation resides. + # @!attribute [rw] description + # @return [::String] + # A description while creating reservation. + # @!attribute [rw] allocation + # @return [::String] + # The reservation resource name. + # @!attribute [rw] owner_project_id + # @return [::String] + # @!attribute [rw] status + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::Status] + # The status of the reservation. + # @!attribute [rw] share_settings + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::ShareSettings] + # Specify share-settings to create a shared reservation. + # @!attribute [rw] auto_delete_time + # @return [::Google::Protobuf::Timestamp] + # Absolute time in future when the reservation will be + # auto-deleted by Compute Engine. + class Allocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This reservation type allows to pre allocate specific instance + # configuration. + # @!attribute [rw] instance_properties + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties] + # The instance properties for the reservation. + # @!attribute [rw] count + # @return [::Integer] + # Specifies the number of resources that are allocated. + # @!attribute [rw] used_count + # @return [::Integer] + # Indicates how many instances are in use. + # @!attribute [rw] assured_count + # @return [::Integer] + # Indicates how many instances are actually usable currently. + class SpecificSKUAllocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Properties of the SKU instances being reserved. + # @!attribute [rw] machine_type + # @return [::String] + # Specifies type of machine (name only) which has fixed number of vCPUs + # and fixed amount of memory. This also includes specifying custom + # machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. + # @!attribute [rw] guest_accelerator + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AcceleratorConfig>] + # Specifies accelerator type and count. + # @!attribute [rw] min_cpu_platform + # @return [::String] + # Minimum cpu platform the reservation. + # @!attribute [rw] local_ssd + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk>] + # Specifies amount of local ssd to reserve with each instance. The type + # of disk is local-ssd. + class AllocatedInstanceProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A specification of the type and number of accelerator cards attached to + # the instance. + # @!attribute [rw] type + # @return [::String] + # Accelerator name. + # See https://cloud.google.com/compute/docs/gpus/#introduction for a + # full list of accelerator types. + # @!attribute [rw] count + # @return [::Integer] + # The number of the guest accelerator cards exposed to this instance. + class AcceleratorConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A specification of the interface and size of disk attached to + # the instance. + # @!attribute [rw] disk_size_gb + # @return [::Integer] + # Specifies the size of the disk in base-2 GB. + # @!attribute [rw] disk_interface + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk::DiskInterface] + # Specifies the disk interface to use for attaching this disk, which is + # either SCSI or NVME. The default is SCSI. + class AllocatedDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # guest device interface options to use for the disk. + module DiskInterface + # Default value. This value is unused. + DISK_INTERFACE_UNSPECIFIED = 0 + + # SCSI disk interface. + SCSI = 1 + + # NVME disk interface. + NVME = 2 + + # NVDIMM disk interface. + NVDIMM = 3 + + # ISCSI disk interface. + ISCSI = 4 + end + end + end + end + + # The share setting for reservation. + # @!attribute [rw] share_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::ShareSettings::ShareType] + # Type of sharing for this shared-reservation + # @!attribute [rw] projects + # @return [::Array<::String>] + # A List of Project names to specify consumer projects for this + # shared-reservation. This is only valid when share_type's value is + # SPECIFIC_PROJECTS. + class ShareSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible scope in which the reservation can be shared. More granularity + # can be added in future. + module ShareType + # Default value. This value is unused. + SHARE_TYPE_UNSPECIFIED = 0 + + # Shared-reservation is open to entire Organization + ORGANIZATION = 1 + + # Shared-reservation is open to specific projects + SPECIFIC_PROJECTS = 2 + + # Default value. + LOCAL = 3 + + # Shared-reservation is open to direct child projects of specific + # folders. + DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS = 4 + end + end + + # The status of the reservation. + module Status + # Default value. This value is unused. + STATUS_UNSPECIFIED = 0 + + # Invalid Reservation + INVALID = 1 + + # Resources are being allocated for the reservation. + CREATING = 2 + + # Reservation has allocated all its resources. + READY = 3 + + # Reservation is currently being deleted. + DELETING = 4 + + # Reservation is currently being resized. + UPDATING = 5 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb new file mode 100644 index 000000000000..23ca19eed3e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CapacityPlanner + module V1beta + # Repesents Future Reservation request which is part of aggregated + # reservations data response of "QueryReservations". + # @!attribute [rw] specific_sku_properties + # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::SpecificSKUProperties] + # Future Reservation configuration to indicate instance properties and + # total count. + # @!attribute [rw] id + # @return [::Integer] + # A unique identifier for this future reservation. The server + # defines this identifier. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The creation timestamp for this future reservation. + # @!attribute [rw] zone + # @return [::String] + # URL of the Zone where this future reservation resides. + # @!attribute [rw] description + # @return [::String] + # Description of the future reservation provided by user. + # @!attribute [rw] future_reservation + # @return [::String] + # The future reservation resource name. + # @!attribute [rw] owner_project_id + # @return [::String] + # @!attribute [rw] time_window + # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::TimeWindow] + # Time window for this Future Reservation. + # @!attribute [rw] share_settings + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::ShareSettings] + # List of Projects/Folders to share with. + # @!attribute [rw] name_prefix + # @return [::String] + # Name prefix for the reservations to be created at the time of + # delivery. The name prefix must comply with RFC1035. + # Maximum allowed length for name prefix is 20. Automatically created + # reservations name format will be -date-####. + # @!attribute [rw] status + # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::Status] + # Status of the Future Reservation + # @!attribute [rw] auto_created_reservations_delete_time + # @return [::Google::Protobuf::Timestamp] + # Future timestamp when the FR auto-created reservations will be deleted by + # Compute Engine. Format of this field must be a valid RFC3339 value. + # @!attribute [rw] auto_delete_auto_created_reservations + # @return [::Boolean] + # Setting for enabling or disabling automatic deletion for auto-created + # reservation. If set to true, auto-created reservations will be + # deleted at Future Reservation's end time (default) or at user's defined + # timestamp if any of the + # [auto_created_reservations_delete_time, auto_created_reservations_duration] + # values is specified. + # For keeping auto-created reservation indefinitely, this value should be set + # to false. + class FutureReservation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents specific SKU properties for the Future Reservation. + # @!attribute [rw] instance_properties + # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties] + # Properties of the SKU instances being reserved. + # @!attribute [rw] total_count + # @return [::Integer] + # Total number of instances for which capacity assurance is requested at a + # future time period. + class SpecificSKUProperties + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents time window for the Future Reservation. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Start time of the Future Reservation. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # End time of the Future Reservation. + class TimeWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents status related to the future reservation. + # @!attribute [rw] procurement_status + # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::Status::ProcurementStatus] + # Current state of this Future Reservation + # @!attribute [rw] lock_time + # @return [::Google::Protobuf::Timestamp] + # Time when Future Reservation would become LOCKED, after which no + # modifications to Future Reservation will be allowed. Applicable only + # after the Future Reservation is in the APPROVED state. The lock_time is + # an RFC3339 string. The procurement_status will transition to PROCURING + # state at this time. + # @!attribute [rw] auto_created_reservations + # @return [::Array<::String>] + # Fully qualified urls of the automatically created reservations at + # start_time. + # @!attribute [rw] fulfilled_count + # @return [::Integer] + # This count indicates the fulfilled capacity so far. This is set during + # "PROVISIONING" state. This count also includes capacity delivered as part + # of existing matching reservations. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents procurement status of the Future Reservation. + module ProcurementStatus + # This is unused status value. + PROCUREMENT_STATUS_UNSPECIFIED = 0 + + # Future reservation is pending approval by Google Cloud Platform. + PENDING_APPROVAL = 1 + + # Future reservation is approved by Google Cloud Platform. + APPROVED = 2 + + # Future reservation is committed by the customer. + COMMITTED = 3 + + # Future reservation is rejected by Google Cloud Platform. + DECLINED = 4 + + # Future reservation is cancelled by the customer. + CANCELLED = 5 + + # Future reservation is being procured by Google Cloud Platform. Beyond + # this point, Future reservation is locked and no further modifications + # are allowed. + PROCURING = 6 + + # Future reservation capacity is being provisioned. This state will be + # entered after start_time, while reservations are being created to + # provide total_count reserved instance slots. This state will not + # persist past start_time + 24h. + PROVISIONING = 7 + + # Future reservation is fulfilled completely. + FULFILLED = 8 + + # Future reservation failed. No additional reservations were provided. + FAILED = 9 + + # Future reservation is partially fulfilled. Additional reservations were + # provided but did not reach total_count reserved instance slots. + FAILED_PARTIALLY_FULFILLED = 10 + + # Related status for PlanningStatus.Draft. Transitions to + # PENDING_APPROVAL upon user submitting FR. + DRAFTING = 11 + + # An Amendment to the Future Reservation has been requested. If the + # Amendment is declined, the Future Reservation will be restored to the + # last known good state. + PENDING_AMENDMENT_APPROVAL = 12 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb new file mode 100644 index 000000000000..279b2e874b84 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CapacityPlanner + module V1beta + # Identifier for a Google Cloud Platform location. + # @!attribute [rw] location_level + # @return [::Google::Cloud::CapacityPlanner::V1beta::LocationLevel] + # The location level such as a region. + # @!attribute [rw] source + # @return [::String] + # Required. Location where resource is sourced. For Cloud Storage, the + # alphabetically first location is the source. + # @!attribute [rw] linked_locations + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::LocationIdentifier::LinkedLocation>] + # Optional. Other linked locations. + class LocationIdentifier + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] location_level + # @return [::Google::Cloud::CapacityPlanner::V1beta::LocationLevel] + # The location level such as a region. + # @!attribute [rw] location + # @return [::String] + # Required. The linked cloud location. + # @!attribute [rw] label + # @return [::String] + class LinkedLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The level of the Google Cloud Platform location. + module LocationLevel + # Location level is unspecified. + LOCATION_LEVEL_UNSPECIFIED = 0 + + # Cloud region. + REGION = 1 + + # Cloud zone. + ZONE = 2 + + # Globally. + GLOBAL = 3 + + # A metro. + METRO = 4 + + # Dual region pair. + DUAL_REGION = 5 + + # Multiple regions. + MULTI_REGION = 6 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb new file mode 100644 index 000000000000..68d8f2d1f4b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb @@ -0,0 +1,159 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CapacityPlanner + module V1beta + # The resource container of Google Cloud Platform hierarchy such as a project. + # @!attribute [rw] type + # @return [::Google::Cloud::CapacityPlanner::V1beta::ResourceContainer::Type] + # @!attribute [rw] id + # @return [::String] + # Required. Identifier of the resource container. For example, project number + # for project type. + class ResourceContainer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Type + TYPE_UNSPECIFIED = 0 + + PROJECT = 1 + + FOLDER = 2 + + ORG = 3 + end + end + + # The id for a Google Cloud Platform resource key. + # @!attribute [rw] resource_code + # @return [::String] + # Required. resource_code for the resource. eg: gce-ram, gce-vcpus, + # gce-gpu, gce-tpu, gce-vm, gce-persistent-disk, gce-local-ssd. + # @!attribute [rw] resource_id + # @return [::Google::Cloud::CapacityPlanner::V1beta::ResourceIdentifier] + # Required. Id of the resource. + class ResourceIdKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The identifier for a Google Cloud Platform resource. + # @!attribute [rw] service_name + # @return [::String] + # @!attribute [rw] resource_name + # @return [::String] + # @!attribute [rw] resource_attributes + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::ResourceAttribute>] + class ResourceIdentifier + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An attribute of a Google Cloud Platform resource. + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::CapacityPlanner::V1beta::ResourceValue] + class ResourceAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] unit + # @return [::Google::Cloud::CapacityPlanner::V1beta::Unit] + # @!attribute [rw] value + # @return [::Google::Cloud::CapacityPlanner::V1beta::Value] + class ResourceValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] int64_value + # @return [::Integer] + # Note: The following fields are mutually exclusive: `int64_value`, `string_value`, `double_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] string_value + # @return [::String] + # Note: The following fields are mutually exclusive: `string_value`, `int64_value`, `double_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_value + # @return [::Float] + # Note: The following fields are mutually exclusive: `double_value`, `int64_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bool_value + # @return [::Boolean] + # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `string_value`, `double_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module Unit + UNIT_UNSPECIFIED = 0 + + UNIT_COUNT = 1 + + # Kilobytes (10^3 bytes) + KB = 2 + + # Gigabytes (10^9 bytes) + GB = 3 + + # Terabytes (10^12 bytes) + TB = 4 + + # Mebibytes (2^20 bytes) + MIB = 17 + + # Gibibytes (2^30 bytes) + GIB = 5 + + # Tebibytes (2^40 bytes) + TIB = 6 + + # Queries per second + QPS = 7 + + # Megabytes (10^6 bytes) + MB = 8 + + # Pebibytes (2^50 bytes) + PIB = 9 + + # Terabits (10^12 bits) per second + TBPS = 10 + + GBPS_BITS = 11 + + GIB_BITS = 12 + + MBPS_BITS = 13 + + MBPS_BYTES = 14 + + TBPS_BITS = 15 + + TBPS_BYTES = 16 + + KOPS = 18 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb new file mode 100644 index 000000000000..79c6457f5863 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb @@ -0,0 +1,912 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CapacityPlanner + module V1beta + # The `QueryUsageHistories` request. + # Next : 16 + # @!attribute [rw] parent + # @return [::String] + # Required. The compute engine resource and location for the time series + # values to return. The format is: + # + # projects/{project}/locations/{location} or + # organizations/{organization}/locations/{location} or + # folders/{folder}/locations/{location} + # @!attribute [rw] location_level + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @!attribute [rw] is_spot + # @return [::Boolean] + # Optional. The is_spot flag is used to fetch the usage data for preemptible + # Resources. + # @!attribute [rw] machine_family + # @return [::String] + # The machine family for the `UsageHistory` values to return. Possible values + # include "n1", and "n2d". See + # https://cloud.google.com/compute/docs/machine-types for more examples. + # Empty machine_family will return results matching all machine families. + # @!attribute [rw] machine_shape + # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] + # Optional. The machine shape for the `UsageHistory` values to return. + # @!attribute [rw] disk_type + # @return [::String] + # Optional. The disk_type for the `UsageHistory` values to return request + # with persistent-disk cloud_resource_type. Empty disk_type will return + # results matching all disk types. + # @!attribute [rw] confidential_mode + # @return [::Boolean] + # Optional. Whether the persistent disk is in confidential mode. + # @!attribute [rw] gpu_type + # @return [::String] + # Optional. The GPU type for the `UsageHistory` values to return. Sample + # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @!attribute [rw] tpu_type + # @return [::String] + # Optional. The TPU type for the `UsageHistory` values to return. Empty + # tpu_type will return results matching all TPUs. + # @!attribute [rw] cloud_resource_type + # @return [::String] + # Required. The resource for the `UsageHistory` values to return. Possible + # values include "gce-vcpus", "gce-ram", "gce-local-ssd", + # "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type + # will return results matching all resources. + # @!attribute [rw] usage_aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # The method that should be used to convert sampled usage data to daily + # usage values. + # AGGREGATION_METHOD_UNSPECIFIED will return results matching all the + # aggregation methods. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Optional. The start date of reservations usage. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Optional. The end date of reservations usage. + class QueryUsageHistoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `QueryUsageHistories` response. + # @!attribute [rw] usage_histories + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::UsageHistory>] + # The usage histories that match the request. + class QueryUsageHistoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `QueryForecasts` request. + # Next : 14 + # @!attribute [rw] parent + # @return [::String] + # Required. The compute engine resource and location for the time series + # values to return. The format is: + # + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @!attribute [rw] machine_family + # @return [::String] + # The machine family to use to select the `Forecast` values to return. + # Possible values include "n1", and "n2d". + # Empty machine_family will return results matching all machine families. + # @!attribute [rw] machine_shape + # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] + # Optional. The machine shape for the time series values to return. + # @!attribute [rw] disk_type + # @return [::String] + # Optional. The disk_type for the `Forecast` values to return with request + # persistent-disk cloud_resource_type. + # Empty disk_type will return results matching all disk types. + # @!attribute [rw] confidential_mode + # @return [::Boolean] + # Optional. Whether the persistent disk is in confidential mode. + # @!attribute [rw] gpu_type + # @return [::String] + # Optional. The GPU type for the `Forecast` values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @!attribute [rw] tpu_type + # @return [::String] + # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type + # will return results matching all TPUs. + # @!attribute [rw] cloud_resource_type + # @return [::String] + # Required. The resource for the `Forecast` values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", + # "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results + # matching all resources. + # @!attribute [rw] forecast_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] + # The type of forecast to use to select the `Forecast` values to return. + # FORECAST_TYPE_UNSPECIFIED will return results matching all the forecast + # types. + # @!attribute [rw] prediction_interval + # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] + # The prediction interval to use to select the `Forecast` values to return. + # PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction + # intervals. + # @!attribute [rw] aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Aggregation Method of the historical usage for which the forecast is + # generated + class QueryForecastsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `QueryForecasts` response. + # @!attribute [rw] forecasts + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Forecast>] + # The forecasts that match the request. + class QueryForecastsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `QueryReservations` request. + # @!attribute [rw] parent + # @return [::String] + # Required. The compute engine resource and location for the time series + # values to return. The format is: + # + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @!attribute [rw] location_level + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @!attribute [rw] machine_family + # @return [::String] + # Optional. The machine family to use to select the aggregate reserved values + # to return. Possible values include "n1", and "n2d" etc. Empty + # machine_family will return results matching all machine families. + # @!attribute [rw] machine_shape + # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] + # Optional. The machine_shape as a filter to select matching reservations. + # @!attribute [rw] gpu_type + # @return [::String] + # Optional. The GPU type for the reserved values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @!attribute [rw] cloud_resource_type + # @return [::String] + # Required. The resource for the reserved values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm". + # @!attribute [rw] reservation_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationType] + # Required. The Reservation type for example, future reservation request and + # allocation. If unspecified, all types are + # included. + # @!attribute [rw] share_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ShareType] + # Optional. Types of share settings to filter reservations in response. If + # unspecified, all types are included. + # @!attribute [rw] ownership_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::OwnershipType] + # Optional. Types of ownerships to filter reservations based on. + # In case of OWNED, it filters reservations which are owned by selected + # parent project/folder/organization. If unspecified, all types are + # included. + # @!attribute [rw] reservation_data_level + # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationDataLevel] + # Required. Reservations output data format. + # @!attribute [rw] include_unapproved_reservations + # @return [::Boolean] + # Optional. Whether to include pending for approval reservations in the + # response. This field is only applicable for future reservations. + # @!attribute [rw] aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. Aggregation Method of the historical reservation usage + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Optional. The start date of reservations usage. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Optional. The end date of reservations usage. + class QueryReservationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of the reservation + module ReservationType + # No reservation type specified. + RESERVATION_TYPE_UNSPECIFIED = 0 + + # Allocation refers to realized reservation either auto created or created + # by the users on demand. + RESERVATION_TYPE_ALLOCATION = 1 + + # Future Reservation requests created by users. + RESERVATION_TYPE_FUTURE_RESERVATION = 2 + + # All reservations. + RESERVATION_TYPE_ALL = 3 + end + + # Possible scope in which the reservation can be shared. + module ShareType + # No share type specified. + SHARE_TYPE_UNSPECIFIED = 0 + + # Default value, for which reservation is open to only owner project. + SHARE_TYPE_LOCAL = 1 + + # Shared-reservation is open to specific projects. + SHARE_TYPE_SPECIFIC_PROJECTS = 2 + end + + # Reservation ownership status to provide distinction for Capacity Planning. + module OwnershipType + # No ownership status specified. + OWNERSHIP_TYPE_UNSPECIFIED = 0 + + # For the reservations owned within selected Google Cloud Platform Resource + # Container (project/folder/organization). + OWNERSHIP_TYPE_OWNED = 1 + + # For the reservations consumable within selected Google Cloud Platform + # Resource Container (project/folder/organization), but not owned by them. + OWNERSHIP_TYPE_SHARED_BY_OTHERS = 2 + end + + # The form in which data of reservations should be returned. + # In case of AGGREGATED, timeseries for selected reservations is returned. If + # unspecified, all levels are included. + module ReservationDataLevel + # No reservation data level specified. + RESERVATION_DATA_LEVEL_UNSPECIFIED = 0 + + # aggregated reservations data in a timeseries or aggregation over + # timeseries. + RESERVATION_DATA_LEVEL_AGGREGATED = 1 + + # per reservation detail which is equivalent of Arcus Future Reservation or + # Allocation with only limited fields which are useful for Capacity + # Planning. + RESERVATION_DATA_LEVEL_PER_RESERVATION = 2 + end + end + + # The `QueryReservations` response. + # @!attribute [rw] reservations + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::ReservationData>] + # The reservations data that match the request. + class QueryReservationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A single data point in a time series. + # @!attribute [rw] event_time + # @return [::Google::Protobuf::Timestamp] + # The time which the data point applies. + # @!attribute [rw] value + # @return [::Float] + # The value of the data point. + class Point + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of data points that describes the predicted time-varying values + # of a resource. + # @!attribute [rw] name + # @return [::String] + # The resource name of the connection in the form of: + # `projects/{project_id}/locations/{location_id}/forecasts/{forecast_id}` or + # `organizations/{organization_id}/locations/{location_id}/forecasts/{forecast_id}` + # or `folders/{folder_id}/locations/{location_id}/forecasts/{forecast_id}` + # @!attribute [rw] time_series + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] + # The collection of data points that represent the predicted values. Note + # that some of these values may be in the past (if, for example, the forecast + # was created in the past and predicted values for the present day). + # @!attribute [rw] forecast_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] + # The type of forecast. + # @!attribute [rw] bounds + # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::Bounds] + # The bounds represented by this forecast time series. + # @!attribute [rw] prediction_interval + # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] + # The prediction interval represented by the time series. + # @!attribute [rw] aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Aggregation Method of the historical usage for which the forecast is + # generated + class Forecast + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of the forecast. This describes the method that was used to + # produce future time series values from historical time series values. + module ForecastType + # No forecast type is specified. + FORECAST_TYPE_UNSPECIFIED = 0 + + # Statistical forecast. + STATISTICAL = 1 + + # Statistical forecast that attempts to predict the seasonal affects of + # Black Friday and Cyber Monday. + STATISTICAL_WITH_BFCM = 2 + + # Yearly Seasonality model provides generic seasonality beyond BFCM. + YEARLY_SEASONALITY = 3 + end + + # The bounds of the forecast time series. + module Bounds + # No bounds is specified. + BOUNDS_UNSPECIFIED = 0 + + # The time series represents the upper bound of the forecast. + LOWER_BOUND = 1 + + # The time series represents the median expected forecast value. + MEDIAN = 2 + + # The time series represents the lower bound of the forecast. + UPPER_BOUND = 3 + end + + # The prediction interval represented by a forecast. + module PredictionInterval + # No prediction interval is specified. + PREDICTION_INTERVAL_UNSPECIFIED = 0 + + # This represents a prediction interval that has 90% confidence. For + # example, for a symmetric prediction interval, a `PredictionInterval` + # of `PREDICTION_INTERVAL_90` means that the `UPPER_BOUND` will represent + # the 95th precentile. + PREDICTION_INTERVAL_90 = 1 + + # This represents a prediction interval that has 50% confidence. For + # example, for a symmetric prediction interval, a `PredictionInterval` + # of `PREDICTION_INTERVAL_50` means that the `UPPER_BOUND` will represent + # the 75th precentile. + PREDICTION_INTERVAL_50 = 2 + end + end + + # A collection of data points that describes the historical time-varying values + # of a resource. + # @!attribute [rw] time_series + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] + # The collection of data points that represent the historical values. + # @!attribute [rw] aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Method used to convert sampled usage data to time series values. + class UsageHistory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Methods for converting sampled data to time series values. + module AggregationMethod + # No aggregation method is specified. + AGGREGATION_METHOD_UNSPECIFIED = 0 + + MEDIAN = 1 + + # Time series values represent the 99th percentile of the sampled values. + PEAK = 2 + + # Time series values represent the 50th(median) percentile of the sampled + # values. + P50 = 3 + + # Time series values represent the 75th percentile of the sampled values. + P75 = 4 + + # Time series values represent the 99th percentile of the sampled values. + P99 = 5 + end + end + + # A collection of data points that describes the time-varying values of a + # resource. A time series is identified by its ID. + # Next : 13 + # @!attribute [rw] location_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Required. The type of location that the time series is summarizing. + # @!attribute [rw] location + # @return [::String] + # Optional. The location of the usage data in time series. + # @!attribute [rw] is_spot + # @return [::Boolean] + # Optional. The location of the usage data in time series. + # @!attribute [rw] machine_family + # @return [::String] + # The machine family for the time series values to return. Possible values + # include "n1" and "n2d". + # @!attribute [rw] disk_type + # @return [::String] + # The disk type for the time series values to return. + # @!attribute [rw] confidential_mode + # @return [::Boolean] + # Optional. The confidential mode for disk. + # @!attribute [rw] gpu_type + # @return [::String] + # The GPU type of the time series. + # @!attribute [rw] tpu_type + # @return [::String] + # The TPU type of the time series. + # @!attribute [rw] machine_shape + # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] + # The machine shape of the time series. + # @!attribute [rw] cloud_resource_type + # @return [::String] + # The resource for the time series values to return. Possible values include + # "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu", + # "gce-tpu" and "gce-vm". + # @!attribute [rw] points + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Point>] + # The data points of this time series. When listing time series, points are + # returned in chronological order. + # @!attribute [rw] unit + # @return [::String] + # The units in which the values are reported. + class TimeSeries + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of location that the time series is summarizing. + module LocationType + # No location type was specified. + LOCATION_TYPE_UNSPECIFIED = 0 + + # Time series values represent usage aggregated at the region level. + REGIONAL = 1 + + # Time series values represent usage aggregated at the zone level. + ZONAL = 2 + end + end + + # Response entity for reservations data. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the connection in the form of: + # `projects/{project_id}/locations/{location_id}/reservations/{reservation_id}` + # or + # `organizations/{organization_id}/locations/{location_id}/reservations/{reservation_id}` + # or + # `folders/{folder_id}/locations/{location_id}/reservations/{reservation_id}` + # @!attribute [rw] time_series + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] + # The collection of data points that represent the aggregated reserved value + # for reservations filtered by the criteria. + # @!attribute [rw] used_reservation_values + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] + # The collection of data points that represent the aggregated used value for + # reservations filtered by the criteria. + # @!attribute [rw] future_reservations + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::FutureReservation>] + # Future reservations filtered by the criteria. + # @!attribute [rw] allocations + # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Allocation>] + # Allocations filtered by the criteria. + class ReservationData + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Machine shape details + # Next : 13 + # @!attribute [rw] machine_family + # @return [::String] + # Optional. The VM family. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. The characteristics of the sampled VM expressed as a string. + # @!attribute [rw] machine_shape + # @return [::String] + # Optional. The customer visible string representing the type of VM. + # @!attribute [rw] cpu_cores + # @return [::Float] + # Optional. Number of CPU cores per VM. + # @!attribute [rw] gpu_type + # @return [::String] + # Optional. The type of GPU with the VM. + # @!attribute [rw] gpu_compute_type + # @return [::String] + # Optional. The GPU name recognized by Compute Engine APIs. + # @!attribute [rw] gpu_cores + # @return [::Integer] + # Optional. The number of GPU cores per VM. + # @!attribute [rw] local_ssd_partitions + # @return [::Integer] + # Optional. The number of local SSD partitions per VM. + # @!attribute [rw] local_ssd_gb + # @return [::Float] + # Optional. Total amount of local SSD storage. + # @!attribute [rw] memory_gb + # @return [::Float] + # Optional. Total amount of memory with the VM. + # @!attribute [rw] local_ssd_interface + # @return [::String] + # Optional. The local SSD interface used such as nvme or scsi + # @!attribute [rw] min_cpu_platform + # @return [::String] + # Optional. The Min-cpu platform used such as icelake + class MachineShape + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ExportUsageHistories` request + # Next : 12 + # @!attribute [rw] parent + # @return [::String] + # Required. The compute engine resource and location for the time series + # values to return. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @!attribute [rw] is_spot + # @return [::Boolean] + # Optional. Set true to export usage for spot resources. + # @!attribute [rw] machine_family + # @return [::String] + # Optional. The machine family for the `UsageHistory` values to return. + # Possible values include "n1", and "n2d". See + # https://cloud.google.com/compute/docs/machine-types for more examples. + # @!attribute [rw] machine_shape + # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] + # Optional. The machine shape for the time series values to export. + # @!attribute [rw] disk_type + # @return [::String] + # Optional. The disk_type for the `UsageHistory` values to return request + # with persistent-disk resource_type. Possible values include "pd-ssd", + # "pd-standard", "pd-balanced", and "pd-extreme". + # @!attribute [rw] gpu_type + # @return [::String] + # Optional. The GPU type for the `UsageHistory` values to return. Sample + # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @!attribute [rw] tpu_type + # @return [::String] + # Optional. The TPU type for the `UsageHistory` values to return. Empty + # tpu_type will return results matching all TPUs. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource for the `UsageHistory` values to return. Possible + # values include "gce-vcpus", "gce-ram", "gce-local-ssd", + # "gce-persistent-disk", "gce-gpu" and "gce-tpu". + # @!attribute [rw] usage_aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. The method that should be used to convert sampled usage data to + # daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results + # matching all the aggregation methods. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Optional. The start date of usage. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Optional. The end date of usage. + # @!attribute [rw] output_config + # @return [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig] + # Required. Output configuration indicating where the results will be output + # to. + class ExportUsageHistoriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ExportForecasts` request + # Next : 13 + # @!attribute [rw] parent + # @return [::String] + # Required. The compute engine resource and location for the time series + # values to return. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @!attribute [rw] machine_family + # @return [::String] + # Optional. The machine family to use to select the `Forecast` values to + # return. Possible values include "n1", and "n2d". + # @!attribute [rw] machine_shape + # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] + # Optional. The machine shape for the time series values to export. + # @!attribute [rw] disk_type + # @return [::String] + # Optional. The disk_type for the `Forecast` values to return with request + # persistent-disk resource_type. + # @!attribute [rw] gpu_type + # @return [::String] + # Optional. The GPU type for the `Forecast` values to return. Sample values + # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See + # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type + # will return results matching all GPUs. + # @!attribute [rw] tpu_type + # @return [::String] + # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type + # will return results matching all TPUs. + # @!attribute [rw] resource_type + # @return [::String] + # Required. The resource for the `Forecast` values to return. Possible values + # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", + # "gce-gpu" and "gce-tpu". + # @!attribute [rw] prediction_interval + # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] + # Optional. The prediction interval to use to select the `Forecast` values to + # return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all + # prediction intervals. + # @!attribute [rw] aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Optional. Aggregation Method of the historical usage for which the forecast + # is generated. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Optional. The start date of forecasts. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Optional. The end date of forecasts. + # @!attribute [rw] output_config + # @return [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig] + # Required. Output configuration indicating where the results will be output + # to. + class ExportForecastsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The `ExportReservationsUsage` request + # @!attribute [rw] machine_family + # @return [::String] + # Optional. The machine family to query reservations and usage by. For + # example: n1, n2d. + # + # Note: The following fields are mutually exclusive: `machine_family`, `machine_shape`, `gpu_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] machine_shape + # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] + # Optional. The machine_shape as a filter to select matching reservations + # and its usage. + # + # Note: The following fields are mutually exclusive: `machine_shape`, `machine_family`, `gpu_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gpu_type + # @return [::String] + # Optional. The GPU type to query reservations and usage by. For example: + # NVIDIA T4. + # + # Note: The following fields are mutually exclusive: `gpu_type`, `machine_family`, `machine_shape`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] parent + # @return [::String] + # Required. The compute engine resource and location of the + # reservationsusage. The format is: + # projects/\\{project}/locations/\\{location} or + # organizations/\\{organization}/locations/\\{location} or + # folders/\\{folder}/locations/\\{location} + # @!attribute [rw] location_level + # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] + # Optional. The location level of the reservations usage timeseries. + # @!attribute [rw] cloud_resource_type + # @return [::String] + # Required. The resource for the `ReservationsUsage` values to return. + # Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and + # "gce-gpu". + # @!attribute [rw] usage_aggregation_method + # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] + # Required. The method that should be used to convert sampled reservations + # data to daily usage values. + # @!attribute [rw] share_type + # @return [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest::ShareType] + # Optional. Type of share settings to filter reservations in response. If + # unspecified, all types are included. + # @!attribute [rw] start_date + # @return [::Google::Type::Date] + # Optional. The start date of reservations usage. + # @!attribute [rw] end_date + # @return [::Google::Type::Date] + # Optional. The end date of reservations usage. + # @!attribute [rw] output_config + # @return [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig] + # Required. Output configuration indicating where the results will be output + # to. + class ExportReservationsUsageRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible scope in which the reservation can be shared. + module ShareType + # No share type specified. + SHARE_TYPE_UNSPECIFIED = 0 + + # Default value, for which reservation is open to only owner project. + SHARE_TYPE_LOCAL = 1 + + # Shared-reservation is open to specific projects. + SHARE_TYPE_SPECIFIC_PROJECTS = 2 + end + end + + # Output configuration for export destination. + # @!attribute [rw] gcs_destination + # @return [::Google::Cloud::CapacityPlanner::V1beta::GcsDestination] + # Destination on Cloud Storage. + # + # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bigquery_destination + # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination] + # Destination on BigQuery. + # + # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class OutputConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Cloud Storage location. + # @!attribute [rw] uri + # @return [::String] + # Optional. The path to the file in Cloud Storage where the export will be + # stored. The URI is in the form `gs://bucketName/fileName`. If the file + # already exists, the request succeeds, but the operation fails. + # @!attribute [rw] bucket + # @return [::String] + # Required. The bucket name to which the export will be stored. + # @!attribute [rw] object + # @return [::String] + # Required. The object name to which the export will be stored. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Flag to indicate overwrite in case file already exists. + class GcsDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A BigQuery destination for exporting assets to. + # @!attribute [rw] dataset + # @return [::String] + # Required. The BigQuery dataset in format + # "projects/\\{projectId}/datasets/\\{datasetId}", to which the snapshot result + # should be exported. If this dataset does not exist, the export call returns + # an INVALID_ARGUMENT error. + # @!attribute [rw] table + # @return [::String] + # Required. The BigQuery table to which the snapshot result should be + # written. + # @!attribute [rw] partition_key + # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination::PartitionKey] + # Optional. The partition key for BigQuery partitioned table. + # @!attribute [rw] write_disposition + # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination::WriteDisposition] + # Optional. Specifies the action that occurs if the destination table or + # partition already exists. + # @!attribute [rw] create_disposition + # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination::CreateDisposition] + # Optional. Specifies the action that occurs if the destination table does + # not exist + # @!attribute [rw] gcs_location + # @return [::String] + # Optional. Specifies the Cloud Storage location. + # Users can choose to provide a location for Cloud Storage bucket to store + # the exported data. (as it is possible that some locations are restricted + # via org policy for that project) Temporary Cloud Storage bucket creation is + # an interim step for BigQuery upload. If no value is provided, the default + # location used will be 'US'. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This enum determines the partition key column for the BigQuery tables. + # Partitioning can improve query performance and reduce query cost by + # filtering partitions. Refer to + # https://cloud.google.com/bigquery/docs/partitioned-tables for details. + module PartitionKey + # Unspecified partition key. Tables won't be partitioned using this + # option. + PARTITION_KEY_UNSPECIFIED = 0 + + # The time when the request is received. If specified as partition key, + # the result table(s) is partitioned by the RequestTime column, an + # additional timestamp column representing when the request was received. + REQUEST_TIME = 1 + end + + # Specifies the action that occurs if the destination table or partition + # already exists. By default, the data will be appended to the existing + # table. + module WriteDisposition + # Unspecified write disposition. + WRITE_DISPOSITION_UNSPECIFIED = 0 + + # If the table or partition already exists, BigQuery appends the data to + # the table or the latest partition. + WRITE_APPEND = 1 + + # If the table or partition already exists, BigQuery overwrites the entire + # table or all the partitions data. + WRITE_TRUNCATE = 2 + + # If the table already exists and contains data, an error is returned. + WRITE_EMPTY = 3 + end + + # Specifies the action that occurs if the destination table does not exist. + # By default, a new table will be created. + module CreateDisposition + # Unspecified create disposition. + CREATE_DISPOSITION_UNSPECIFIED = 0 + + # If the table does not exist, BigQuery creates the table. + CREATE_IF_NEEDED = 1 + + # If the table does not exist, an error will be returned. + CREATE_NEVER = 2 + end + end + + # Represents the metadata of a 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. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response message for [UsageService.ExportUsageHistories]. + # @!attribute [rw] response + # @return [::String] + # The response message for the usage history export. In case of bigquery, + # it will also contain job id. + class ExportUsageHistoriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response message for [UsageService.ExportForecasts]. + # @!attribute [rw] response + # @return [::String] + # The response message for the forecast export. In case of bigquery, + # it will also contain job id. + class ExportForecastsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response message for [UsageService.ExportReservationsUsage]. + # @!attribute [rw] response + # @return [::String] + # The response message for the reservations usage export. In case of + # bigquery, it will also contain job id. + class ExportReservationsUsageResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/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-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/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-capacity_planner-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..1d0a9780457f --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/type/date.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..95bb82d75ac5 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-capacity_planner-v1beta", path: "../" +else + gem "google-cloud-capacity_planner-v1beta" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json new file mode 100644 index 000000000000..1664264586ff --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-capacity_planner-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.capacityplanner.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "capacityplanner_v1beta_generated_UsageService_QueryUsageHistories_sync", + "title": "Snippet for the query_usage_histories call in the UsageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_usage_histories.", + "file": "usage_service/query_usage_histories.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_usage_histories", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_usage_histories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse", + "client": { + "short_name": "UsageService::Client", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" + }, + "method": { + "short_name": "QueryUsageHistories", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService.QueryUsageHistories", + "service": { + "short_name": "UsageService", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "capacityplanner_v1beta_generated_UsageService_QueryForecasts_sync", + "title": "Snippet for the query_forecasts call in the UsageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_forecasts.", + "file": "usage_service/query_forecasts.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_forecasts", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_forecasts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse", + "client": { + "short_name": "UsageService::Client", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" + }, + "method": { + "short_name": "QueryForecasts", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService.QueryForecasts", + "service": { + "short_name": "UsageService", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "capacityplanner_v1beta_generated_UsageService_QueryReservations_sync", + "title": "Snippet for the query_reservations call in the UsageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_reservations.", + "file": "usage_service/query_reservations.rb", + "language": "RUBY", + "client_method": { + "short_name": "query_reservations", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_reservations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse", + "client": { + "short_name": "UsageService::Client", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" + }, + "method": { + "short_name": "QueryReservations", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService.QueryReservations", + "service": { + "short_name": "UsageService", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "capacityplanner_v1beta_generated_UsageService_ExportUsageHistories_sync", + "title": "Snippet for the export_usage_histories call in the UsageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_usage_histories.", + "file": "usage_service/export_usage_histories.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_usage_histories", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_usage_histories", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "UsageService::Client", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" + }, + "method": { + "short_name": "ExportUsageHistories", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService.ExportUsageHistories", + "service": { + "short_name": "UsageService", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "capacityplanner_v1beta_generated_UsageService_ExportForecasts_sync", + "title": "Snippet for the export_forecasts call in the UsageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_forecasts.", + "file": "usage_service/export_forecasts.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_forecasts", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_forecasts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "UsageService::Client", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" + }, + "method": { + "short_name": "ExportForecasts", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService.ExportForecasts", + "service": { + "short_name": "UsageService", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "capacityplanner_v1beta_generated_UsageService_ExportReservationsUsage_sync", + "title": "Snippet for the export_reservations_usage call in the UsageService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_reservations_usage.", + "file": "usage_service/export_reservations_usage.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_reservations_usage", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_reservations_usage", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "UsageService::Client", + "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" + }, + "method": { + "short_name": "ExportReservationsUsage", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService.ExportReservationsUsage", + "service": { + "short_name": "UsageService", + "full_name": "google.cloud.capacityplanner.v1beta.UsageService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.rb new file mode 100644 index 000000000000..235a5f5ed9ee --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.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 capacityplanner_v1beta_generated_UsageService_ExportForecasts_sync] +require "google/cloud/capacity_planner/v1beta" + +## +# Snippet for the export_forecasts call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#export_forecasts. +# +def export_forecasts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new + + # Call the export_forecasts method. + result = client.export_forecasts 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 capacityplanner_v1beta_generated_UsageService_ExportForecasts_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.rb new file mode 100644 index 000000000000..a27bc6e1ebc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.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 capacityplanner_v1beta_generated_UsageService_ExportReservationsUsage_sync] +require "google/cloud/capacity_planner/v1beta" + +## +# Snippet for the export_reservations_usage call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#export_reservations_usage. +# +def export_reservations_usage + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new + + # Call the export_reservations_usage method. + result = client.export_reservations_usage 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 capacityplanner_v1beta_generated_UsageService_ExportReservationsUsage_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.rb new file mode 100644 index 000000000000..667907cfe746 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.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 capacityplanner_v1beta_generated_UsageService_ExportUsageHistories_sync] +require "google/cloud/capacity_planner/v1beta" + +## +# Snippet for the export_usage_histories call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#export_usage_histories. +# +def export_usage_histories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new + + # Call the export_usage_histories method. + result = client.export_usage_histories 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 capacityplanner_v1beta_generated_UsageService_ExportUsageHistories_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.rb new file mode 100644 index 000000000000..36f71013a08a --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.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 capacityplanner_v1beta_generated_UsageService_QueryForecasts_sync] +require "google/cloud/capacity_planner/v1beta" + +## +# Snippet for the query_forecasts call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#query_forecasts. +# +def query_forecasts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new + + # Call the query_forecasts method. + result = client.query_forecasts request + + # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse. + p result +end +# [END capacityplanner_v1beta_generated_UsageService_QueryForecasts_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.rb new file mode 100644 index 000000000000..48196522f4e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.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 capacityplanner_v1beta_generated_UsageService_QueryReservations_sync] +require "google/cloud/capacity_planner/v1beta" + +## +# Snippet for the query_reservations call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#query_reservations. +# +def query_reservations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new + + # Call the query_reservations method. + result = client.query_reservations request + + # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse. + p result +end +# [END capacityplanner_v1beta_generated_UsageService_QueryReservations_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.rb new file mode 100644 index 000000000000..3fa1c33dcd9a --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.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 capacityplanner_v1beta_generated_UsageService_QueryUsageHistories_sync] +require "google/cloud/capacity_planner/v1beta" + +## +# Snippet for the query_usage_histories call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#query_usage_histories. +# +def query_usage_histories + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new + + # Call the query_usage_histories method. + result = client.query_usage_histories request + + # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse. + p result +end +# [END capacityplanner_v1beta_generated_UsageService_QueryUsageHistories_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_operations_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_operations_test.rb new file mode 100644 index 000000000000..b4888a250c6d --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_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/capacityplanner/v1beta/usage_service_pb" +require "google/cloud/capacityplanner/v1beta/usage_service_services_pb" +require "google/cloud/capacity_planner/v1beta/usage_service" + +class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb new file mode 100644 index 000000000000..a1794d23a68e --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/capacity_planner/v1beta/usage_service" + +class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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_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::CapacityPlanner::V1beta::UsageService::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 +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb new file mode 100644 index 000000000000..f426a662f818 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb @@ -0,0 +1,488 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/capacityplanner/v1beta/usage_service_pb" +require "google/cloud/capacity_planner/v1beta/usage_service/rest" + + +class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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_query_usage_histories + # Create test objects. + client_result = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + location_level = :LOCATION_TYPE_UNSPECIFIED + is_spot = true + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + confidential_mode = true + gpu_type = "hello world" + tpu_type = "hello world" + cloud_resource_type = "hello world" + usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + + query_usage_histories_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_query_usage_histories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_usage_histories_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_usage_histories parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_usage_histories_client_stub.call_count + end + end + end + + def test_query_forecasts + # Create test objects. + client_result = ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + confidential_mode = true + gpu_type = "hello world" + tpu_type = "hello world" + cloud_resource_type = "hello world" + forecast_type = :FORECAST_TYPE_UNSPECIFIED + prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED + aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + + query_forecasts_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_query_forecasts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_forecasts_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_forecasts ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_forecasts(::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_forecasts_client_stub.call_count + end + end + end + + def test_query_reservations + # Create test objects. + client_result = ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + location_level = :LOCATION_TYPE_UNSPECIFIED + machine_family = "hello world" + machine_shape = {} + gpu_type = "hello world" + cloud_resource_type = "hello world" + reservation_type = :RESERVATION_TYPE_UNSPECIFIED + share_type = :SHARE_TYPE_UNSPECIFIED + ownership_type = :OWNERSHIP_TYPE_UNSPECIFIED + reservation_data_level = :RESERVATION_DATA_LEVEL_UNSPECIFIED + include_unapproved_reservations = true + aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + + query_reservations_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_query_reservations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, query_reservations_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.query_reservations parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.query_reservations ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.query_reservations(::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, query_reservations_client_stub.call_count + end + end + end + + def test_export_usage_histories + # 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" + is_spot = true + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + gpu_type = "hello world" + tpu_type = "hello world" + resource_type = "hello world" + usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + output_config = {} + + export_usage_histories_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_export_usage_histories_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_usage_histories_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_usage_histories parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_usage_histories_client_stub.call_count + end + end + end + + def test_export_forecasts + # 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" + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + gpu_type = "hello world" + tpu_type = "hello world" + resource_type = "hello world" + prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED + aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + output_config = {} + + export_forecasts_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_export_forecasts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_forecasts_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_forecasts ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_forecasts(::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_forecasts_client_stub.call_count + end + end + end + + def test_export_reservations_usage + # 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. + machine_family = "hello world" + parent = "hello world" + location_level = :LOCATION_TYPE_UNSPECIFIED + cloud_resource_type = "hello world" + usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + share_type = :SHARE_TYPE_UNSPECIFIED + start_date = {} + end_date = {} + output_config = {} + + export_reservations_usage_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_export_reservations_usage_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_reservations_usage_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_reservations_usage machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_reservations_usage ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_reservations_usage(::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_reservations_usage_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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb new file mode 100644 index 000000000000..ce4daf2c4599 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb @@ -0,0 +1,612 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/capacityplanner/v1beta/usage_service_pb" +require "google/cloud/capacity_planner/v1beta/usage_service" + +class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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_query_usage_histories + # Create GRPC objects. + grpc_response = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse.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" + location_level = :LOCATION_TYPE_UNSPECIFIED + is_spot = true + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + confidential_mode = true + gpu_type = "hello world" + tpu_type = "hello world" + cloud_resource_type = "hello world" + usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + + query_usage_histories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_usage_histories, name + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal :LOCATION_TYPE_UNSPECIFIED, request["location_level"] + assert_equal true, request["is_spot"] + assert_equal "hello world", request["machine_family"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] + assert_equal "hello world", request["disk_type"] + assert_equal true, request["confidential_mode"] + assert_equal "hello world", request["gpu_type"] + assert_equal "hello world", request["tpu_type"] + assert_equal "hello world", request["cloud_resource_type"] + assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["usage_aggregation_method"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_usage_histories_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_usage_histories parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_usage_histories_client_stub.call_rpc_count + end + end + + def test_query_forecasts + # Create GRPC objects. + grpc_response = ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse.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" + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + confidential_mode = true + gpu_type = "hello world" + tpu_type = "hello world" + cloud_resource_type = "hello world" + forecast_type = :FORECAST_TYPE_UNSPECIFIED + prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED + aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + + query_forecasts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_forecasts, name + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["machine_family"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] + assert_equal "hello world", request["disk_type"] + assert_equal true, request["confidential_mode"] + assert_equal "hello world", request["gpu_type"] + assert_equal "hello world", request["tpu_type"] + assert_equal "hello world", request["cloud_resource_type"] + assert_equal :FORECAST_TYPE_UNSPECIFIED, request["forecast_type"] + assert_equal :PREDICTION_INTERVAL_UNSPECIFIED, request["prediction_interval"] + assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["aggregation_method"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_forecasts_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_forecasts ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_forecasts(::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_forecasts_client_stub.call_rpc_count + end + end + + def test_query_reservations + # Create GRPC objects. + grpc_response = ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse.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" + location_level = :LOCATION_TYPE_UNSPECIFIED + machine_family = "hello world" + machine_shape = {} + gpu_type = "hello world" + cloud_resource_type = "hello world" + reservation_type = :RESERVATION_TYPE_UNSPECIFIED + share_type = :SHARE_TYPE_UNSPECIFIED + ownership_type = :OWNERSHIP_TYPE_UNSPECIFIED + reservation_data_level = :RESERVATION_DATA_LEVEL_UNSPECIFIED + include_unapproved_reservations = true + aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + + query_reservations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :query_reservations, name + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest, request + assert_equal "hello world", request["parent"] + assert_equal :LOCATION_TYPE_UNSPECIFIED, request["location_level"] + assert_equal "hello world", request["machine_family"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] + assert_equal "hello world", request["gpu_type"] + assert_equal "hello world", request["cloud_resource_type"] + assert_equal :RESERVATION_TYPE_UNSPECIFIED, request["reservation_type"] + assert_equal :SHARE_TYPE_UNSPECIFIED, request["share_type"] + assert_equal :OWNERSHIP_TYPE_UNSPECIFIED, request["ownership_type"] + assert_equal :RESERVATION_DATA_LEVEL_UNSPECIFIED, request["reservation_data_level"] + assert_equal true, request["include_unapproved_reservations"] + assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["aggregation_method"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, query_reservations_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.query_reservations parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.query_reservations ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.query_reservations(::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, query_reservations_client_stub.call_rpc_count + end + end + + def test_export_usage_histories + # 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" + is_spot = true + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + gpu_type = "hello world" + tpu_type = "hello world" + resource_type = "hello world" + usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + output_config = {} + + export_usage_histories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_usage_histories, name + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest, request + assert_equal "hello world", request["parent"] + assert_equal true, request["is_spot"] + assert_equal "hello world", request["machine_family"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] + assert_equal "hello world", request["disk_type"] + assert_equal "hello world", request["gpu_type"] + assert_equal "hello world", request["tpu_type"] + assert_equal "hello world", request["resource_type"] + assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["usage_aggregation_method"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::OutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_usage_histories_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) 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.export_usage_histories parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config 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.export_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) 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.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, 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.export_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), 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, export_usage_histories_client_stub.call_rpc_count + end + end + + def test_export_forecasts + # 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" + machine_family = "hello world" + machine_shape = {} + disk_type = "hello world" + gpu_type = "hello world" + tpu_type = "hello world" + resource_type = "hello world" + prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED + aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + start_date = {} + end_date = {} + output_config = {} + + export_forecasts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_forecasts, name + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["machine_family"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] + assert_equal "hello world", request["disk_type"] + assert_equal "hello world", request["gpu_type"] + assert_equal "hello world", request["tpu_type"] + assert_equal "hello world", request["resource_type"] + assert_equal :PREDICTION_INTERVAL_UNSPECIFIED, request["prediction_interval"] + assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["aggregation_method"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::OutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_forecasts_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) 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.export_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config 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.export_forecasts ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) 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.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, 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.export_forecasts(::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), 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, export_forecasts_client_stub.call_rpc_count + end + end + + def test_export_reservations_usage + # 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. + machine_family = "hello world" + parent = "hello world" + location_level = :LOCATION_TYPE_UNSPECIFIED + cloud_resource_type = "hello world" + usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED + share_type = :SHARE_TYPE_UNSPECIFIED + start_date = {} + end_date = {} + output_config = {} + + export_reservations_usage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_reservations_usage, name + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest, request + assert_equal "hello world", request["machine_family"] + assert_equal :machine_family, request.resource + assert_equal "hello world", request["parent"] + assert_equal :LOCATION_TYPE_UNSPECIFIED, request["location_level"] + assert_equal "hello world", request["cloud_resource_type"] + assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["usage_aggregation_method"] + assert_equal :SHARE_TYPE_UNSPECIFIED, request["share_type"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::OutputConfig), request["output_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_reservations_usage_client_stub do + # Create client + client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }) 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.export_reservations_usage machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config 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.export_reservations_usage ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config) 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.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }, 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.export_reservations_usage(::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config), 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, export_reservations_usage_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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/.gitignore b/owl-bot-staging/google-cloud-certificate_manager-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-certificate_manager-v1/.repo-metadata.json new file mode 100644 index 000000000000..67f57f59fa4f --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "certificatemanager.googleapis.com", + "api_shortname": "certificatemanager", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-certificate_manager-v1/latest", + "distribution_name": "google-cloud-certificate_manager-v1", + "is_cloud": true, + "language": "ruby", + "name": "certificatemanager", + "name_pretty": "Certificate Manager V1 API", + "product_documentation": "https://cloud.google.com/certificate-manager", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Certificate Manager lets you acquire and manage Transport Layer Security (TLS) (SSL) certificates for use with classic external HTTP(S) load balancers in Google Cloud. Note that google-cloud-certificate_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-certificate_manager instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/certificate-manager", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml b/owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml new file mode 100644 index 000000000000..49b1dc3efefd --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-certificate_manager-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-certificate_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/.yardopts b/owl-bot-staging/google-cloud-certificate_manager-v1/.yardopts new file mode 100644 index 000000000000..ca21ac00ea4f --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Certificate Manager 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-certificate_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-certificate_manager-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..6c91720978a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-certificate_manager-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-certificate_manager-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/certificate_manager/v1" + +client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/certificate_manager/v1" + +::Google::Cloud::CertificateManager::V1::CertificateManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::CertificateManager::V1::CertificateManager::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-certificate_manager-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/certificate_manager/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::CertificateManager::V1::CertificateManager::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-certificate_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-certificate_manager-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile b/owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/LICENSE.md b/owl-bot-staging/google-cloud-certificate_manager-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/README.md b/owl-bot-staging/google-cloud-certificate_manager-v1/README.md new file mode 100644 index 000000000000..6bc00c2a6a4f --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Certificate Manager V1 API + +API Client library for the Certificate Manager V1 API + +Certificate Manager lets you acquire and manage Transport Layer Security (TLS) (SSL) certificates for use with classic external HTTP(S) load balancers in Google Cloud. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Certificate Manager V1 API. Most users should consider using +the main client gem, +[google-cloud-certificate_manager](https://rubygems.org/gems/google-cloud-certificate_manager). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-certificate_manager-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/certificatemanager.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/certificate_manager/v1" + +client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new +request = ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new # (request fields as keyword arguments...) +response = client.list_certificates request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-certificate_manager-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/certificate-manager) +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/certificate_manager/v1" +require "logger" + +client = ::Google::Cloud::CertificateManager::V1::CertificateManager::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-certificate_manager`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-certificate_manager-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-certificate_manager`. +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-certificate_manager-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-certificate_manager-v1/Rakefile b/owl-bot-staging/google-cloud-certificate_manager-v1/Rakefile new file mode 100644 index 000000000000..b45a3913cae6 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/certificate_manager/v1/certificate_manager/credentials" + ::Google::Cloud::CertificateManager::V1::CertificateManager::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-certificate_manager-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-certificate_manager-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-certificate_manager-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-certificate_manager-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-certificate_manager-v1" + header "google-cloud-certificate_manager-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-certificate_manager-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-certificate_manager-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-certificate_manager-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-certificate_manager-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-certificate_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-certificate_manager-v1/gapic_metadata.json new file mode 100644 index 000000000000..18e863768690 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.certificatemanager.v1", + "libraryPackage": "::Google::Cloud::CertificateManager::V1", + "services": { + "CertificateManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client", + "rpcs": { + "ListCertificates": { + "methods": [ + "list_certificates" + ] + }, + "GetCertificate": { + "methods": [ + "get_certificate" + ] + }, + "CreateCertificate": { + "methods": [ + "create_certificate" + ] + }, + "UpdateCertificate": { + "methods": [ + "update_certificate" + ] + }, + "DeleteCertificate": { + "methods": [ + "delete_certificate" + ] + }, + "ListCertificateMaps": { + "methods": [ + "list_certificate_maps" + ] + }, + "GetCertificateMap": { + "methods": [ + "get_certificate_map" + ] + }, + "CreateCertificateMap": { + "methods": [ + "create_certificate_map" + ] + }, + "UpdateCertificateMap": { + "methods": [ + "update_certificate_map" + ] + }, + "DeleteCertificateMap": { + "methods": [ + "delete_certificate_map" + ] + }, + "ListCertificateMapEntries": { + "methods": [ + "list_certificate_map_entries" + ] + }, + "GetCertificateMapEntry": { + "methods": [ + "get_certificate_map_entry" + ] + }, + "CreateCertificateMapEntry": { + "methods": [ + "create_certificate_map_entry" + ] + }, + "UpdateCertificateMapEntry": { + "methods": [ + "update_certificate_map_entry" + ] + }, + "DeleteCertificateMapEntry": { + "methods": [ + "delete_certificate_map_entry" + ] + }, + "ListDnsAuthorizations": { + "methods": [ + "list_dns_authorizations" + ] + }, + "GetDnsAuthorization": { + "methods": [ + "get_dns_authorization" + ] + }, + "CreateDnsAuthorization": { + "methods": [ + "create_dns_authorization" + ] + }, + "UpdateDnsAuthorization": { + "methods": [ + "update_dns_authorization" + ] + }, + "DeleteDnsAuthorization": { + "methods": [ + "delete_dns_authorization" + ] + }, + "ListCertificateIssuanceConfigs": { + "methods": [ + "list_certificate_issuance_configs" + ] + }, + "GetCertificateIssuanceConfig": { + "methods": [ + "get_certificate_issuance_config" + ] + }, + "CreateCertificateIssuanceConfig": { + "methods": [ + "create_certificate_issuance_config" + ] + }, + "DeleteCertificateIssuanceConfig": { + "methods": [ + "delete_certificate_issuance_config" + ] + }, + "ListTrustConfigs": { + "methods": [ + "list_trust_configs" + ] + }, + "GetTrustConfig": { + "methods": [ + "get_trust_config" + ] + }, + "CreateTrustConfig": { + "methods": [ + "create_trust_config" + ] + }, + "UpdateTrustConfig": { + "methods": [ + "update_trust_config" + ] + }, + "DeleteTrustConfig": { + "methods": [ + "delete_trust_config" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec b/owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec new file mode 100644 index 000000000000..408430c3296d --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/certificate_manager/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-certificate_manager-v1" + gem.version = Google::Cloud::CertificateManager::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Certificate Manager lets you acquire and manage Transport Layer Security (TLS) (SSL) certificates for use with classic external HTTP(S) load balancers in Google Cloud. Note that google-cloud-certificate_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-certificate_manager instead. See the readme for more details." + gem.summary = "API Client library for the Certificate Manager 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.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-v1.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-v1.rb new file mode 100644 index 000000000000..a560e5985df3 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-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/certificate_manager/v1" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1.rb new file mode 100644 index 000000000000..3c20017ffbbb --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/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/certificate_manager/v1/certificate_manager" +require "google/cloud/certificate_manager/v1/version" + +module Google + module Cloud + module CertificateManager + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/certificate_manager/v1" + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/certificate_manager/v1" + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/certificate_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb new file mode 100644 index 000000000000..49d28058b675 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module CertificateManager + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/certificate_manager/v1/rest" + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CertificateManager"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb new file mode 100644 index 000000000000..8f41b8b38e0f --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/certificate_manager/v1/version" + +require "google/cloud/certificate_manager/v1/certificate_manager/credentials" +require "google/cloud/certificate_manager/v1/certificate_manager/paths" +require "google/cloud/certificate_manager/v1/certificate_manager/operations" +require "google/cloud/certificate_manager/v1/certificate_manager/client" +require "google/cloud/certificate_manager/v1/certificate_manager/rest" + +module Google + module Cloud + module CertificateManager + module V1 + ## + # API Overview + # + # Certificates Manager API allows customers to see and manage all their TLS + # certificates. + # + # Certificates Manager API service provides methods to manage certificates, + # group them into collections, and create serving configuration that can be + # easily applied to other Cloud resources e.g. Target Proxies. + # + # Data Model + # + # The Certificates Manager service exposes the following resources: + # + # * `Certificate` that describes a single TLS certificate. + # * `CertificateMap` that describes a collection of certificates that can be + # attached to a target resource. + # * `CertificateMapEntry` that describes a single configuration entry that + # consists of a SNI and a group of certificates. It's a subresource of + # CertificateMap. + # + # Certificate, CertificateMap and CertificateMapEntry IDs + # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, + # - only lower case letters, digits, and hyphen are allowed + # - length of the resource ID has to be in [1,63] range. + # + # Provides methods to manage Cloud Certificate Manager entities. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/certificate_manager/v1/certificate_manager" + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/certificate_manager/v1/certificate_manager/rest" + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + module CertificateManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "certificate_manager", "helpers.rb" +require "google/cloud/certificate_manager/v1/certificate_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb new file mode 100644 index 000000000000..b409a564a66b --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb @@ -0,0 +1,3567 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/certificatemanager/v1/certificate_manager_pb" +require "google/cloud/location" + +module Google + module Cloud + module CertificateManager + module V1 + module CertificateManager + ## + # Client for the CertificateManager service. + # + # API Overview + # + # Certificates Manager API allows customers to see and manage all their TLS + # certificates. + # + # Certificates Manager API service provides methods to manage certificates, + # group them into collections, and create serving configuration that can be + # easily applied to other Cloud resources e.g. Target Proxies. + # + # Data Model + # + # The Certificates Manager service exposes the following resources: + # + # * `Certificate` that describes a single TLS certificate. + # * `CertificateMap` that describes a collection of certificates that can be + # attached to a target resource. + # * `CertificateMapEntry` that describes a single configuration entry that + # consists of a SNI and a group of certificates. It's a subresource of + # CertificateMap. + # + # Certificate, CertificateMap and CertificateMapEntry IDs + # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, + # - only lower case letters, digits, and hyphen are allowed + # - length of the resource ID has to be in [1,63] range. + # + # Provides methods to manage Cloud Certificate Manager entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :certificate_manager_stub + + ## + # Configure the CertificateManager Client class. + # + # See {::Google::Cloud::CertificateManager::V1::CertificateManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CertificateManager clients + # ::Google::Cloud::CertificateManager::V1::CertificateManager::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", "CertificateManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_certificates.timeout = 60.0 + default_config.rpcs.list_certificates.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate.timeout = 60.0 + default_config.rpcs.get_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate.timeout = 60.0 + default_config.rpcs.create_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_certificate.timeout = 60.0 + default_config.rpcs.update_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate.timeout = 60.0 + default_config.rpcs.delete_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_certificate_maps.timeout = 60.0 + default_config.rpcs.list_certificate_maps.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate_map.timeout = 60.0 + default_config.rpcs.get_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate_map.timeout = 60.0 + default_config.rpcs.create_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_certificate_map.timeout = 60.0 + default_config.rpcs.update_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate_map.timeout = 60.0 + default_config.rpcs.delete_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_certificate_map_entries.timeout = 60.0 + default_config.rpcs.list_certificate_map_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate_map_entry.timeout = 60.0 + default_config.rpcs.get_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate_map_entry.timeout = 60.0 + default_config.rpcs.create_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_certificate_map_entry.timeout = 60.0 + default_config.rpcs.update_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate_map_entry.timeout = 60.0 + default_config.rpcs.delete_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_dns_authorizations.timeout = 60.0 + default_config.rpcs.list_dns_authorizations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_dns_authorization.timeout = 60.0 + default_config.rpcs.get_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_dns_authorization.timeout = 60.0 + default_config.rpcs.create_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_dns_authorization.timeout = 60.0 + default_config.rpcs.update_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_dns_authorization.timeout = 60.0 + default_config.rpcs.delete_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_certificate_issuance_configs.timeout = 60.0 + default_config.rpcs.list_certificate_issuance_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate_issuance_config.timeout = 60.0 + default_config.rpcs.get_certificate_issuance_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate_issuance_config.timeout = 60.0 + default_config.rpcs.create_certificate_issuance_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate_issuance_config.timeout = 60.0 + default_config.rpcs.delete_certificate_issuance_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 CertificateManager 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::CertificateManager::V1::CertificateManager::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 + @certificate_manager_stub.universe_domain + end + + ## + # Create a new CertificateManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CertificateManager 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/certificatemanager/v1/certificate_manager_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 + + @certificate_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CertificateManager::V1::CertificateManager::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 + ) + + @certificate_manager_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @certificate_manager_stub.endpoint + config.universe_domain = @certificate_manager_stub.universe_domain + config.logger = @certificate_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateManager::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @certificate_manager_stub.logger + end + + # Service calls + + ## + # Lists Certificates in a given project and location. + # + # @overload list_certificates(request, options = nil) + # Pass arguments to `list_certificates` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificates` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the certificate should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of certificates to return per call. + # @param page_token [::String] + # The value returned by the last `ListCertificatesResponse`. Indicates that + # this is a continuation of a prior `ListCertificates` call, and that the + # system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the Certificates returned. + # @param order_by [::String] + # A list of Certificate field names used to specify the order of the returned + # results. The default sorting order is ascending. To specify descending + # order for a field, add a suffix `" desc"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new + # + # # Call the list_certificates method. + # result = client.list_certificates 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::CertificateManager::V1::Certificate. + # p item + # end + # + def list_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest + + # Converts hash 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_certificates.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::CertificateManager::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_certificates.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :list_certificates, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificates, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Certificate. + # + # @overload get_certificate(request, options = nil) + # Pass arguments to `get_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(name: nil) + # Pass arguments to `get_certificate` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate to describe. Must be in the format + # `projects/*/locations/*/certificates/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CertificateManager::V1::Certificate] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CertificateManager::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateRequest.new + # + # # Call the get_certificate method. + # result = client.get_certificate request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::Certificate. + # p result + # + def get_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :get_certificate, 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 Certificate in a given project and location. + # + # @overload create_certificate(request, options = nil) + # Pass arguments to `create_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(parent: nil, certificate_id: nil, certificate: nil) + # Pass arguments to `create_certificate` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate. Must be in the format + # `projects/*/locations/*`. + # @param certificate_id [::String] + # Required. A user-provided name of the certificate. + # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] + # Required. A definition of the certificate 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new + # + # # Call the create_certificate method. + # result = client.create_certificate 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_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :create_certificate, 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 Certificate. + # + # @overload update_certificate(request, options = nil) + # Pass arguments to `update_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(certificate: nil, update_mask: nil) + # Pass arguments to `update_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] + # Required. A definition of the certificate to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new + # + # # Call the update_certificate method. + # result = client.update_certificate 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_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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.certificate&.name + header_params["certificate.name"] = request.certificate.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_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :update_certificate, 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 single Certificate. + # + # @overload delete_certificate(request, options = nil) + # Pass arguments to `delete_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(name: nil) + # Pass arguments to `delete_certificate` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate to delete. Must be in the format + # `projects/*/locations/*/certificates/*`. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new + # + # # Call the delete_certificate method. + # result = client.delete_certificate 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_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :delete_certificate, 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 CertificateMaps in a given project and location. + # + # @overload list_certificate_maps(request, options = nil) + # Pass arguments to `list_certificate_maps` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_maps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_maps` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the certificate maps should + # be listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of certificate maps to return per call. + # @param page_token [::String] + # The value returned by the last `ListCertificateMapsResponse`. Indicates + # that this is a continuation of a prior `ListCertificateMaps` call, and that + # the system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the Certificates Maps returned. + # @param order_by [::String] + # A list of Certificate Map field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.new + # + # # Call the list_certificate_maps method. + # result = client.list_certificate_maps 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::CertificateManager::V1::CertificateMap. + # p item + # end + # + def list_certificate_maps request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest + + # Converts hash 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_certificate_maps.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::CertificateManager::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_certificate_maps.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_maps.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :list_certificate_maps, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_maps, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single CertificateMap. + # + # @overload get_certificate_map(request, options = nil) + # Pass arguments to `get_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(name: nil) + # Pass arguments to `get_certificate_map` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map to describe. Must be in the format + # `projects/*/locations/*/certificateMaps/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CertificateManager::V1::CertificateMap] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new + # + # # Call the get_certificate_map method. + # result = client.get_certificate_map request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMap. + # p result + # + def get_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :get_certificate_map, 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 CertificateMap in a given project and location. + # + # @overload create_certificate_map(request, options = nil) + # Pass arguments to `create_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(parent: nil, certificate_map_id: nil, certificate_map: nil) + # Pass arguments to `create_certificate_map` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate map. Must be in the format + # `projects/*/locations/*`. + # @param certificate_map_id [::String] + # Required. A user-provided name of the certificate map. + # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] + # Required. A definition of the certificate map 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new + # + # # Call the create_certificate_map method. + # result = client.create_certificate_map 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_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :create_certificate_map, 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 CertificateMap. + # + # @overload update_certificate_map(request, options = nil) + # Pass arguments to `update_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(certificate_map: nil, update_mask: nil) + # Pass arguments to `update_certificate_map` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] + # Required. A definition of the certificate map to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new + # + # # Call the update_certificate_map method. + # result = client.update_certificate_map 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_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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.certificate_map&.name + header_params["certificate_map.name"] = request.certificate_map.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_certificate_map.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :update_certificate_map, 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 single CertificateMap. A Certificate Map can't be deleted + # if it contains Certificate Map Entries. Remove all the entries from + # the map before calling this method. + # + # @overload delete_certificate_map(request, options = nil) + # Pass arguments to `delete_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(name: nil) + # Pass arguments to `delete_certificate_map` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map to delete. Must be in the format + # `projects/*/locations/*/certificateMaps/*`. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new + # + # # Call the delete_certificate_map method. + # result = client.delete_certificate_map 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_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :delete_certificate_map, 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 CertificateMapEntries in a given project and location. + # + # @overload list_certificate_map_entries(request, options = nil) + # Pass arguments to `list_certificate_map_entries` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_map_entries` via keyword arguments. Note that at + # least one keyword argument is 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 project, location and certificate map from which the + # certificate map entries should be listed, specified in the format + # `projects/*/locations/*/certificateMaps/*`. + # @param page_size [::Integer] + # Maximum number of certificate map entries to return. The service may return + # fewer than this value. + # If unspecified, at most 50 certificate map entries will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # The value returned by the last `ListCertificateMapEntriesResponse`. + # Indicates that this is a continuation of a prior + # `ListCertificateMapEntries` call, and that the system should return the + # next page of data. + # @param filter [::String] + # Filter expression to restrict the returned Certificate Map Entries. + # @param order_by [::String] + # A list of Certificate Map Entry field names used to specify + # the order of the returned results. The default sorting order is ascending. + # To specify descending order for a field, add a suffix `" desc"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.new + # + # # Call the list_certificate_map_entries method. + # result = client.list_certificate_map_entries 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::CertificateManager::V1::CertificateMapEntry. + # p item + # end + # + def list_certificate_map_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest + + # Converts hash 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_certificate_map_entries.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::CertificateManager::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_certificate_map_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_map_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :list_certificate_map_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_map_entries, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single CertificateMapEntry. + # + # @overload get_certificate_map_entry(request, options = nil) + # Pass arguments to `get_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) + # Pass arguments to `get_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map entry to describe. Must be in the + # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new + # + # # Call the get_certificate_map_entry method. + # result = client.get_certificate_map_entry request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMapEntry. + # p result + # + def get_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :get_certificate_map_entry, 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 CertificateMapEntry in a given project and location. + # + # @overload create_certificate_map_entry(request, options = nil) + # Pass arguments to `create_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(parent: nil, certificate_map_entry_id: nil, certificate_map_entry: nil) + # Pass arguments to `create_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate map entry. Must be in the + # format `projects/*/locations/*/certificateMaps/*`. + # @param certificate_map_entry_id [::String] + # Required. A user-provided name of the certificate map entry. + # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] + # Required. A definition of the certificate map entry 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new + # + # # Call the create_certificate_map_entry method. + # result = client.create_certificate_map_entry 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_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :create_certificate_map_entry, 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 CertificateMapEntry. + # + # @overload update_certificate_map_entry(request, options = nil) + # Pass arguments to `update_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(certificate_map_entry: nil, update_mask: nil) + # Pass arguments to `update_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] + # Required. A definition of the certificate map entry to create map entry. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new + # + # # Call the update_certificate_map_entry method. + # result = client.update_certificate_map_entry 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_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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.certificate_map_entry&.name + header_params["certificate_map_entry.name"] = request.certificate_map_entry.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_certificate_map_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :update_certificate_map_entry, 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 single CertificateMapEntry. + # + # @overload delete_certificate_map_entry(request, options = nil) + # Pass arguments to `delete_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) + # Pass arguments to `delete_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map entry to delete. Must be in the + # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new + # + # # Call the delete_certificate_map_entry method. + # result = client.delete_certificate_map_entry 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_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :delete_certificate_map_entry, 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 DnsAuthorizations in a given project and location. + # + # @overload list_dns_authorizations(request, options = nil) + # Pass arguments to `list_dns_authorizations` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorizations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_dns_authorizations` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the dns authorizations should + # be listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of dns authorizations to return per call. + # @param page_token [::String] + # The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + # that this is a continuation of a prior `ListDnsAuthorizations` call, and + # that the system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the Dns Authorizations returned. + # @param order_by [::String] + # A list of Dns Authorization field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.new + # + # # Call the list_dns_authorizations method. + # result = client.list_dns_authorizations 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::CertificateManager::V1::DnsAuthorization. + # p item + # end + # + def list_dns_authorizations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest + + # Converts hash 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_dns_authorizations.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::CertificateManager::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_dns_authorizations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_dns_authorizations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :list_dns_authorizations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_dns_authorizations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single DnsAuthorization. + # + # @overload get_dns_authorization(request, options = nil) + # Pass arguments to `get_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) + # Pass arguments to `get_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the dns authorization to describe. Must be in the + # format `projects/*/locations/*/dnsAuthorizations/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CertificateManager::V1::DnsAuthorization] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new + # + # # Call the get_dns_authorization method. + # result = client.get_dns_authorization request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::DnsAuthorization. + # p result + # + def get_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :get_dns_authorization, 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 DnsAuthorization in a given project and location. + # + # @overload create_dns_authorization(request, options = nil) + # Pass arguments to `create_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(parent: nil, dns_authorization_id: nil, dns_authorization: nil) + # Pass arguments to `create_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the dns authorization. Must be in the + # format `projects/*/locations/*`. + # @param dns_authorization_id [::String] + # Required. A user-provided name of the dns authorization. + # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] + # Required. A definition of the dns authorization 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new + # + # # Call the create_dns_authorization method. + # result = client.create_dns_authorization 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_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :create_dns_authorization, 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 DnsAuthorization. + # + # @overload update_dns_authorization(request, options = nil) + # Pass arguments to `update_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(dns_authorization: nil, update_mask: nil) + # Pass arguments to `update_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] + # Required. A definition of the dns authorization to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new + # + # # Call the update_dns_authorization method. + # result = client.update_dns_authorization 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_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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.dns_authorization&.name + header_params["dns_authorization.name"] = request.dns_authorization.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_dns_authorization.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :update_dns_authorization, 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 single DnsAuthorization. + # + # @overload delete_dns_authorization(request, options = nil) + # Pass arguments to `delete_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) + # Pass arguments to `delete_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the dns authorization to delete. Must be in the format + # `projects/*/locations/*/dnsAuthorizations/*`. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new + # + # # Call the delete_dns_authorization method. + # result = client.delete_dns_authorization 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_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :delete_dns_authorization, 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 CertificateIssuanceConfigs in a given project and location. + # + # @overload list_certificate_issuance_configs(request, options = nil) + # Pass arguments to `list_certificate_issuance_configs` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_issuance_configs` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the certificate should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of certificate configs to return per call. + # @param page_token [::String] + # The value returned by the last `ListCertificateIssuanceConfigsResponse`. + # Indicates that this is a continuation of a prior + # `ListCertificateIssuanceConfigs` call, and that the system should return + # the next page of data. + # @param filter [::String] + # Filter expression to restrict the Certificates Configs returned. + # @param order_by [::String] + # A list of Certificate Config field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.new + # + # # Call the list_certificate_issuance_configs method. + # result = client.list_certificate_issuance_configs 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::CertificateManager::V1::CertificateIssuanceConfig. + # p item + # end + # + def list_certificate_issuance_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest + + # Converts hash 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_certificate_issuance_configs.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::CertificateManager::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_certificate_issuance_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_certificate_issuance_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :list_certificate_issuance_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_issuance_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single CertificateIssuanceConfig. + # + # @overload get_certificate_issuance_config(request, options = nil) + # Pass arguments to `get_certificate_issuance_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) + # Pass arguments to `get_certificate_issuance_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate issuance config to describe. Must be in + # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new + # + # # Call the get_certificate_issuance_config method. + # result = client.get_certificate_issuance_config request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig. + # p result + # + def get_certificate_issuance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest + + # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_certificate_issuance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :get_certificate_issuance_config, 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 CertificateIssuanceConfig in a given project and location. + # + # @overload create_certificate_issuance_config(request, options = nil) + # Pass arguments to `create_certificate_issuance_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_config(parent: nil, certificate_issuance_config_id: nil, certificate_issuance_config: nil) + # Pass arguments to `create_certificate_issuance_config` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate issuance config. Must be + # in the format `projects/*/locations/*`. + # @param certificate_issuance_config_id [::String] + # Required. A user-provided name of the certificate config. + # @param certificate_issuance_config [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig, ::Hash] + # Required. A definition of the certificate issuance config 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new + # + # # Call the create_certificate_issuance_config method. + # result = client.create_certificate_issuance_config 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_certificate_issuance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest + + # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_certificate_issuance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :create_certificate_issuance_config, 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 single CertificateIssuanceConfig. + # + # @overload delete_certificate_issuance_config(request, options = nil) + # Pass arguments to `delete_certificate_issuance_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) + # Pass arguments to `delete_certificate_issuance_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate issuance config to delete. Must be in + # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new + # + # # Call the delete_certificate_issuance_config method. + # result = client.delete_certificate_issuance_config 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_certificate_issuance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest + + # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_certificate_issuance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :delete_certificate_issuance_config, 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 TrustConfigs in a given project and location. + # + # @overload list_trust_configs(request, options = nil) + # Pass arguments to `list_trust_configs` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_trust_configs` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the TrustConfigs should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of TrustConfigs to return per call. + # @param page_token [::String] + # The value returned by the last `ListTrustConfigsResponse`. Indicates + # that this is a continuation of a prior `ListTrustConfigs` call, and that + # the system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the TrustConfigs returned. + # @param order_by [::String] + # A list of TrustConfig field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new + # + # # Call the list_trust_configs method. + # result = client.list_trust_configs 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::CertificateManager::V1::TrustConfig. + # p item + # end + # + def list_trust_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest + + # Converts hash 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_trust_configs.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::CertificateManager::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_trust_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_trust_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :list_trust_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_trust_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single TrustConfig. + # + # @overload get_trust_config(request, options = nil) + # Pass arguments to `get_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(name: nil) + # Pass arguments to `get_trust_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TrustConfig to describe. Must be in the format + # `projects/*/locations/*/trustConfigs/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CertificateManager::V1::TrustConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new + # + # # Call the get_trust_config method. + # result = client.get_trust_config request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig. + # p result + # + def get_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :get_trust_config, 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 TrustConfig in a given project and location. + # + # @overload create_trust_config(request, options = nil) + # Pass arguments to `create_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(parent: nil, trust_config_id: nil, trust_config: nil) + # Pass arguments to `create_trust_config` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the TrustConfig. Must be in the format + # `projects/*/locations/*`. + # @param trust_config_id [::String] + # Required. A user-provided name of the TrustConfig. Must match the regexp + # `[a-z0-9-]{1,63}`. + # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] + # Required. A definition of the TrustConfig 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new + # + # # Call the create_trust_config method. + # result = client.create_trust_config 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_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :create_trust_config, 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 TrustConfig. + # + # @overload update_trust_config(request, options = nil) + # Pass arguments to `update_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(trust_config: nil, update_mask: nil) + # Pass arguments to `update_trust_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] + # Required. A definition of the TrustConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new + # + # # Call the update_trust_config method. + # result = client.update_trust_config 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_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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.trust_config&.name + header_params["trust_config.name"] = request.trust_config.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_trust_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :update_trust_config, 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 single TrustConfig. + # + # @overload delete_trust_config(request, options = nil) + # Pass arguments to `delete_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(name: nil, etag: nil) + # Pass arguments to `delete_trust_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TrustConfig to delete. Must be in the format + # `projects/*/locations/*/trustConfigs/*`. + # @param etag [::String] + # The current etag of the TrustConfig. + # If an etag is provided and does not match the current etag of the resource, + # deletion will be blocked and an ABORTED error will be returned. + # + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new + # + # # Call the delete_trust_config method. + # result = client.delete_trust_config 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_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.call_rpc :delete_trust_config, 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 CertificateManager API. + # + # This class represents the configuration for CertificateManager, + # 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::CertificateManager::V1::CertificateManager::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_certificates to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_certificates.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_certificates.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::CertificateManager::V1::CertificateManager::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 = "certificatemanager.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 CertificateManager 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_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificates + ## + # RPC-specific configuration for `get_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate + ## + # RPC-specific configuration for `create_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate + ## + # RPC-specific configuration for `update_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate + ## + # RPC-specific configuration for `delete_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate + ## + # RPC-specific configuration for `list_certificate_maps` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_maps + ## + # RPC-specific configuration for `get_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_map + ## + # RPC-specific configuration for `create_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_map + ## + # RPC-specific configuration for `update_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_map + ## + # RPC-specific configuration for `delete_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_map + ## + # RPC-specific configuration for `list_certificate_map_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_map_entries + ## + # RPC-specific configuration for `get_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_map_entry + ## + # RPC-specific configuration for `create_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_map_entry + ## + # RPC-specific configuration for `update_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_map_entry + ## + # RPC-specific configuration for `delete_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_map_entry + ## + # RPC-specific configuration for `list_dns_authorizations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_dns_authorizations + ## + # RPC-specific configuration for `get_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dns_authorization + ## + # RPC-specific configuration for `create_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dns_authorization + ## + # RPC-specific configuration for `update_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dns_authorization + ## + # RPC-specific configuration for `delete_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dns_authorization + ## + # RPC-specific configuration for `list_certificate_issuance_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_issuance_configs + ## + # RPC-specific configuration for `get_certificate_issuance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_issuance_config + ## + # RPC-specific configuration for `create_certificate_issuance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_issuance_config + ## + # RPC-specific configuration for `delete_certificate_issuance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_issuance_config + ## + # RPC-specific configuration for `list_trust_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_trust_configs + ## + # RPC-specific configuration for `get_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trust_config + ## + # RPC-specific configuration for `create_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trust_config + ## + # RPC-specific configuration for `update_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trust_config + ## + # RPC-specific configuration for `delete_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trust_config + + # @private + def initialize parent_rpcs = nil + list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates + @list_certificates = ::Gapic::Config::Method.new list_certificates_config + get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate + @get_certificate = ::Gapic::Config::Method.new get_certificate_config + create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate + @create_certificate = ::Gapic::Config::Method.new create_certificate_config + update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate + @update_certificate = ::Gapic::Config::Method.new update_certificate_config + delete_certificate_config = parent_rpcs.delete_certificate if parent_rpcs.respond_to? :delete_certificate + @delete_certificate = ::Gapic::Config::Method.new delete_certificate_config + list_certificate_maps_config = parent_rpcs.list_certificate_maps if parent_rpcs.respond_to? :list_certificate_maps + @list_certificate_maps = ::Gapic::Config::Method.new list_certificate_maps_config + get_certificate_map_config = parent_rpcs.get_certificate_map if parent_rpcs.respond_to? :get_certificate_map + @get_certificate_map = ::Gapic::Config::Method.new get_certificate_map_config + create_certificate_map_config = parent_rpcs.create_certificate_map if parent_rpcs.respond_to? :create_certificate_map + @create_certificate_map = ::Gapic::Config::Method.new create_certificate_map_config + update_certificate_map_config = parent_rpcs.update_certificate_map if parent_rpcs.respond_to? :update_certificate_map + @update_certificate_map = ::Gapic::Config::Method.new update_certificate_map_config + delete_certificate_map_config = parent_rpcs.delete_certificate_map if parent_rpcs.respond_to? :delete_certificate_map + @delete_certificate_map = ::Gapic::Config::Method.new delete_certificate_map_config + list_certificate_map_entries_config = parent_rpcs.list_certificate_map_entries if parent_rpcs.respond_to? :list_certificate_map_entries + @list_certificate_map_entries = ::Gapic::Config::Method.new list_certificate_map_entries_config + get_certificate_map_entry_config = parent_rpcs.get_certificate_map_entry if parent_rpcs.respond_to? :get_certificate_map_entry + @get_certificate_map_entry = ::Gapic::Config::Method.new get_certificate_map_entry_config + create_certificate_map_entry_config = parent_rpcs.create_certificate_map_entry if parent_rpcs.respond_to? :create_certificate_map_entry + @create_certificate_map_entry = ::Gapic::Config::Method.new create_certificate_map_entry_config + update_certificate_map_entry_config = parent_rpcs.update_certificate_map_entry if parent_rpcs.respond_to? :update_certificate_map_entry + @update_certificate_map_entry = ::Gapic::Config::Method.new update_certificate_map_entry_config + delete_certificate_map_entry_config = parent_rpcs.delete_certificate_map_entry if parent_rpcs.respond_to? :delete_certificate_map_entry + @delete_certificate_map_entry = ::Gapic::Config::Method.new delete_certificate_map_entry_config + list_dns_authorizations_config = parent_rpcs.list_dns_authorizations if parent_rpcs.respond_to? :list_dns_authorizations + @list_dns_authorizations = ::Gapic::Config::Method.new list_dns_authorizations_config + get_dns_authorization_config = parent_rpcs.get_dns_authorization if parent_rpcs.respond_to? :get_dns_authorization + @get_dns_authorization = ::Gapic::Config::Method.new get_dns_authorization_config + create_dns_authorization_config = parent_rpcs.create_dns_authorization if parent_rpcs.respond_to? :create_dns_authorization + @create_dns_authorization = ::Gapic::Config::Method.new create_dns_authorization_config + update_dns_authorization_config = parent_rpcs.update_dns_authorization if parent_rpcs.respond_to? :update_dns_authorization + @update_dns_authorization = ::Gapic::Config::Method.new update_dns_authorization_config + delete_dns_authorization_config = parent_rpcs.delete_dns_authorization if parent_rpcs.respond_to? :delete_dns_authorization + @delete_dns_authorization = ::Gapic::Config::Method.new delete_dns_authorization_config + list_certificate_issuance_configs_config = parent_rpcs.list_certificate_issuance_configs if parent_rpcs.respond_to? :list_certificate_issuance_configs + @list_certificate_issuance_configs = ::Gapic::Config::Method.new list_certificate_issuance_configs_config + get_certificate_issuance_config_config = parent_rpcs.get_certificate_issuance_config if parent_rpcs.respond_to? :get_certificate_issuance_config + @get_certificate_issuance_config = ::Gapic::Config::Method.new get_certificate_issuance_config_config + create_certificate_issuance_config_config = parent_rpcs.create_certificate_issuance_config if parent_rpcs.respond_to? :create_certificate_issuance_config + @create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config + delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config + @delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config + list_trust_configs_config = parent_rpcs.list_trust_configs if parent_rpcs.respond_to? :list_trust_configs + @list_trust_configs = ::Gapic::Config::Method.new list_trust_configs_config + get_trust_config_config = parent_rpcs.get_trust_config if parent_rpcs.respond_to? :get_trust_config + @get_trust_config = ::Gapic::Config::Method.new get_trust_config_config + create_trust_config_config = parent_rpcs.create_trust_config if parent_rpcs.respond_to? :create_trust_config + @create_trust_config = ::Gapic::Config::Method.new create_trust_config_config + update_trust_config_config = parent_rpcs.update_trust_config if parent_rpcs.respond_to? :update_trust_config + @update_trust_config = ::Gapic::Config::Method.new update_trust_config_config + delete_trust_config_config = parent_rpcs.delete_trust_config if parent_rpcs.respond_to? :delete_trust_config + @delete_trust_config = ::Gapic::Config::Method.new delete_trust_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb new file mode 100644 index 000000000000..7c858c767e6f --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CertificateManager + module V1 + module CertificateManager + # Credentials for the CertificateManager API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/operations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/operations.rb new file mode 100644 index 000000000000..b10d77666dbb --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/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 CertificateManager + module V1 + module CertificateManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CertificateManager 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 CertificateManager 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::CertificateManager::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::CertificateManager::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::CertificateManager::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::CertificateManager::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::CertificateManager::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 = "certificatemanager.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-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb new file mode 100644 index 000000000000..056853804233 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CertificateManager + module V1 + module CertificateManager + # Path helper methods for the CertificateManager API. + module Paths + ## + # Create a fully-qualified CaPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/caPools/{ca_pool}` + # + # @param project [String] + # @param location [String] + # @param ca_pool [String] + # + # @return [::String] + def ca_pool_path project:, location:, ca_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" + end + + ## + # Create a fully-qualified Certificate resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificates/{certificate}` + # + # @param project [String] + # @param location [String] + # @param certificate [String] + # + # @return [::String] + def certificate_path project:, location:, certificate: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificates/#{certificate}" + end + + ## + # Create a fully-qualified CertificateIssuanceConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}` + # + # @param project [String] + # @param location [String] + # @param certificate_issuance_config [String] + # + # @return [::String] + def certificate_issuance_config_path project:, location:, certificate_issuance_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificateIssuanceConfigs/#{certificate_issuance_config}" + end + + ## + # Create a fully-qualified CertificateMap resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificateMaps/{certificate_map}` + # + # @param project [String] + # @param location [String] + # @param certificate_map [String] + # + # @return [::String] + def certificate_map_path project:, location:, certificate_map: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificateMaps/#{certificate_map}" + end + + ## + # Create a fully-qualified CertificateMapEntry resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}` + # + # @param project [String] + # @param location [String] + # @param certificate_map [String] + # @param certificate_map_entry [String] + # + # @return [::String] + def certificate_map_entry_path project:, location:, certificate_map:, certificate_map_entry: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "certificate_map cannot contain /" if certificate_map.to_s.include? "/" + + "projects/#{project}/locations/#{location}/certificateMaps/#{certificate_map}/certificateMapEntries/#{certificate_map_entry}" + end + + ## + # Create a fully-qualified DnsAuthorization resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}` + # + # @param project [String] + # @param location [String] + # @param dns_authorization [String] + # + # @return [::String] + def dns_authorization_path project:, location:, dns_authorization: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/dnsAuthorizations/#{dns_authorization}" + 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 TrustConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/trustConfigs/{trust_config}` + # + # @param project [String] + # @param location [String] + # @param trust_config [String] + # + # @return [::String] + def trust_config_path project:, location:, trust_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/trustConfigs/#{trust_config}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb new file mode 100644 index 000000000000..495df2e270ea --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/certificate_manager/v1/version" +require "google/cloud/certificate_manager/v1/bindings_override" + +require "google/cloud/certificate_manager/v1/certificate_manager/credentials" +require "google/cloud/certificate_manager/v1/certificate_manager/paths" +require "google/cloud/certificate_manager/v1/certificate_manager/rest/operations" +require "google/cloud/certificate_manager/v1/certificate_manager/rest/client" + +module Google + module Cloud + module CertificateManager + module V1 + ## + # API Overview + # + # Certificates Manager API allows customers to see and manage all their TLS + # certificates. + # + # Certificates Manager API service provides methods to manage certificates, + # group them into collections, and create serving configuration that can be + # easily applied to other Cloud resources e.g. Target Proxies. + # + # Data Model + # + # The Certificates Manager service exposes the following resources: + # + # * `Certificate` that describes a single TLS certificate. + # * `CertificateMap` that describes a collection of certificates that can be + # attached to a target resource. + # * `CertificateMapEntry` that describes a single configuration entry that + # consists of a SNI and a group of certificates. It's a subresource of + # CertificateMap. + # + # Certificate, CertificateMap and CertificateMapEntry IDs + # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, + # - only lower case letters, digits, and hyphen are allowed + # - length of the resource ID has to be in [1,63] range. + # + # Provides methods to manage Cloud Certificate Manager entities. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/certificate_manager/v1/certificate_manager/rest" + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + module CertificateManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/certificate_manager/v1/certificate_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb new file mode 100644 index 000000000000..4103362cc5a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb @@ -0,0 +1,3329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/certificatemanager/v1/certificate_manager_pb" +require "google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module CertificateManager + module V1 + module CertificateManager + module Rest + ## + # REST client for the CertificateManager service. + # + # API Overview + # + # Certificates Manager API allows customers to see and manage all their TLS + # certificates. + # + # Certificates Manager API service provides methods to manage certificates, + # group them into collections, and create serving configuration that can be + # easily applied to other Cloud resources e.g. Target Proxies. + # + # Data Model + # + # The Certificates Manager service exposes the following resources: + # + # * `Certificate` that describes a single TLS certificate. + # * `CertificateMap` that describes a collection of certificates that can be + # attached to a target resource. + # * `CertificateMapEntry` that describes a single configuration entry that + # consists of a SNI and a group of certificates. It's a subresource of + # CertificateMap. + # + # Certificate, CertificateMap and CertificateMapEntry IDs + # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, + # - only lower case letters, digits, and hyphen are allowed + # - length of the resource ID has to be in [1,63] range. + # + # Provides methods to manage Cloud Certificate Manager entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :certificate_manager_stub + + ## + # Configure the CertificateManager Client class. + # + # See {::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CertificateManager clients + # ::Google::Cloud::CertificateManager::V1::CertificateManager::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", "CertificateManager", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_certificates.timeout = 60.0 + default_config.rpcs.list_certificates.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate.timeout = 60.0 + default_config.rpcs.get_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate.timeout = 60.0 + default_config.rpcs.create_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_certificate.timeout = 60.0 + default_config.rpcs.update_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate.timeout = 60.0 + default_config.rpcs.delete_certificate.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_certificate_maps.timeout = 60.0 + default_config.rpcs.list_certificate_maps.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate_map.timeout = 60.0 + default_config.rpcs.get_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate_map.timeout = 60.0 + default_config.rpcs.create_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_certificate_map.timeout = 60.0 + default_config.rpcs.update_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate_map.timeout = 60.0 + default_config.rpcs.delete_certificate_map.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_certificate_map_entries.timeout = 60.0 + default_config.rpcs.list_certificate_map_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate_map_entry.timeout = 60.0 + default_config.rpcs.get_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate_map_entry.timeout = 60.0 + default_config.rpcs.create_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_certificate_map_entry.timeout = 60.0 + default_config.rpcs.update_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate_map_entry.timeout = 60.0 + default_config.rpcs.delete_certificate_map_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_dns_authorizations.timeout = 60.0 + default_config.rpcs.list_dns_authorizations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_dns_authorization.timeout = 60.0 + default_config.rpcs.get_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_dns_authorization.timeout = 60.0 + default_config.rpcs.create_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_dns_authorization.timeout = 60.0 + default_config.rpcs.update_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_dns_authorization.timeout = 60.0 + default_config.rpcs.delete_dns_authorization.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_certificate_issuance_configs.timeout = 60.0 + default_config.rpcs.list_certificate_issuance_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_certificate_issuance_config.timeout = 60.0 + default_config.rpcs.get_certificate_issuance_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_certificate_issuance_config.timeout = 60.0 + default_config.rpcs.create_certificate_issuance_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_certificate_issuance_config.timeout = 60.0 + default_config.rpcs.delete_certificate_issuance_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 CertificateManager 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::CertificateManager::V1::CertificateManager::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 + @certificate_manager_stub.universe_domain + end + + ## + # Create a new CertificateManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CertificateManager 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::CertificateManager::V1::CertificateManager::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 + + @certificate_manager_stub = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @certificate_manager_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @certificate_manager_stub.endpoint + config.universe_domain = @certificate_manager_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @certificate_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Operations] + # + attr_reader :operations_client + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @certificate_manager_stub.logger + end + + # Service calls + + ## + # Lists Certificates in a given project and location. + # + # @overload list_certificates(request, options = nil) + # Pass arguments to `list_certificates` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificatesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificates` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the certificate should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of certificates to return per call. + # @param page_token [::String] + # The value returned by the last `ListCertificatesResponse`. Indicates that + # this is a continuation of a prior `ListCertificates` call, and that the + # system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the Certificates returned. + # @param order_by [::String] + # A list of Certificate field names used to specify the order of the returned + # results. The default sorting order is ascending. To specify descending + # order for a field, add a suffix `" desc"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new + # + # # Call the list_certificates method. + # result = client.list_certificates 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::CertificateManager::V1::Certificate. + # p item + # end + # + def list_certificates request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest + + # Converts hash 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_certificates.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::CertificateManager::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_certificates.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificates.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.list_certificates request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificates, "certificates", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Certificate. + # + # @overload get_certificate(request, options = nil) + # Pass arguments to `get_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(name: nil) + # Pass arguments to `get_certificate` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate to describe. Must be in the format + # `projects/*/locations/*/certificates/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CertificateManager::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::Certificate] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateRequest.new + # + # # Call the get_certificate method. + # result = client.get_certificate request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::Certificate. + # p result + # + def get_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.get_certificate 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 Certificate in a given project and location. + # + # @overload create_certificate(request, options = nil) + # Pass arguments to `create_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(parent: nil, certificate_id: nil, certificate: nil) + # Pass arguments to `create_certificate` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate. Must be in the format + # `projects/*/locations/*`. + # @param certificate_id [::String] + # Required. A user-provided name of the certificate. + # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] + # Required. A definition of the certificate 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new + # + # # Call the create_certificate method. + # result = client.create_certificate 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_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.create_certificate 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 Certificate. + # + # @overload update_certificate(request, options = nil) + # Pass arguments to `update_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(certificate: nil, update_mask: nil) + # Pass arguments to `update_certificate` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] + # Required. A definition of the certificate to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new + # + # # Call the update_certificate method. + # result = client.update_certificate 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_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.update_certificate 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 single Certificate. + # + # @overload delete_certificate(request, options = nil) + # Pass arguments to `delete_certificate` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate(name: nil) + # Pass arguments to `delete_certificate` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate to delete. Must be in the format + # `projects/*/locations/*/certificates/*`. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new + # + # # Call the delete_certificate method. + # result = client.delete_certificate 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_certificate request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest + + # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_certificate.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.delete_certificate 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 CertificateMaps in a given project and location. + # + # @overload list_certificate_maps(request, options = nil) + # Pass arguments to `list_certificate_maps` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_maps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_maps` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the certificate maps should + # be listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of certificate maps to return per call. + # @param page_token [::String] + # The value returned by the last `ListCertificateMapsResponse`. Indicates + # that this is a continuation of a prior `ListCertificateMaps` call, and that + # the system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the Certificates Maps returned. + # @param order_by [::String] + # A list of Certificate Map field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.new + # + # # Call the list_certificate_maps method. + # result = client.list_certificate_maps 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::CertificateManager::V1::CertificateMap. + # p item + # end + # + def list_certificate_maps request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest + + # Converts hash 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_certificate_maps.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::CertificateManager::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_certificate_maps.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_maps.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.list_certificate_maps request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificate_maps, "certificate_maps", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single CertificateMap. + # + # @overload get_certificate_map(request, options = nil) + # Pass arguments to `get_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(name: nil) + # Pass arguments to `get_certificate_map` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map to describe. Must be in the format + # `projects/*/locations/*/certificateMaps/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateMap] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new + # + # # Call the get_certificate_map method. + # result = client.get_certificate_map request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMap. + # p result + # + def get_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.get_certificate_map 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 CertificateMap in a given project and location. + # + # @overload create_certificate_map(request, options = nil) + # Pass arguments to `create_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(parent: nil, certificate_map_id: nil, certificate_map: nil) + # Pass arguments to `create_certificate_map` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate map. Must be in the format + # `projects/*/locations/*`. + # @param certificate_map_id [::String] + # Required. A user-provided name of the certificate map. + # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] + # Required. A definition of the certificate map 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new + # + # # Call the create_certificate_map method. + # result = client.create_certificate_map 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_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.create_certificate_map 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 CertificateMap. + # + # @overload update_certificate_map(request, options = nil) + # Pass arguments to `update_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(certificate_map: nil, update_mask: nil) + # Pass arguments to `update_certificate_map` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] + # Required. A definition of the certificate map to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new + # + # # Call the update_certificate_map method. + # result = client.update_certificate_map 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_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.update_certificate_map 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 single CertificateMap. A Certificate Map can't be deleted + # if it contains Certificate Map Entries. Remove all the entries from + # the map before calling this method. + # + # @overload delete_certificate_map(request, options = nil) + # Pass arguments to `delete_certificate_map` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map(name: nil) + # Pass arguments to `delete_certificate_map` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map to delete. Must be in the format + # `projects/*/locations/*/certificateMaps/*`. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new + # + # # Call the delete_certificate_map method. + # result = client.delete_certificate_map 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_certificate_map request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest + + # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_certificate_map.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.delete_certificate_map 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 CertificateMapEntries in a given project and location. + # + # @overload list_certificate_map_entries(request, options = nil) + # Pass arguments to `list_certificate_map_entries` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_map_entries` via keyword arguments. Note that at + # least one keyword argument is 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 project, location and certificate map from which the + # certificate map entries should be listed, specified in the format + # `projects/*/locations/*/certificateMaps/*`. + # @param page_size [::Integer] + # Maximum number of certificate map entries to return. The service may return + # fewer than this value. + # If unspecified, at most 50 certificate map entries will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # The value returned by the last `ListCertificateMapEntriesResponse`. + # Indicates that this is a continuation of a prior + # `ListCertificateMapEntries` call, and that the system should return the + # next page of data. + # @param filter [::String] + # Filter expression to restrict the returned Certificate Map Entries. + # @param order_by [::String] + # A list of Certificate Map Entry field names used to specify + # the order of the returned results. The default sorting order is ascending. + # To specify descending order for a field, add a suffix `" desc"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.new + # + # # Call the list_certificate_map_entries method. + # result = client.list_certificate_map_entries 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::CertificateManager::V1::CertificateMapEntry. + # p item + # end + # + def list_certificate_map_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest + + # Converts hash 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_certificate_map_entries.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::CertificateManager::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_certificate_map_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_map_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.list_certificate_map_entries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificate_map_entries, "certificate_map_entries", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single CertificateMapEntry. + # + # @overload get_certificate_map_entry(request, options = nil) + # Pass arguments to `get_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) + # Pass arguments to `get_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map entry to describe. Must be in the + # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new + # + # # Call the get_certificate_map_entry method. + # result = client.get_certificate_map_entry request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMapEntry. + # p result + # + def get_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.get_certificate_map_entry 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 CertificateMapEntry in a given project and location. + # + # @overload create_certificate_map_entry(request, options = nil) + # Pass arguments to `create_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(parent: nil, certificate_map_entry_id: nil, certificate_map_entry: nil) + # Pass arguments to `create_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate map entry. Must be in the + # format `projects/*/locations/*/certificateMaps/*`. + # @param certificate_map_entry_id [::String] + # Required. A user-provided name of the certificate map entry. + # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] + # Required. A definition of the certificate map entry 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new + # + # # Call the create_certificate_map_entry method. + # result = client.create_certificate_map_entry 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_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.create_certificate_map_entry 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 CertificateMapEntry. + # + # @overload update_certificate_map_entry(request, options = nil) + # Pass arguments to `update_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(certificate_map_entry: nil, update_mask: nil) + # Pass arguments to `update_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] + # Required. A definition of the certificate map entry to create map entry. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new + # + # # Call the update_certificate_map_entry method. + # result = client.update_certificate_map_entry 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_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.update_certificate_map_entry 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 single CertificateMapEntry. + # + # @overload delete_certificate_map_entry(request, options = nil) + # Pass arguments to `delete_certificate_map_entry` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) + # Pass arguments to `delete_certificate_map_entry` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate map entry to delete. Must be in the + # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new + # + # # Call the delete_certificate_map_entry method. + # result = client.delete_certificate_map_entry 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_certificate_map_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest + + # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_certificate_map_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.delete_certificate_map_entry 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 DnsAuthorizations in a given project and location. + # + # @overload list_dns_authorizations(request, options = nil) + # Pass arguments to `list_dns_authorizations` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorizations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_dns_authorizations` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the dns authorizations should + # be listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of dns authorizations to return per call. + # @param page_token [::String] + # The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + # that this is a continuation of a prior `ListDnsAuthorizations` call, and + # that the system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the Dns Authorizations returned. + # @param order_by [::String] + # A list of Dns Authorization field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.new + # + # # Call the list_dns_authorizations method. + # result = client.list_dns_authorizations 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::CertificateManager::V1::DnsAuthorization. + # p item + # end + # + def list_dns_authorizations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest + + # Converts hash 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_dns_authorizations.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::CertificateManager::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_dns_authorizations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_dns_authorizations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.list_dns_authorizations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_dns_authorizations, "dns_authorizations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single DnsAuthorization. + # + # @overload get_dns_authorization(request, options = nil) + # Pass arguments to `get_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) + # Pass arguments to `get_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the dns authorization to describe. Must be in the + # format `projects/*/locations/*/dnsAuthorizations/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CertificateManager::V1::DnsAuthorization] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new + # + # # Call the get_dns_authorization method. + # result = client.get_dns_authorization request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::DnsAuthorization. + # p result + # + def get_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.get_dns_authorization 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 DnsAuthorization in a given project and location. + # + # @overload create_dns_authorization(request, options = nil) + # Pass arguments to `create_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(parent: nil, dns_authorization_id: nil, dns_authorization: nil) + # Pass arguments to `create_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the dns authorization. Must be in the + # format `projects/*/locations/*`. + # @param dns_authorization_id [::String] + # Required. A user-provided name of the dns authorization. + # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] + # Required. A definition of the dns authorization 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new + # + # # Call the create_dns_authorization method. + # result = client.create_dns_authorization 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_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.create_dns_authorization 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 DnsAuthorization. + # + # @overload update_dns_authorization(request, options = nil) + # Pass arguments to `update_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(dns_authorization: nil, update_mask: nil) + # Pass arguments to `update_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] + # Required. A definition of the dns authorization to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new + # + # # Call the update_dns_authorization method. + # result = client.update_dns_authorization 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_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.update_dns_authorization 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 single DnsAuthorization. + # + # @overload delete_dns_authorization(request, options = nil) + # Pass arguments to `delete_dns_authorization` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) + # Pass arguments to `delete_dns_authorization` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the dns authorization to delete. Must be in the format + # `projects/*/locations/*/dnsAuthorizations/*`. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new + # + # # Call the delete_dns_authorization method. + # result = client.delete_dns_authorization 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_dns_authorization request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest + + # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dns_authorization.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.delete_dns_authorization 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 CertificateIssuanceConfigs in a given project and location. + # + # @overload list_certificate_issuance_configs(request, options = nil) + # Pass arguments to `list_certificate_issuance_configs` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_certificate_issuance_configs` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the certificate should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of certificate configs to return per call. + # @param page_token [::String] + # The value returned by the last `ListCertificateIssuanceConfigsResponse`. + # Indicates that this is a continuation of a prior + # `ListCertificateIssuanceConfigs` call, and that the system should return + # the next page of data. + # @param filter [::String] + # Filter expression to restrict the Certificates Configs returned. + # @param order_by [::String] + # A list of Certificate Config field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.new + # + # # Call the list_certificate_issuance_configs method. + # result = client.list_certificate_issuance_configs 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::CertificateManager::V1::CertificateIssuanceConfig. + # p item + # end + # + def list_certificate_issuance_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest + + # Converts hash 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_certificate_issuance_configs.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::CertificateManager::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_certificate_issuance_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_certificate_issuance_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.list_certificate_issuance_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificate_issuance_configs, "certificate_issuance_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single CertificateIssuanceConfig. + # + # @overload get_certificate_issuance_config(request, options = nil) + # Pass arguments to `get_certificate_issuance_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) + # Pass arguments to `get_certificate_issuance_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate issuance config to describe. Must be in + # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new + # + # # Call the get_certificate_issuance_config method. + # result = client.get_certificate_issuance_config request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig. + # p result + # + def get_certificate_issuance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest + + # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_certificate_issuance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.get_certificate_issuance_config 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 CertificateIssuanceConfig in a given project and location. + # + # @overload create_certificate_issuance_config(request, options = nil) + # Pass arguments to `create_certificate_issuance_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_config(parent: nil, certificate_issuance_config_id: nil, certificate_issuance_config: nil) + # Pass arguments to `create_certificate_issuance_config` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the certificate issuance config. Must be + # in the format `projects/*/locations/*`. + # @param certificate_issuance_config_id [::String] + # Required. A user-provided name of the certificate config. + # @param certificate_issuance_config [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig, ::Hash] + # Required. A definition of the certificate issuance config 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new + # + # # Call the create_certificate_issuance_config method. + # result = client.create_certificate_issuance_config 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_certificate_issuance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest + + # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_certificate_issuance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.create_certificate_issuance_config 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 single CertificateIssuanceConfig. + # + # @overload delete_certificate_issuance_config(request, options = nil) + # Pass arguments to `delete_certificate_issuance_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) + # Pass arguments to `delete_certificate_issuance_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the certificate issuance config to delete. Must be in + # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new + # + # # Call the delete_certificate_issuance_config method. + # result = client.delete_certificate_issuance_config 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_certificate_issuance_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest + + # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_certificate_issuance_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.delete_certificate_issuance_config 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 TrustConfigs in a given project and location. + # + # @overload list_trust_configs(request, options = nil) + # Pass arguments to `list_trust_configs` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_trust_configs` via keyword arguments. Note that at + # least one keyword argument is 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 project and location from which the TrustConfigs should be + # listed, specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Maximum number of TrustConfigs to return per call. + # @param page_token [::String] + # The value returned by the last `ListTrustConfigsResponse`. Indicates + # that this is a continuation of a prior `ListTrustConfigs` call, and that + # the system should return the next page of data. + # @param filter [::String] + # Filter expression to restrict the TrustConfigs returned. + # @param order_by [::String] + # A list of TrustConfig field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new + # + # # Call the list_trust_configs method. + # result = client.list_trust_configs 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::CertificateManager::V1::TrustConfig. + # p item + # end + # + def list_trust_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest + + # Converts hash 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_trust_configs.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::CertificateManager::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_trust_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_trust_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.list_trust_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_trust_configs, "trust_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single TrustConfig. + # + # @overload get_trust_config(request, options = nil) + # Pass arguments to `get_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(name: nil) + # Pass arguments to `get_trust_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TrustConfig to describe. Must be in the format + # `projects/*/locations/*/trustConfigs/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CertificateManager::V1::TrustConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new + # + # # Call the get_trust_config method. + # result = client.get_trust_config request + # + # # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig. + # p result + # + def get_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.get_trust_config 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 TrustConfig in a given project and location. + # + # @overload create_trust_config(request, options = nil) + # Pass arguments to `create_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(parent: nil, trust_config_id: nil, trust_config: nil) + # Pass arguments to `create_trust_config` via keyword arguments. Note that at + # least one keyword argument is 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 resource of the TrustConfig. Must be in the format + # `projects/*/locations/*`. + # @param trust_config_id [::String] + # Required. A user-provided name of the TrustConfig. Must match the regexp + # `[a-z0-9-]{1,63}`. + # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] + # Required. A definition of the TrustConfig 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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new + # + # # Call the create_trust_config method. + # result = client.create_trust_config 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_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.create_trust_config 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 TrustConfig. + # + # @overload update_trust_config(request, options = nil) + # Pass arguments to `update_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(trust_config: nil, update_mask: nil) + # Pass arguments to `update_trust_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] + # Required. A definition of the TrustConfig to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new + # + # # Call the update_trust_config method. + # result = client.update_trust_config 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_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.update_trust_config 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 single TrustConfig. + # + # @overload delete_trust_config(request, options = nil) + # Pass arguments to `delete_trust_config` via a request object, either of type + # {::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trust_config(name: nil, etag: nil) + # Pass arguments to `delete_trust_config` via keyword arguments. Note that at + # least one keyword argument is 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. A name of the TrustConfig to delete. Must be in the format + # `projects/*/locations/*/trustConfigs/*`. + # @param etag [::String] + # The current etag of the TrustConfig. + # If an etag is provided and does not match the current etag of the resource, + # deletion will be blocked and an ABORTED error will be returned. + # @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/certificate_manager/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new + # + # # Call the delete_trust_config method. + # result = client.delete_trust_config 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_trust_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest + + # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_trust_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @certificate_manager_stub.delete_trust_config 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 class for the CertificateManager REST API. + # + # This class represents the configuration for CertificateManager 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::CertificateManager::V1::CertificateManager::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_certificates to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_certificates.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_certificates.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 = "certificatemanager.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CertificateManager 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_certificates` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificates + ## + # RPC-specific configuration for `get_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate + ## + # RPC-specific configuration for `create_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate + ## + # RPC-specific configuration for `update_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate + ## + # RPC-specific configuration for `delete_certificate` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate + ## + # RPC-specific configuration for `list_certificate_maps` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_maps + ## + # RPC-specific configuration for `get_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_map + ## + # RPC-specific configuration for `create_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_map + ## + # RPC-specific configuration for `update_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_map + ## + # RPC-specific configuration for `delete_certificate_map` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_map + ## + # RPC-specific configuration for `list_certificate_map_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_map_entries + ## + # RPC-specific configuration for `get_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_map_entry + ## + # RPC-specific configuration for `create_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_map_entry + ## + # RPC-specific configuration for `update_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :update_certificate_map_entry + ## + # RPC-specific configuration for `delete_certificate_map_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_map_entry + ## + # RPC-specific configuration for `list_dns_authorizations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_dns_authorizations + ## + # RPC-specific configuration for `get_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dns_authorization + ## + # RPC-specific configuration for `create_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dns_authorization + ## + # RPC-specific configuration for `update_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dns_authorization + ## + # RPC-specific configuration for `delete_dns_authorization` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dns_authorization + ## + # RPC-specific configuration for `list_certificate_issuance_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_certificate_issuance_configs + ## + # RPC-specific configuration for `get_certificate_issuance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_certificate_issuance_config + ## + # RPC-specific configuration for `create_certificate_issuance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_certificate_issuance_config + ## + # RPC-specific configuration for `delete_certificate_issuance_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_certificate_issuance_config + ## + # RPC-specific configuration for `list_trust_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_trust_configs + ## + # RPC-specific configuration for `get_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trust_config + ## + # RPC-specific configuration for `create_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trust_config + ## + # RPC-specific configuration for `update_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trust_config + ## + # RPC-specific configuration for `delete_trust_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trust_config + + # @private + def initialize parent_rpcs = nil + list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates + @list_certificates = ::Gapic::Config::Method.new list_certificates_config + get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate + @get_certificate = ::Gapic::Config::Method.new get_certificate_config + create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate + @create_certificate = ::Gapic::Config::Method.new create_certificate_config + update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate + @update_certificate = ::Gapic::Config::Method.new update_certificate_config + delete_certificate_config = parent_rpcs.delete_certificate if parent_rpcs.respond_to? :delete_certificate + @delete_certificate = ::Gapic::Config::Method.new delete_certificate_config + list_certificate_maps_config = parent_rpcs.list_certificate_maps if parent_rpcs.respond_to? :list_certificate_maps + @list_certificate_maps = ::Gapic::Config::Method.new list_certificate_maps_config + get_certificate_map_config = parent_rpcs.get_certificate_map if parent_rpcs.respond_to? :get_certificate_map + @get_certificate_map = ::Gapic::Config::Method.new get_certificate_map_config + create_certificate_map_config = parent_rpcs.create_certificate_map if parent_rpcs.respond_to? :create_certificate_map + @create_certificate_map = ::Gapic::Config::Method.new create_certificate_map_config + update_certificate_map_config = parent_rpcs.update_certificate_map if parent_rpcs.respond_to? :update_certificate_map + @update_certificate_map = ::Gapic::Config::Method.new update_certificate_map_config + delete_certificate_map_config = parent_rpcs.delete_certificate_map if parent_rpcs.respond_to? :delete_certificate_map + @delete_certificate_map = ::Gapic::Config::Method.new delete_certificate_map_config + list_certificate_map_entries_config = parent_rpcs.list_certificate_map_entries if parent_rpcs.respond_to? :list_certificate_map_entries + @list_certificate_map_entries = ::Gapic::Config::Method.new list_certificate_map_entries_config + get_certificate_map_entry_config = parent_rpcs.get_certificate_map_entry if parent_rpcs.respond_to? :get_certificate_map_entry + @get_certificate_map_entry = ::Gapic::Config::Method.new get_certificate_map_entry_config + create_certificate_map_entry_config = parent_rpcs.create_certificate_map_entry if parent_rpcs.respond_to? :create_certificate_map_entry + @create_certificate_map_entry = ::Gapic::Config::Method.new create_certificate_map_entry_config + update_certificate_map_entry_config = parent_rpcs.update_certificate_map_entry if parent_rpcs.respond_to? :update_certificate_map_entry + @update_certificate_map_entry = ::Gapic::Config::Method.new update_certificate_map_entry_config + delete_certificate_map_entry_config = parent_rpcs.delete_certificate_map_entry if parent_rpcs.respond_to? :delete_certificate_map_entry + @delete_certificate_map_entry = ::Gapic::Config::Method.new delete_certificate_map_entry_config + list_dns_authorizations_config = parent_rpcs.list_dns_authorizations if parent_rpcs.respond_to? :list_dns_authorizations + @list_dns_authorizations = ::Gapic::Config::Method.new list_dns_authorizations_config + get_dns_authorization_config = parent_rpcs.get_dns_authorization if parent_rpcs.respond_to? :get_dns_authorization + @get_dns_authorization = ::Gapic::Config::Method.new get_dns_authorization_config + create_dns_authorization_config = parent_rpcs.create_dns_authorization if parent_rpcs.respond_to? :create_dns_authorization + @create_dns_authorization = ::Gapic::Config::Method.new create_dns_authorization_config + update_dns_authorization_config = parent_rpcs.update_dns_authorization if parent_rpcs.respond_to? :update_dns_authorization + @update_dns_authorization = ::Gapic::Config::Method.new update_dns_authorization_config + delete_dns_authorization_config = parent_rpcs.delete_dns_authorization if parent_rpcs.respond_to? :delete_dns_authorization + @delete_dns_authorization = ::Gapic::Config::Method.new delete_dns_authorization_config + list_certificate_issuance_configs_config = parent_rpcs.list_certificate_issuance_configs if parent_rpcs.respond_to? :list_certificate_issuance_configs + @list_certificate_issuance_configs = ::Gapic::Config::Method.new list_certificate_issuance_configs_config + get_certificate_issuance_config_config = parent_rpcs.get_certificate_issuance_config if parent_rpcs.respond_to? :get_certificate_issuance_config + @get_certificate_issuance_config = ::Gapic::Config::Method.new get_certificate_issuance_config_config + create_certificate_issuance_config_config = parent_rpcs.create_certificate_issuance_config if parent_rpcs.respond_to? :create_certificate_issuance_config + @create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config + delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config + @delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config + list_trust_configs_config = parent_rpcs.list_trust_configs if parent_rpcs.respond_to? :list_trust_configs + @list_trust_configs = ::Gapic::Config::Method.new list_trust_configs_config + get_trust_config_config = parent_rpcs.get_trust_config if parent_rpcs.respond_to? :get_trust_config + @get_trust_config = ::Gapic::Config::Method.new get_trust_config_config + create_trust_config_config = parent_rpcs.create_trust_config if parent_rpcs.respond_to? :create_trust_config + @create_trust_config = ::Gapic::Config::Method.new create_trust_config_config + update_trust_config_config = parent_rpcs.update_trust_config if parent_rpcs.respond_to? :update_trust_config + @update_trust_config = ::Gapic::Config::Method.new update_trust_config_config + delete_trust_config_config = parent_rpcs.delete_trust_config if parent_rpcs.respond_to? :delete_trust_config + @delete_trust_config = ::Gapic::Config::Method.new delete_trust_config_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/operations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/operations.rb new file mode 100644 index 000000000000..8cc6ca05f6f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/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 CertificateManager + module V1 + module CertificateManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CertificateManager 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 CertificateManager 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::CertificateManager::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::CertificateManager::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::CertificateManager::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::CertificateManager::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 = "certificatemanager.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-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb new file mode 100644 index 000000000000..666d3ba3f4d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb @@ -0,0 +1,1861 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/certificatemanager/v1/certificate_manager_pb" + +module Google + module Cloud + module CertificateManager + module V1 + module CertificateManager + module Rest + ## + # REST service stub for the CertificateManager 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_certificates REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest] + # 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::CertificateManager::V1::ListCertificatesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::ListCertificatesResponse] + # A result object deserialized from the server's reply + def list_certificates request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificates_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_certificates", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse.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_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateRequest] + # 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::CertificateManager::V1::Certificate] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::Certificate] + # A result object deserialized from the server's reply + def get_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_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_certificate", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::Certificate.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_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest] + # 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_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_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_certificate", + 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_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest] + # 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_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_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_certificate", + 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_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest] + # 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_certificate request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_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_certificate", + 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_certificate_maps REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest] + # 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::CertificateManager::V1::ListCertificateMapsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse] + # A result object deserialized from the server's reply + def list_certificate_maps request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_maps_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_certificate_maps", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse.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_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest] + # 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::CertificateManager::V1::CertificateMap] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] + # A result object deserialized from the server's reply + def get_certificate_map request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_map_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_certificate_map", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::CertificateMap.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_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest] + # 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_certificate_map request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_map_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_certificate_map", + 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_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest] + # 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_certificate_map request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_map_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_certificate_map", + 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_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest] + # 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_certificate_map request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_map_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_certificate_map", + 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_certificate_map_entries REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest] + # 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::CertificateManager::V1::ListCertificateMapEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse] + # A result object deserialized from the server's reply + def list_certificate_map_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_map_entries_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_certificate_map_entries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse.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_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest] + # 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::CertificateManager::V1::CertificateMapEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] + # A result object deserialized from the server's reply + def get_certificate_map_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_map_entry_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_certificate_map_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::CertificateMapEntry.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_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest] + # 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_certificate_map_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_map_entry_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_certificate_map_entry", + 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_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest] + # 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_certificate_map_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_map_entry_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_certificate_map_entry", + 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_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest] + # 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_certificate_map_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_map_entry_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_certificate_map_entry", + 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_dns_authorizations REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest] + # 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::CertificateManager::V1::ListDnsAuthorizationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse] + # A result object deserialized from the server's reply + def list_dns_authorizations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_dns_authorizations_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_dns_authorizations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse.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_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest] + # 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::CertificateManager::V1::DnsAuthorization] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] + # A result object deserialized from the server's reply + def get_dns_authorization request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dns_authorization_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_dns_authorization", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::DnsAuthorization.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_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest] + # 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_dns_authorization request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dns_authorization_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_dns_authorization", + 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_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest] + # 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_dns_authorization request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_dns_authorization_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_dns_authorization", + 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_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest] + # 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_dns_authorization request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dns_authorization_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_dns_authorization", + 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_certificate_issuance_configs REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest] + # 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::CertificateManager::V1::ListCertificateIssuanceConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse] + # A result object deserialized from the server's reply + def list_certificate_issuance_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_issuance_configs_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_certificate_issuance_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse.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_certificate_issuance_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest] + # 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::CertificateManager::V1::CertificateIssuanceConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] + # A result object deserialized from the server's reply + def get_certificate_issuance_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_issuance_config_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_certificate_issuance_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.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_certificate_issuance_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest] + # 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_certificate_issuance_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_issuance_config_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_certificate_issuance_config", + 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_certificate_issuance_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest] + # 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_certificate_issuance_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_issuance_config_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_certificate_issuance_config", + 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_trust_configs REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest] + # 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::CertificateManager::V1::ListTrustConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse] + # A result object deserialized from the server's reply + def list_trust_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_trust_configs_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_trust_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse.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_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest] + # 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::CertificateManager::V1::TrustConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] + # A result object deserialized from the server's reply + def get_trust_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_trust_config_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_trust_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CertificateManager::V1::TrustConfig.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_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest] + # 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_trust_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_trust_config_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_trust_config", + 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_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest] + # 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_trust_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_trust_config_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_trust_config", + 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_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest] + # 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_trust_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_trust_config_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_trust_config", + 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 list_certificates REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest] + # 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_certificates_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificates", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateRequest] + # 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_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest] + # 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_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/certificates", + body: "certificate", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest] + # 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_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{certificate.name}", + body: "certificate", + matches: [ + ["certificate.name", %r{^projects/[^/]+/locations/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_certificate REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest] + # 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_certificate_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificates/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_maps REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest] + # 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_certificate_maps_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificateMaps", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest] + # 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_certificate_map_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest] + # 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_certificate_map_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/certificateMaps", + body: "certificate_map", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest] + # 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_certificate_map_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{certificate_map.name}", + body: "certificate_map", + matches: [ + ["certificate_map.name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_certificate_map REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest] + # 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_certificate_map_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_map_entries REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest] + # 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_certificate_map_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificateMapEntries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest] + # 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_certificate_map_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/certificateMapEntries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest] + # 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_certificate_map_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/certificateMapEntries", + body: "certificate_map_entry", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest] + # 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_certificate_map_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{certificate_map_entry.name}", + body: "certificate_map_entry", + matches: [ + ["certificate_map_entry.name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/certificateMapEntries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_certificate_map_entry REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest] + # 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_certificate_map_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/certificateMapEntries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_dns_authorizations REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest] + # 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_dns_authorizations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dnsAuthorizations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest] + # 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_dns_authorization_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dnsAuthorizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest] + # 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_dns_authorization_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dnsAuthorizations", + body: "dns_authorization", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest] + # 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_dns_authorization_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{dns_authorization.name}", + body: "dns_authorization", + matches: [ + ["dns_authorization.name", %r{^projects/[^/]+/locations/[^/]+/dnsAuthorizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dns_authorization REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest] + # 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_dns_authorization_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/dnsAuthorizations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_certificate_issuance_configs REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest] + # 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_certificate_issuance_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/certificateIssuanceConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_certificate_issuance_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest] + # 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_certificate_issuance_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateIssuanceConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_certificate_issuance_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest] + # 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_certificate_issuance_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/certificateIssuanceConfigs", + body: "certificate_issuance_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_certificate_issuance_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest] + # 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_certificate_issuance_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/certificateIssuanceConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_trust_configs REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest] + # 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_trust_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/trustConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest] + # 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_trust_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest] + # 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_trust_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/trustConfigs", + body: "trust_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest] + # 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_trust_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{trust_config.name}", + body: "trust_config", + matches: [ + ["trust_config.name", %r{^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_trust_config REST call + # + # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest] + # 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_trust_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb new file mode 100644 index 000000000000..f38f65295a35 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/certificate_manager/v1/certificate_manager/rest" +require "google/cloud/certificate_manager/v1/bindings_override" +require "google/cloud/certificate_manager/v1/version" + +module Google + module Cloud + module CertificateManager + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/certificate_manager/v1/rest" + # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/version.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/version.rb new file mode 100644 index 000000000000..67813bc06643 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/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 CertificateManager + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb new file mode 100644 index 000000000000..53e9071d2f3b --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/certificatemanager/v1/certificate_issuance_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nDgoogle/cloud/certificatemanager/v1/certificate_issuance_config.proto\x12\"google.cloud.certificatemanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xab\x01\n%ListCertificateIssuanceConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"\xbb\x01\n&ListCertificateIssuanceConfigsResponse\x12\x63\n\x1c\x63\x65rtificate_issuance_configs\x18\x01 \x03(\x0b\x32=.google.cloud.certificatemanager.v1.CertificateIssuanceConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"x\n#GetCertificateIssuanceConfigRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;certificatemanager.googleapis.com/CertificateIssuanceConfig\"\xf9\x01\n&CreateCertificateIssuanceConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12+\n\x1e\x63\x65rtificate_issuance_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12g\n\x1b\x63\x65rtificate_issuance_config\x18\x03 \x01(\x0b\x32=.google.cloud.certificatemanager.v1.CertificateIssuanceConfigB\x03\xe0\x41\x02\"{\n&DeleteCertificateIssuanceConfigRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;certificatemanager.googleapis.com/CertificateIssuanceConfig\"\xa3\t\n\x19\x43\x65rtificateIssuanceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x04 \x03(\x0b\x32I.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x83\x01\n\x1c\x63\x65rtificate_authority_config\x18\x06 \x01(\x0b\x32X.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfigB\x03\xe0\x41\x02\x12\x30\n\x08lifetime\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\'\n\x1arotation_window_percentage\x18\x08 \x01(\x05\x42\x03\xe0\x41\x02\x12\x66\n\rkey_algorithm\x18\t \x01(\x0e\x32J.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithmB\x03\xe0\x41\x02\x1a\xb0\x02\n\x1a\x43\x65rtificateAuthorityConfig\x12\xaa\x01\n$certificate_authority_service_config\x18\x01 \x01(\x0b\x32z.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfigH\x00\x1a]\n!CertificateAuthorityServiceConfig\x12\x38\n\x07\x63\x61_pool\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPoolB\x06\n\x04kind\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"K\n\x0cKeyAlgorithm\x12\x1d\n\x19KEY_ALGORITHM_UNSPECIFIED\x10\x00\x12\x0c\n\x08RSA_2048\x10\x01\x12\x0e\n\nECDSA_P256\x10\x04:\xa3\x01\xea\x41\x9f\x01\n;certificatemanager.googleapis.com/CertificateIssuanceConfig\x12`projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}B\xf3\x02\n&com.google.cloud.certificatemanager.v1B\x1e\x43\x65rtificateIssuanceConfigProtoP\x01ZVcloud.google.com/go/certificatemanager/apiv1/certificatemanagerpb;certificatemanagerpb\xaa\x02\"Google.Cloud.CertificateManager.V1\xca\x02\"Google\\Cloud\\CertificateManager\\V1\xea\x02%Google::Cloud::CertificateManager::V1\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CertificateManager + module V1 + ListCertificateIssuanceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest").msgclass + ListCertificateIssuanceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse").msgclass + GetCertificateIssuanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest").msgclass + CreateCertificateIssuanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest").msgclass + DeleteCertificateIssuanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest").msgclass + CertificateIssuanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig").msgclass + CertificateIssuanceConfig::CertificateAuthorityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig").msgclass + CertificateIssuanceConfig::CertificateAuthorityConfig::CertificateAuthorityServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig").msgclass + CertificateIssuanceConfig::KeyAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb new file mode 100644 index 000000000000..af08692825af --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/certificatemanager/v1/certificate_manager.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/certificatemanager/v1/certificate_issuance_config_pb' +require 'google/cloud/certificatemanager/v1/trust_config_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google.cloud.certificatemanager.v1.CertificateMap.LabelsEntry\x12X\n\x0cgclb_targets\x18\x04 \x03(\x0b\x32=.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetB\x03\xe0\x41\x03\x1a\xfa\x01\n\nGclbTarget\x12!\n\x12target_https_proxy\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1f\n\x10target_ssl_proxy\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x12_\n\nip_configs\x18\x02 \x03(\x0b\x32\x46.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigB\x03\xe0\x41\x03\x1a\x37\n\x08IpConfig\x12\x17\n\nip_address\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05ports\x18\x03 \x03(\rB\x03\xe0\x41\x03\x42\x0e\n\x0ctarget_proxy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n0certificatemanager.googleapis.com/CertificateMap\x12Iprojects/{project}/locations/{location}/certificateMaps/{certificate_map}\"\x91\x06\n\x13\x43\x65rtificateMapEntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x06labels\x18\x04 \x03(\x0b\x32\x43.google.cloud.certificatemanager.v1.CertificateMapEntry.LabelsEntry\x12\x12\n\x08hostname\x18\x05 \x01(\tH\x00\x12R\n\x07matcher\x18\n \x01(\x0e\x32?.google.cloud.certificatemanager.v1.CertificateMapEntry.MatcherH\x00\x12H\n\x0c\x63\x65rtificates\x18\x07 \x03(\tB2\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12\x44\n\x05state\x18\x08 \x01(\x0e\x32\x30.google.cloud.certificatemanager.v1.ServingStateB\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\"/\n\x07Matcher\x12\x17\n\x13MATCHER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01:\xb4\x01\xea\x41\xb0\x01\n5certificatemanager.googleapis.com/CertificateMapEntry\x12wprojects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}B\x07\n\x05match\"\x92\x06\n\x10\x44nsAuthorization\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x04 \x03(\x0b\x32@.google.cloud.certificatemanager.v1.DnsAuthorization.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x16\n\x06\x64omain\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12h\n\x13\x64ns_resource_record\x18\n \x01(\x0b\x32\x46.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordB\x03\xe0\x41\x03\x12L\n\x04type\x18\x0b \x01(\x0e\x32\x39.google.cloud.certificatemanager.v1.DnsAuthorization.TypeB\x03\xe0\x41\x05\x1aL\n\x11\x44nsResourceRecord\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x64\x61ta\x18\x03 \x01(\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\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IXED_RECORD\x10\x01\x12\x16\n\x12PER_PROJECT_RECORD\x10\x02:\x87\x01\xea\x41\x83\x01\n2certificatemanager.googleapis.com/DnsAuthorization\x12Mprojects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}*F\n\x0cServingState\x12\x1d\n\x19SERVING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x32\xd6:\n\x12\x43\x65rtificateManager\x12\xd0\x01\n\x10ListCertificates\x12;.google.cloud.certificatemanager.v1.ListCertificatesRequest\x1a<.google.cloud.certificatemanager.v1.ListCertificatesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/certificates\x12\xbd\x01\n\x0eGetCertificate\x12\x39.google.cloud.certificatemanager.v1.GetCertificateRequest\x1a/.google.cloud.certificatemanager.v1.Certificate\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/certificates/*}\x12\xff\x01\n\x11\x43reateCertificate\x12<.google.cloud.certificatemanager.v1.CreateCertificateRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41 \n\x0b\x43\x65rtificate\x12\x11OperationMetadata\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/certificates:\x0b\x63\x65rtificate\x12\x81\x02\n\x11UpdateCertificate\x12<.google.cloud.certificatemanager.v1.UpdateCertificateRequest\x1a\x1d.google.longrunning.Operation\"\x8e\x01\xca\x41 \n\x0b\x43\x65rtificate\x12\x11OperationMetadata\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02K2.google.cloud.certificatemanager.v1.ListCertificateMapsRequest\x1a?.google.cloud.certificatemanager.v1.ListCertificateMapsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/certificateMaps\x12\xc9\x01\n\x11GetCertificateMap\x12<.google.cloud.certificatemanager.v1.GetCertificateMapRequest\x1a\x32.google.cloud.certificatemanager.v1.CertificateMap\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/certificateMaps/*}\x12\x97\x02\n\x14\x43reateCertificateMap\x12?.google.cloud.certificatemanager.v1.CreateCertificateMapRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x43\x65rtificateMap\x12\x11OperationMetadata\xda\x41)parent,certificate_map,certificate_map_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/certificateMaps:\x0f\x63\x65rtificate_map\x12\x99\x02\n\x14UpdateCertificateMap\x12?.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x43\x65rtificateMap\x12\x11OperationMetadata\xda\x41\x1b\x63\x65rtificate_map,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{certificate_map.name=projects/*/locations/*/certificateMaps/*}:\x0f\x63\x65rtificate_map\x12\xe7\x01\n\x14\x44\x65leteCertificateMap\x12?.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/certificateMaps/*}\x12\x86\x02\n\x19ListCertificateMapEntries\x12\x44.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest\x1a\x45.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries\x12\xf0\x01\n\x16GetCertificateMapEntry\x12\x41.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest\x1a\x37.google.cloud.certificatemanager.v1.CertificateMapEntry\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}\x12\xd0\x02\n\x19\x43reateCertificateMapEntry\x12\x44.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest\x1a\x1d.google.longrunning.Operation\"\xcd\x01\xca\x41(\n\x13\x43\x65rtificateMapEntry\x12\x11OperationMetadata\xda\x41\x35parent,certificate_map_entry,certificate_map_entry_id\x82\xd3\xe4\x93\x02\x64\"K/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries:\x15\x63\x65rtificate_map_entry\x12\xd2\x02\n\x19UpdateCertificateMapEntry\x12\x44.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest\x1a\x1d.google.longrunning.Operation\"\xcf\x01\xca\x41(\n\x13\x43\x65rtificateMapEntry\x12\x11OperationMetadata\xda\x41!certificate_map_entry,update_mask\x82\xd3\xe4\x93\x02z2a/v1/{certificate_map_entry.name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}:\x15\x63\x65rtificate_map_entry\x12\x8a\x02\n\x19\x44\x65leteCertificateMapEntry\x12\x44.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}\x12\xe4\x01\n\x15ListDnsAuthorizations\x12@.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest\x1a\x41.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/dnsAuthorizations\x12\xd1\x01\n\x13GetDnsAuthorization\x12>.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest\x1a\x34.google.cloud.certificatemanager.v1.DnsAuthorization\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/dnsAuthorizations/*}\x12\xa5\x02\n\x16\x43reateDnsAuthorization\x12\x41.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10\x44nsAuthorization\x12\x11OperationMetadata\xda\x41-parent,dns_authorization,dns_authorization_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/dnsAuthorizations:\x11\x64ns_authorization\x12\xa7\x02\n\x16UpdateDnsAuthorization\x12\x41.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41%\n\x10\x44nsAuthorization\x12\x11OperationMetadata\xda\x41\x1d\x64ns_authorization,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{dns_authorization.name=projects/*/locations/*/dnsAuthorizations/*}:\x11\x64ns_authorization\x12\xed\x01\n\x16\x44\x65leteDnsAuthorization\x12\x41.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/dnsAuthorizations/*}\x12\x88\x02\n\x1eListCertificateIssuanceConfigs\x12I.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest\x1aJ.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs\x12\xf5\x01\n\x1cGetCertificateIssuanceConfig\x12G.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest\x1a=.google.cloud.certificatemanager.v1.CertificateIssuanceConfig\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}\x12\xe7\x02\n\x1f\x43reateCertificateIssuanceConfig\x12J.google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd8\x01\xca\x41.\n\x19\x43\x65rtificateIssuanceConfig\x12\x11OperationMetadata\xda\x41\x41parent,certificate_issuance_config,certificate_issuance_config_id\x82\xd3\xe4\x93\x02]\">/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs:\x1b\x63\x65rtificate_issuance_config\x12\x88\x02\n\x1f\x44\x65leteCertificateIssuanceConfig\x12J.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}\x12\xd0\x01\n\x10ListTrustConfigs\x12;.google.cloud.certificatemanager.v1.ListTrustConfigsRequest\x1a<.google.cloud.certificatemanager.v1.ListTrustConfigsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/trustConfigs\x12\xbd\x01\n\x0eGetTrustConfig\x12\x39.google.cloud.certificatemanager.v1.GetTrustConfigRequest\x1a/.google.cloud.certificatemanager.v1.TrustConfig\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/trustConfigs/*}\x12\x82\x02\n\x11\x43reateTrustConfig\x12<.google.cloud.certificatemanager.v1.CreateTrustConfigRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bTrustConfig\x12\x11OperationMetadata\xda\x41#parent,trust_config,trust_config_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/trustConfigs:\x0ctrust_config\x12\x84\x02\n\x11UpdateTrustConfig\x12<.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41 \n\x0bTrustConfig\x12\x11OperationMetadata\xda\x41\x18trust_config,update_mask\x82\xd3\xe4\x93\x02M2=/v1/{trust_config.name=projects/*/locations/*/trustConfigs/*}:\x0ctrust_config\x12\xde\x01\n\x11\x44\x65leteTrustConfig\x12<.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/trustConfigs/*}\x1aU\xca\x41!certificatemanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8d\x02\n&com.google.cloud.certificatemanager.v1B\x17\x43\x65rtificateManagerProtoP\x01ZVcloud.google.com/go/certificatemanager/apiv1/certificatemanagerpb;certificatemanagerpb\xaa\x02\"Google.Cloud.CertificateManager.V1\xca\x02\"Google\\Cloud\\CertificateManager\\V1\xea\x02%Google::Cloud::CertificateManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CertificateManager + module V1 + ListCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificatesRequest").msgclass + ListCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificatesResponse").msgclass + GetCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateRequest").msgclass + CreateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateRequest").msgclass + UpdateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateCertificateRequest").msgclass + DeleteCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateRequest").msgclass + ListCertificateMapsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapsRequest").msgclass + ListCertificateMapsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapsResponse").msgclass + GetCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateMapRequest").msgclass + CreateCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateMapRequest").msgclass + UpdateCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateCertificateMapRequest").msgclass + DeleteCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateMapRequest").msgclass + ListCertificateMapEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest").msgclass + ListCertificateMapEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse").msgclass + GetCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest").msgclass + CreateCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest").msgclass + UpdateCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest").msgclass + DeleteCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest").msgclass + ListDnsAuthorizationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest").msgclass + ListDnsAuthorizationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse").msgclass + GetDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest").msgclass + CreateDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest").msgclass + UpdateDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest").msgclass + DeleteDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.OperationMetadata").msgclass + Certificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate").msgclass + Certificate::SelfManagedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate").msgclass + Certificate::ManagedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate").msgclass + Certificate::ManagedCertificate::ProvisioningIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue").msgclass + Certificate::ManagedCertificate::ProvisioningIssue::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason").enummodule + Certificate::ManagedCertificate::AuthorizationAttemptInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo").msgclass + Certificate::ManagedCertificate::AuthorizationAttemptInfo::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State").enummodule + Certificate::ManagedCertificate::AuthorizationAttemptInfo::FailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason").enummodule + Certificate::ManagedCertificate::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State").enummodule + Certificate::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.Scope").enummodule + CertificateMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMap").msgclass + CertificateMap::GclbTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMap.GclbTarget").msgclass + CertificateMap::GclbTarget::IpConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig").msgclass + CertificateMapEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMapEntry").msgclass + CertificateMapEntry::Matcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher").enummodule + DnsAuthorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DnsAuthorization").msgclass + DnsAuthorization::DnsResourceRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord").msgclass + DnsAuthorization::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DnsAuthorization.Type").enummodule + ServingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ServingState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb new file mode 100644 index 000000000000..798df335056a --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb @@ -0,0 +1,128 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/certificatemanager/v1/certificate_manager.proto for package 'Google.Cloud.CertificateManager.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/certificatemanager/v1/certificate_manager_pb' + +module Google + module Cloud + module CertificateManager + module V1 + module CertificateManager + # API Overview + # + # Certificates Manager API allows customers to see and manage all their TLS + # certificates. + # + # Certificates Manager API service provides methods to manage certificates, + # group them into collections, and create serving configuration that can be + # easily applied to other Cloud resources e.g. Target Proxies. + # + # Data Model + # + # The Certificates Manager service exposes the following resources: + # + # * `Certificate` that describes a single TLS certificate. + # * `CertificateMap` that describes a collection of certificates that can be + # attached to a target resource. + # * `CertificateMapEntry` that describes a single configuration entry that + # consists of a SNI and a group of certificates. It's a subresource of + # CertificateMap. + # + # Certificate, CertificateMap and CertificateMapEntry IDs + # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, + # - only lower case letters, digits, and hyphen are allowed + # - length of the resource ID has to be in [1,63] range. + # + # Provides methods to manage Cloud Certificate Manager entities. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.certificatemanager.v1.CertificateManager' + + # Lists Certificates in a given project and location. + rpc :ListCertificates, ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse + # Gets details of a single Certificate. + rpc :GetCertificate, ::Google::Cloud::CertificateManager::V1::GetCertificateRequest, ::Google::Cloud::CertificateManager::V1::Certificate + # Creates a new Certificate in a given project and location. + rpc :CreateCertificate, ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, ::Google::Longrunning::Operation + # Updates a Certificate. + rpc :UpdateCertificate, ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, ::Google::Longrunning::Operation + # Deletes a single Certificate. + rpc :DeleteCertificate, ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, ::Google::Longrunning::Operation + # Lists CertificateMaps in a given project and location. + rpc :ListCertificateMaps, ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse + # Gets details of a single CertificateMap. + rpc :GetCertificateMap, ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, ::Google::Cloud::CertificateManager::V1::CertificateMap + # Creates a new CertificateMap in a given project and location. + rpc :CreateCertificateMap, ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, ::Google::Longrunning::Operation + # Updates a CertificateMap. + rpc :UpdateCertificateMap, ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, ::Google::Longrunning::Operation + # Deletes a single CertificateMap. A Certificate Map can't be deleted + # if it contains Certificate Map Entries. Remove all the entries from + # the map before calling this method. + rpc :DeleteCertificateMap, ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, ::Google::Longrunning::Operation + # Lists CertificateMapEntries in a given project and location. + rpc :ListCertificateMapEntries, ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse + # Gets details of a single CertificateMapEntry. + rpc :GetCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, ::Google::Cloud::CertificateManager::V1::CertificateMapEntry + # Creates a new CertificateMapEntry in a given project and location. + rpc :CreateCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, ::Google::Longrunning::Operation + # Updates a CertificateMapEntry. + rpc :UpdateCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, ::Google::Longrunning::Operation + # Deletes a single CertificateMapEntry. + rpc :DeleteCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, ::Google::Longrunning::Operation + # Lists DnsAuthorizations in a given project and location. + rpc :ListDnsAuthorizations, ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse + # Gets details of a single DnsAuthorization. + rpc :GetDnsAuthorization, ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, ::Google::Cloud::CertificateManager::V1::DnsAuthorization + # Creates a new DnsAuthorization in a given project and location. + rpc :CreateDnsAuthorization, ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, ::Google::Longrunning::Operation + # Updates a DnsAuthorization. + rpc :UpdateDnsAuthorization, ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, ::Google::Longrunning::Operation + # Deletes a single DnsAuthorization. + rpc :DeleteDnsAuthorization, ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, ::Google::Longrunning::Operation + # Lists CertificateIssuanceConfigs in a given project and location. + rpc :ListCertificateIssuanceConfigs, ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse + # Gets details of a single CertificateIssuanceConfig. + rpc :GetCertificateIssuanceConfig, ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig + # Creates a new CertificateIssuanceConfig in a given project and location. + rpc :CreateCertificateIssuanceConfig, ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Google::Longrunning::Operation + # Deletes a single CertificateIssuanceConfig. + rpc :DeleteCertificateIssuanceConfig, ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Google::Longrunning::Operation + # Lists TrustConfigs in a given project and location. + rpc :ListTrustConfigs, ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse + # Gets details of a single TrustConfig. + rpc :GetTrustConfig, ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Google::Cloud::CertificateManager::V1::TrustConfig + # Creates a new TrustConfig in a given project and location. + rpc :CreateTrustConfig, ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Google::Longrunning::Operation + # Updates a TrustConfig. + rpc :UpdateTrustConfig, ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Google::Longrunning::Operation + # Deletes a single TrustConfig. + rpc :DeleteTrustConfig, ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb new file mode 100644 index 000000000000..7232b277f428 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/certificatemanager/v1/trust_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/certificatemanager/v1/trust_config.proto\x12\"google.cloud.certificatemanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9d\x01\n\x17ListTrustConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"\x90\x01\n\x18ListTrustConfigsResponse\x12\x46\n\rtrust_configs\x18\x01 \x03(\x0b\x32/.google.cloud.certificatemanager.v1.TrustConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x15GetTrustConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-certificatemanager.googleapis.com/TrustConfig\"\xbf\x01\n\x18\x43reateTrustConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1c\n\x0ftrust_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x0ctrust_config\x18\x03 \x01(\x0b\x32/.google.cloud.certificatemanager.v1.TrustConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x18UpdateTrustConfigRequest\x12J\n\x0ctrust_config\x18\x01 \x01(\x0b\x32/.google.cloud.certificatemanager.v1.TrustConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"m\n\x18\x44\x65leteTrustConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-certificatemanager.googleapis.com/TrustConfig\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"\x95\x06\n\x0bTrustConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x06labels\x18\x04 \x03(\x0b\x32;.google.cloud.certificatemanager.v1.TrustConfig.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12P\n\x0ctrust_stores\x18\x08 \x03(\x0b\x32:.google.cloud.certificatemanager.v1.TrustConfig.TrustStore\x1a\x30\n\x0bTrustAnchor\x12\x19\n\x0fpem_certificate\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1a\x33\n\x0eIntermediateCA\x12\x19\n\x0fpem_certificate\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1a\xba\x01\n\nTrustStore\x12R\n\rtrust_anchors\x18\x01 \x03(\x0b\x32;.google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor\x12X\n\x10intermediate_cas\x18\x02 \x03(\x0b\x32>.google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n-certificatemanager.googleapis.com/TrustConfig\x12\x43projects/{project}/locations/{location}/trustConfigs/{trust_config}B\x86\x02\n&com.google.cloud.certificatemanager.v1B\x10TrustConifgProtoP\x01ZVcloud.google.com/go/certificatemanager/apiv1/certificatemanagerpb;certificatemanagerpb\xaa\x02\"Google.Cloud.CertificateManager.V1\xca\x02\"Google\\Cloud\\CertificateManager\\V1\xea\x02%Google::Cloud::CertificateManager::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CertificateManager + module V1 + ListTrustConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListTrustConfigsRequest").msgclass + ListTrustConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListTrustConfigsResponse").msgclass + GetTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetTrustConfigRequest").msgclass + CreateTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateTrustConfigRequest").msgclass + UpdateTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateTrustConfigRequest").msgclass + DeleteTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteTrustConfigRequest").msgclass + TrustConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig").msgclass + TrustConfig::TrustAnchor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor").msgclass + TrustConfig::IntermediateCA = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA").msgclass + TrustConfig::TrustStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig.TrustStore").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md new file mode 100644 index 000000000000..bae476f8b306 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Certificate Manager 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-certificate_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb new file mode 100644 index 000000000000..309ea459d3d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb @@ -0,0 +1,186 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CertificateManager + module V1 + # Request for the `ListCertificateIssuanceConfigs` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the certificate should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of certificate configs to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListCertificateIssuanceConfigsResponse`. + # Indicates that this is a continuation of a prior + # `ListCertificateIssuanceConfigs` call, and that the system should return + # the next page of data. + # @!attribute [rw] filter + # @return [::String] + # Filter expression to restrict the Certificates Configs returned. + # @!attribute [rw] order_by + # @return [::String] + # A list of Certificate Config field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + class ListCertificateIssuanceConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListCertificateIssuanceConfigs` method. + # @!attribute [rw] certificate_issuance_configs + # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] + # A list of certificate configs for the parent resource. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListCertificateIssuanceConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetCertificateIssuanceConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate issuance config to describe. Must be in + # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + class GetCertificateIssuanceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateCertificateIssuanceConfig` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the certificate issuance config. Must be + # in the format `projects/*/locations/*`. + # @!attribute [rw] certificate_issuance_config_id + # @return [::String] + # Required. A user-provided name of the certificate config. + # @!attribute [rw] certificate_issuance_config + # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] + # Required. A definition of the certificate issuance config to create. + class CreateCertificateIssuanceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteCertificateIssuanceConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate issuance config to delete. Must be in + # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. + class DeleteCertificateIssuanceConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CertificateIssuanceConfig specifies how to issue and manage a certificate. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the certificate issuance config. + # CertificateIssuanceConfig names must be unique globally and match pattern + # `projects/*/locations/*/certificateIssuanceConfigs/*`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a CertificateIssuanceConfig. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a CertificateIssuanceConfig. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Set of labels associated with a CertificateIssuanceConfig. + # @!attribute [rw] description + # @return [::String] + # One or more paragraphs of text description of a CertificateIssuanceConfig. + # @!attribute [rw] certificate_authority_config + # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig::CertificateAuthorityConfig] + # Required. The CA that issues the workload certificate. It includes the CA + # address, type, authentication to CA service, etc. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # Required. Workload certificate lifetime requested. + # @!attribute [rw] rotation_window_percentage + # @return [::Integer] + # Required. Specifies the percentage of elapsed time of the certificate + # lifetime to wait before renewing the certificate. Must be a number between + # 1-99, inclusive. + # @!attribute [rw] key_algorithm + # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig::KeyAlgorithm] + # Required. The key algorithm to use when generating the private key. + class CertificateIssuanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The CA that issues the workload certificate. It includes CA address, type, + # authentication to CA service, etc. + # @!attribute [rw] certificate_authority_service_config + # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig::CertificateAuthorityConfig::CertificateAuthorityServiceConfig] + # Defines a CertificateAuthorityServiceConfig. + class CertificateAuthorityConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains information required to contact CA service. + # @!attribute [rw] ca_pool + # @return [::String] + # Required. A CA pool resource used to issue a certificate. + # The CA pool string has a relative resource path following the form + # "projects/\\{project}/locations/\\{location}/caPools/\\{ca_pool}". + class CertificateAuthorityServiceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of keypair to generate. + module KeyAlgorithm + # Unspecified key algorithm. + KEY_ALGORITHM_UNSPECIFIED = 0 + + # Specifies RSA with a 2048-bit modulus. + RSA_2048 = 1 + + # Specifies ECDSA with curve P256. + ECDSA_P256 = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb new file mode 100644 index 000000000000..4535652f31dd --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb @@ -0,0 +1,896 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CertificateManager + module V1 + # Request for the `ListCertificates` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the certificate should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of certificates to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListCertificatesResponse`. Indicates that + # this is a continuation of a prior `ListCertificates` call, and that the + # system should return the next page of data. + # @!attribute [rw] filter + # @return [::String] + # Filter expression to restrict the Certificates returned. + # @!attribute [rw] order_by + # @return [::String] + # A list of Certificate field names used to specify the order of the returned + # results. The default sorting order is ascending. To specify descending + # order for a field, add a suffix `" desc"`. + class ListCertificatesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListCertificates` method. + # @!attribute [rw] certificates + # @return [::Array<::Google::Cloud::CertificateManager::V1::Certificate>] + # A list of certificates for the parent resource. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # A list of locations that could not be reached. + class ListCertificatesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetCertificate` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate to describe. Must be in the format + # `projects/*/locations/*/certificates/*`. + class GetCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateCertificate` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the certificate. Must be in the format + # `projects/*/locations/*`. + # @!attribute [rw] certificate_id + # @return [::String] + # Required. A user-provided name of the certificate. + # @!attribute [rw] certificate + # @return [::Google::Cloud::CertificateManager::V1::Certificate] + # Required. A definition of the certificate to create. + class CreateCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateCertificate` method. + # @!attribute [rw] certificate + # @return [::Google::Cloud::CertificateManager::V1::Certificate] + # Required. A definition of the certificate to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + class UpdateCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteCertificate` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate to delete. Must be in the format + # `projects/*/locations/*/certificates/*`. + class DeleteCertificateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListCertificateMaps` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the certificate maps should + # be listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of certificate maps to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListCertificateMapsResponse`. Indicates + # that this is a continuation of a prior `ListCertificateMaps` call, and that + # the system should return the next page of data. + # @!attribute [rw] filter + # @return [::String] + # Filter expression to restrict the Certificates Maps returned. + # @!attribute [rw] order_by + # @return [::String] + # A list of Certificate Map field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + class ListCertificateMapsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListCertificateMaps` method. + # @!attribute [rw] certificate_maps + # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMap>] + # A list of certificate maps for the parent resource. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListCertificateMapsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetCertificateMap` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate map to describe. Must be in the format + # `projects/*/locations/*/certificateMaps/*`. + class GetCertificateMapRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateCertificateMap` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the certificate map. Must be in the format + # `projects/*/locations/*`. + # @!attribute [rw] certificate_map_id + # @return [::String] + # Required. A user-provided name of the certificate map. + # @!attribute [rw] certificate_map + # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] + # Required. A definition of the certificate map to create. + class CreateCertificateMapRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateCertificateMap` method. + # @!attribute [rw] certificate_map + # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] + # Required. A definition of the certificate map to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + class UpdateCertificateMapRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteCertificateMap` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate map to delete. Must be in the format + # `projects/*/locations/*/certificateMaps/*`. + class DeleteCertificateMapRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListCertificateMapEntries` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project, location and certificate map from which the + # certificate map entries should be listed, specified in the format + # `projects/*/locations/*/certificateMaps/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of certificate map entries to return. The service may return + # fewer than this value. + # If unspecified, at most 50 certificate map entries will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListCertificateMapEntriesResponse`. + # Indicates that this is a continuation of a prior + # `ListCertificateMapEntries` call, and that the system should return the + # next page of data. + # @!attribute [rw] filter + # @return [::String] + # Filter expression to restrict the returned Certificate Map Entries. + # @!attribute [rw] order_by + # @return [::String] + # A list of Certificate Map Entry field names used to specify + # the order of the returned results. The default sorting order is ascending. + # To specify descending order for a field, add a suffix `" desc"`. + class ListCertificateMapEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListCertificateMapEntries` method. + # @!attribute [rw] certificate_map_entries + # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] + # A list of certificate map entries for the parent resource. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListCertificateMapEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetCertificateMapEntry` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate map entry to describe. Must be in the + # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + class GetCertificateMapEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateCertificateMapEntry` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the certificate map entry. Must be in the + # format `projects/*/locations/*/certificateMaps/*`. + # @!attribute [rw] certificate_map_entry_id + # @return [::String] + # Required. A user-provided name of the certificate map entry. + # @!attribute [rw] certificate_map_entry + # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] + # Required. A definition of the certificate map entry to create. + class CreateCertificateMapEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateCertificateMapEntry` method. + # @!attribute [rw] certificate_map_entry + # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] + # Required. A definition of the certificate map entry to create map entry. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + class UpdateCertificateMapEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteCertificateMapEntry` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the certificate map entry to delete. Must be in the + # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + class DeleteCertificateMapEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListDnsAuthorizations` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the dns authorizations should + # be listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of dns authorizations to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListDnsAuthorizationsResponse`. Indicates + # that this is a continuation of a prior `ListDnsAuthorizations` call, and + # that the system should return the next page of data. + # @!attribute [rw] filter + # @return [::String] + # Filter expression to restrict the Dns Authorizations returned. + # @!attribute [rw] order_by + # @return [::String] + # A list of Dns Authorization field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + class ListDnsAuthorizationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListDnsAuthorizations` method. + # @!attribute [rw] dns_authorizations + # @return [::Array<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] + # A list of dns authorizations for the parent resource. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDnsAuthorizationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetDnsAuthorization` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the dns authorization to describe. Must be in the + # format `projects/*/locations/*/dnsAuthorizations/*`. + class GetDnsAuthorizationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateDnsAuthorization` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the dns authorization. Must be in the + # format `projects/*/locations/*`. + # @!attribute [rw] dns_authorization_id + # @return [::String] + # Required. A user-provided name of the dns authorization. + # @!attribute [rw] dns_authorization + # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] + # Required. A definition of the dns authorization to create. + class CreateDnsAuthorizationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateDnsAuthorization` method. + # @!attribute [rw] dns_authorization + # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] + # Required. A definition of the dns authorization to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + class UpdateDnsAuthorizationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteDnsAuthorization` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the dns authorization to delete. Must be in the format + # `projects/*/locations/*/dnsAuthorizations/*`. + class DeleteDnsAuthorizationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. Output only. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] target + # @return [::String] + # Server-defined resource path for the target of the operation. + # @!attribute [rw] verb + # @return [::String] + # Name of the verb executed by the operation. + # @!attribute [rw] status_message + # @return [::String] + # Human-readable status of the operation, if any. + # @!attribute [rw] requested_cancellation + # @return [::Boolean] + # 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`. + # @!attribute [rw] api_version + # @return [::String] + # API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines TLS certificate. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the certificate. Certificate names must be unique + # globally and match pattern `projects/*/locations/*/certificates/*`. + # @!attribute [rw] description + # @return [::String] + # One or more paragraphs of text description of a certificate. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a Certificate. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a Certificate. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Set of labels associated with a Certificate. + # @!attribute [rw] self_managed + # @return [::Google::Cloud::CertificateManager::V1::Certificate::SelfManagedCertificate] + # If set, defines data of a self-managed certificate. + # + # Note: The following fields are mutually exclusive: `self_managed`, `managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] managed + # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate] + # If set, contains configuration and state of a managed certificate. + # + # Note: The following fields are mutually exclusive: `managed`, `self_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] san_dnsnames + # @return [::Array<::String>] + # Output only. The list of Subject Alternative Names of dnsName type defined + # in the certificate (see RFC 5280 4.2.1.6). Managed certificates that + # haven't been provisioned yet have this field populated with a value of the + # managed.domains field. + # @!attribute [r] pem_certificate + # @return [::String] + # Output only. The PEM-encoded certificate chain. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The expiry timestamp of a Certificate. + # @!attribute [rw] scope + # @return [::Google::Cloud::CertificateManager::V1::Certificate::Scope] + # Immutable. The scope of the certificate. + class Certificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Certificate data for a SelfManaged Certificate. + # SelfManaged Certificates are uploaded by the user. Updating such + # certificates before they expire remains the user's responsibility. + # @!attribute [rw] pem_certificate + # @return [::String] + # Input only. The PEM-encoded certificate chain. + # Leaf certificate comes first, followed by intermediate ones if any. + # @!attribute [rw] pem_private_key + # @return [::String] + # Input only. The PEM-encoded private key of the leaf certificate. + class SelfManagedCertificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration and state of a Managed Certificate. + # Certificate Manager provisions and renews Managed Certificates + # automatically, for as long as it's authorized to do so. + # @!attribute [rw] domains + # @return [::Array<::String>] + # Immutable. The domains for which a managed SSL certificate will be + # generated. Wildcard domains are only supported with DNS challenge + # resolution. + # @!attribute [rw] dns_authorizations + # @return [::Array<::String>] + # Immutable. Authorizations that will be used for performing domain + # authorization. + # @!attribute [rw] issuance_config + # @return [::String] + # Immutable. The resource name for a + # {::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig CertificateIssuanceConfig} + # used to configure private PKI certificates in the format + # `projects/*/locations/*/certificateIssuanceConfigs/*`. + # If this field is not set, the certificates will instead be publicly + # signed as documented at + # https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. + # @!attribute [r] state + # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::State] + # Output only. State of the managed certificate resource. + # @!attribute [r] provisioning_issue + # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::ProvisioningIssue] + # Output only. Information about issues with provisioning a Managed + # Certificate. + # @!attribute [r] authorization_attempt_info + # @return [::Array<::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::AuthorizationAttemptInfo>] + # Output only. Detailed state of the latest authorization attempt for each + # domain specified for managed certificate resource. + class ManagedCertificate + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about issues with provisioning a Managed Certificate. + # @!attribute [r] reason + # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::ProvisioningIssue::Reason] + # Output only. Reason for provisioning failures. + # @!attribute [r] details + # @return [::String] + # Output only. Human readable explanation about the issue. Provided to + # help address the configuration issues. Not guaranteed to be stable. For + # programmatic access use Reason enum. + class ProvisioningIssue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Reason for provisioning failures. + module Reason + # Reason is unspecified. + REASON_UNSPECIFIED = 0 + + # Certificate provisioning failed due to an issue with one or more of + # the domains on the certificate. + # For details of which domains failed, consult the + # `authorization_attempt_info` field. + AUTHORIZATION_ISSUE = 1 + + # Exceeded Certificate Authority quotas or internal rate limits of the + # system. Provisioning may take longer to complete. + RATE_LIMITED = 2 + end + end + + # State of the latest attempt to authorize a domain for certificate + # issuance. + # @!attribute [rw] domain + # @return [::String] + # Domain name of the authorization attempt. + # @!attribute [r] state + # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::AuthorizationAttemptInfo::State] + # Output only. State of the domain for managed certificate issuance. + # @!attribute [r] failure_reason + # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::AuthorizationAttemptInfo::FailureReason] + # Output only. Reason for failure of the authorization attempt for the + # domain. + # @!attribute [r] details + # @return [::String] + # Output only. Human readable explanation for reaching the state. + # Provided to help address the configuration issues. Not guaranteed to be + # stable. For programmatic access use FailureReason enum. + class AuthorizationAttemptInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State of the domain for managed certificate issuance. + module State + # State is unspecified. + STATE_UNSPECIFIED = 0 + + # Certificate provisioning for this domain is under way. Google Cloud + # will attempt to authorize the domain. + AUTHORIZING = 1 + + # A managed certificate can be provisioned, no issues for this domain. + AUTHORIZED = 6 + + # Attempt to authorize the domain failed. This prevents the Managed + # Certificate from being issued. + # See `failure_reason` and `details` fields for more information. + FAILED = 7 + end + + # Reason for failure of the authorization attempt for the domain. + module FailureReason + # FailureReason is unspecified. + FAILURE_REASON_UNSPECIFIED = 0 + + # There was a problem with the user's DNS or load balancer + # configuration for this domain. + CONFIG = 1 + + # Certificate issuance forbidden by an explicit CAA record for the + # domain or a failure to check CAA records for the domain. + CAA = 2 + + # Reached a CA or internal rate-limit for the domain, + # e.g. for certificates per top-level private domain. + RATE_LIMITED = 3 + end + end + + # State of the managed certificate resource. + module State + # State is unspecified. + STATE_UNSPECIFIED = 0 + + # Certificate Manager attempts to provision or renew the certificate. + # If the process takes longer than expected, consult the + # `provisioning_issue` field. + PROVISIONING = 1 + + # Multiple certificate provisioning attempts failed and Certificate + # Manager gave up. To try again, delete and create a new managed + # Certificate resource. + # For details see the `provisioning_issue` field. + FAILED = 2 + + # The certificate management is working, and a certificate has been + # provisioned. + ACTIVE = 3 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Certificate scope. + module Scope + # Certificates with default scope are served from core Google data centers. + # If unsure, choose this option. + DEFAULT = 0 + + # Certificates with scope EDGE_CACHE are special-purposed certificates, + # served from Edge Points of Presence. + # See https://cloud.google.com/vpc/docs/edge-locations. + EDGE_CACHE = 1 + + # Certificates with ALL_REGIONS scope are served from all Google Cloud + # regions. See https://cloud.google.com/compute/docs/regions-zones. + ALL_REGIONS = 2 + end + end + + # Defines a collection of certificate configurations. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the Certificate Map. Certificate Map names must be + # unique globally and match pattern + # `projects/*/locations/*/certificateMaps/*`. + # @!attribute [rw] description + # @return [::String] + # One or more paragraphs of text description of a certificate map. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a Certificate Map. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update timestamp of a Certificate Map. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Set of labels associated with a Certificate Map. + # @!attribute [r] gclb_targets + # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMap::GclbTarget>] + # Output only. A list of GCLB targets that use this Certificate Map. + # A Target Proxy is only present on this list if it's attached to a + # Forwarding Rule. + class CertificateMap + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a Target Proxy that uses this Certificate Map. + # @!attribute [r] target_https_proxy + # @return [::String] + # Output only. This field returns the resource name in the following + # format: + # `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. + # + # Note: The following fields are mutually exclusive: `target_https_proxy`, `target_ssl_proxy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] target_ssl_proxy + # @return [::String] + # Output only. This field returns the resource name in the following + # format: + # `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. + # + # Note: The following fields are mutually exclusive: `target_ssl_proxy`, `target_https_proxy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] ip_configs + # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMap::GclbTarget::IpConfig>] + # Output only. IP configurations for this Target Proxy where the + # Certificate Map is serving. + class GclbTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines IP configuration where this Certificate Map is serving. + # @!attribute [r] ip_address + # @return [::String] + # Output only. An external IP address. + # @!attribute [r] ports + # @return [::Array<::Integer>] + # Output only. Ports. + class IpConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + 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 + + # Defines a certificate map entry. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the Certificate Map Entry. Certificate Map Entry + # names must be unique globally and match pattern + # `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. + # @!attribute [rw] description + # @return [::String] + # One or more paragraphs of text description of a certificate map entry. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a Certificate Map Entry. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The update timestamp of a Certificate Map Entry. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Set of labels associated with a Certificate Map Entry. + # @!attribute [rw] hostname + # @return [::String] + # A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression + # (`*.example.com`) for a set of hostnames with common suffix. Used as + # Server Name Indication (SNI) for selecting a proper certificate. + # + # Note: The following fields are mutually exclusive: `hostname`, `matcher`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] matcher + # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry::Matcher] + # A predefined matcher for particular cases, other than SNI selection. + # + # Note: The following fields are mutually exclusive: `matcher`, `hostname`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] certificates + # @return [::Array<::String>] + # A set of Certificates defines for the given `hostname`. There can be + # defined up to four certificates in each Certificate Map Entry. Each + # certificate must match pattern `projects/*/locations/*/certificates/*`. + # @!attribute [r] state + # @return [::Google::Cloud::CertificateManager::V1::ServingState] + # Output only. A serving state of this Certificate Map Entry. + class CertificateMapEntry + 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 + + # Defines predefined cases other than SNI-hostname match when this + # configuration should be applied. + module Matcher + # A matcher has't been recognized. + MATCHER_UNSPECIFIED = 0 + + # A primary certificate that is served when SNI wasn't specified in the + # request or SNI couldn't be found in the map. + PRIMARY = 1 + end + end + + # A DnsAuthorization resource describes a way to perform domain authorization + # for certificate issuance. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the dns authorization. DnsAuthorization names must + # be unique globally and match pattern + # `projects/*/locations/*/dnsAuthorizations/*`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a DnsAuthorization. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a DnsAuthorization. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Set of labels associated with a DnsAuthorization. + # @!attribute [rw] description + # @return [::String] + # One or more paragraphs of text description of a DnsAuthorization. + # @!attribute [rw] domain + # @return [::String] + # Required. Immutable. A domain that is being authorized. A DnsAuthorization + # resource covers a single domain and its wildcard, e.g. authorization for + # `example.com` can be used to issue certificates for `example.com` and + # `*.example.com`. + # @!attribute [r] dns_resource_record + # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization::DnsResourceRecord] + # Output only. DNS Resource Record that needs to be added to DNS + # configuration. + # @!attribute [rw] type + # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization::Type] + # Immutable. Type of DnsAuthorization. If unset during resource creation the + # following default will be used: + # - in location global: FIXED_RECORD. + class DnsAuthorization + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The structure describing the DNS Resource Record that needs to be added + # to DNS configuration for the authorization to be usable by + # certificate. + # @!attribute [r] name + # @return [::String] + # Output only. Fully qualified name of the DNS Resource Record. + # e.g. `_acme-challenge.example.com` + # @!attribute [r] type + # @return [::String] + # Output only. Type of the DNS Resource Record. + # Currently always set to "CNAME". + # @!attribute [r] data + # @return [::String] + # Output only. Data of the DNS Resource Record. + class DnsResourceRecord + 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 + + # DnsAuthorization type. + module Type + # Type is unspecified. + TYPE_UNSPECIFIED = 0 + + # FIXED_RECORD DNS authorization uses DNS-01 validation method. + FIXED_RECORD = 1 + + # PER_PROJECT_RECORD DNS authorization allows for independent management + # of Google-managed certificates with DNS authorization across multiple + # projects. + PER_PROJECT_RECORD = 2 + end + end + + # Defines set of serving states associated with a resource. + module ServingState + # The status is undefined. + SERVING_STATE_UNSPECIFIED = 0 + + # The configuration is serving. + ACTIVE = 1 + + # Update is in progress. Some frontends may serve this configuration. + PENDING = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb new file mode 100644 index 000000000000..58fbca8230a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CertificateManager + module V1 + # Request for the `ListTrustConfigs` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the TrustConfigs should be + # listed, specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of TrustConfigs to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last `ListTrustConfigsResponse`. Indicates + # that this is a continuation of a prior `ListTrustConfigs` call, and that + # the system should return the next page of data. + # @!attribute [rw] filter + # @return [::String] + # Filter expression to restrict the TrustConfigs returned. + # @!attribute [rw] order_by + # @return [::String] + # A list of TrustConfig field names used to specify the order of the + # returned results. The default sorting order is ascending. To specify + # descending order for a field, add a suffix `" desc"`. + class ListTrustConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListTrustConfigs` method. + # @!attribute [rw] trust_configs + # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig>] + # A list of TrustConfigs for the parent resource. + # @!attribute [rw] next_page_token + # @return [::String] + # If there might be more results than those appearing in this response, then + # `next_page_token` is included. To get the next set of results, call this + # method again using the value of `next_page_token` as `page_token`. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListTrustConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetTrustConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the TrustConfig to describe. Must be in the format + # `projects/*/locations/*/trustConfigs/*`. + class GetTrustConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateTrustConfig` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource of the TrustConfig. Must be in the format + # `projects/*/locations/*`. + # @!attribute [rw] trust_config_id + # @return [::String] + # Required. A user-provided name of the TrustConfig. Must match the regexp + # `[a-z0-9-]{1,63}`. + # @!attribute [rw] trust_config + # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] + # Required. A definition of the TrustConfig to create. + class CreateTrustConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateTrustConfig` method. + # @!attribute [rw] trust_config + # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] + # Required. A definition of the TrustConfig to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The update mask applies to the resource. For the `FieldMask` + # definition, see + # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. + class UpdateTrustConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteTrustConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the TrustConfig to delete. Must be in the format + # `projects/*/locations/*/trustConfigs/*`. + # @!attribute [rw] etag + # @return [::String] + # The current etag of the TrustConfig. + # If an etag is provided and does not match the current etag of the resource, + # deletion will be blocked and an ABORTED error will be returned. + class DeleteTrustConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines a trust config. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the trust config. TrustConfig names must be + # unique globally and match pattern + # `projects/*/locations/*/trustConfigs/*`. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation timestamp of a TrustConfig. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a TrustConfig. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Set of labels associated with a TrustConfig. + # @!attribute [rw] description + # @return [::String] + # One or more paragraphs of text description of a TrustConfig. + # @!attribute [rw] etag + # @return [::String] + # This checksum is computed by the server based on the value of other + # fields, and may be sent on update and delete requests to ensure the + # client has an up-to-date value before proceeding. + # @!attribute [rw] trust_stores + # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig::TrustStore>] + # Set of trust stores to perform validation against. + # + # This field is supported when TrustConfig is configured with Load Balancers, + # currently not supported for SPIFFE certificate validation. + # + # Only one TrustStore specified is currently allowed. + class TrustConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a trust anchor. + # @!attribute [rw] pem_certificate + # @return [::String] + # PEM root certificate of the PKI used for validation. + # + # Each certificate provided in PEM format may occupy up to 5kB. + class TrustAnchor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines an intermediate CA. + # @!attribute [rw] pem_certificate + # @return [::String] + # PEM intermediate certificate used for building up paths + # for validation. + # + # Each certificate provided in PEM format may occupy up to 5kB. + class IntermediateCA + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines a trust store. + # @!attribute [rw] trust_anchors + # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig::TrustAnchor>] + # List of Trust Anchors to be used while performing validation + # against a given TrustStore. + # @!attribute [rw] intermediate_cas + # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig::IntermediateCA>] + # Set of intermediate CA certificates used for the path building + # phase of chain validation. + # + # The field is currently not supported if TrustConfig is used for the + # workload certificate feature. + class TrustStore + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/Gemfile new file mode 100644 index 000000000000..a6fc4e1b0e1f --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1", path: "../" +else + gem "google-cloud-certificate_manager-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-certificate_manager-v1/snippets/certificate_manager/create_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate.rb new file mode 100644 index 000000000000..88a72fd1753f --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate.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 certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the create_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate. +# +def create_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new + + # Call the create_certificate method. + result = client.create_certificate 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 certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.rb new file mode 100644 index 000000000000..e2c0bd353947 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.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 certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the create_certificate_issuance_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate_issuance_config. +# +def create_certificate_issuance_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new + + # Call the create_certificate_issuance_config method. + result = client.create_certificate_issuance_config 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 certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.rb new file mode 100644 index 000000000000..00626d926dc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the create_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate_map. +# +def create_certificate_map + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new + + # Call the create_certificate_map method. + result = client.create_certificate_map 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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.rb new file mode 100644 index 000000000000..e46d9756c52c --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the create_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate_map_entry. +# +def create_certificate_map_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new + + # Call the create_certificate_map_entry method. + result = client.create_certificate_map_entry 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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.rb new file mode 100644 index 000000000000..324f09b29049 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the create_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_dns_authorization. +# +def create_dns_authorization + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new + + # Call the create_dns_authorization method. + result = client.create_dns_authorization 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 certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.rb new file mode 100644 index 000000000000..3bf4e1e8d1ff --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.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 certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the create_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_trust_config. +# +def create_trust_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new + + # Call the create_trust_config method. + result = client.create_trust_config 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 certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.rb new file mode 100644 index 000000000000..512228dcedc5 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the delete_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate. +# +def delete_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new + + # Call the delete_certificate method. + result = client.delete_certificate 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.rb new file mode 100644 index 000000000000..698b21c66447 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the delete_certificate_issuance_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate_issuance_config. +# +def delete_certificate_issuance_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new + + # Call the delete_certificate_issuance_config method. + result = client.delete_certificate_issuance_config 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.rb new file mode 100644 index 000000000000..e99339fb4f89 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the delete_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate_map. +# +def delete_certificate_map + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new + + # Call the delete_certificate_map method. + result = client.delete_certificate_map 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.rb new file mode 100644 index 000000000000..c88a12ec38df --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the delete_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate_map_entry. +# +def delete_certificate_map_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new + + # Call the delete_certificate_map_entry method. + result = client.delete_certificate_map_entry 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.rb new file mode 100644 index 000000000000..581c980d8c0d --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the delete_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_dns_authorization. +# +def delete_dns_authorization + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new + + # Call the delete_dns_authorization method. + result = client.delete_dns_authorization 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 certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.rb new file mode 100644 index 000000000000..84b680f43f72 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.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 certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the delete_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_trust_config. +# +def delete_trust_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new + + # Call the delete_trust_config method. + result = client.delete_trust_config 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 certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.rb new file mode 100644 index 000000000000..ea936dc2274d --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.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 certificatemanager_v1_generated_CertificateManager_GetCertificate_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the get_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate. +# +def get_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::GetCertificateRequest.new + + # Call the get_certificate method. + result = client.get_certificate request + + # The returned object is of type Google::Cloud::CertificateManager::V1::Certificate. + p result +end +# [END certificatemanager_v1_generated_CertificateManager_GetCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.rb new file mode 100644 index 000000000000..1a0d544d86fe --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.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 certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the get_certificate_issuance_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate_issuance_config. +# +def get_certificate_issuance_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new + + # Call the get_certificate_issuance_config method. + result = client.get_certificate_issuance_config request + + # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig. + p result +end +# [END certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.rb new file mode 100644 index 000000000000..003b8a63bd8e --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.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 certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the get_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate_map. +# +def get_certificate_map + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new + + # Call the get_certificate_map method. + result = client.get_certificate_map request + + # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMap. + p result +end +# [END certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.rb new file mode 100644 index 000000000000..93be15b96fd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the get_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate_map_entry. +# +def get_certificate_map_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new + + # Call the get_certificate_map_entry method. + result = client.get_certificate_map_entry request + + # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMapEntry. + p result +end +# [END certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.rb new file mode 100644 index 000000000000..c501f218f1cd --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the get_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_dns_authorization. +# +def get_dns_authorization + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new + + # Call the get_dns_authorization method. + result = client.get_dns_authorization request + + # The returned object is of type Google::Cloud::CertificateManager::V1::DnsAuthorization. + p result +end +# [END certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.rb new file mode 100644 index 000000000000..acbf49bdebfb --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.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 certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the get_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_trust_config. +# +def get_trust_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new + + # Call the get_trust_config method. + result = client.get_trust_config request + + # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig. + p result +end +# [END certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.rb new file mode 100644 index 000000000000..3dd56266effb --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.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 certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the list_certificate_issuance_configs call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificate_issuance_configs. +# +def list_certificate_issuance_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.new + + # Call the list_certificate_issuance_configs method. + result = client.list_certificate_issuance_configs 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::CertificateManager::V1::CertificateIssuanceConfig. + p item + end +end +# [END certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.rb new file mode 100644 index 000000000000..b946859ef9bd --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.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 certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the list_certificate_map_entries call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificate_map_entries. +# +def list_certificate_map_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.new + + # Call the list_certificate_map_entries method. + result = client.list_certificate_map_entries 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::CertificateManager::V1::CertificateMapEntry. + p item + end +end +# [END certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.rb new file mode 100644 index 000000000000..9708cba6902b --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.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 certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the list_certificate_maps call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificate_maps. +# +def list_certificate_maps + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.new + + # Call the list_certificate_maps method. + result = client.list_certificate_maps 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::CertificateManager::V1::CertificateMap. + p item + end +end +# [END certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.rb new file mode 100644 index 000000000000..f150d46f27df --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.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 certificatemanager_v1_generated_CertificateManager_ListCertificates_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the list_certificates call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificates. +# +def list_certificates + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new + + # Call the list_certificates method. + result = client.list_certificates 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::CertificateManager::V1::Certificate. + p item + end +end +# [END certificatemanager_v1_generated_CertificateManager_ListCertificates_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.rb new file mode 100644 index 000000000000..16e15b84c7b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.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 certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the list_dns_authorizations call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_dns_authorizations. +# +def list_dns_authorizations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.new + + # Call the list_dns_authorizations method. + result = client.list_dns_authorizations 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::CertificateManager::V1::DnsAuthorization. + p item + end +end +# [END certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.rb new file mode 100644 index 000000000000..74991af03dac --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.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 certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the list_trust_configs call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_trust_configs. +# +def list_trust_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new + + # Call the list_trust_configs method. + result = client.list_trust_configs 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::CertificateManager::V1::TrustConfig. + p item + end +end +# [END certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.rb new file mode 100644 index 000000000000..44dc497deb3e --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.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 certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the update_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_certificate. +# +def update_certificate + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new + + # Call the update_certificate method. + result = client.update_certificate 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 certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.rb new file mode 100644 index 000000000000..047e69d9381b --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the update_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_certificate_map. +# +def update_certificate_map + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new + + # Call the update_certificate_map method. + result = client.update_certificate_map 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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.rb new file mode 100644 index 000000000000..1032589fd824 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the update_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_certificate_map_entry. +# +def update_certificate_map_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new + + # Call the update_certificate_map_entry method. + result = client.update_certificate_map_entry 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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.rb new file mode 100644 index 000000000000..a9a2e0018f5e --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the update_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_dns_authorization. +# +def update_dns_authorization + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new + + # Call the update_dns_authorization method. + result = client.update_dns_authorization 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 certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.rb new file mode 100644 index 000000000000..3ed74d3a0995 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.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 certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync] +require "google/cloud/certificate_manager/v1" + +## +# Snippet for the update_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_trust_config. +# +def update_trust_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new + + # Call the update_trust_config method. + result = client.update_trust_config 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 certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json new file mode 100644 index 000000000000..5ae9a91447df --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json @@ -0,0 +1,1175 @@ +{ + "client_library": { + "name": "google-cloud-certificate_manager-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.certificatemanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificates_sync", + "title": "Snippet for the list_certificates call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificates.", + "file": "certificate_manager/list_certificates.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificates", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificates", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::ListCertificatesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificatesResponse", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "ListCertificates", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificates", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificate_sync", + "title": "Snippet for the get_certificate call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate.", + "file": "certificate_manager/get_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::GetCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::Certificate", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "GetCertificate", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificate", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync", + "title": "Snippet for the create_certificate call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate.", + "file": "certificate_manager/create_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "CreateCertificate", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificate", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync", + "title": "Snippet for the update_certificate call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate.", + "file": "certificate_manager/update_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "UpdateCertificate", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateCertificate", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync", + "title": "Snippet for the delete_certificate call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate.", + "file": "certificate_manager/delete_certificate.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_certificate", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "DeleteCertificate", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificate", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync", + "title": "Snippet for the list_certificate_maps call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_maps.", + "file": "certificate_manager/list_certificate_maps.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_maps", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_maps", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "ListCertificateMaps", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificateMaps", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync", + "title": "Snippet for the get_certificate_map call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map.", + "file": "certificate_manager/get_certificate_map.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_map", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::CertificateMap", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "GetCertificateMap", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificateMap", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync", + "title": "Snippet for the create_certificate_map call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map.", + "file": "certificate_manager/create_certificate_map.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate_map", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "CreateCertificateMap", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificateMap", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync", + "title": "Snippet for the update_certificate_map call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map.", + "file": "certificate_manager/update_certificate_map.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate_map", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "UpdateCertificateMap", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateCertificateMap", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync", + "title": "Snippet for the delete_certificate_map call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map.", + "file": "certificate_manager/delete_certificate_map.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_certificate_map", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "DeleteCertificateMap", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificateMap", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync", + "title": "Snippet for the list_certificate_map_entries call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_map_entries.", + "file": "certificate_manager/list_certificate_map_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_map_entries", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_map_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "ListCertificateMapEntries", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificateMapEntries", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync", + "title": "Snippet for the get_certificate_map_entry call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map_entry.", + "file": "certificate_manager/get_certificate_map_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_map_entry", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::CertificateMapEntry", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "GetCertificateMapEntry", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificateMapEntry", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync", + "title": "Snippet for the create_certificate_map_entry call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map_entry.", + "file": "certificate_manager/create_certificate_map_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate_map_entry", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "CreateCertificateMapEntry", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificateMapEntry", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync", + "title": "Snippet for the update_certificate_map_entry call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map_entry.", + "file": "certificate_manager/update_certificate_map_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_certificate_map_entry", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "UpdateCertificateMapEntry", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateCertificateMapEntry", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync", + "title": "Snippet for the delete_certificate_map_entry call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map_entry.", + "file": "certificate_manager/delete_certificate_map_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_certificate_map_entry", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "DeleteCertificateMapEntry", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificateMapEntry", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync", + "title": "Snippet for the list_dns_authorizations call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_dns_authorizations.", + "file": "certificate_manager/list_dns_authorizations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_dns_authorizations", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_dns_authorizations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "ListDnsAuthorizations", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListDnsAuthorizations", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync", + "title": "Snippet for the get_dns_authorization call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_dns_authorization.", + "file": "certificate_manager/get_dns_authorization.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dns_authorization", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_dns_authorization", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::DnsAuthorization", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "GetDnsAuthorization", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetDnsAuthorization", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync", + "title": "Snippet for the create_dns_authorization call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_dns_authorization.", + "file": "certificate_manager/create_dns_authorization.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dns_authorization", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_dns_authorization", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "CreateDnsAuthorization", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateDnsAuthorization", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync", + "title": "Snippet for the update_dns_authorization call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_dns_authorization.", + "file": "certificate_manager/update_dns_authorization.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_dns_authorization", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_dns_authorization", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "UpdateDnsAuthorization", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateDnsAuthorization", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync", + "title": "Snippet for the delete_dns_authorization call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_dns_authorization.", + "file": "certificate_manager/delete_dns_authorization.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dns_authorization", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_dns_authorization", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "DeleteDnsAuthorization", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteDnsAuthorization", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync", + "title": "Snippet for the list_certificate_issuance_configs call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_issuance_configs.", + "file": "certificate_manager/list_certificate_issuance_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_certificate_issuance_configs", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_issuance_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "ListCertificateIssuanceConfigs", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificateIssuanceConfigs", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync", + "title": "Snippet for the get_certificate_issuance_config call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_issuance_config.", + "file": "certificate_manager/get_certificate_issuance_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_certificate_issuance_config", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_issuance_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "GetCertificateIssuanceConfig", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificateIssuanceConfig", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync", + "title": "Snippet for the create_certificate_issuance_config call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_issuance_config.", + "file": "certificate_manager/create_certificate_issuance_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_certificate_issuance_config", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_issuance_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "CreateCertificateIssuanceConfig", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificateIssuanceConfig", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync", + "title": "Snippet for the delete_certificate_issuance_config call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_issuance_config.", + "file": "certificate_manager/delete_certificate_issuance_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_certificate_issuance_config", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_issuance_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "DeleteCertificateIssuanceConfig", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificateIssuanceConfig", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync", + "title": "Snippet for the list_trust_configs call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_trust_configs.", + "file": "certificate_manager/list_trust_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_trust_configs", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_trust_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "ListTrustConfigs", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListTrustConfigs", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync", + "title": "Snippet for the get_trust_config call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_trust_config.", + "file": "certificate_manager/get_trust_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_trust_config", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_trust_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CertificateManager::V1::TrustConfig", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "GetTrustConfig", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetTrustConfig", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync", + "title": "Snippet for the create_trust_config call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_trust_config.", + "file": "certificate_manager/create_trust_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_trust_config", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_trust_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "CreateTrustConfig", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateTrustConfig", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync", + "title": "Snippet for the update_trust_config call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_trust_config.", + "file": "certificate_manager/update_trust_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_trust_config", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_trust_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "UpdateTrustConfig", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateTrustConfig", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync", + "title": "Snippet for the delete_trust_config call in the CertificateManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_trust_config.", + "file": "certificate_manager/delete_trust_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_trust_config", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_trust_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CertificateManager::Client", + "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" + }, + "method": { + "short_name": "DeleteTrustConfig", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteTrustConfig", + "service": { + "short_name": "CertificateManager", + "full_name": "google.cloud.certificatemanager.v1.CertificateManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_operations_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_operations_test.rb new file mode 100644 index 000000000000..6ecd8da13871 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_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/certificatemanager/v1/certificate_manager_pb" +require "google/cloud/certificatemanager/v1/certificate_manager_services_pb" +require "google/cloud/certificate_manager/v1/certificate_manager" + +class ::Google::Cloud::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb new file mode 100644 index 000000000000..9d224b9b14db --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/certificate_manager/v1/certificate_manager" + +class ::Google::Cloud::CertificateManager::V1::CertificateManager::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_ca_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" + assert_equal "projects/value0/locations/value1/caPools/value2", path + end + end + + def test_certificate_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_path project: "value0", location: "value1", certificate: "value2" + assert_equal "projects/value0/locations/value1/certificates/value2", path + end + end + + def test_certificate_issuance_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_issuance_config_path project: "value0", location: "value1", certificate_issuance_config: "value2" + assert_equal "projects/value0/locations/value1/certificateIssuanceConfigs/value2", path + end + end + + def test_certificate_map_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_map_path project: "value0", location: "value1", certificate_map: "value2" + assert_equal "projects/value0/locations/value1/certificateMaps/value2", path + end + end + + def test_certificate_map_entry_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.certificate_map_entry_path project: "value0", location: "value1", certificate_map: "value2", certificate_map_entry: "value3" + assert_equal "projects/value0/locations/value1/certificateMaps/value2/certificateMapEntries/value3", path + end + end + + def test_dns_authorization_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dns_authorization_path project: "value0", location: "value1", dns_authorization: "value2" + assert_equal "projects/value0/locations/value1/dnsAuthorizations/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::CertificateManager::V1::CertificateManager::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_trust_config_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.trust_config_path project: "value0", location: "value1", trust_config: "value2" + assert_equal "projects/value0/locations/value1/trustConfigs/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb new file mode 100644 index 000000000000..ca98ed7a6415 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb @@ -0,0 +1,1707 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/certificatemanager/v1/certificate_manager_pb" +require "google/cloud/certificate_manager/v1/certificate_manager/rest" + + +class ::Google::Cloud::CertificateManager::V1::CertificateManager::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_certificates + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse.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_certificates_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificates_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificates_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_certificates({ 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_certificates 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_certificates ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates({ 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_certificates(::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates_client_stub.call_count + end + end + end + + def test_get_certificate + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::Certificate.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_certificate({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_certificate name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_certificate ::Google::Cloud::CertificateManager::V1::GetCertificateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_certificate({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_certificate(::Google::Cloud::CertificateManager::V1::GetCertificateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_client_stub.call_count + end + end + end + + def test_create_certificate + # 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" + certificate_id = "hello world" + certificate = {} + + create_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_certificate ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_certificate(::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_client_stub.call_count + end + end + end + + def test_update_certificate + # 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. + certificate = {} + update_mask = {} + + update_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_certificate({ certificate: certificate, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_certificate certificate: certificate, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_certificate ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_certificate({ certificate: certificate, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_certificate(::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_client_stub.call_count + end + end + end + + def test_delete_certificate + # 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_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_certificate({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_certificate name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_certificate ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_certificate({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_certificate(::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_certificate_client_stub.call_count + end + end + end + + def test_list_certificate_maps + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse.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_certificate_maps_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificate_maps_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_maps_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_certificate_maps({ 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_certificate_maps 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_certificate_maps ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps({ 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_certificate_maps(::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps_client_stub.call_count + end + end + end + + def test_get_certificate_map + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::CertificateMap.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_map_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_certificate_map({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_certificate_map name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_certificate_map ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_certificate_map({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_certificate_map(::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_map_client_stub.call_count + end + end + end + + def test_create_certificate_map + # 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" + certificate_map_id = "hello world" + certificate_map = {} + + create_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_map_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_certificate_map parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_certificate_map ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_certificate_map(::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_map_client_stub.call_count + end + end + end + + def test_update_certificate_map + # 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. + certificate_map = {} + update_mask = {} + + update_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_certificate_map_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_certificate_map({ certificate_map: certificate_map, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_certificate_map certificate_map: certificate_map, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_certificate_map ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_certificate_map({ certificate_map: certificate_map, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_certificate_map(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_map_client_stub.call_count + end + end + end + + def test_delete_certificate_map + # 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_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_map_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_certificate_map({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_certificate_map name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_certificate_map ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_certificate_map({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_certificate_map(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_certificate_map_client_stub.call_count + end + end + end + + def test_list_certificate_map_entries + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse.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_certificate_map_entries_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificate_map_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_map_entries_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_certificate_map_entries({ 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_certificate_map_entries 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_certificate_map_entries ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries({ 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_certificate_map_entries(::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries_client_stub.call_count + end + end + end + + def test_get_certificate_map_entry + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::CertificateMapEntry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_map_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_certificate_map_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_certificate_map_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_certificate_map_entry ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_certificate_map_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_certificate_map_entry(::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_map_entry_client_stub.call_count + end + end + end + + def test_create_certificate_map_entry + # 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" + certificate_map_entry_id = "hello world" + certificate_map_entry = {} + + create_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_map_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_certificate_map_entry parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_certificate_map_entry ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_certificate_map_entry(::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_map_entry_client_stub.call_count + end + end + end + + def test_update_certificate_map_entry + # 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. + certificate_map_entry = {} + update_mask = {} + + update_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_certificate_map_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_certificate_map_entry({ certificate_map_entry: certificate_map_entry, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_certificate_map_entry certificate_map_entry: certificate_map_entry, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_certificate_map_entry ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_certificate_map_entry({ certificate_map_entry: certificate_map_entry, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_certificate_map_entry(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_certificate_map_entry_client_stub.call_count + end + end + end + + def test_delete_certificate_map_entry + # 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_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_map_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_certificate_map_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_certificate_map_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_certificate_map_entry ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_certificate_map_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_certificate_map_entry(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_certificate_map_entry_client_stub.call_count + end + end + end + + def test_list_dns_authorizations + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse.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_dns_authorizations_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_dns_authorizations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_dns_authorizations_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_dns_authorizations({ 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_dns_authorizations 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_dns_authorizations ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations({ 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_dns_authorizations(::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations_client_stub.call_count + end + end + end + + def test_get_dns_authorization + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::DnsAuthorization.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_dns_authorization_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dns_authorization({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dns_authorization name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dns_authorization ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dns_authorization({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dns_authorization(::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dns_authorization_client_stub.call_count + end + end + end + + def test_create_dns_authorization + # 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" + dns_authorization_id = "hello world" + dns_authorization = {} + + create_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_dns_authorization_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_dns_authorization parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_dns_authorization ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_dns_authorization(::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dns_authorization_client_stub.call_count + end + end + end + + def test_update_dns_authorization + # 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. + dns_authorization = {} + update_mask = {} + + update_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_dns_authorization_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_dns_authorization({ dns_authorization: dns_authorization, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_dns_authorization dns_authorization: dns_authorization, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_dns_authorization ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_dns_authorization({ dns_authorization: dns_authorization, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_dns_authorization(::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_dns_authorization_client_stub.call_count + end + end + end + + def test_delete_dns_authorization + # 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_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_dns_authorization_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_dns_authorization({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_dns_authorization name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_dns_authorization ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_dns_authorization({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_dns_authorization(::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_dns_authorization_client_stub.call_count + end + end + end + + def test_list_certificate_issuance_configs + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse.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_certificate_issuance_configs_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificate_issuance_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_certificate_issuance_configs_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_certificate_issuance_configs({ 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_certificate_issuance_configs 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_certificate_issuance_configs ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs({ 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_certificate_issuance_configs(::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs_client_stub.call_count + end + end + end + + def test_get_certificate_issuance_config + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_certificate_issuance_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_issuance_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_certificate_issuance_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_certificate_issuance_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_certificate_issuance_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_certificate_issuance_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_certificate_issuance_config_client_stub.call_count + end + end + end + + def test_create_certificate_issuance_config + # 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" + certificate_issuance_config_id = "hello world" + certificate_issuance_config = {} + + create_certificate_issuance_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_issuance_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_certificate_issuance_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_certificate_issuance_config parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_certificate_issuance_config_client_stub.call_count + end + end + end + + def test_delete_certificate_issuance_config + # 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_certificate_issuance_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_issuance_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_certificate_issuance_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_certificate_issuance_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_certificate_issuance_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_certificate_issuance_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_certificate_issuance_config_client_stub.call_count + end + end + end + + def test_list_trust_configs + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse.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_trust_configs_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_trust_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_trust_configs_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_trust_configs({ 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_trust_configs 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_trust_configs ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs({ 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_trust_configs(::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs_client_stub.call_count + end + end + end + + def test_get_trust_config + # Create test objects. + client_result = ::Google::Cloud::CertificateManager::V1::TrustConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_trust_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_trust_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_trust_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_trust_config ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_trust_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_trust_config(::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_trust_config_client_stub.call_count + end + end + end + + def test_create_trust_config + # 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" + trust_config_id = "hello world" + trust_config = {} + + create_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_trust_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_trust_config parent: parent, trust_config_id: trust_config_id, trust_config: trust_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_trust_config ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_trust_config(::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_trust_config_client_stub.call_count + end + end + end + + def test_update_trust_config + # 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. + trust_config = {} + update_mask = {} + + update_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_trust_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_trust_config({ trust_config: trust_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_trust_config trust_config: trust_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_trust_config ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_trust_config({ trust_config: trust_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_trust_config(::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_trust_config_client_stub.call_count + end + end + end + + def test_delete_trust_config + # 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" + etag = "hello world" + + delete_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_trust_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_trust_config({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_trust_config name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_trust_config ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_trust_config({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_trust_config(::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_trust_config_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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb new file mode 100644 index 000000000000..5f5039354e80 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb @@ -0,0 +1,1999 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/certificatemanager/v1/certificate_manager_pb" +require "google/cloud/certificate_manager/v1/certificate_manager" + +class ::Google::Cloud::CertificateManager::V1::CertificateManager::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_certificates + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse.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_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificates, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, 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_certificates_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_certificates({ 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_certificates 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_certificates ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates({ 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_certificates(::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates_client_stub.call_rpc_count + end + end + + def test_get_certificate + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::Certificate.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_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_certificate({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_certificate name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_certificate ::Google::Cloud::CertificateManager::V1::GetCertificateRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_certificate({ 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_certificate(::Google::Cloud::CertificateManager::V1::GetCertificateRequest.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_certificate_client_stub.call_rpc_count + end + end + + def test_create_certificate + # 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" + certificate_id = "hello world" + certificate = {} + + create_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::Certificate), request["certificate"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }) 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_certificate parent: parent, certificate_id: certificate_id, certificate: certificate 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_certificate ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate) 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_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }, 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_certificate(::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate), 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_certificate_client_stub.call_rpc_count + end + end + + def test_update_certificate + # 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. + certificate = {} + update_mask = {} + + update_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::Certificate), request["certificate"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_certificate({ certificate: certificate, 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_certificate certificate: certificate, 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_certificate ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, 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_certificate({ certificate: certificate, 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_certificate(::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, 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_certificate_client_stub.call_rpc_count + end + end + + def test_delete_certificate + # 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_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_certificate, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_certificate_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_certificate({ 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_certificate 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_certificate ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.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_certificate({ 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_certificate(::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.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_certificate_client_stub.call_rpc_count + end + end + + def test_list_certificate_maps + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse.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_certificate_maps_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_maps, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, 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_certificate_maps_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_certificate_maps({ 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_certificate_maps 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_certificate_maps ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps({ 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_certificate_maps(::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps_client_stub.call_rpc_count + end + end + + def test_get_certificate_map + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::CertificateMap.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_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_map, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_certificate_map({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_certificate_map name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_certificate_map ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_certificate_map({ 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_certificate_map(::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.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_certificate_map_client_stub.call_rpc_count + end + end + + def test_create_certificate_map + # 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" + certificate_map_id = "hello world" + certificate_map = {} + + create_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate_map, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_map_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMap), request["certificate_map"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }) 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_certificate_map parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map 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_certificate_map ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map) 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_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }, 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_certificate_map(::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map), 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_certificate_map_client_stub.call_rpc_count + end + end + + def test_update_certificate_map + # 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. + certificate_map = {} + update_mask = {} + + update_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate_map, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMap), request["certificate_map"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_certificate_map({ certificate_map: certificate_map, 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_certificate_map certificate_map: certificate_map, 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_certificate_map ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, 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_certificate_map({ certificate_map: certificate_map, 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_certificate_map(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, 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_certificate_map_client_stub.call_rpc_count + end + end + + def test_delete_certificate_map + # 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_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_certificate_map, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_certificate_map_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_certificate_map({ 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_certificate_map 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_certificate_map ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.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_certificate_map({ 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_certificate_map(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.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_certificate_map_client_stub.call_rpc_count + end + end + + def test_list_certificate_map_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse.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_certificate_map_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_map_entries, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, 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_certificate_map_entries_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_certificate_map_entries({ 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_certificate_map_entries 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_certificate_map_entries ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries({ 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_certificate_map_entries(::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries_client_stub.call_rpc_count + end + end + + def test_get_certificate_map_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::CertificateMapEntry.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_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_map_entry, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_certificate_map_entry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_certificate_map_entry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_certificate_map_entry ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_certificate_map_entry({ 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.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_certificate_map_entry_client_stub.call_rpc_count + end + end + + def test_create_certificate_map_entry + # 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" + certificate_map_entry_id = "hello world" + certificate_map_entry = {} + + create_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate_map_entry, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_map_entry_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMapEntry), request["certificate_map_entry"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }) 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_certificate_map_entry parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry 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_certificate_map_entry ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry) 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_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }, 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry), 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_certificate_map_entry_client_stub.call_rpc_count + end + end + + def test_update_certificate_map_entry + # 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. + certificate_map_entry = {} + update_mask = {} + + update_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_certificate_map_entry, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMapEntry), request["certificate_map_entry"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_certificate_map_entry({ certificate_map_entry: certificate_map_entry, 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_certificate_map_entry certificate_map_entry: certificate_map_entry, 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_certificate_map_entry ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, 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_certificate_map_entry({ certificate_map_entry: certificate_map_entry, 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, 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_certificate_map_entry_client_stub.call_rpc_count + end + end + + def test_delete_certificate_map_entry + # 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_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_certificate_map_entry, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_certificate_map_entry_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_certificate_map_entry({ 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_certificate_map_entry 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_certificate_map_entry ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.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_certificate_map_entry({ 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.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_certificate_map_entry_client_stub.call_rpc_count + end + end + + def test_list_dns_authorizations + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse.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_dns_authorizations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_dns_authorizations, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, 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_dns_authorizations_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_dns_authorizations({ 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_dns_authorizations 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_dns_authorizations ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations({ 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_dns_authorizations(::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations_client_stub.call_rpc_count + end + end + + def test_get_dns_authorization + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::DnsAuthorization.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_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dns_authorization, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dns_authorization({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dns_authorization name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dns_authorization ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dns_authorization({ 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_dns_authorization(::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.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_dns_authorization_client_stub.call_rpc_count + end + end + + def test_create_dns_authorization + # 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" + dns_authorization_id = "hello world" + dns_authorization = {} + + create_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dns_authorization, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["dns_authorization_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::DnsAuthorization), request["dns_authorization"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }) 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_dns_authorization parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization 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_dns_authorization ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization) 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_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }, 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_dns_authorization(::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization), 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_dns_authorization_client_stub.call_rpc_count + end + end + + def test_update_dns_authorization + # 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. + dns_authorization = {} + update_mask = {} + + update_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_dns_authorization, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::DnsAuthorization), request["dns_authorization"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_dns_authorization({ dns_authorization: dns_authorization, 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_dns_authorization dns_authorization: dns_authorization, 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_dns_authorization ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, 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_dns_authorization({ dns_authorization: dns_authorization, 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_dns_authorization(::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, 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_dns_authorization_client_stub.call_rpc_count + end + end + + def test_delete_dns_authorization + # 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_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dns_authorization, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dns_authorization_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_dns_authorization({ 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_dns_authorization 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_dns_authorization ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.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_dns_authorization({ 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_dns_authorization(::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.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_dns_authorization_client_stub.call_rpc_count + end + end + + def test_list_certificate_issuance_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse.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_certificate_issuance_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_certificate_issuance_configs, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, 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_certificate_issuance_configs_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_certificate_issuance_configs({ 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_certificate_issuance_configs 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_certificate_issuance_configs ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs({ 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_certificate_issuance_configs(::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs_client_stub.call_rpc_count + end + end + + def test_get_certificate_issuance_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.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_certificate_issuance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_certificate_issuance_config, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_certificate_issuance_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_certificate_issuance_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_certificate_issuance_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_certificate_issuance_config({ 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_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.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_certificate_issuance_config_client_stub.call_rpc_count + end + end + + def test_create_certificate_issuance_config + # 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" + certificate_issuance_config_id = "hello world" + certificate_issuance_config = {} + + create_certificate_issuance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_certificate_issuance_config, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["certificate_issuance_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig), request["certificate_issuance_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_certificate_issuance_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }) 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_certificate_issuance_config parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config 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_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config) 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_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }, 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_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config), 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_certificate_issuance_config_client_stub.call_rpc_count + end + end + + def test_delete_certificate_issuance_config + # 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_certificate_issuance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_certificate_issuance_config, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_certificate_issuance_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_certificate_issuance_config({ 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_certificate_issuance_config 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_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.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_certificate_issuance_config({ 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_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.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_certificate_issuance_config_client_stub.call_rpc_count + end + end + + def test_list_trust_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse.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_trust_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_trust_configs, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, 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_trust_configs_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_trust_configs({ 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_trust_configs 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_trust_configs ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs({ 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_trust_configs(::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs_client_stub.call_rpc_count + end + end + + def test_get_trust_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::CertificateManager::V1::TrustConfig.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_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_trust_config, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_trust_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_trust_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_trust_config ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_trust_config({ 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_trust_config(::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.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_trust_config_client_stub.call_rpc_count + end + end + + def test_create_trust_config + # 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" + trust_config_id = "hello world" + trust_config = {} + + create_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_trust_config, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["trust_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::TrustConfig), request["trust_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }) 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_trust_config parent: parent, trust_config_id: trust_config_id, trust_config: trust_config 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_trust_config ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config) 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_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }, 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_trust_config(::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config), 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_trust_config_client_stub.call_rpc_count + end + end + + def test_update_trust_config + # 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. + trust_config = {} + update_mask = {} + + update_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_trust_config, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::TrustConfig), request["trust_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_trust_config({ trust_config: trust_config, 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_trust_config trust_config: trust_config, 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_trust_config ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, 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_trust_config({ trust_config: trust_config, 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_trust_config(::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, 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_trust_config_client_stub.call_rpc_count + end + end + + def test_delete_trust_config + # 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" + etag = "hello world" + + delete_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_trust_config, name + assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_trust_config_client_stub do + # Create client + client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_trust_config({ name: name, etag: etag }) 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_trust_config name: name, etag: etag 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_trust_config ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag) 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_trust_config({ name: name, etag: etag }, 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_trust_config(::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag), 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_trust_config_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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::CertificateManager::V1::CertificateManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json new file mode 100644 index 000000000000..aa41429c48f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "chronicle.googleapis.com", + "api_shortname": "chronicle", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest", + "distribution_name": "google-cloud-chronicle-v1", + "is_cloud": true, + "language": "ruby", + "name": "chronicle", + "name_pretty": "Chronicle V1 API", + "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/chronicle/docs/secops/secops-overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml new file mode 100644 index 000000000000..247c818fc834 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-chronicle-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-chronicle-v1.rb" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/.yardopts b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts new file mode 100644 index 000000000000..279160678357 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Chronicle 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-chronicle-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..2b6138fc6b12 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-chronicle-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-chronicle-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/chronicle/v1" + +client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/chronicle/v1" + +::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::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-chronicle-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/chronicle/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::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-chronicle-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/README.md b/owl-bot-staging/google-cloud-chronicle-v1/README.md new file mode 100644 index 000000000000..0020c37e4f88 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Chronicle V1 API + +The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. + +The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Chronicle V1 API. Most users should consider using +the main client gem, +[google-cloud-chronicle](https://rubygems.org/gems/google-cloud-chronicle). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-chronicle-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/chronicle.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/chronicle/v1" + +client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new +request = ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new # (request fields as keyword arguments...) +response = client.create_data_access_label request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/chronicle/docs/secops/secops-overview) +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/chronicle/v1" +require "logger" + +client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::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-chronicle`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-chronicle-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-chronicle`. +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-chronicle-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-chronicle-v1/Rakefile b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile new file mode 100644 index 000000000000..1ec0994ae807 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/chronicle/v1/data_access_control_service/credentials" + ::Google::Cloud::Chronicle::V1::DataAccessControlService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-chronicle-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-chronicle-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-chronicle-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-chronicle-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-chronicle-v1" + header "google-cloud-chronicle-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-chronicle-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-chronicle-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-chronicle-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-chronicle-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-chronicle-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json new file mode 100644 index 000000000000..5ee0ce216af9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json @@ -0,0 +1,214 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.chronicle.v1", + "libraryPackage": "::Google::Cloud::Chronicle::V1", + "services": { + "DataAccessControlService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client", + "rpcs": { + "CreateDataAccessLabel": { + "methods": [ + "create_data_access_label" + ] + }, + "GetDataAccessLabel": { + "methods": [ + "get_data_access_label" + ] + }, + "ListDataAccessLabels": { + "methods": [ + "list_data_access_labels" + ] + }, + "UpdateDataAccessLabel": { + "methods": [ + "update_data_access_label" + ] + }, + "DeleteDataAccessLabel": { + "methods": [ + "delete_data_access_label" + ] + }, + "CreateDataAccessScope": { + "methods": [ + "create_data_access_scope" + ] + }, + "GetDataAccessScope": { + "methods": [ + "get_data_access_scope" + ] + }, + "ListDataAccessScopes": { + "methods": [ + "list_data_access_scopes" + ] + }, + "UpdateDataAccessScope": { + "methods": [ + "update_data_access_scope" + ] + }, + "DeleteDataAccessScope": { + "methods": [ + "delete_data_access_scope" + ] + } + } + } + } + }, + "EntityService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::EntityService::Client", + "rpcs": { + "GetWatchlist": { + "methods": [ + "get_watchlist" + ] + }, + "ListWatchlists": { + "methods": [ + "list_watchlists" + ] + }, + "CreateWatchlist": { + "methods": [ + "create_watchlist" + ] + }, + "UpdateWatchlist": { + "methods": [ + "update_watchlist" + ] + }, + "DeleteWatchlist": { + "methods": [ + "delete_watchlist" + ] + } + } + } + } + }, + "InstanceService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::InstanceService::Client", + "rpcs": { + "GetInstance": { + "methods": [ + "get_instance" + ] + } + } + } + } + }, + "ReferenceListService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client", + "rpcs": { + "GetReferenceList": { + "methods": [ + "get_reference_list" + ] + }, + "ListReferenceLists": { + "methods": [ + "list_reference_lists" + ] + }, + "CreateReferenceList": { + "methods": [ + "create_reference_list" + ] + }, + "UpdateReferenceList": { + "methods": [ + "update_reference_list" + ] + } + } + } + } + }, + "RuleService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Chronicle::V1::RuleService::Client", + "rpcs": { + "CreateRule": { + "methods": [ + "create_rule" + ] + }, + "GetRule": { + "methods": [ + "get_rule" + ] + }, + "ListRules": { + "methods": [ + "list_rules" + ] + }, + "UpdateRule": { + "methods": [ + "update_rule" + ] + }, + "DeleteRule": { + "methods": [ + "delete_rule" + ] + }, + "ListRuleRevisions": { + "methods": [ + "list_rule_revisions" + ] + }, + "CreateRetrohunt": { + "methods": [ + "create_retrohunt" + ] + }, + "GetRetrohunt": { + "methods": [ + "get_retrohunt" + ] + }, + "ListRetrohunts": { + "methods": [ + "list_retrohunts" + ] + }, + "GetRuleDeployment": { + "methods": [ + "get_rule_deployment" + ] + }, + "ListRuleDeployments": { + "methods": [ + "list_rule_deployments" + ] + }, + "UpdateRuleDeployment": { + "methods": [ + "update_rule_deployment" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec new file mode 100644 index 000000000000..d2af296cfe16 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/chronicle/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-chronicle-v1" + gem.version = Google::Cloud::Chronicle::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details." + gem.summary = "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb new file mode 100644 index 000000000000..8d5cd2a8ddb3 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-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/chronicle/v1" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb new file mode 100644 index 000000000000..3eb05282e5da --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/data_access_control_service" +require "google/cloud/chronicle/v1/entity_service" +require "google/cloud/chronicle/v1/instance_service" +require "google/cloud/chronicle/v1/reference_list_service" +require "google/cloud/chronicle/v1/rule_service" +require "google/cloud/chronicle/v1/version" + +module Google + module Cloud + module Chronicle + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/chronicle/v1" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/chronicle/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb new file mode 100644 index 000000000000..cc6fd584534a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/data_access_control.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x01\n\x1c\x43reateDataAccessLabelRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\n\x11\x64\x61ta_access_label\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_label_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\x9b\x01\n\x1bListDataAccessLabelsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1cListDataAccessLabelsResponse\x12\x46\n\x12\x64\x61ta_access_labels\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x1cUpdateDataAccessLabelRequest\x12J\n\x11\x64\x61ta_access_label\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\xcf\x01\n\x1c\x43reateDataAccessScopeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12J\n\x11\x64\x61ta_access_scope\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_scope_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x9b\x01\n\x1bListDataAccessScopesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x1cListDataAccessScopesResponse\x12\x46\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScope\x12-\n global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB#\n!_global_data_access_scope_granted\"\x9b\x01\n\x1cUpdateDataAccessScopeRequest\x12J\n\x11\x64\x61ta_access_scope\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\xd5\x03\n\x0f\x44\x61taAccessLabel\x12\x13\n\tudm_query\x18\x03 \x01(\tH\x00\x12;\n\x04name\x18\x01 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessLabel\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0c\n\ndefinition\"\x88\x05\n\x0f\x44\x61taAccessScope\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12\\\n\x1a\x61llowed_data_access_labels\x18\x02 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12[\n\x19\x64\x65nied_data_access_labels\x18\x03 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \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\x13\n\x06\x61uthor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tallow_all\x18\n \x01(\x08\x42\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessScope\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xd0\x01\n\x18\x44\x61taAccessLabelReference\x12\x1b\n\x11\x64\x61ta_access_label\x18\x01 \x01(\tH\x00\x12\x12\n\x08log_type\x18\x02 \x01(\tH\x00\x12\x19\n\x0f\x61sset_namespace\x18\x03 \x01(\tH\x00\x12\x44\n\x0fingestion_label\x18\x04 \x01(\x0b\x32).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x42\x07\n\x05label\"V\n\x0eIngestionLabel\x12 \n\x13ingestion_label_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15ingestion_label_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xe6\x12\n\x18\x44\x61taAccessControlService\x12\x8a\x02\n\x15\x43reateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8b\x01\xda\x41-parent,data_access_label,data_access_label_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11\x64\x61ta_access_label\x12\xc7\x01\n\x12GetDataAccessLabel\x12\x34.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xda\x01\n\x14ListDataAccessLabels\x12\x36.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8c\x02\n\x15UpdateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_label,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11\x64\x61ta_access_label\x12\xb9\x01\n\x15\x44\x65leteDataAccessLabel\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8a\x02\n\x15\x43reateDataAccessScope\x12\x37.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8b\x01\xda\x41-parent,data_access_scope,data_access_scope_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11\x64\x61ta_access_scope\x12\xc7\x01\n\x12GetDataAccessScope\x12\x34.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xda\x01\n\x14ListDataAccessScopes\x12\x36.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8c\x02\n\x15UpdateDataAccessScope\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_scope,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11\x64\x61ta_access_scope\x12\xb9\x01\n\x15\x44\x65leteDataAccessScope\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0f\x44\x61taAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + CreateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessLabelRequest").msgclass + GetDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessLabelRequest").msgclass + ListDataAccessLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsRequest").msgclass + ListDataAccessLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsResponse").msgclass + UpdateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessLabelRequest").msgclass + DeleteDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessLabelRequest").msgclass + CreateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessScopeRequest").msgclass + GetDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessScopeRequest").msgclass + ListDataAccessScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesRequest").msgclass + ListDataAccessScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesResponse").msgclass + UpdateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessScopeRequest").msgclass + DeleteDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessScopeRequest").msgclass + DataAccessLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabel").msgclass + DataAccessScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessScope").msgclass + DataAccessLabelReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabelReference").msgclass + IngestionLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.IngestionLabel").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb new file mode 100644 index 000000000000..7001b817d96a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_access_control_service/credentials" +require "google/cloud/chronicle/v1/data_access_control_service/paths" +require "google/cloud/chronicle/v1/data_access_control_service/client" +require "google/cloud/chronicle/v1/data_access_control_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/data_access_control_service" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/data_access_control_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module DataAccessControlService + end + end + end + end +end + +helper_path = ::File.join __dir__, "data_access_control_service", "helpers.rb" +require "google/cloud/chronicle/v1/data_access_control_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb new file mode 100644 index 000000000000..06ae3041cf1e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb @@ -0,0 +1,1431 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/data_access_control_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + ## + # Client for the DataAccessControlService service. + # + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_access_control_service_stub + + ## + # Configure the DataAccessControlService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAccessControlService clients + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_data_access_label.timeout = 60.0 + + default_config.rpcs.get_data_access_label.timeout = 60.0 + default_config.rpcs.get_data_access_label.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_labels.timeout = 60.0 + default_config.rpcs.list_data_access_labels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_label.timeout = 60.0 + + default_config.rpcs.delete_data_access_label.timeout = 60.0 + + default_config.rpcs.create_data_access_scope.timeout = 60.0 + + default_config.rpcs.get_data_access_scope.timeout = 60.0 + default_config.rpcs.get_data_access_scope.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_scopes.timeout = 60.0 + default_config.rpcs.list_data_access_scopes.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_scope.timeout = 60.0 + + default_config.rpcs.delete_data_access_scope.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 + @data_access_control_service_stub.universe_domain + end + + ## + # Create a new DataAccessControlService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAccessControlService 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/chronicle/v1/data_access_control_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 + + @data_access_control_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::DataAccessControlService::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 + ) + + @data_access_control_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_access_control_service_stub.logger + end + + # Service calls + + ## + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + # + # @overload create_data_access_label(request, options = nil) + # Pass arguments to `create_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) + # Pass arguments to `create_data_access_label` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. Data access label to create. + # @param data_access_label_id [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + # + # # Call the create_data_access_label method. + # result = client.create_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def create_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :create_data_access_label, 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 a data access label. + # + # @overload get_data_access_label(request, options = nil) + # Pass arguments to `get_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(name: nil) + # Pass arguments to `get_data_access_label` via keyword arguments. Note that at + # least one keyword argument is 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 ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + # + # # Call the get_data_access_label method. + # result = client.get_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def get_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :get_data_access_label, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all data access labels for the customer. + # + # @overload list_data_access_labels(request, options = nil) + # Pass arguments to `list_data_access_labels` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_labels` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + # + # # Call the list_data_access_labels method. + # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + # p item + # end + # + def list_data_access_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest + + # Converts hash 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_data_access_labels.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::Chronicle::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_data_access_labels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_access_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :list_data_access_labels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, 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 + + ## + # Updates a data access label. + # + # @overload update_data_access_label(request, options = nil) + # Pass arguments to `update_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(data_access_label: nil, update_mask: nil) + # Pass arguments to `update_data_access_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + # + # # Call the update_data_access_label method. + # result = client.update_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def update_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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.data_access_label&.name + header_params["data_access_label.name"] = request.data_access_label.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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :update_data_access_label, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + # + # @overload delete_data_access_label(request, options = nil) + # Pass arguments to `delete_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(name: nil) + # Pass arguments to `delete_data_access_label` via keyword arguments. Note that at + # least one keyword argument is 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 ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + # + # # Call the delete_data_access_label method. + # result = client.delete_data_access_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :delete_data_access_label, 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 data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + # + # @overload create_data_access_scope(request, options = nil) + # Pass arguments to `create_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) + # Pass arguments to `create_data_access_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 resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. Data access scope to create. + # @param data_access_scope_id [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + # + # # Call the create_data_access_scope method. + # result = client.create_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def create_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :create_data_access_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 + + ## + # Retrieves an existing data access scope. + # + # @overload get_data_access_scope(request, options = nil) + # Pass arguments to `get_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) + # Pass arguments to `get_data_access_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 ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + # + # # Call the get_data_access_scope method. + # result = client.get_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def get_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :get_data_access_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 + + ## + # Lists all existing data access scopes for the customer. + # + # @overload list_data_access_scopes(request, options = nil) + # Pass arguments to `list_data_access_scopes` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_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 resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + # + # # Call the list_data_access_scopes method. + # result = client.list_data_access_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::Chronicle::V1::DataAccessScope. + # p item + # end + # + def list_data_access_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scopes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_data_access_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :list_data_access_scopes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_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 + + ## + # Updates a data access scope. + # + # @overload update_data_access_scope(request, options = nil) + # Pass arguments to `update_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(data_access_scope: nil, update_mask: nil) + # Pass arguments to `update_data_access_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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + # + # # Call the update_data_access_scope method. + # result = client.update_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def update_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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.data_access_scope&.name + header_params["data_access_scope.name"] = request.data_access_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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :update_data_access_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 + + ## + # Deletes a data access scope. + # + # @overload delete_data_access_scope(request, options = nil) + # Pass arguments to `delete_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) + # Pass arguments to `delete_data_access_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 ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + # + # # Call the delete_data_access_scope method. + # result = client.delete_data_access_scope request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.call_rpc :delete_data_access_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 + + ## + # Configuration class for the DataAccessControlService API. + # + # This class represents the configuration for DataAccessControlService, + # 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::Chronicle::V1::DataAccessControlService::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 + # # create_data_access_label to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.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::Chronicle::V1::DataAccessControlService::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 = "chronicle.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 DataAccessControlService 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 `create_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_label + ## + # RPC-specific configuration for `get_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_label + ## + # RPC-specific configuration for `list_data_access_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_labels + ## + # RPC-specific configuration for `update_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_label + ## + # RPC-specific configuration for `delete_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_label + ## + # RPC-specific configuration for `create_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_scope + ## + # RPC-specific configuration for `get_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_scope + ## + # RPC-specific configuration for `list_data_access_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_scopes + ## + # RPC-specific configuration for `update_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_scope + ## + # RPC-specific configuration for `delete_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_scope + + # @private + def initialize parent_rpcs = nil + create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label + @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config + get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label + @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config + list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels + @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config + update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label + @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config + delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label + @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config + create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope + @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config + get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope + @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config + list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes + @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config + update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope + @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config + delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope + @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb new file mode 100644 index 000000000000..2e86b999c1a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + # Credentials for the DataAccessControlService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb new file mode 100644 index 000000000000..f3ec957a19df --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + module DataAccessControlService + # Path helper methods for the DataAccessControlService API. + module Paths + ## + # Create a fully-qualified DataAccessLabel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_label [String] + # + # @return [::String] + def data_access_label_path project:, location:, instance:, data_access_label: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessLabels/#{data_access_label}" + end + + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb new file mode 100644 index 000000000000..e93f75e06d2d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/chronicle/v1/version" + +require "google/cloud/chronicle/v1/data_access_control_service/credentials" +require "google/cloud/chronicle/v1/data_access_control_service/paths" +require "google/cloud/chronicle/v1/data_access_control_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/data_access_control_service/rest" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module DataAccessControlService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/data_access_control_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb new file mode 100644 index 000000000000..88d1752de0f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb @@ -0,0 +1,1318 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + module Rest + ## + # REST client for the DataAccessControlService service. + # + # DataAccessControlService exposes resources and endpoints related to data + # access control. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :data_access_control_service_stub + + ## + # Configure the DataAccessControlService Client class. + # + # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all DataAccessControlService clients + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_data_access_label.timeout = 60.0 + + default_config.rpcs.get_data_access_label.timeout = 60.0 + default_config.rpcs.get_data_access_label.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_labels.timeout = 60.0 + default_config.rpcs.list_data_access_labels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_label.timeout = 60.0 + + default_config.rpcs.delete_data_access_label.timeout = 60.0 + + default_config.rpcs.create_data_access_scope.timeout = 60.0 + + default_config.rpcs.get_data_access_scope.timeout = 60.0 + default_config.rpcs.get_data_access_scope.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_data_access_scopes.timeout = 60.0 + default_config.rpcs.list_data_access_scopes.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_data_access_scope.timeout = 60.0 + + default_config.rpcs.delete_data_access_scope.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 + @data_access_control_service_stub.universe_domain + end + + ## + # Create a new DataAccessControlService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the DataAccessControlService 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 + + @data_access_control_service_stub = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @data_access_control_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @data_access_control_service_stub.logger + end + + # Service calls + + ## + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + # + # @overload create_data_access_label(request, options = nil) + # Pass arguments to `create_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) + # Pass arguments to `create_data_access_label` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. Data access label to create. + # @param data_access_label_id [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + # + # # Call the create_data_access_label method. + # result = client.create_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def create_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.create_data_access_label 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 a data access label. + # + # @overload get_data_access_label(request, options = nil) + # Pass arguments to `get_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(name: nil) + # Pass arguments to `get_data_access_label` via keyword arguments. Note that at + # least one keyword argument is 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 ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + # + # # Call the get_data_access_label method. + # result = client.get_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def get_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.get_data_access_label request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all data access labels for the customer. + # + # @overload list_data_access_labels(request, options = nil) + # Pass arguments to `list_data_access_labels` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_labels` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + # + # # Call the list_data_access_labels method. + # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + # p item + # end + # + def list_data_access_labels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest + + # Converts hash 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_data_access_labels.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::Chronicle::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_data_access_labels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_access_labels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.list_data_access_labels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, "data_access_labels", 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 + + ## + # Updates a data access label. + # + # @overload update_data_access_label(request, options = nil) + # Pass arguments to `update_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(data_access_label: nil, update_mask: nil) + # Pass arguments to `update_data_access_label` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + # + # # Call the update_data_access_label method. + # result = client.update_data_access_label request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + # p result + # + def update_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.update_data_access_label request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + # + # @overload delete_data_access_label(request, options = nil) + # Pass arguments to `delete_data_access_label` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_label(name: nil) + # Pass arguments to `delete_data_access_label` via keyword arguments. Note that at + # least one keyword argument is 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 ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + # + # # Call the delete_data_access_label method. + # result = client.delete_data_access_label request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_label request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest + + # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_access_label.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.delete_data_access_label 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 data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + # + # @overload create_data_access_scope(request, options = nil) + # Pass arguments to `create_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) + # Pass arguments to `create_data_access_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 resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. Data access scope to create. + # @param data_access_scope_id [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + # + # # Call the create_data_access_scope method. + # result = client.create_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def create_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.create_data_access_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 + + ## + # Retrieves an existing data access scope. + # + # @overload get_data_access_scope(request, options = nil) + # Pass arguments to `get_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) + # Pass arguments to `get_data_access_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 ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + # + # # Call the get_data_access_scope method. + # result = client.get_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def get_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.get_data_access_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 + + ## + # Lists all existing data access scopes for the customer. + # + # @overload list_data_access_scopes(request, options = nil) + # Pass arguments to `list_data_access_scopes` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_data_access_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 resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + # + # # Call the list_data_access_scopes method. + # result = client.list_data_access_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::Chronicle::V1::DataAccessScope. + # p item + # end + # + def list_data_access_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scopes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_data_access_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.list_data_access_scopes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, "data_access_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 + + ## + # Updates a data access scope. + # + # @overload update_data_access_scope(request, options = nil) + # Pass arguments to `update_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(data_access_scope: nil, update_mask: nil) + # Pass arguments to `update_data_access_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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + # + # # Call the update_data_access_scope method. + # result = client.update_data_access_scope request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + # p result + # + def update_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.update_data_access_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 + + ## + # Deletes a data access scope. + # + # @overload delete_data_access_scope(request, options = nil) + # Pass arguments to `delete_data_access_scope` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) + # Pass arguments to `delete_data_access_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 ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + # + # # Call the delete_data_access_scope method. + # result = client.delete_data_access_scope request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_data_access_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest + + # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_data_access_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @data_access_control_service_stub.delete_data_access_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 + + ## + # Configuration class for the DataAccessControlService REST API. + # + # This class represents the configuration for DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 + # # create_data_access_label to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_data_access_label.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 = "chronicle.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 DataAccessControlService 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 `create_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_label + ## + # RPC-specific configuration for `get_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_label + ## + # RPC-specific configuration for `list_data_access_labels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_labels + ## + # RPC-specific configuration for `update_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_label + ## + # RPC-specific configuration for `delete_data_access_label` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_label + ## + # RPC-specific configuration for `create_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_data_access_scope + ## + # RPC-specific configuration for `get_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_data_access_scope + ## + # RPC-specific configuration for `list_data_access_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_data_access_scopes + ## + # RPC-specific configuration for `update_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_data_access_scope + ## + # RPC-specific configuration for `delete_data_access_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_data_access_scope + + # @private + def initialize parent_rpcs = nil + create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label + @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config + get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label + @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config + list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels + @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config + update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label + @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config + delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label + @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config + create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope + @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config + get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope + @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config + list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes + @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config + update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope + @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config + delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope + @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb new file mode 100644 index 000000000000..c11b9f42da29 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb @@ -0,0 +1,695 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/data_access_control_pb" + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + module Rest + ## + # REST service stub for the DataAccessControlService 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 create_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def create_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def get_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_labels REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] + # 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::Chronicle::V1::ListDataAccessLabelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse] + # A result object deserialized from the server's reply + def list_data_access_labels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_labels_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_data_access_labels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] + # 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::Chronicle::V1::DataAccessLabel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # A result object deserialized from the server's reply + def update_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_label_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_data_access_label", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] + # 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_data_access_label request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_label_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_data_access_label", + 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 create_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def create_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def get_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scopes REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] + # 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::Chronicle::V1::ListDataAccessScopesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse] + # A result object deserialized from the server's reply + def list_data_access_scopes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_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_data_access_scopes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] + # 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::Chronicle::V1::DataAccessScope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # A result object deserialized from the server's reply + def update_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_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_data_access_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] + # 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_data_access_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_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_data_access_scope", + 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 create_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAccessLabels", + body: "data_access_label", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_access_labels REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] + # 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_data_access_labels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAccessLabels", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_access_label.name}", + body: "data_access_label", + matches: [ + ["data_access_label.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_access_label REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] + # 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_data_access_label_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/dataAccessScopes", + body: "data_access_scope", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_data_access_scopes REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] + # 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_data_access_scopes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/dataAccessScopes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{data_access_scope.name}", + body: "data_access_scope", + matches: [ + ["data_access_scope.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_data_access_scope REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] + # 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_data_access_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb new file mode 100644 index 000000000000..0ef90feac2fc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb @@ -0,0 +1,76 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/data_access_control.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/chronicle/v1/data_access_control_pb' + +module Google + module Cloud + module Chronicle + module V1 + module DataAccessControlService + # DataAccessControlService exposes resources and endpoints related to data + # access control. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.DataAccessControlService' + + # Creates a data access label. + # Data access labels are applied to incoming event data and selected in data + # access scopes (another resource), and only users with scopes containing the + # label can see data with that label. Currently, the data access label + # resource only includes custom labels, which are labels that correspond + # to UDM queries over event data. + rpc :CreateDataAccessLabel, ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Gets a data access label. + rpc :GetDataAccessLabel, ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Lists all data access labels for the customer. + rpc :ListDataAccessLabels, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse + # Updates a data access label. + rpc :UpdateDataAccessLabel, ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel + # Deletes a data access label. When a label is deleted, new + # data that enters in the system will not receive the label, but the label + # will not be removed from old data that still refers to it. + rpc :DeleteDataAccessLabel, ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Google::Protobuf::Empty + # Creates a data access scope. + # Data access scope is a combination of allowed and denied labels attached + # to a permission group. If a scope has allowed labels A and B and denied + # labels C and D, then the group of people attached to the scope + # will have permissions to see all events labeled with A or B (or both) and + # not labeled with either C or D. + rpc :CreateDataAccessScope, ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Retrieves an existing data access scope. + rpc :GetDataAccessScope, ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Lists all existing data access scopes for the customer. + rpc :ListDataAccessScopes, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse + # Updates a data access scope. + rpc :UpdateDataAccessScope, ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope + # Deletes a data access scope. + rpc :DeleteDataAccessScope, ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb new file mode 100644 index 000000000000..80fdf542b870 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/entity.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/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x06\n\tWatchlist\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12multiplying_factor\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12h\n\x1b\x65ntity_population_mechanism\x18\x06 \x01(\x0b\x32>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xe0\x41\x02\x12K\n\x0c\x65ntity_count\x18\x07 \x01(\x0b\x32\x30.google.cloud.chronicle.v1.Watchlist.EntityCountB\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\\\n\x1awatchlist_user_preferences\x18\n \x01(\x0b\x32\x33.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xe0\x41\x01\x1a\x90\x01\n\x19\x45ntityPopulationMechanism\x12\\\n\x06manual\x18\x01 \x01(\x0b\x32\x45.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xe0\x41\x01H\x00\x1a\x08\n\x06ManualB\x0b\n\tmechanism\x1a\x34\n\x0b\x45ntityCount\x12\x11\n\x04user\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x12\n\x05\x61sset\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03:\x94\x01\xea\x41\x90\x01\n\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\nwatchlists2\twatchlist\"/\n\x18WatchlistUserPreferences\x12\x13\n\x06pinned\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x13GetWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\"\x99\x01\n\x15ListWatchlistsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\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\"u\n\x16ListWatchlistsResponse\x12=\n\nwatchlists\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\x16\x43reateWatchlistRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\n\x0cwatchlist_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\twatchlist\x18\x03 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdateWatchlistRequest\x12<\n\twatchlist\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbe\x08\n\rEntityService\x12\xaf\x01\n\x0cGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xc2\x01\n\x0eListWatchlists\x12\x30.google.cloud.chronicle.v1.ListWatchlistsRequest\x1a\x31.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xd9\x01\n\x0f\x43reateWatchlist\x12\x31.google.cloud.chronicle.v1.CreateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"m\xda\x41\x1dparent,watchlist,watchlist_id\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\twatchlist\x12\xdb\x01\n\x0fUpdateWatchlist\x12\x31.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"o\xda\x41\x15watchlist,update_mask\x82\xd3\xe4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\twatchlist\x12\xad\x01\n\x0f\x44\x65leteWatchlist\x12\x31.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc2\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0b\x45ntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + Watchlist = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist").msgclass + Watchlist::EntityPopulationMechanism = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism").msgclass + Watchlist::EntityPopulationMechanism::Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual").msgclass + Watchlist::EntityCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityCount").msgclass + WatchlistUserPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.WatchlistUserPreferences").msgclass + GetWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetWatchlistRequest").msgclass + ListWatchlistsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsRequest").msgclass + ListWatchlistsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsResponse").msgclass + CreateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateWatchlistRequest").msgclass + UpdateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateWatchlistRequest").msgclass + DeleteWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteWatchlistRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb new file mode 100644 index 000000000000..5dd703d38f49 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/chronicle/v1/version" + +require "google/cloud/chronicle/v1/entity_service/credentials" +require "google/cloud/chronicle/v1/entity_service/paths" +require "google/cloud/chronicle/v1/entity_service/client" +require "google/cloud/chronicle/v1/entity_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # EntityService contains apis for finding entities. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/entity_service" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/entity_service/rest" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + module EntityService + end + end + end + end +end + +helper_path = ::File.join __dir__, "entity_service", "helpers.rb" +require "google/cloud/chronicle/v1/entity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb new file mode 100644 index 000000000000..58bdcbe09913 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb @@ -0,0 +1,908 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/entity_pb" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + ## + # Client for the EntityService service. + # + # EntityService contains apis for finding entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :entity_service_stub + + ## + # Configure the EntityService Client class. + # + # See {::Google::Cloud::Chronicle::V1::EntityService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EntityService clients + # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_watchlist.timeout = 90.0 + default_config.rpcs.get_watchlist.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_watchlists.timeout = 90.0 + default_config.rpcs.list_watchlists.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_watchlist.timeout = 90.0 + + default_config.rpcs.update_watchlist.timeout = 90.0 + + default_config.rpcs.delete_watchlist.timeout = 90.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EntityService 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::Chronicle::V1::EntityService::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 + @entity_service_stub.universe_domain + end + + ## + # Create a new EntityService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EntityService 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/chronicle/v1/entity_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 + + @entity_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::EntityService::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 + ) + + @entity_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @entity_service_stub.logger + end + + # Service calls + + ## + # Gets watchlist details for the given watchlist ID. + # + # @overload get_watchlist(request, options = nil) + # Pass arguments to `get_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(name: nil) + # Pass arguments to `get_watchlist` via keyword arguments. Note that at + # least one keyword argument is 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 parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + # + # # Call the get_watchlist method. + # result = client.get_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def get_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :get_watchlist, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all watchlists for the given instance. + # + # @overload list_watchlists(request, options = nil) + # Pass arguments to `list_watchlists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_watchlists` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + # + # # Call the list_watchlists method. + # result = client.list_watchlists 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::Chronicle::V1::Watchlist. + # p item + # end + # + def list_watchlists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest + + # Converts hash 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_watchlists.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::Chronicle::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_watchlists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_watchlists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :list_watchlists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @entity_service_stub, :list_watchlists, 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 + + ## + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + # + # @overload create_watchlist(request, options = nil) + # Pass arguments to `create_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) + # Pass arguments to `create_watchlist` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param watchlist_id [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + # + # # Call the create_watchlist method. + # result = client.create_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def create_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :create_watchlist, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the watchlist for the given instance. + # + # @overload update_watchlist(request, options = nil) + # Pass arguments to `update_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(watchlist: nil, update_mask: nil) + # Pass arguments to `update_watchlist` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + # + # # Call the update_watchlist method. + # result = client.update_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def update_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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.watchlist&.name + header_params["watchlist.name"] = request.watchlist.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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :update_watchlist, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the watchlist for the given instance. + # + # @overload delete_watchlist(request, options = nil) + # Pass arguments to `delete_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(name: nil, force: nil) + # Pass arguments to `delete_watchlist` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param force [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + # + # # Call the delete_watchlist method. + # result = client.delete_watchlist request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.call_rpc :delete_watchlist, 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 EntityService API. + # + # This class represents the configuration for EntityService, + # 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::Chronicle::V1::EntityService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_watchlist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::EntityService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.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::Chronicle::V1::EntityService::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 = "chronicle.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 EntityService 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 `get_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :get_watchlist + ## + # RPC-specific configuration for `list_watchlists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_watchlists + ## + # RPC-specific configuration for `create_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :create_watchlist + ## + # RPC-specific configuration for `update_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :update_watchlist + ## + # RPC-specific configuration for `delete_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_watchlist + + # @private + def initialize parent_rpcs = nil + get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist + @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config + list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists + @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config + create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist + @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config + update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist + @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config + delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist + @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb new file mode 100644 index 000000000000..d22648b53244 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + # Credentials for the EntityService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb new file mode 100644 index 000000000000..21433575930f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + module EntityService + # Path helper methods for the EntityService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified Watchlist resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param watchlist [String] + # + # @return [::String] + def watchlist_path project:, location:, instance:, watchlist: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/watchlists/#{watchlist}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb new file mode 100644 index 000000000000..5e1f8b48cf66 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/entity_service/credentials" +require "google/cloud/chronicle/v1/entity_service/paths" +require "google/cloud/chronicle/v1/entity_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # EntityService contains apis for finding entities. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/entity_service/rest" + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + module EntityService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/entity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb new file mode 100644 index 000000000000..fc82038f4319 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb @@ -0,0 +1,830 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + module Rest + ## + # REST client for the EntityService service. + # + # EntityService contains apis for finding entities. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :entity_service_stub + + ## + # Configure the EntityService Client class. + # + # See {::Google::Cloud::Chronicle::V1::EntityService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all EntityService clients + # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_watchlist.timeout = 90.0 + default_config.rpcs.get_watchlist.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_watchlists.timeout = 90.0 + default_config.rpcs.list_watchlists.retry_policy = { + initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_watchlist.timeout = 90.0 + + default_config.rpcs.update_watchlist.timeout = 90.0 + + default_config.rpcs.delete_watchlist.timeout = 90.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the EntityService 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::Chronicle::V1::EntityService::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 + @entity_service_stub.universe_domain + end + + ## + # Create a new EntityService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the EntityService 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 + + @entity_service_stub = ::Google::Cloud::Chronicle::V1::EntityService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @entity_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @entity_service_stub.logger + end + + # Service calls + + ## + # Gets watchlist details for the given watchlist ID. + # + # @overload get_watchlist(request, options = nil) + # Pass arguments to `get_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(name: nil) + # Pass arguments to `get_watchlist` via keyword arguments. Note that at + # least one keyword argument is 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 parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + # + # # Call the get_watchlist method. + # result = client.get_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def get_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.get_watchlist request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all watchlists for the given instance. + # + # @overload list_watchlists(request, options = nil) + # Pass arguments to `list_watchlists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_watchlists` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + # + # # Call the list_watchlists method. + # result = client.list_watchlists 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::Chronicle::V1::Watchlist. + # p item + # end + # + def list_watchlists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest + + # Converts hash 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_watchlists.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::Chronicle::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_watchlists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_watchlists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.list_watchlists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @entity_service_stub, :list_watchlists, "watchlists", 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 + + ## + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + # + # @overload create_watchlist(request, options = nil) + # Pass arguments to `create_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) + # Pass arguments to `create_watchlist` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param watchlist_id [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + # + # # Call the create_watchlist method. + # result = client.create_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def create_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.create_watchlist request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the watchlist for the given instance. + # + # @overload update_watchlist(request, options = nil) + # Pass arguments to `update_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(watchlist: nil, update_mask: nil) + # Pass arguments to `update_watchlist` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + # + # # Call the update_watchlist method. + # result = client.update_watchlist request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + # p result + # + def update_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.update_watchlist request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the watchlist for the given instance. + # + # @overload delete_watchlist(request, options = nil) + # Pass arguments to `delete_watchlist` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_watchlist(name: nil, force: nil) + # Pass arguments to `delete_watchlist` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @param force [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + # + # # Call the delete_watchlist method. + # result = client.delete_watchlist request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_watchlist request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest + + # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_watchlist.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @entity_service_stub.delete_watchlist 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 EntityService REST API. + # + # This class represents the configuration for EntityService 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::Chronicle::V1::EntityService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_watchlist to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_watchlist.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 = "chronicle.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 EntityService 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 `get_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :get_watchlist + ## + # RPC-specific configuration for `list_watchlists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_watchlists + ## + # RPC-specific configuration for `create_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :create_watchlist + ## + # RPC-specific configuration for `update_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :update_watchlist + ## + # RPC-specific configuration for `delete_watchlist` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_watchlist + + # @private + def initialize parent_rpcs = nil + get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist + @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config + list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists + @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config + create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist + @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config + update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist + @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config + delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist + @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb new file mode 100644 index 000000000000..526e1e685af9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb @@ -0,0 +1,388 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/entity_pb" + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + module Rest + ## + # REST service stub for the EntityService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def get_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] + # 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::Chronicle::V1::ListWatchlistsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListWatchlistsResponse] + # A result object deserialized from the server's reply + def list_watchlists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_watchlists_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_watchlists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def create_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] + # 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::Chronicle::V1::Watchlist] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # A result object deserialized from the server's reply + def update_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] + # 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_watchlist request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_watchlist_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_watchlist", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_watchlists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] + # 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_watchlists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/watchlists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/watchlists", + body: "watchlist", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{watchlist.name}", + body: "watchlist", + matches: [ + ["watchlist.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_watchlist REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] + # 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_watchlist_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb new file mode 100644 index 000000000000..c59e9b0b6f56 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb @@ -0,0 +1,54 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/entity.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/chronicle/v1/entity_pb' + +module Google + module Cloud + module Chronicle + module V1 + module EntityService + # EntityService contains apis for finding entities. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.EntityService' + + # Gets watchlist details for the given watchlist ID. + rpc :GetWatchlist, ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Lists all watchlists for the given instance. + rpc :ListWatchlists, ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse + # Creates a watchlist for the given instance. + # Note that there can be at most 200 watchlists per instance. + rpc :CreateWatchlist, ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Updates the watchlist for the given instance. + rpc :UpdateWatchlist, ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist + # Deletes the watchlist for the given instance. + rpc :DeleteWatchlist, ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb new file mode 100644 index 000000000000..93db557b2ce9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/instance.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' + + +descriptor_data = "\n(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:y\xea\x41v\n!chronicle.googleapis.com/Instance\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the InstanceService API. + # + # This class represents the configuration for InstanceService, + # 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::Chronicle::V1::InstanceService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.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::Chronicle::V1::InstanceService::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 = "chronicle.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 InstanceService 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 `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb new file mode 100644 index 000000000000..63fbe3b5b5fb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + # Credentials for the InstanceService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb new file mode 100644 index 000000000000..71d7213a0c6d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + module InstanceService + # Path helper methods for the InstanceService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb new file mode 100644 index 000000000000..40b1913eead4 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/instance_service/credentials" +require "google/cloud/chronicle/v1/instance_service/paths" +require "google/cloud/chronicle/v1/instance_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # InstanceService provides the entry interface for the Chronicle API. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/instance_service/rest" + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + module InstanceService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/instance_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb new file mode 100644 index 000000000000..4b6f95ea6cbb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb @@ -0,0 +1,431 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + module Rest + ## + # REST client for the InstanceService service. + # + # InstanceService provides the entry interface for the Chronicle API. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :instance_service_stub + + ## + # Configure the InstanceService Client class. + # + # See {::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all InstanceService clients + # ::Google::Cloud::Chronicle::V1::InstanceService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the InstanceService 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::Chronicle::V1::InstanceService::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 + @instance_service_stub.universe_domain + end + + ## + # Create a new InstanceService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the InstanceService 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 + + @instance_service_stub = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @instance_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @instance_service_stub.logger + end + + # Service calls + + ## + # Gets a Instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the instance to retrieve. + # Format: + # `projects/{project_id}/locations/{location}/instances/{instance}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetInstanceRequest + + # Converts hash 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_instance.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::Chronicle::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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @instance_service_stub.get_instance 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 InstanceService REST API. + # + # This class represents the configuration for InstanceService 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::Chronicle::V1::InstanceService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_instance to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_instance.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 = "chronicle.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 InstanceService 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 `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + + # @private + def initialize parent_rpcs = nil + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb new file mode 100644 index 000000000000..54fc5b580ded --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb @@ -0,0 +1,142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/chronicle/v1/instance_pb" + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + module Rest + ## + # REST service stub for the InstanceService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_instance REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] + # 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::Chronicle::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_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_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Instance.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb new file mode 100644 index 000000000000..3465f58ac427 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb @@ -0,0 +1,45 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/instance.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/chronicle/v1/instance_pb' + +module Google + module Cloud + module Chronicle + module V1 + module InstanceService + # InstanceService provides the entry interface for the Chronicle API. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.InstanceService' + + # Gets a Instance. + rpc :GetInstance, ::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Google::Cloud::Chronicle::V1::Instance + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb new file mode 100644 index 000000000000..7cd0fc43edd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/reference_list.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/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xf5\x07\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + ScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ScopeInfo").msgclass + ReferenceListScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListScope").msgclass + GetReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetReferenceListRequest").msgclass + ListReferenceListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsRequest").msgclass + ListReferenceListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsResponse").msgclass + CreateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateReferenceListRequest").msgclass + UpdateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateReferenceListRequest").msgclass + ReferenceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceList").msgclass + ReferenceListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListEntry").msgclass + ReferenceListSyntaxType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListSyntaxType").enummodule + ReferenceListView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb new file mode 100644 index 000000000000..e88bb3a15142 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/chronicle/v1/version" + +require "google/cloud/chronicle/v1/reference_list_service/credentials" +require "google/cloud/chronicle/v1/reference_list_service/paths" +require "google/cloud/chronicle/v1/reference_list_service/client" +require "google/cloud/chronicle/v1/reference_list_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # ReferenceListService provides an interface for managing reference lists. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/reference_list_service" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/reference_list_service/rest" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + module ReferenceListService + end + end + end + end +end + +helper_path = ::File.join __dir__, "reference_list_service", "helpers.rb" +require "google/cloud/chronicle/v1/reference_list_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb new file mode 100644 index 000000000000..7472a7315b5a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb @@ -0,0 +1,809 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/reference_list_pb" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + ## + # Client for the ReferenceListService service. + # + # ReferenceListService provides an interface for managing reference lists. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reference_list_service_stub + + ## + # Configure the ReferenceListService Client class. + # + # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReferenceListService clients + # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_reference_list.timeout = 60.0 + default_config.rpcs.get_reference_list.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reference_lists.timeout = 60.0 + default_config.rpcs.list_reference_lists.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_reference_list.timeout = 60.0 + + default_config.rpcs.update_reference_list.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + @reference_list_service_stub.universe_domain + end + + ## + # Create a new ReferenceListService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReferenceListService 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/chronicle/v1/reference_list_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 + + @reference_list_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::ReferenceListService::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 + ) + + @reference_list_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reference_list_service_stub.logger + end + + # Service calls + + ## + # Gets a single reference list. + # + # @overload get_reference_list(request, options = nil) + # Pass arguments to `get_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_list(name: nil, view: nil) + # Pass arguments to `get_reference_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + # + # # Call the get_reference_list method. + # result = client.get_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def get_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest + + # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :get_reference_list, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a collection of reference lists. + # + # @overload list_reference_lists(request, options = nil) + # Pass arguments to `list_reference_lists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_reference_lists` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + # + # # Call the list_reference_lists method. + # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + # p item + # end + # + def list_reference_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest + + # Converts hash 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_reference_lists.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::Chronicle::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_reference_lists.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_reference_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :list_reference_lists, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, 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 + + ## + # Creates a new reference list. + # + # @overload create_reference_list(request, options = nil) + # Pass arguments to `create_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) + # Pass arguments to `create_reference_list` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to create. + # @param reference_list_id [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + # + # # Call the create_reference_list method. + # result = client.create_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def create_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest + + # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :create_reference_list, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing reference list. + # + # @overload update_reference_list(request, options = nil) + # Pass arguments to `update_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_list(reference_list: nil, update_mask: nil) + # Pass arguments to `update_reference_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + # + # # Call the update_reference_list method. + # result = client.update_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def update_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest + + # Converts hash 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_reference_list.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::Chronicle::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.reference_list&.name + header_params["reference_list.name"] = request.reference_list.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_reference_list.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.call_rpc :update_reference_list, 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 ReferenceListService API. + # + # This class represents the configuration for ReferenceListService, + # 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::Chronicle::V1::ReferenceListService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_reference_list to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.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::Chronicle::V1::ReferenceListService::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 = "chronicle.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 ReferenceListService 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 `get_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_list + ## + # RPC-specific configuration for `list_reference_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_lists + ## + # RPC-specific configuration for `create_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_list + ## + # RPC-specific configuration for `update_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reference_list + + # @private + def initialize parent_rpcs = nil + get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list + @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config + list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists + @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config + create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list + @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config + update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list + @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb new file mode 100644 index 000000000000..bc9bb656539c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + # Credentials for the ReferenceListService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb new file mode 100644 index 000000000000..0655f1b591bb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + module ReferenceListService + # Path helper methods for the ReferenceListService API. + module Paths + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified ReferenceList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param reference_list [String] + # + # @return [::String] + def reference_list_path project:, location:, instance:, reference_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb new file mode 100644 index 000000000000..72c3da5feecc --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/version" + +require "google/cloud/chronicle/v1/reference_list_service/credentials" +require "google/cloud/chronicle/v1/reference_list_service/paths" +require "google/cloud/chronicle/v1/reference_list_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # ReferenceListService provides an interface for managing reference lists. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/reference_list_service/rest" + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + module ReferenceListService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/reference_list_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb new file mode 100644 index 000000000000..31d0d82a8c4c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb @@ -0,0 +1,738 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + module Rest + ## + # REST client for the ReferenceListService service. + # + # ReferenceListService provides an interface for managing reference lists. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :reference_list_service_stub + + ## + # Configure the ReferenceListService Client class. + # + # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all ReferenceListService clients + # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_reference_list.timeout = 60.0 + default_config.rpcs.get_reference_list.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_reference_lists.timeout = 60.0 + default_config.rpcs.list_reference_lists.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_reference_list.timeout = 60.0 + + default_config.rpcs.update_reference_list.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 + @reference_list_service_stub.universe_domain + end + + ## + # Create a new ReferenceListService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the ReferenceListService 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 + + @reference_list_service_stub = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @reference_list_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @reference_list_service_stub.logger + end + + # Service calls + + ## + # Gets a single reference list. + # + # @overload get_reference_list(request, options = nil) + # Pass arguments to `get_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_list(name: nil, view: nil) + # Pass arguments to `get_reference_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + # + # # Call the get_reference_list method. + # result = client.get_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def get_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest + + # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.get_reference_list request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists a collection of reference lists. + # + # @overload list_reference_lists(request, options = nil) + # Pass arguments to `list_reference_lists` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_reference_lists` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + # + # # Call the list_reference_lists method. + # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + # p item + # end + # + def list_reference_lists request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest + + # Converts hash 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_reference_lists.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::Chronicle::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_reference_lists.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_reference_lists.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.list_reference_lists request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, "reference_lists", 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 + + ## + # Creates a new reference list. + # + # @overload create_reference_list(request, options = nil) + # Pass arguments to `create_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) + # Pass arguments to `create_reference_list` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to create. + # @param reference_list_id [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + # + # # Call the create_reference_list method. + # result = client.create_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def create_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest + + # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.create_reference_list request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing reference list. + # + # @overload update_reference_list(request, options = nil) + # Pass arguments to `update_reference_list` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_reference_list(reference_list: nil, update_mask: nil) + # Pass arguments to `update_reference_list` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + # + # # Call the update_reference_list method. + # result = client.update_reference_list request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + # p result + # + def update_reference_list request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest + + # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_reference_list.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @reference_list_service_stub.update_reference_list 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 ReferenceListService REST API. + # + # This class represents the configuration for ReferenceListService 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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_reference_list to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_reference_list.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 = "chronicle.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 ReferenceListService 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 `get_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :get_reference_list + ## + # RPC-specific configuration for `list_reference_lists` + # @return [::Gapic::Config::Method] + # + attr_reader :list_reference_lists + ## + # RPC-specific configuration for `create_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :create_reference_list + ## + # RPC-specific configuration for `update_reference_list` + # @return [::Gapic::Config::Method] + # + attr_reader :update_reference_list + + # @private + def initialize parent_rpcs = nil + get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list + @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config + list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists + @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config + create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list + @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config + update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list + @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb new file mode 100644 index 000000000000..718ce68bd0d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb @@ -0,0 +1,327 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/reference_list_pb" + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + module Rest + ## + # REST service stub for the ReferenceListService service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def get_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_lists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] + # 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::Chronicle::V1::ListReferenceListsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListReferenceListsResponse] + # A result object deserialized from the server's reply + def list_reference_lists request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_lists_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_reference_lists", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def create_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] + # 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::Chronicle::V1::ReferenceList] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # A result object deserialized from the server's reply + def update_reference_list request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_reference_list_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_reference_list", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ReferenceList.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_reference_lists REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] + # 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_reference_lists_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/referenceLists", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/referenceLists", + body: "reference_list", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_reference_list REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] + # 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_reference_list_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{reference_list.name}", + body: "reference_list", + matches: [ + ["reference_list.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb new file mode 100644 index 000000000000..aa0cb32e7359 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb @@ -0,0 +1,51 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/reference_list.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/chronicle/v1/reference_list_pb' + +module Google + module Cloud + module Chronicle + module V1 + module ReferenceListService + # ReferenceListService provides an interface for managing reference lists. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.ReferenceListService' + + # Gets a single reference list. + rpc :GetReferenceList, ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + # Lists a collection of reference lists. + rpc :ListReferenceLists, ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse + # Creates a new reference list. + rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + # Updates an existing reference list. + rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb new file mode 100644 index 000000000000..43053a2db121 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/data_access_control_service/rest" +require "google/cloud/chronicle/v1/entity_service/rest" +require "google/cloud/chronicle/v1/instance_service/rest" +require "google/cloud/chronicle/v1/reference_list_service/rest" +require "google/cloud/chronicle/v1/rule_service/rest" +require "google/cloud/chronicle/v1/version" + +module Google + module Cloud + module Chronicle + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/chronicle/v1/rest" + # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb new file mode 100644 index 000000000000..e4b4236afdf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/chronicle/v1/rule.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/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\x91\t\n\x04Rule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x08severity\x18\x06 \x01(\x0b\x32#.google.cloud.chronicle.v1.SeverityB\x03\xe0\x41\x03\x12\x44\n\x08metadata\x18\x07 \x03(\x0b\x32-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x11\x63ompilation_state\x18\n \x01(\x0e\x32\x30.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x0c \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleTypeB\x03\xe0\x41\x03\x12G\n\x0freference_lists\x18\r \x03(\tB.\xe0\x41\x03\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12M\n\x17\x61llowed_run_frequencies\x18\x0e \x03(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequencyB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0f \x01(\t\x12<\n\x05scope\x18\x10 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12V\n\x17\x63ompilation_diagnostics\x18\x11 \x03(\x0b\x32\x30.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xe0\x41\x03\x12.\n!near_real_time_live_rule_eligible\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0binputs_used\x18\x14 \x01(\x0b\x32%.google.cloud.chronicle.v1.InputsUsedB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"P\n\x10\x43ompilationState\x12!\n\x1d\x43OMPILATION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02:m\xea\x41j\n\x1d\x63hronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xcb\x05\n\x0eRuleDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12\x10\n\x08\x61lerting\x18\x03 \x01(\x08\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\x12\x35\n\x0c\x61rchive_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\rrun_frequency\x18\x06 \x01(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequency\x12V\n\x0f\x65xecution_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xe0\x41\x03\x12=\n\x0eproducer_rules\x18\x08 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12=\n\x0e\x63onsumer_rules\x18\t \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x46\n\x1dlast_alert_status_change_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"W\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\x12\n\n\x06PAUSED\x10\x03:\x82\x01\xea\x41\x7f\n\'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xc8\x03\n\tRetrohunt\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x10process_interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x36\n\x12\x65xecution_interval\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xe0\x41\x03\x12 \n\x13progress_percentage\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\"P\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x8a\x01\xea\x41\x86\x01\n\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\n\x11\x43reateRuleRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x32\n\x04rule\x18\x02 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\"x\n\x0eGetRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"\xb3\x01\n\x10ListRulesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\\\n\x11ListRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x11UpdateRuleRequest\x12\x32\n\x04rule\x18\x01 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\\\n\x11\x44\x65leteRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa9\x01\n\x18ListRuleRevisionsRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"d\n\x19ListRuleRevisionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x16\x43reateRetrohuntRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12<\n\tretrohunt\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.RetrohuntB\x03\xe0\x41\x02\"O\n\x13GetRetrohuntRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Retrohunt\"\x8a\x01\n\x15ListRetrohuntsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\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\"k\n\x16ListRetrohuntsResponse\x12\x38\n\nretrohunts\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.Retrohunt\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x18GetRuleDeploymentRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/RuleDeployment\"\x94\x01\n\x1aListRuleDeploymentsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/RuleDeployment\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\"{\n\x1bListRuleDeploymentsResponse\x12\x43\n\x10rule_deployments\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.RuleDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x1bUpdateRuleDeploymentRequest\x12G\n\x0frule_deployment\x18\x01 \x01(\x0b\x32).google.cloud.chronicle.v1.RuleDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"y\n\x13\x43ompilationPosition\x12\x17\n\nstart_line\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cstart_column\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_line\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nend_column\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\"\x96\x02\n\x15\x43ompilationDiagnostic\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x08position\x18\x02 \x01(\x0b\x32..google.cloud.chronicle.v1.CompilationPositionB\x03\xe0\x41\x03\x12P\n\x08severity\x18\x03 \x01(\x0e\x32\x39.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x05 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\" \n\x08Severity\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\"\x9a\x01\n\x11RetrohuntMetadata\x12\x35\n\tretrohunt\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x12\x65xecution_interval\x18\x02 \x01(\x0b\x32\x15.google.type.Interval\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x02\"Z\n\nInputsUsed\x12\x15\n\x08uses_udm\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0buses_entity\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0euses_detection\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01*N\n\x0cRunFrequency\x12\x1d\n\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\n\n\x06HOURLY\x10\x02\x12\t\n\x05\x44\x41ILY\x10\x03*H\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSINGLE_EVENT\x10\x01\x12\x0f\n\x0bMULTI_EVENT\x10\x02*V\n\x08RuleView\x12\x19\n\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\x1a\n\x16REVISION_METADATA_ONLY\x10\x03\x32\xa9\x13\n\x0bRuleService\x12\xae\x01\n\nCreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"Q\xda\x41\x0bparent,rule\x82\xd3\xe4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9b\x01\n\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xae\x01\n\tListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1a,.google.cloud.chronicle.v1.ListRulesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xb8\x01\n\nUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"[\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x42\x32:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\n\nDeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xd2\x01\n\x11ListRuleRevisions\x12\x33.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1a\x34.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xef\x01\n\x0f\x43reateRetrohunt\x12\x31.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tRetrohunt\x12\x11RetrohuntMetadata\xda\x41\x10parent,retrohunt\x82\xd3\xe4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\tretrohunt\x12\xb7\x01\n\x0cGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1a$.google.cloud.chronicle.v1.Retrohunt\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xca\x01\n\x0eListRetrohunts\x12\x30.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1a\x31.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xc4\x01\n\x11GetRuleDeployment\x12\x33.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xda\x01\n\x13ListRuleDeployments\x12\x35.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1a\x36.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\n\x14UpdateRuleDeployment\x12\x36.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xda\x41\x1brule_deployment,update_mask\x82\xd3\xe4\x93\x02\x63\x32P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0frule_deployment\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1d\x63om.google.cloud.chronicle.v1B\tRuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module Chronicle + module V1 + Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule").msgclass + Rule::CompilationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule.CompilationState").enummodule + RuleDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment").msgclass + RuleDeployment::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment.ExecutionState").enummodule + Retrohunt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt").msgclass + Retrohunt::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt.State").enummodule + CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRuleRequest").msgclass + GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleRequest").msgclass + ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesRequest").msgclass + ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesResponse").msgclass + UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleRequest").msgclass + DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteRuleRequest").msgclass + ListRuleRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsRequest").msgclass + ListRuleRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsResponse").msgclass + CreateRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRetrohuntRequest").msgclass + GetRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRetrohuntRequest").msgclass + ListRetrohuntsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsRequest").msgclass + ListRetrohuntsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsResponse").msgclass + GetRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleDeploymentRequest").msgclass + ListRuleDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsRequest").msgclass + ListRuleDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsResponse").msgclass + UpdateRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleDeploymentRequest").msgclass + CompilationPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationPosition").msgclass + CompilationDiagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic").msgclass + CompilationDiagnostic::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic.Severity").enummodule + Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Severity").msgclass + RetrohuntMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RetrohuntMetadata").msgclass + InputsUsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InputsUsed").msgclass + RunFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RunFrequency").enummodule + RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleType").enummodule + RuleView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleView").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb new file mode 100644 index 000000000000..e84fdd68ca88 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/chronicle/v1/version" + +require "google/cloud/chronicle/v1/rule_service/credentials" +require "google/cloud/chronicle/v1/rule_service/paths" +require "google/cloud/chronicle/v1/rule_service/operations" +require "google/cloud/chronicle/v1/rule_service/client" +require "google/cloud/chronicle/v1/rule_service/rest" + +module Google + module Cloud + module Chronicle + module V1 + ## + # RuleService provides interface for user-created rules. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/chronicle/v1/rule_service" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/chronicle/v1/rule_service/rest" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + module RuleService + end + end + end + end +end + +helper_path = ::File.join __dir__, "rule_service", "helpers.rb" +require "google/cloud/chronicle/v1/rule_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb new file mode 100644 index 000000000000..53a82998663a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb @@ -0,0 +1,1691 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/rule_pb" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + ## + # Client for the RuleService service. + # + # RuleService provides interface for user-created rules. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :rule_service_stub + + ## + # Configure the RuleService Client class. + # + # See {::Google::Cloud::Chronicle::V1::RuleService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RuleService clients + # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_rule.timeout = 60.0 + + default_config.rpcs.get_rule.timeout = 60.0 + default_config.rpcs.get_rule.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 600.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule.timeout = 600.0 + + default_config.rpcs.delete_rule.timeout = 60.0 + + default_config.rpcs.list_rule_revisions.timeout = 600.0 + default_config.rpcs.list_rule_revisions.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_retrohunt.timeout = 600.0 + + default_config.rpcs.get_retrohunt.timeout = 60.0 + default_config.rpcs.get_retrohunt.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_retrohunts.timeout = 60.0 + default_config.rpcs.list_retrohunts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rule_deployment.timeout = 600.0 + default_config.rpcs.get_rule_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rule_deployments.timeout = 600.0 + default_config.rpcs.list_rule_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule_deployment.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RuleService 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::Chronicle::V1::RuleService::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 + @rule_service_stub.universe_domain + end + + ## + # Create a new RuleService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RuleService 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/chronicle/v1/rule_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 + + @rule_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Chronicle::V1::RuleService::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 + ) + + @rule_service_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Chronicle::V1::RuleService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @rule_service_stub.logger + end + + # Service calls + + ## + # Creates a new Rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(parent: nil, rule: nil) + # Pass arguments to `create_rule` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest + + # Converts hash 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_rule.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::Chronicle::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :create_rule, 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 a Rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(name: nil, view: nil) + # Pass arguments to `get_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest + + # Converts hash 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_rule.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::Chronicle::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @param filter [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest + + # Converts hash 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_rules.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::Chronicle::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_rules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rules, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rules, 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 + + ## + # Updates a Rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest + + # Converts hash 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_rule.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::Chronicle::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.rule&.name + header_params["rule.name"] = request.rule.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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :update_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(name: nil, force: nil) + # Pass arguments to `delete_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param force [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also 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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest + + # Converts hash 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_rule.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::Chronicle::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_rule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :delete_rule, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all revisions of the rule. + # + # @overload list_rule_revisions(request, options = nil) + # Pass arguments to `list_rule_revisions` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_rule_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + # + # # Call the list_rule_revisions method. + # result = client.list_rule_revisions 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rule_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest + + # Converts hash 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_rule_revisions.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::Chronicle::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_rule_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rule_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rule_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, 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 + + ## + # Create a Retrohunt. + # + # @overload create_retrohunt(request, options = nil) + # Pass arguments to `create_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_retrohunt(parent: nil, retrohunt: nil) + # Pass arguments to `create_retrohunt` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] + # Required. The retrohunt 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/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + # + # # Call the create_retrohunt method. + # result = client.create_retrohunt 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_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest + + # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :create_retrohunt, 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 + + ## + # Get a Retrohunt. + # + # @overload get_retrohunt(request, options = nil) + # Pass arguments to `get_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_retrohunt(name: nil) + # Pass arguments to `get_retrohunt` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::Retrohunt] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + # + # # Call the get_retrohunt method. + # result = client.get_retrohunt request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + # p result + # + def get_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest + + # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_retrohunt, 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 + + ## + # List Retrohunts. + # + # @overload list_retrohunts(request, options = nil) + # Pass arguments to `list_retrohunts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_retrohunts` via keyword arguments. Note that at + # least one keyword argument is 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 rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + # + # # Call the list_retrohunts method. + # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + # p item + # end + # + def list_retrohunts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest + + # Converts hash 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_retrohunts.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::Chronicle::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_retrohunts.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_retrohunts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_retrohunts, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_retrohunts, 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 a RuleDeployment. + # + # @overload get_rule_deployment(request, options = nil) + # Pass arguments to `get_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_deployment(name: nil) + # Pass arguments to `get_rule_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + # + # # Call the get_rule_deployment method. + # result = client.get_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def get_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest + + # Converts hash 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_rule_deployment.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::Chronicle::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_rule_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :get_rule_deployment, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists RuleDeployments across all Rules. + # + # @overload list_rule_deployments(request, options = nil) + # Pass arguments to `list_rule_deployments` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_rule_deployments` via keyword arguments. Note that at + # least one keyword argument is 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 collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @param page_size [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + # + # # Call the list_rule_deployments method. + # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + # p item + # end + # + def list_rule_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest + + # Converts hash 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_rule_deployments.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::Chronicle::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_rule_deployments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_rule_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :list_rule_deployments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, 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 + + ## + # Updates a RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + # + # @overload update_rule_deployment(request, options = nil) + # Pass arguments to `update_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_deployment(rule_deployment: nil, update_mask: nil) + # Pass arguments to `update_rule_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + # + # # Call the update_rule_deployment method. + # result = client.update_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def update_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest + + # Converts hash 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_rule_deployment.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::Chronicle::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.rule_deployment&.name + header_params["rule_deployment.name"] = request.rule_deployment.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_rule_deployment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.call_rpc :update_rule_deployment, 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 RuleService API. + # + # This class represents the configuration for RuleService, + # 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::Chronicle::V1::RuleService::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 + # # create_rule to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::RuleService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.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::Chronicle::V1::RuleService::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 = "chronicle.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 RuleService 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 `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `list_rule_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_revisions + ## + # RPC-specific configuration for `create_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :create_retrohunt + ## + # RPC-specific configuration for `get_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :get_retrohunt + ## + # RPC-specific configuration for `list_retrohunts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_retrohunts + ## + # RPC-specific configuration for `get_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule_deployment + ## + # RPC-specific configuration for `list_rule_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_deployments + ## + # RPC-specific configuration for `update_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule_deployment + + # @private + def initialize parent_rpcs = nil + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions + @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config + create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt + @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config + get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt + @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config + list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts + @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config + get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment + @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config + list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments + @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config + update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment + @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb new file mode 100644 index 000000000000..a66ae4c0ebf6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + # Credentials for the RuleService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb new file mode 100644 index 000000000000..162ec1fb3163 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/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 Chronicle + module V1 + module RuleService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the RuleService 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 RuleService 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::Chronicle::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::Chronicle::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::Chronicle::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::Chronicle::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::Chronicle::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 = "chronicle.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-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb new file mode 100644 index 000000000000..00b03a7b2d54 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb @@ -0,0 +1,159 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + module RuleService + # Path helper methods for the RuleService API. + module Paths + ## + # Create a fully-qualified DataAccessScope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param data_access_scope [String] + # + # @return [::String] + def data_access_scope_path project:, location:, instance:, data_access_scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + end + + ## + # Create a fully-qualified ReferenceList resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param reference_list [String] + # + # @return [::String] + def reference_list_path project:, location:, instance:, reference_list: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" + end + + ## + # Create a fully-qualified Retrohunt resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # @param retrohunt [String] + # + # @return [::String] + def retrohunt_path project:, location:, instance:, rule:, retrohunt: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + raise ::ArgumentError, "rule cannot contain /" if rule.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/retrohunts/#{retrohunt}" + end + + ## + # Create a fully-qualified Rule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # + # @return [::String] + def rule_path project:, location:, instance:, rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}" + end + + ## + # Create a fully-qualified RuleDeployment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param rule [String] + # + # @return [::String] + def rule_deployment_path project:, location:, instance:, rule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/deployment" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb new file mode 100644 index 000000000000..d27a86220664 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/chronicle/v1/version" + +require "google/cloud/chronicle/v1/rule_service/credentials" +require "google/cloud/chronicle/v1/rule_service/paths" +require "google/cloud/chronicle/v1/rule_service/rest/operations" +require "google/cloud/chronicle/v1/rule_service/rest/client" + +module Google + module Cloud + module Chronicle + module V1 + ## + # RuleService provides interface for user-created rules. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/chronicle/v1/rule_service/rest" + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + module RuleService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/chronicle/v1/rule_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb new file mode 100644 index 000000000000..e29466693f60 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb @@ -0,0 +1,1564 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service/rest/service_stub" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + module Rest + ## + # REST client for the RuleService service. + # + # RuleService provides interface for user-created rules. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :rule_service_stub + + ## + # Configure the RuleService Client class. + # + # See {::Google::Cloud::Chronicle::V1::RuleService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all RuleService clients + # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.create_rule.timeout = 60.0 + + default_config.rpcs.get_rule.timeout = 60.0 + default_config.rpcs.get_rule.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rules.timeout = 600.0 + default_config.rpcs.list_rules.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule.timeout = 600.0 + + default_config.rpcs.delete_rule.timeout = 60.0 + + default_config.rpcs.list_rule_revisions.timeout = 600.0 + default_config.rpcs.list_rule_revisions.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_retrohunt.timeout = 600.0 + + default_config.rpcs.get_retrohunt.timeout = 60.0 + default_config.rpcs.get_retrohunt.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_retrohunts.timeout = 60.0 + default_config.rpcs.list_retrohunts.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_rule_deployment.timeout = 600.0 + default_config.rpcs.get_rule_deployment.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_rule_deployments.timeout = 600.0 + default_config.rpcs.list_rule_deployments.retry_policy = { + initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_rule_deployment.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the RuleService 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::Chronicle::V1::RuleService::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 + @rule_service_stub.universe_domain + end + + ## + # Create a new RuleService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the RuleService 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::Chronicle::V1::RuleService::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 + + @rule_service_stub = ::Google::Cloud::Chronicle::V1::RuleService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @rule_service_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Chronicle::V1::RuleService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @rule_service_stub.logger + end + + # Service calls + + ## + # Creates a new Rule. + # + # @overload create_rule(request, options = nil) + # Pass arguments to `create_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(parent: nil, rule: nil) + # Pass arguments to `create_rule` via keyword arguments. Note that at + # least one keyword argument is 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 resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + # + # # Call the create_rule method. + # result = client.create_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def create_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest + + # Converts hash 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_rule.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::Chronicle::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.create_rule 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 a Rule. + # + # @overload get_rule(request, options = nil) + # Pass arguments to `get_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(name: nil, view: nil) + # Pass arguments to `get_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + # + # # Call the get_rule method. + # result = client.get_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def get_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest + + # Converts hash 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_rule.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::Chronicle::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Rules. + # + # @overload list_rules(request, options = nil) + # Pass arguments to `list_rules` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) + # Pass arguments to `list_rules` via keyword arguments. Note that at + # least one keyword argument is 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, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @param page_size [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @param filter [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + # + # # Call the list_rules method. + # result = client.list_rules 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest + + # Converts hash 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_rules.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::Chronicle::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_rules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rules request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rules, "rules", 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 + + ## + # Updates a Rule. + # + # @overload update_rule(request, options = nil) + # Pass arguments to `update_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(rule: nil, update_mask: nil) + # Pass arguments to `update_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + # + # # Call the update_rule method. + # result = client.update_rule request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + # p result + # + def update_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest + + # Converts hash 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_rule.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::Chronicle::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.update_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Rule. + # + # @overload delete_rule(request, options = nil) + # Pass arguments to `delete_rule` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule(name: nil, force: nil) + # Pass arguments to `delete_rule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param force [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also 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/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + # + # # Call the delete_rule method. + # result = client.delete_rule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_rule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest + + # Converts hash 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_rule.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::Chronicle::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_rule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_rule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.delete_rule request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all revisions of the rule. + # + # @overload list_rule_revisions(request, options = nil) + # Pass arguments to `list_rule_revisions` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_rule_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @param view [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + # + # # Call the list_rule_revisions method. + # result = client.list_rule_revisions 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::Chronicle::V1::Rule. + # p item + # end + # + def list_rule_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest + + # Converts hash 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_rule_revisions.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::Chronicle::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_rule_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rule_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rule_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, "rules", 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 + + ## + # Create a Retrohunt. + # + # @overload create_retrohunt(request, options = nil) + # Pass arguments to `create_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_retrohunt(parent: nil, retrohunt: nil) + # Pass arguments to `create_retrohunt` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] + # Required. The retrohunt 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/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + # + # # Call the create_retrohunt method. + # result = client.create_retrohunt 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_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest + + # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.create_retrohunt 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 + + ## + # Get a Retrohunt. + # + # @overload get_retrohunt(request, options = nil) + # Pass arguments to `get_retrohunt` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_retrohunt(name: nil) + # Pass arguments to `get_retrohunt` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::Retrohunt] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + # + # # Call the get_retrohunt method. + # result = client.get_retrohunt request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + # p result + # + def get_retrohunt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest + + # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_retrohunt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_retrohunt 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 + + ## + # List Retrohunts. + # + # @overload list_retrohunts(request, options = nil) + # Pass arguments to `list_retrohunts` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_retrohunts` via keyword arguments. Note that at + # least one keyword argument is 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 rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @param page_size [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + # + # # Call the list_retrohunts method. + # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + # p item + # end + # + def list_retrohunts request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest + + # Converts hash 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_retrohunts.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::Chronicle::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_retrohunts.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_retrohunts.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_retrohunts request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_retrohunts, "retrohunts", 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 a RuleDeployment. + # + # @overload get_rule_deployment(request, options = nil) + # Pass arguments to `get_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_deployment(name: nil) + # Pass arguments to `get_rule_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + # + # # Call the get_rule_deployment method. + # result = client.get_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def get_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest + + # Converts hash 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_rule_deployment.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::Chronicle::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_rule_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.get_rule_deployment request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists RuleDeployments across all Rules. + # + # @overload list_rule_deployments(request, options = nil) + # Pass arguments to `list_rule_deployments` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_rule_deployments` via keyword arguments. Note that at + # least one keyword argument is 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 collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @param page_size [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @param page_token [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @param filter [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + # + # # Call the list_rule_deployments method. + # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + # p item + # end + # + def list_rule_deployments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest + + # Converts hash 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_rule_deployments.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::Chronicle::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_rule_deployments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_rule_deployments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.list_rule_deployments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, "rule_deployments", 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 + + ## + # Updates a RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + # + # @overload update_rule_deployment(request, options = nil) + # Pass arguments to `update_rule_deployment` via a request object, either of type + # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_rule_deployment(rule_deployment: nil, update_mask: nil) + # Pass arguments to `update_rule_deployment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields to update. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/chronicle/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + # + # # Call the update_rule_deployment method. + # result = client.update_rule_deployment request + # + # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + # p result + # + def update_rule_deployment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest + + # Converts hash 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_rule_deployment.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::Chronicle::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_rule_deployment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_rule_deployment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @rule_service_stub.update_rule_deployment 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 RuleService REST API. + # + # This class represents the configuration for RuleService 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::Chronicle::V1::RuleService::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 + # # create_rule to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_rule.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 = "chronicle.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 RuleService 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 `create_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_rule + ## + # RPC-specific configuration for `get_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule + ## + # RPC-specific configuration for `list_rules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rules + ## + # RPC-specific configuration for `update_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule + ## + # RPC-specific configuration for `delete_rule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_rule + ## + # RPC-specific configuration for `list_rule_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_revisions + ## + # RPC-specific configuration for `create_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :create_retrohunt + ## + # RPC-specific configuration for `get_retrohunt` + # @return [::Gapic::Config::Method] + # + attr_reader :get_retrohunt + ## + # RPC-specific configuration for `list_retrohunts` + # @return [::Gapic::Config::Method] + # + attr_reader :list_retrohunts + ## + # RPC-specific configuration for `get_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_rule_deployment + ## + # RPC-specific configuration for `list_rule_deployments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_rule_deployments + ## + # RPC-specific configuration for `update_rule_deployment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_rule_deployment + + # @private + def initialize parent_rpcs = nil + create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule + @create_rule = ::Gapic::Config::Method.new create_rule_config + get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule + @get_rule = ::Gapic::Config::Method.new get_rule_config + list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules + @list_rules = ::Gapic::Config::Method.new list_rules_config + update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule + @update_rule = ::Gapic::Config::Method.new update_rule_config + delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule + @delete_rule = ::Gapic::Config::Method.new delete_rule_config + list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions + @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config + create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt + @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config + get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt + @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config + list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts + @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config + get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment + @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config + list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments + @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config + update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment + @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb new file mode 100644 index 000000000000..f989eba5c49e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/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 Chronicle + module V1 + module RuleService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the RuleService 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 RuleService 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::Chronicle::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::Chronicle::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::Chronicle::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::Chronicle::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 = "chronicle.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/[^/]+/instances/[^/]+/?$}, 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/[^/]+/instances/[^/]+/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/[^/]+/instances/[^/]+/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/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb new file mode 100644 index 000000000000..021e04869cad --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb @@ -0,0 +1,817 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/rule_pb" + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + module Rest + ## + # REST service stub for the RuleService 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 create_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def create_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def get_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rules REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] + # 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::Chronicle::V1::ListRulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRulesResponse] + # A result object deserialized from the server's reply + def list_rules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_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_rules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] + # 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::Chronicle::V1::Rule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Rule] + # A result object deserialized from the server's reply + def update_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] + # 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_rule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_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_rule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_rule_revisions REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] + # 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::Chronicle::V1::ListRuleRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse] + # A result object deserialized from the server's reply + def list_rule_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_revisions_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_rule_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] + # 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_retrohunt request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_retrohunt_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_retrohunt", + 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_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] + # 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::Chronicle::V1::Retrohunt] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # A result object deserialized from the server's reply + def get_retrohunt request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_retrohunt_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_retrohunt", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] + # 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::Chronicle::V1::ListRetrohuntsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse] + # A result object deserialized from the server's reply + def list_retrohunts request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_retrohunts_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_retrohunts", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] + # 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::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # A result object deserialized from the server's reply + def get_rule_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_deployment_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_rule_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployments REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] + # 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::Chronicle::V1::ListRuleDeploymentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse] + # A result object deserialized from the server's reply + def list_rule_deployments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_deployments_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_rule_deployments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] + # 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::Chronicle::V1::RuleDeployment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # A result object deserialized from the server's reply + def update_rule_deployment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_deployment_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_rule_deployment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rules", + body: "rule", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rules REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] + # 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_rules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rules", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule.name}", + body: "rule", + matches: [ + ["rule.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_rule REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] + # 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_rule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rule_revisions REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] + # 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_rule_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] + # 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_retrohunt_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/retrohunts", + body: "retrohunt", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_retrohunt REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] + # 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_retrohunt_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/retrohunts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_retrohunts REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] + # 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_retrohunts_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/retrohunts", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] + # 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_rule_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_rule_deployments REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] + # 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_rule_deployments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/deployments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_rule_deployment REST call + # + # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] + # 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_rule_deployment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rule_deployment.name}", + body: "rule_deployment", + matches: [ + ["rule_deployment.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb new file mode 100644 index 000000000000..a893fb504269 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb @@ -0,0 +1,70 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/chronicle/v1/rule.proto for package 'Google.Cloud.Chronicle.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/chronicle/v1/rule_pb' + +module Google + module Cloud + module Chronicle + module V1 + module RuleService + # RuleService provides interface for user-created rules. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.chronicle.v1.RuleService' + + # Creates a new Rule. + rpc :CreateRule, ::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Gets a Rule. + rpc :GetRule, ::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Lists Rules. + rpc :ListRules, ::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Google::Cloud::Chronicle::V1::ListRulesResponse + # Updates a Rule. + rpc :UpdateRule, ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule + # Deletes a Rule. + rpc :DeleteRule, ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Google::Protobuf::Empty + # Lists all revisions of the rule. + rpc :ListRuleRevisions, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse + # Create a Retrohunt. + rpc :CreateRetrohunt, ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Google::Longrunning::Operation + # Get a Retrohunt. + rpc :GetRetrohunt, ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Google::Cloud::Chronicle::V1::Retrohunt + # List Retrohunts. + rpc :ListRetrohunts, ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse + # Gets a RuleDeployment. + rpc :GetRuleDeployment, ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment + # Lists RuleDeployments across all Rules. + rpc :ListRuleDeployments, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse + # Updates a RuleDeployment. + # Failures are not necessarily atomic. If there is a request to update + # multiple fields, and any update to a single field fails, an error will be + # returned, but other fields may remain successfully updated. + rpc :UpdateRuleDeployment, ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb new file mode 100644 index 000000000000..6224648b9b26 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/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 Chronicle + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md new file mode 100644 index 000000000000..70a487ac4c0f --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Chronicle 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-chronicle-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb new file mode 100644 index 000000000000..1342c3da69d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb @@ -0,0 +1,364 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + # Request message for CreateDataAccessLabel. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this Data Access Label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] data_access_label + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # Required. Data access label to create. + # @!attribute [rw] data_access_label_id + # @return [::String] + # Required. The ID to use for the data access label, which will become the + # label's display name and the final component of the label's resource name. + # The maximum number of characters should be 63. Regex pattern is as per AIP: + # https://google.aip.dev/122#resource-id-segments + class CreateDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to retrieve a data access label. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access label to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + class GetDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDataAccessLabels. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data access label will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data access labels to return. The service may return + # fewer than this value. If unspecified, at most 100 data access labels will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListDataAccessLabelsRequest` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessLabel and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + class ListDataAccessLabelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDataAccessLabels. + # @!attribute [rw] data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabel>] + # List of data access labels. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataAccessLabelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDataAccessLabel method. + # @!attribute [rw] data_access_label + # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] + # Required. The data access label to update. + # + # The label's `name` field is used to identify the label to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description and definition + # fields are supported for update; an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + class UpdateDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a data access label. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access label to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` + class DeleteDataAccessLabelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateDataAccessScope. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this Data Access Scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] data_access_scope + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # Required. Data access scope to create. + # @!attribute [rw] data_access_scope_id + # @return [::String] + # Required. The user provided scope id which will become the last part of the + # name of the scope resource. Needs to be compliant with + # https://google.aip.dev/122 + class CreateDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to retrieve a data access scope. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access scope to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + class GetDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListDataAccessScopes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this data access scope will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of data access scopes to return. The service may return + # fewer than this value. If unspecified, at most 100 data access scopes will + # be returned. The maximum value is 1000; values above 1000 will be coerced + # to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListDataAccessScopesRequest` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. A filter which should follow the guidelines of AIP-160. + # Supports filtering on all fieds of DataAccessScope and all operations as + # mentioned in https://google.aip.dev/160. + # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR + # display_name:\"-21-1\"". + class ListDataAccessScopesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListDataAccessScopes. + # @!attribute [rw] data_access_scopes + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessScope>] + # List of data access scopes. + # @!attribute [rw] global_data_access_scope_granted + # @return [::Boolean] + # Whether or not global scope is granted to the user. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListDataAccessScopesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateDataAccessScope method. + # @!attribute [rw] data_access_scope + # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] + # Required. The data access scope to update. + # + # The scope's `name` field is used to identify the scope to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. Currently, only the description, the allowed + # and denied labels list fields are supported for update; + # an update call that attempts to update any + # other fields will return INVALID_ARGUMENT. + class UpdateDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message to delete a data access scope. + # @!attribute [rw] name + # @return [::String] + # Required. The ID of the data access scope to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` + class DeleteDataAccessScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A DataAccessLabel is a label on events to define user access to data. + # @!attribute [rw] udm_query + # @return [::String] + # A UDM query over event data. + # @!attribute [rw] name + # @return [::String] + # The unique resource name of the data access label. + # @!attribute [r] display_name + # @return [::String] + # Output only. The short name displayed for the label as it appears on event + # data. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access label was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access label was last updated. + # @!attribute [r] author + # @return [::String] + # Output only. The user who created the data access label. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The user who last updated the data access label. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the data access label for a human reader. + class DataAccessLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A DataAccessScope is a boolean expression of data access labels used + # to restrict access to data for users. + # @!attribute [rw] name + # @return [::String] + # Required. The unique full name of the data access scope. + # The name should comply with https://google.aip.dev/122 standards. + # @!attribute [rw] allowed_data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] + # Optional. The allowed labels for the scope. + # Either allow_all or allowed_data_access_labels needs to be provided. + # When provided, there has to be at least one label allowed for the scope to + # be valid. + # The logical operator for evaluation of the allowed labels is OR. + # E.g.: A customer with scope with allowed labels A and B will be able + # to see data with labeled with A or B or (A and B). + # @!attribute [rw] denied_data_access_labels + # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] + # Optional. The denied labels for the scope. + # The logical operator for evaluation of the denied labels is AND. + # E.g.: A customer with scope with denied labels A and B won't be able + # to see data labeled with A and data labeled with B + # and data with labels A and B. + # @!attribute [r] display_name + # @return [::String] + # Output only. The name to be used for display to customers of the data + # access scope. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access scope was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the data access scope was last updated. + # @!attribute [r] author + # @return [::String] + # Output only. The user who created the data access scope. + # @!attribute [r] last_editor + # @return [::String] + # Output only. The user who last updated the data access scope. + # @!attribute [rw] description + # @return [::String] + # Optional. A description of the data access scope for a human reader. + # @!attribute [rw] allow_all + # @return [::Boolean] + # Optional. Whether or not the scope allows all labels, allow_all and + # allowed_data_access_labels are mutually exclusive and one of them must be + # present. denied_data_access_labels can still be used along with allow_all. + # When combined with denied_data_access_labels, access will be granted to all + # data that doesn't have labels mentioned in denied_data_access_labels. E.g.: + # A customer with scope with denied labels A and B and allow_all will be able + # to see all data except data labeled with A and data labeled with B and data + # with labels A and B. + class DataAccessScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Reference object to a data access label. + # @!attribute [rw] data_access_label + # @return [::String] + # The name of the data access label. + # + # Note: The following fields are mutually exclusive: `data_access_label`, `log_type`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] log_type + # @return [::String] + # The name of the log type. + # + # Note: The following fields are mutually exclusive: `log_type`, `data_access_label`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] asset_namespace + # @return [::String] + # The asset namespace configured in the forwarder + # of the customer's events. + # + # Note: The following fields are mutually exclusive: `asset_namespace`, `data_access_label`, `log_type`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ingestion_label + # @return [::Google::Cloud::Chronicle::V1::IngestionLabel] + # The ingestion label configured in the forwarder of the customer's events. + # + # Note: The following fields are mutually exclusive: `ingestion_label`, `data_access_label`, `log_type`, `asset_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] display_name + # @return [::String] + # Output only. The display name of the label. + # Data access label and log types's name + # will match the display name of the resource. + # The asset namespace will match the namespace itself. + # The ingestion key value pair will match the key of the tuple. + class DataAccessLabelReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Representation of an ingestion label type. + # @!attribute [rw] ingestion_label_key + # @return [::String] + # Required. The key of the ingestion label. Always required. + # @!attribute [rw] ingestion_label_value + # @return [::String] + # Optional. The value of the ingestion label. Optional. An object + # with no provided value and some key provided would match + # against the given key and ANY value. + class IngestionLabel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb new file mode 100644 index 000000000000..89cef26897a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb @@ -0,0 +1,210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + # A watchlist is a list of entities that allows for bulk operations over the + # included entities. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the watchlist. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name of the watchlist. + # Note that it must be at least one character and less than 63 characters + # (https://google.aip.dev/148). + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the watchlist. + # @!attribute [rw] multiplying_factor + # @return [::Float] + # Optional. Weight applied to the risk score for entities + # in this watchlist. + # The default is 1.0 if it is not specified. + # @!attribute [rw] entity_population_mechanism + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism] + # Required. Mechanism to populate entities in the watchlist. + # @!attribute [r] entity_count + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityCount] + # Output only. Entity count in the watchlist. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the watchlist was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the watchlist was last updated. + # @!attribute [rw] watchlist_user_preferences + # @return [::Google::Cloud::Chronicle::V1::WatchlistUserPreferences] + # Optional. User preferences for watchlist configuration. + class Watchlist + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mechanism to populate entities in the watchlist. + # @!attribute [rw] manual + # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism::Manual] + # Optional. Entities are added manually. + class EntityPopulationMechanism + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Entities are added manually. + class Manual + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Count of different types of entities in the watchlist. + # @!attribute [r] user + # @return [::Integer] + # Output only. Count of user type entities in the watchlist. + # @!attribute [r] asset + # @return [::Integer] + # Output only. Count of asset type entities in the watchlist. + class EntityCount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A collection of user preferences for watchlist UI configuration. + # @!attribute [rw] pinned + # @return [::Boolean] + # Optional. Whether the watchlist is pinned on the dashboard. + class WatchlistUserPreferences + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for getting a watchlist. + # @!attribute [rw] name + # @return [::String] + # Required. The parent, which owns this collection of watchlists. + # The name of the watchlist to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + class GetWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for listing watchlists. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of watchlists. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of watchlists to return. + # The service may return fewer than this value. + # If unspecified, at most 200 watchlists will be returned. + # The maximum value is 200; values above 200 will be coerced to 200. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListWatchlists` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to + # `ListWatchlists` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Which watchlist to return in aip.dev/160 form. + # Currently, only the following filters are supported: + # - `watchlist_user_preferences.pinned=true` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` + # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` + class ListWatchlistsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for listing watchlists. + # @!attribute [rw] watchlists + # @return [::Array<::Google::Cloud::Chronicle::V1::Watchlist>] + # Optional. The watchlists from the specified instance. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. A token, which can be sent as `page_token` to retrieve the next + # page. If this field is omitted, there are no subsequent pages. + class ListWatchlistsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for creating watchlist. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this watchlist will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] watchlist_id + # @return [::String] + # Optional. The ID to use for the watchlist, + # which will become the final component of the watchlist's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @!attribute [rw] watchlist + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # Required. The watchlist to create. + class CreateWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for updating watchlist. + # @!attribute [rw] watchlist + # @return [::Google::Cloud::Chronicle::V1::Watchlist] + # Required. The watchlist to update. + # + # The watchlist's `name` field is used to identify the watchlist to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + class UpdateWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for deleting watchlist. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the watchlist to delete. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any entities under this watchlist will also be + # deleted. (Otherwise, the request will only work if the watchlist has no + # entities.) + class DeleteWatchlistRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb new file mode 100644 index 000000000000..dde3c3cbf88d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.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 Chronicle + module V1 + # A Instance represents an instantiation of the Instance product. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of this instance. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to get a Instance. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the instance to retrieve. + # Format: + # `projects/{project_id}/locations/{location}/instances/{instance}` + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb new file mode 100644 index 000000000000..2ab663d35a0d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb @@ -0,0 +1,232 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + # ScopeInfo specifies the scope info of the reference list. + # @!attribute [rw] reference_list_scope + # @return [::Google::Cloud::Chronicle::V1::ReferenceListScope] + # Required. The list of scope names of the reference list, if the list is + # empty the reference list is treated as unscoped. + class ScopeInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ReferenceListScope specifies the list of scope names of the reference list. + # @!attribute [rw] scope_names + # @return [::Array<::String>] + # Optional. The list of scope names of the reference list. The scope names + # should be full resource names and should be of the format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. + class ReferenceListScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get details about a reference list. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the reference list to retrieve. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of the ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_FULL. + class GetReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request for a list of reference lists. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of reference lists. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of reference lists to return. + # The service may return fewer than this value. + # If unspecified, at most 100 reference lists will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListReferenceLists` call. + # Provide this to retrieve the subsequent page. + # When paginating, all other parameters provided to `ListReferenceLists` must + # match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] + # How much of each ReferenceList to view. Defaults to + # REFERENCE_LIST_VIEW_BASIC. + class ListReferenceListsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A response to a request for a list of reference lists. + # @!attribute [rw] reference_lists + # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceList>] + # The reference lists. + # Ordered in ascending alphabetical order by name. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListReferenceListsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a reference list. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this reference list will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] reference_list + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # Required. The reference list to create. + # @!attribute [rw] reference_list_id + # @return [::String] + # Required. The ID to use for the reference list. This is also the display + # name for the reference list. It must satisfy the following requirements: + # - Starts with letter. + # - Contains only letters, numbers and underscore. + # - Has length less than 256. + # - Must be unique. + class CreateReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a reference list. + # @!attribute [rw] reference_list + # @return [::Google::Cloud::Chronicle::V1::ReferenceList] + # Required. The reference list to update. + # + # The reference list's `name` field is used to identify the reference list to + # update. + # Format: + # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. + # When no field mask is supplied, all non-empty fields will be updated. + # A field mask of "*" will update all fields, whether empty or not. + class UpdateReferenceListRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reference list. + # Reference lists are user-defined lists of values which users can + # use in multiple Rules. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the reference list. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` + # @!attribute [r] display_name + # @return [::String] + # Output only. The unique display name of the reference list. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the reference list was last updated. + # @!attribute [rw] description + # @return [::String] + # Required. A user-provided description of the reference list. + # @!attribute [rw] entries + # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry>] + # Required. The entries of the reference list. + # When listed, they are returned in the order that was specified at creation + # or update. The combined size of the values of the reference list may not + # exceed 6MB. + # This is returned only when the view is REFERENCE_LIST_VIEW_FULL. + # @!attribute [r] rules + # @return [::Array<::String>] + # Output only. The resource names for the associated self-authored Rules that + # use this reference list. This is returned only when the view is + # REFERENCE_LIST_VIEW_FULL. + # @!attribute [rw] syntax_type + # @return [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType] + # Required. The syntax type indicating how list entries should be validated. + # @!attribute [r] rule_associations_count + # @return [::Integer] + # Output only. The count of self-authored rules using the reference list. + # @!attribute [rw] scope_info + # @return [::Google::Cloud::Chronicle::V1::ScopeInfo] + # The scope info of the reference list. + # During reference list creation, if this field is not set, the reference + # list without scopes (an unscoped list) will be created for an unscoped + # user. For a scoped user, this field must be set. During reference list + # update, if scope_info is requested to be updated, this field must be set. + class ReferenceList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An entry in a reference list. + # @!attribute [rw] value + # @return [::String] + # Required. The value of the entry. Maximum length is 512 characters. + class ReferenceListEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The syntax type indicating how list entries should be validated. + module ReferenceListSyntaxType + # Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. + REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0 + + # List contains plain text patterns. + REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1 + + # List contains only Regular Expression patterns. + REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2 + + # List contains only CIDR patterns. + REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3 + end + + # ReferenceListView is a mechanism for viewing partial responses of the + # ReferenceList resource. + module ReferenceListView + # The default / unset value. + # The API will default to the BASIC view for ListReferenceLists. + # The API will default to the FULL view for methods that return a single + # ReferenceList resource. + REFERENCE_LIST_VIEW_UNSPECIFIED = 0 + + # Include metadata about the ReferenceList. + # This is the default view for ListReferenceLists. + REFERENCE_LIST_VIEW_BASIC = 1 + + # Include all details about the ReferenceList: metadata, content lines, + # associated rule counts. This is the default view for GetReferenceList. + REFERENCE_LIST_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb new file mode 100644 index 000000000000..0b2584f226f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb @@ -0,0 +1,701 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Chronicle + module V1 + # The Rule resource represents a user-created rule. + # NEXT TAG: 21 + # @!attribute [rw] name + # @return [::String] + # Identifier. Full resource name for the rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] revision_id + # @return [::String] + # Output only. The revision ID of the rule. + # A new revision is created whenever the rule text is changed in any way. + # Format: `v_{10 digits}_{9 digits}` + # Populated in REVISION_METADATA_ONLY view and FULL view. + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of the rule. + # Populated in BASIC view and FULL view. + # @!attribute [rw] text + # @return [::String] + # The YARA-L content of the rule. + # Populated in FULL view. + # @!attribute [r] author + # @return [::String] + # Output only. The author of the rule. Extracted from the meta section of + # text. Populated in BASIC view and FULL view. + # @!attribute [r] severity + # @return [::Google::Cloud::Chronicle::V1::Severity] + # Output only. The severity of the rule as specified in the meta section of + # text. Populated in BASIC view and FULL view. + # @!attribute [r] metadata + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. Additional metadata specified in the meta section of text. + # Populated in FULL view. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the rule was created. + # Populated in FULL view. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the rule revision was created. + # Populated in FULL, REVISION_METADATA_ONLY views. + # @!attribute [r] compilation_state + # @return [::Google::Cloud::Chronicle::V1::Rule::CompilationState] + # Output only. The current compilation state of the rule. + # Populated in FULL view. + # @!attribute [r] type + # @return [::Google::Cloud::Chronicle::V1::RuleType] + # Output only. User-facing type of the rule. Extracted from the events + # section of rule text. Populated in BASIC view and FULL view. + # @!attribute [r] reference_lists + # @return [::Array<::String>] + # Output only. Resource names of the reference lists used in this rule. + # Populated in FULL view. + # @!attribute [r] allowed_run_frequencies + # @return [::Array<::Google::Cloud::Chronicle::V1::RunFrequency>] + # Output only. The run frequencies that are allowed for the rule. + # Populated in BASIC view and FULL view. + # @!attribute [rw] etag + # @return [::String] + # The etag for this rule. + # If this is provided on update, the request will succeed if and only if it + # matches the server-computed value, and will fail with an ABORTED error + # otherwise. + # Populated in BASIC view and FULL view. + # @!attribute [rw] scope + # @return [::String] + # Resource name of the DataAccessScope bound to this rule. + # Populated in BASIC view and FULL view. + # If reference lists are used in the rule, validations will be performed + # against this scope to ensure that the reference lists are compatible with + # both the user's and the rule's scopes. + # The scope should be in the format: + # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. + # @!attribute [r] compilation_diagnostics + # @return [::Array<::Google::Cloud::Chronicle::V1::CompilationDiagnostic>] + # Output only. A list of a rule's corresponding compilation diagnostic + # messages such as compilation errors and compilation warnings. Populated in + # FULL view. + # @!attribute [r] near_real_time_live_rule_eligible + # @return [::Boolean] + # Output only. Indicate the rule can run in near real time live rule. + # If this is true, the rule uses the near real time live rule when the run + # frequency is set to LIVE. + # @!attribute [r] inputs_used + # @return [::Google::Cloud::Chronicle::V1::InputsUsed] + # Output only. The set of inputs used in the rule. For example, if the rule + # uses $e.principal.hostname, then the uses_udm field will be true. + class Rule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class MetadataEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The current compilation state of the rule. + module CompilationState + # The compilation state is unspecified/unknown. + COMPILATION_STATE_UNSPECIFIED = 0 + + # The Rule can successfully compile. + SUCCEEDED = 1 + + # The Rule cannot successfully compile. + # This is possible if a backwards-incompatible change was made to the + # compiler. + FAILED = 2 + end + end + + # The RuleDeployment resource represents the deployment state of a Rule. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the rule deployment. + # Note that RuleDeployment is a child of the overall Rule, not any individual + # revision, so the resource ID segment for the Rule resource must not + # reference a specific revision. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether the rule is currently deployed continuously against incoming data. + # @!attribute [rw] alerting + # @return [::Boolean] + # Whether detections resulting from this deployment should be considered + # alerts. + # @!attribute [rw] archived + # @return [::Boolean] + # The archive state of the rule deployment. + # Cannot be set to true unless enabled is set to false. + # If set to true, alerting will automatically be set to false. + # If currently set to true, enabled, alerting, and run_frequency cannot be + # updated. + # @!attribute [r] archive_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the rule deployment archive state was last + # set to true. If the rule deployment's current archive state is not set to + # true, the field will be empty. + # @!attribute [rw] run_frequency + # @return [::Google::Cloud::Chronicle::V1::RunFrequency] + # The run frequency of the rule deployment. + # @!attribute [r] execution_state + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment::ExecutionState] + # Output only. The execution state of the rule deployment. + # @!attribute [r] producer_rules + # @return [::Array<::String>] + # Output only. The names of the associated/chained producer rules. Rules are + # considered producers for this rule if this rule explicitly filters on their + # ruleid. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] consumer_rules + # @return [::Array<::String>] + # Output only. The names of the associated/chained consumer rules. Rules are + # considered consumers of this rule if their rule text explicitly filters on + # this rule's ruleid. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [r] last_alert_status_change_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the rule deployment alert state was lastly + # changed. This is filled regardless of the current alert state. E.g. if the + # current alert status is false, this timestamp will be the timestamp when + # the alert status was changed to false. + class RuleDeployment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible execution states the rule deployment can be in. + module ExecutionState + # Unspecified or unknown execution state. + EXECUTION_STATE_UNSPECIFIED = 0 + + # Default execution state. + DEFAULT = 1 + + # Rules in limited state may not have their executions guaranteed. + LIMITED = 2 + + # Paused rules are not executed at all. + PAUSED = 3 + end + end + + # Retrohunt is an execution of a Rule over a time range in the past. + # @!attribute [rw] name + # @return [::String] + # The resource name of the retrohunt. + # Retrohunt is the child of a rule revision. \\{rule} in the format below is + # structured as \\{rule_id@revision_id}. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @!attribute [rw] process_interval + # @return [::Google::Type::Interval] + # Required. The start and end time of the event time range this retrohunt + # processes. + # @!attribute [r] execution_interval + # @return [::Google::Type::Interval] + # Output only. The start and end time of the retrohunt execution. If the + # retrohunt is not yet finished, the end time of the interval will not be + # populated. + # @!attribute [r] state + # @return [::Google::Cloud::Chronicle::V1::Retrohunt::State] + # Output only. The state of the retrohunt. + # @!attribute [r] progress_percentage + # @return [::Float] + # Output only. Percent progress of the retrohunt towards completion, from + # 0.00 to 100.00. + class Retrohunt + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The possible states a retrohunt can be in. + module State + # Unspecified or unknown retrohunt state. + STATE_UNSPECIFIED = 0 + + # Running state. + RUNNING = 1 + + # Done state. + DONE = 2 + + # Cancelled state. + CANCELLED = 3 + + # Failed state. + FAILED = 4 + end + end + + # Request message for CreateRule method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource where this rule will be created. + # Format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] rule + # @return [::Google::Cloud::Chronicle::V1::Rule] + # Required. The rule to create. + class CreateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRule method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the Rule being + # returned. If unspecified, defaults to FULL. + class GetRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRules method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent, which owns this collection of rules. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rules to return. The service may return fewer than + # this value. If unspecified, at most 100 rules will be returned. The + # maximum value is 1000; values above 1000 will be coerced to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRules` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRules` + # must match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # view indicates the scope of fields to populate for the Rule being returned. + # If unspecified, defaults to BASIC. + # @!attribute [rw] filter + # @return [::String] + # Only the following filters are allowed: + # "reference_lists:\\{reference_list_name}" + # "data_tables:\\{data_table_name}" + # "display_name:\\{display_name}" + class ListRulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRules method. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] + # The rules from the specified instance. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRule method. + # @!attribute [rw] rule + # @return [::Google::Cloud::Chronicle::V1::Rule] + # Required. The rule to update. + # + # The rule's `name` field is used to identify the rule to update. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to update. If not included, all fields with a non-empty + # value will be overwritten. + class UpdateRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the DeleteRule method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to delete. A rule revision timestamp cannot + # be specified as part of the name, as deleting specific revisions is not + # supported. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any retrohunts and any detections associated with + # the rule will also be deleted. If set to false, the call will only succeed + # if the rule has no associated retrohunts, including completed retrohunts, + # and no associated detections. Regardless of this field's value, the rule + # deployment associated with this rule will also be deleted. + class DeleteRuleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRuleRevisions method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule to list revisions for. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of revisions to return per page. The service may return + # fewer than this value. If unspecified, at most 100 revisions will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # The page token, received from a previous `ListRuleRevisions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleRevisions` + # must match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Chronicle::V1::RuleView] + # The view field indicates the scope of fields to populate for the revision + # being returned. If unspecified, defaults to BASIC. + class ListRuleRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRuleRevisions method. + # @!attribute [rw] rules + # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] + # The revisions of the rule. + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRuleRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateRetrohunt method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of retrohunt, which is a rule. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] retrohunt + # @return [::Google::Cloud::Chronicle::V1::Retrohunt] + # Required. The retrohunt to create. + class CreateRetrohuntRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRetrohunt method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the retrohunt to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + class GetRetrohuntRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRetrohunts method. + # @!attribute [rw] parent + # @return [::String] + # Required. The rule that the retrohunts belong to. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of retrohunt to return. The service may return fewer + # than this value. If unspecified, at most 100 retrohunts will be returned. + # The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRetrohunts` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRetrohunts` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # state + class ListRetrohuntsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRetrohunts method. + # @!attribute [rw] retrohunts + # @return [::Array<::Google::Cloud::Chronicle::V1::Retrohunt>] + # The retrohunts from the specified rule. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRetrohuntsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRuleDeployment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the rule deployment to retrieve. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + class GetRuleDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRuleDeployments. + # @!attribute [rw] parent + # @return [::String] + # Required. The collection of all parents which own all rule deployments. The + # "-" wildcard token must be used as the rule identifier in the resource + # path. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/-` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of rule deployments to return. The service may return + # fewer than this value. If unspecified, at most 100 rule deployments will be + # returned. The maximum value is 1000; values above 1000 will be coerced to + # 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListRuleDeployments` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListRuleDeployments` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # A filter that can be used to retrieve specific rule deployments. + # The following fields are filterable: + # archived, name + class ListRuleDeploymentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRuleDeployments. + # @!attribute [rw] rule_deployments + # @return [::Array<::Google::Cloud::Chronicle::V1::RuleDeployment>] + # The rule deployments from all rules. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListRuleDeploymentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRuleDeployment. + # @!attribute [rw] rule_deployment + # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] + # Required. The rule deployment to update. + # + # The rule deployment's `name` field is used to identify the rule deployment + # to update. Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields to update. + class UpdateRuleDeploymentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CompilationPosition represents the location of a compilation diagnostic in + # rule text. + # @!attribute [r] start_line + # @return [::Integer] + # Output only. Start line number, beginning at 1. + # @!attribute [r] start_column + # @return [::Integer] + # Output only. Start column number, beginning at 1. + # @!attribute [r] end_line + # @return [::Integer] + # Output only. End line number, beginning at 1. + # @!attribute [r] end_column + # @return [::Integer] + # Output only. End column number, beginning at 1. + class CompilationPosition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CompilationDiagnostic represents a compilation diagnostic generated + # during a rule's compilation, such as a compilation error or a compilation + # warning. + # @!attribute [r] message + # @return [::String] + # Output only. The diagnostic message. + # @!attribute [r] position + # @return [::Google::Cloud::Chronicle::V1::CompilationPosition] + # Output only. The approximate position in the rule text associated with the + # compilation diagnostic. + # Compilation Position may be empty. + # @!attribute [r] severity + # @return [::Google::Cloud::Chronicle::V1::CompilationDiagnostic::Severity] + # Output only. The severity of a rule's compilation diagnostic. + # @!attribute [r] uri + # @return [::String] + # Output only. Link to documentation that describes a diagnostic in more + # detail. + class CompilationDiagnostic + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity level of the compilation diagnostic. + module Severity + # An unspecified severity level. + SEVERITY_UNSPECIFIED = 0 + + # A compilation warning. + WARNING = 1 + + # A compilation error. + ERROR = 2 + end + end + + # Severity represents the severity level of the rule. + # @!attribute [rw] display_name + # @return [::String] + # The display name of the severity level. Extracted from the meta section of + # the rule text. + class Severity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Operation Metadata for Retrohunts. + # @!attribute [rw] retrohunt + # @return [::String] + # The name of the retrohunt. + # Format: + # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` + # @!attribute [rw] execution_interval + # @return [::Google::Type::Interval] + # The start and end time of the retrohunt execution. If the retrohunt is not + # yet finished, the end time of the interval will not be filled. + # @!attribute [rw] progress_percentage + # @return [::Float] + # Percent progress of the retrohunt towards completion, from 0.00 to 100.00. + class RetrohuntMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # InputsUsed is a convenience field that tells us which sources + # of events (if any) were used in the rule. + # NEXT TAG: 4 + # @!attribute [rw] uses_udm + # @return [::Boolean] + # Optional. Whether the rule queries UDM events. + # @!attribute [rw] uses_entity + # @return [::Boolean] + # Optional. Whether the rule queries entity events. + # @!attribute [rw] uses_detection + # @return [::Boolean] + # Optional. Whether the rule queries detections. + class InputsUsed + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RunFrequency indicates the run frequency at which a YARA-L 2 rule will run if + # enabled. + module RunFrequency + # The run frequency is unspecified/unknown. + RUN_FREQUENCY_UNSPECIFIED = 0 + + # Executes in real time. + LIVE = 1 + + # Executes once per hour. + HOURLY = 2 + + # Executes once per day. + DAILY = 3 + end + + # RuleType indicates the YARA-L rule type of user-created and Google Cloud + # Threat Intelligence (GCTI) authored rules. + module RuleType + # The rule type is unspecified/unknown. + RULE_TYPE_UNSPECIFIED = 0 + + # Rule checks for the existence of a single event. + SINGLE_EVENT = 1 + + # Rule checks for correlation between multiple events + MULTI_EVENT = 2 + end + + # RuleView indicates the scope of fields to populate when returning the Rule + # resource. + module RuleView + # The default/unset value. + # The API will default to the BASIC view for ListRules/ListRuleRevisions. + # The API will default to the FULL view for GetRule. + RULE_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the rule, but not the full contents. + # Returned fields include: revision_id, revision_create_time, display_name, + # author, severity, type, allowed_run_frequency, + # near_real_time_live_rule_eligible, etag, and scope. + # This is the default value for ListRules and ListRuleRevisions. + BASIC = 1 + + # Include all fields. + # This is the default value for GetRule. + FULL = 2 + + # Include basic metadata about the rule's revision only. + # Returned fields include: revision_id and revision_create_time. + REVISION_METADATA_ONLY = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.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! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile new file mode 100644 index 000000000000..8856abb69960 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1", path: "../" +else + gem "google-cloud-chronicle-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-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb new file mode 100644 index 000000000000..3bfe7e104b89 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_label. +# +def create_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new + + # Call the create_data_access_label method. + result = client.create_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb new file mode 100644 index 000000000000..870849c6db47 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope. +# +def create_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new + + # Call the create_data_access_scope method. + result = client.create_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb new file mode 100644 index 000000000000..e12c3440d608 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label. +# +def delete_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new + + # Call the delete_data_access_label method. + result = client.delete_data_access_label request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb new file mode 100644 index 000000000000..0341030faa5c --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope. +# +def delete_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new + + # Call the delete_data_access_scope method. + result = client.delete_data_access_scope request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb new file mode 100644 index 000000000000..988f66268da5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.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 chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_label. +# +def get_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new + + # Call the get_data_access_label method. + result = client.get_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb new file mode 100644 index 000000000000..d9de6dbf8b84 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_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 chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope. +# +def get_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new + + # Call the get_data_access_scope method. + result = client.get_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb new file mode 100644 index 000000000000..e62e53adb905 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.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 chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_access_labels call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels. +# +def list_data_access_labels + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new + + # Call the list_data_access_labels method. + result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. + p item + end +end +# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb new file mode 100644 index 000000000000..4b11c99375f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_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 chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_data_access_scopes call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes. +# +def list_data_access_scopes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new + + # Call the list_data_access_scopes method. + result = client.list_data_access_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::Chronicle::V1::DataAccessScope. + p item + end +end +# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb new file mode 100644 index 000000000000..2974c40a7a70 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_label. +# +def update_data_access_label + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new + + # Call the update_data_access_label method. + result = client.update_data_access_label request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb new file mode 100644 index 000000000000..81a0e349a4fa --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope. +# +def update_data_access_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new + + # Call the update_data_access_scope method. + result = client.update_data_access_scope request + + # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. + p result +end +# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb new file mode 100644 index 000000000000..76ac024b263d --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.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 chronicle_v1_generated_EntityService_CreateWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#create_watchlist. +# +def create_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new + + # Call the create_watchlist method. + result = client.create_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb new file mode 100644 index 000000000000..dce65e1ea1f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.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 chronicle_v1_generated_EntityService_DeleteWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#delete_watchlist. +# +def delete_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new + + # Call the delete_watchlist method. + result = client.delete_watchlist request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb new file mode 100644 index 000000000000..429a7abe7363 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.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 chronicle_v1_generated_EntityService_GetWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#get_watchlist. +# +def get_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new + + # Call the get_watchlist method. + result = client.get_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb new file mode 100644 index 000000000000..07fb0f279542 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.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 chronicle_v1_generated_EntityService_ListWatchlists_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_watchlists call in the EntityService 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::Chronicle::V1::EntityService::Client#list_watchlists. +# +def list_watchlists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new + + # Call the list_watchlists method. + result = client.list_watchlists 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::Chronicle::V1::Watchlist. + p item + end +end +# [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb new file mode 100644 index 000000000000..fe92dd9d1924 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.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 chronicle_v1_generated_EntityService_UpdateWatchlist_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#update_watchlist. +# +def update_watchlist + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::EntityService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new + + # Call the update_watchlist method. + result = client.update_watchlist request + + # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. + p result +end +# [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb new file mode 100644 index 000000000000..8fdeb2d7ad47 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.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 chronicle_v1_generated_InstanceService_GetInstance_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_instance call in the InstanceService 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::Chronicle::V1::InstanceService::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::InstanceService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::Chronicle::V1::Instance. + p result +end +# [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb new file mode 100644 index 000000000000..56680299d2ab --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.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 chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#create_reference_list. +# +def create_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new + + # Call the create_reference_list method. + result = client.create_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb new file mode 100644 index 000000000000..9fee3cf12ff5 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.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 chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#get_reference_list. +# +def get_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new + + # Call the get_reference_list method. + result = client.get_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb new file mode 100644 index 000000000000..11926590f8d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.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 chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_reference_lists call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#list_reference_lists. +# +def list_reference_lists + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new + + # Call the list_reference_lists method. + result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. + p item + end +end +# [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb new file mode 100644 index 000000000000..a914529bd2b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.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 chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#update_reference_list. +# +def update_reference_list + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new + + # Call the update_reference_list method. + result = client.update_reference_list request + + # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. + p result +end +# [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb new file mode 100644 index 000000000000..0cac677634bb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#create_retrohunt. +# +def create_retrohunt + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new + + # Call the create_retrohunt method. + result = client.create_retrohunt 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb new file mode 100644 index 000000000000..57e6c2e2a973 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.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 chronicle_v1_generated_RuleService_CreateRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the create_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#create_rule. +# +def create_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new + + # Call the create_rule method. + result = client.create_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb new file mode 100644 index 000000000000..db56a864183a --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.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 chronicle_v1_generated_RuleService_DeleteRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the delete_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#delete_rule. +# +def delete_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new + + # Call the delete_rule method. + result = client.delete_rule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb new file mode 100644 index 000000000000..481026822412 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.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 chronicle_v1_generated_RuleService_GetRetrohunt_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#get_retrohunt. +# +def get_retrohunt + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new + + # Call the get_retrohunt method. + result = client.get_retrohunt request + + # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. + p result +end +# [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb new file mode 100644 index 000000000000..eb550559d7a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.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 chronicle_v1_generated_RuleService_GetRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule. +# +def get_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRuleRequest.new + + # Call the get_rule method. + result = client.get_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb new file mode 100644 index 000000000000..c4d8a125f230 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.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 chronicle_v1_generated_RuleService_GetRuleDeployment_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the get_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule_deployment. +# +def get_rule_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new + + # Call the get_rule_deployment method. + result = client.get_rule_deployment request + + # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + p result +end +# [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb new file mode 100644 index 000000000000..fd21d3d155c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.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 chronicle_v1_generated_RuleService_ListRetrohunts_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_retrohunts call in the RuleService 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::Chronicle::V1::RuleService::Client#list_retrohunts. +# +def list_retrohunts + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new + + # Call the list_retrohunts method. + result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb new file mode 100644 index 000000000000..061793135cde --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.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 chronicle_v1_generated_RuleService_ListRuleDeployments_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rule_deployments call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_deployments. +# +def list_rule_deployments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new + + # Call the list_rule_deployments method. + result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb new file mode 100644 index 000000000000..ee56939b8586 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.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 chronicle_v1_generated_RuleService_ListRuleRevisions_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rule_revisions call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_revisions. +# +def list_rule_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new + + # Call the list_rule_revisions method. + result = client.list_rule_revisions 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::Chronicle::V1::Rule. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb new file mode 100644 index 000000000000..607a52db7bbb --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.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 chronicle_v1_generated_RuleService_ListRules_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the list_rules call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rules. +# +def list_rules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::ListRulesRequest.new + + # Call the list_rules method. + result = client.list_rules 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::Chronicle::V1::Rule. + p item + end +end +# [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb new file mode 100644 index 000000000000..612a59e32e81 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.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 chronicle_v1_generated_RuleService_UpdateRule_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule. +# +def update_rule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new + + # Call the update_rule method. + result = client.update_rule request + + # The returned object is of type Google::Cloud::Chronicle::V1::Rule. + p result +end +# [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb new file mode 100644 index 000000000000..c8c3638a445e --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.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 chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] +require "google/cloud/chronicle/v1" + +## +# Snippet for the update_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule_deployment. +# +def update_rule_deployment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Chronicle::V1::RuleService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new + + # Call the update_rule_deployment method. + result = client.update_rule_deployment request + + # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. + p result +end +# [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json new file mode 100644 index 000000000000..97757c48b4dd --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json @@ -0,0 +1,1295 @@ +{ + "client_library": { + "name": "google-cloud-chronicle-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.chronicle.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync", + "title": "Snippet for the create_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label.", + "file": "data_access_control_service/create_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "CreateDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync", + "title": "Snippet for the get_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label.", + "file": "data_access_control_service/get_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "GetDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync", + "title": "Snippet for the list_data_access_labels call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels.", + "file": "data_access_control_service/list_data_access_labels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_access_labels", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "ListDataAccessLabels", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessLabels", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync", + "title": "Snippet for the update_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label.", + "file": "data_access_control_service/update_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "UpdateDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync", + "title": "Snippet for the delete_data_access_label call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label.", + "file": "data_access_control_service/delete_data_access_label.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_access_label", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "DeleteDataAccessLabel", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessLabel", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync", + "title": "Snippet for the create_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope.", + "file": "data_access_control_service/create_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "CreateDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync", + "title": "Snippet for the get_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope.", + "file": "data_access_control_service/get_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "GetDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync", + "title": "Snippet for the list_data_access_scopes call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes.", + "file": "data_access_control_service/list_data_access_scopes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_data_access_scopes", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "ListDataAccessScopes", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessScopes", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync", + "title": "Snippet for the update_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope.", + "file": "data_access_control_service/update_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "UpdateDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync", + "title": "Snippet for the delete_data_access_scope call in the DataAccessControlService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope.", + "file": "data_access_control_service/delete_data_access_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_data_access_scope", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "DataAccessControlService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" + }, + "method": { + "short_name": "DeleteDataAccessScope", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessScope", + "service": { + "short_name": "DataAccessControlService", + "full_name": "google.cloud.chronicle.v1.DataAccessControlService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_GetWatchlist_sync", + "title": "Snippet for the get_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist.", + "file": "entity_service/get_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "GetWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.GetWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_ListWatchlists_sync", + "title": "Snippet for the list_watchlists call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists.", + "file": "entity_service/list_watchlists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_watchlists", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListWatchlistsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListWatchlistsResponse", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "ListWatchlists", + "full_name": "google.cloud.chronicle.v1.EntityService.ListWatchlists", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_CreateWatchlist_sync", + "title": "Snippet for the create_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist.", + "file": "entity_service/create_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "CreateWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.CreateWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_UpdateWatchlist_sync", + "title": "Snippet for the update_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist.", + "file": "entity_service/update_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "UpdateWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.UpdateWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_EntityService_DeleteWatchlist_sync", + "title": "Snippet for the delete_watchlist call in the EntityService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist.", + "file": "entity_service/delete_watchlist.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_watchlist", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "EntityService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" + }, + "method": { + "short_name": "DeleteWatchlist", + "full_name": "google.cloud.chronicle.v1.EntityService.DeleteWatchlist", + "service": { + "short_name": "EntityService", + "full_name": "google.cloud.chronicle.v1.EntityService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_InstanceService_GetInstance_sync", + "title": "Snippet for the get_instance call in the InstanceService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance.", + "file": "instance_service/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Instance", + "client": { + "short_name": "InstanceService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.chronicle.v1.InstanceService.GetInstance", + "service": { + "short_name": "InstanceService", + "full_name": "google.cloud.chronicle.v1.InstanceService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_GetReferenceList_sync", + "title": "Snippet for the get_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list.", + "file": "reference_list_service/get_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "GetReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.GetReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync", + "title": "Snippet for the list_reference_lists call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists.", + "file": "reference_list_service/list_reference_lists.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_reference_lists", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListReferenceListsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListReferenceListsResponse", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "ListReferenceLists", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.ListReferenceLists", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync", + "title": "Snippet for the create_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list.", + "file": "reference_list_service/create_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "CreateReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.CreateReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync", + "title": "Snippet for the update_reference_list call in the ReferenceListService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list.", + "file": "reference_list_service/update_reference_list.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_reference_list", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", + "client": { + "short_name": "ReferenceListService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" + }, + "method": { + "short_name": "UpdateReferenceList", + "full_name": "google.cloud.chronicle.v1.ReferenceListService.UpdateReferenceList", + "service": { + "short_name": "ReferenceListService", + "full_name": "google.cloud.chronicle.v1.ReferenceListService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_CreateRule_sync", + "title": "Snippet for the create_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_rule.", + "file": "rule_service/create_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "CreateRule", + "full_name": "google.cloud.chronicle.v1.RuleService.CreateRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRule_sync", + "title": "Snippet for the get_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule.", + "file": "rule_service/get_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRule", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRules_sync", + "title": "Snippet for the list_rules call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rules.", + "file": "rule_service/list_rules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rules", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRulesResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRules", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRules", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_UpdateRule_sync", + "title": "Snippet for the update_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule.", + "file": "rule_service/update_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Rule", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "UpdateRule", + "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_DeleteRule_sync", + "title": "Snippet for the delete_rule call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule.", + "file": "rule_service/delete_rule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_rule", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::DeleteRuleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "DeleteRule", + "full_name": "google.cloud.chronicle.v1.RuleService.DeleteRule", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRuleRevisions_sync", + "title": "Snippet for the list_rule_revisions call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions.", + "file": "rule_service/list_rule_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rule_revisions", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRuleRevisions", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleRevisions", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_CreateRetrohunt_sync", + "title": "Snippet for the create_retrohunt call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt.", + "file": "rule_service/create_retrohunt.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_retrohunt", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "CreateRetrohunt", + "full_name": "google.cloud.chronicle.v1.RuleService.CreateRetrohunt", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRetrohunt_sync", + "title": "Snippet for the get_retrohunt call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt.", + "file": "rule_service/get_retrohunt.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_retrohunt", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRetrohuntRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::Retrohunt", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRetrohunt", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRetrohunt", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRetrohunts_sync", + "title": "Snippet for the list_retrohunts call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts.", + "file": "rule_service/list_retrohunts.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_retrohunts", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRetrohunts", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRetrohunts", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_GetRuleDeployment_sync", + "title": "Snippet for the get_rule_deployment call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment.", + "file": "rule_service/get_rule_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_rule_deployment", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "GetRuleDeployment", + "full_name": "google.cloud.chronicle.v1.RuleService.GetRuleDeployment", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_ListRuleDeployments_sync", + "title": "Snippet for the list_rule_deployments call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments.", + "file": "rule_service/list_rule_deployments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_rule_deployments", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "ListRuleDeployments", + "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleDeployments", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync", + "title": "Snippet for the update_rule_deployment call in the RuleService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment.", + "file": "rule_service/update_rule_deployment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_rule_deployment", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", + "client": { + "short_name": "RuleService::Client", + "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" + }, + "method": { + "short_name": "UpdateRuleDeployment", + "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRuleDeployment", + "service": { + "short_name": "RuleService", + "full_name": "google.cloud.chronicle.v1.RuleService" + } + } + }, + "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-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb new file mode 100644 index 000000000000..8ef29809b076 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb @@ -0,0 +1,79 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/chronicle/v1/data_access_control_service" + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_label_path project: "value0", location: "value1", instance: "value2", data_access_label: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessLabels/value3", path + end + end + + def test_data_access_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::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb new file mode 100644 index 000000000000..a20b2c953e40 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb @@ -0,0 +1,651 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service/rest" + + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_create_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_access_label = {} + data_access_label_id = "hello world" + + create_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_access_label_client_stub.call_count + end + end + end + + def test_get_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_access_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_access_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_access_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_access_label_client_stub.call_count + end + end + end + + def test_list_data_access_labels + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_labels_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_labels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_access_labels_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_access_labels({ 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_data_access_labels 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_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels({ 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_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels_client_stub.call_count + end + end + end + + def test_update_data_access_label + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_access_label = {} + update_mask = {} + + update_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_data_access_label_client_stub.call_count + end + end + end + + def test_delete_data_access_label + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_label_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_access_label({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_access_label name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_access_label({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_access_label_client_stub.call_count + end + end + end + + def test_create_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + data_access_scope = {} + data_access_scope_id = "hello world" + + create_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_data_access_scope_client_stub.call_count + end + end + end + + def test_get_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_data_access_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_data_access_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_data_access_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_data_access_scope_client_stub.call_count + end + end + end + + def test_list_data_access_scopes + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_scopes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_data_access_scopes_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_data_access_scopes({ 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_data_access_scopes 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_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes({ 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_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes_client_stub.call_count + end + end + end + + def test_update_data_access_scope + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + data_access_scope = {} + update_mask = {} + + update_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_data_access_scope({ data_access_scope: data_access_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_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_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_data_access_scope_client_stub.call_count + end + end + end + + def test_delete_data_access_scope + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_data_access_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_data_access_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_data_access_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb new file mode 100644 index 000000000000..32e8f27fe8cf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb @@ -0,0 +1,718 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/data_access_control_pb" +require "google/cloud/chronicle/v1/data_access_control_service" + +class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_create_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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" + data_access_label = {} + data_access_label_id = "hello world" + + create_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] + assert_equal "hello world", request["data_access_label_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_access_label_client_stub.call_rpc_count + end + end + + def test_get_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_access_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_access_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_access_label({ 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_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count + end + end + + def test_list_data_access_labels + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_access_labels, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, 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_data_access_labels_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_access_labels({ 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_data_access_labels 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_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels({ 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_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels_client_stub.call_rpc_count + end + end + + def test_update_data_access_label + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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. + data_access_label = {} + update_mask = {} + + update_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_access_label_client_stub.call_rpc_count + end + end + + def test_delete_data_access_label + # 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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_access_label, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_access_label_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_access_label({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_access_label name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_access_label({ 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_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count + end + end + + def test_create_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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" + data_access_scope = {} + data_access_scope_id = "hello world" + + create_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] + assert_equal "hello world", request["data_access_scope_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_data_access_scope_client_stub.call_rpc_count + end + end + + def test_get_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_data_access_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_data_access_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_data_access_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_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.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_data_access_scope_client_stub.call_rpc_count + end + end + + def test_list_data_access_scopes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_data_access_scopes, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, 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_data_access_scopes_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_data_access_scopes({ 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_data_access_scopes 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_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes({ 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_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes_client_stub.call_rpc_count + end + end + + def test_update_data_access_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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. + data_access_scope = {} + update_mask = {} + + update_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_data_access_scope_client_stub.call_rpc_count + end + end + + def test_delete_data_access_scope + # 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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_data_access_scope, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_data_access_scope_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_data_access_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_data_access_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_data_access_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.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.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_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb new file mode 100644 index 000000000000..5d9dc9f08219 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/entity_service" + +class ::Google::Cloud::Chronicle::V1::EntityService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_watchlist_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.watchlist_path project: "value0", location: "value1", instance: "value2", watchlist: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/watchlists/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb new file mode 100644 index 000000000000..eaea39586386 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb @@ -0,0 +1,376 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service/rest" + + +class ::Google::Cloud::Chronicle::V1::EntityService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_get_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_watchlist({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_watchlist name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_watchlist({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_watchlist_client_stub.call_count + end + end + end + + def test_list_watchlists + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlists_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_list_watchlists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_watchlists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_watchlists({ 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_watchlists 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_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists({ 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_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists_client_stub.call_count + end + end + end + + def test_create_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + watchlist_id = "hello world" + watchlist = {} + + create_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_create_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_watchlist_client_stub.call_count + end + end + end + + def test_update_watchlist + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + watchlist = {} + update_mask = {} + + update_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_update_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_watchlist watchlist: watchlist, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_watchlist_client_stub.call_count + end + end + end + + def test_delete_watchlist + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_delete_watchlist_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_watchlist({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_watchlist name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_watchlist({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb new file mode 100644 index 000000000000..33700fc8c675 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb @@ -0,0 +1,413 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/entity_pb" +require "google/cloud/chronicle/v1/entity_service" + +class ::Google::Cloud::Chronicle::V1::EntityService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_watchlist({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_watchlist name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_watchlist({ 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_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.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_watchlist_client_stub.call_rpc_count + end + end + + def test_list_watchlists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_watchlists, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, 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_watchlists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_watchlists({ 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_watchlists 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_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists({ 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_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists_client_stub.call_rpc_count + end + end + + def test_create_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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" + watchlist_id = "hello world" + watchlist = {} + + create_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["watchlist_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_watchlist_client_stub.call_rpc_count + end + end + + def test_update_watchlist + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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. + watchlist = {} + update_mask = {} + + update_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_watchlist watchlist: watchlist, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_watchlist_client_stub.call_rpc_count + end + end + + def test_delete_watchlist + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_watchlist, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_watchlist_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_watchlist({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_watchlist name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_watchlist({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::EntityService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb new file mode 100644 index 000000000000..07fe0e7efd30 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/chronicle/v1/instance_service" + +class ::Google::Cloud::Chronicle::V1::InstanceService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb new file mode 100644 index 000000000000..68e2d76e63cf --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb @@ -0,0 +1,153 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service/rest" + + +class ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_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::Chronicle::V1::InstanceService::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb new file mode 100644 index 000000000000..267cd03ea876 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb @@ -0,0 +1,162 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/chronicle/v1/instance_pb" +require "google/cloud/chronicle/v1/instance_service" + +class ::Google::Cloud::Chronicle::V1::InstanceService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Instance.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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ 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_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.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_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::InstanceService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb new file mode 100644 index 000000000000..0a3e0e6f9025 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/reference_list_service" + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_reference_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb new file mode 100644 index 000000000000..e077a4322795 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb @@ -0,0 +1,322 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service/rest" + + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + get_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_get_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_reference_list({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_reference_list name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_reference_list({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_reference_list_client_stub.call_count + end + end + end + + def test_list_reference_lists + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + list_reference_lists_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_list_reference_lists_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_reference_lists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_reference_lists_client_stub.call_count + end + end + end + + def test_create_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + reference_list = {} + reference_list_id = "hello world" + + create_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_create_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_reference_list_client_stub.call_count + end + end + end + + def test_update_reference_list + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + reference_list = {} + update_mask = {} + + update_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_update_reference_list_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_reference_list reference_list: reference_list, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb new file mode 100644 index 000000000000..02598fddb1c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb @@ -0,0 +1,355 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/reference_list_pb" +require "google/cloud/chronicle/v1/reference_list_service" + +class ::Google::Cloud::Chronicle::V1::ReferenceListService::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + get_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, request + assert_equal "hello world", request["name"] + assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_reference_list({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_reference_list name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_reference_list({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_reference_list_client_stub.call_rpc_count + end + end + + def test_list_reference_lists + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" + view = :REFERENCE_LIST_VIEW_UNSPECIFIED + + list_reference_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_reference_lists, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_reference_lists_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) 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_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view 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_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_reference_lists_client_stub.call_rpc_count + end + end + + def test_create_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" + reference_list = {} + reference_list_id = "hello world" + + create_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] + assert_equal "hello world", request["reference_list_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_reference_list_client_stub.call_rpc_count + end + end + + def test_update_reference_list + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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. + reference_list = {} + update_mask = {} + + update_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_reference_list, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_reference_list_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_reference_list reference_list: reference_list, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::ReferenceListService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb new file mode 100644 index 000000000000..91602a5d5414 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_services_pb" +require "google/cloud/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb new file mode 100644 index 000000000000..cc40252d4fea --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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_data_access_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::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/value2", path + end + end + + def test_reference_list_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path + end + end + + def test_retrohunt_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.retrohunt_path project: "value0", location: "value1", instance: "value2", rule: "value3", retrohunt: "value4" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/retrohunts/value4", path + end + end + + def test_rule_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_path project: "value0", location: "value1", instance: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3", path + end + end + + def test_rule_deployment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rule_deployment_path project: "value0", location: "value1", instance: "value2", rule: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/deployment", path + end + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb new file mode 100644 index 000000000000..22d16284fac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb @@ -0,0 +1,766 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service/rest" + + +class ::Google::Cloud::Chronicle::V1::RuleService::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_create_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rule = {} + + create_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_rule({ parent: parent, rule: rule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_rule parent: parent, rule: rule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_rule({ parent: parent, rule: rule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_count + end + end + end + + def test_get_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + get_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rule({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rule name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rule({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_count + end + end + end + + def test_list_rules + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" + view = :RULE_VIEW_UNSPECIFIED + filter = "hello world" + + list_rules_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rules_client_stub.call_count + end + end + end + + def test_update_rule + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Rule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule = {} + update_mask = {} + + update_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_count + end + end + end + + def test_delete_rule + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_rule({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_rule name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_rule({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_count + end + end + end + + def test_list_rule_revisions + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + list_rule_revisions_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rule_revisions_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_rule_revisions_client_stub.call_count + end + end + end + + def test_create_retrohunt + # 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" + retrohunt = {} + + create_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_retrohunt_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_retrohunt parent: parent, retrohunt: retrohunt do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_retrohunt_client_stub.call_count + end + end + end + + def test_get_retrohunt + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::Retrohunt.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_retrohunt_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_retrohunt({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_retrohunt name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_retrohunt({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_retrohunt_client_stub.call_count + end + end + end + + def test_list_retrohunts + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_retrohunts_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_retrohunts_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_retrohunts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_retrohunts({ 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_retrohunts 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_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts({ 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_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts_client_stub.call_count + end + end + end + + def test_get_rule_deployment + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_rule_deployment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_rule_deployment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_rule_deployment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_rule_deployment_client_stub.call_count + end + end + end + + def test_list_rule_deployments + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployments_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_deployments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_rule_deployments_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_rule_deployments({ 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_rule_deployments 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_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments({ 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_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments_client_stub.call_count + end + end + end + + def test_update_rule_deployment + # Create test objects. + client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rule_deployment = {} + update_mask = {} + + update_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_deployment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb new file mode 100644 index 000000000000..75d72ff1a561 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb @@ -0,0 +1,877 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/chronicle/v1/rule_pb" +require "google/cloud/chronicle/v1/rule_service" + +class ::Google::Cloud::Chronicle::V1::RuleService::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_create_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" + rule = {} + + create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRuleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_rule({ parent: parent, rule: rule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_rule parent: parent, rule: rule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_rule_client_stub.call_rpc_count + end + end + + def test_get_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rule({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rule name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rule({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_rule_client_stub.call_rpc_count + end + end + + def test_list_rules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" + view = :RULE_VIEW_UNSPECIFIED + filter = "hello world" + + list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rules, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRulesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rules_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules_client_stub.call_rpc_count + end + end + + def test_update_rule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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. + rule = {} + update_mask = {} + + update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rule rule: rule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rule({ rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_rule_client_stub.call_rpc_count + end + end + + def test_delete_rule + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_rule, name + assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_rule_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_rule({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_rule name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_rule({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_rule_client_stub.call_rpc_count + end + end + + def test_list_rule_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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" + page_size = 42 + page_token = "hello world" + view = :RULE_VIEW_UNSPECIFIED + + list_rule_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rule_revisions, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_rule_revisions_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) 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_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view 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_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) 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_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, 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_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), 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_rule_revisions_client_stub.call_rpc_count + end + end + + def test_create_retrohunt + # 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" + retrohunt = {} + + create_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_retrohunt, name + assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Retrohunt), request["retrohunt"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) 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_retrohunt parent: parent, retrohunt: retrohunt 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_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) 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_retrohunt({ parent: parent, retrohunt: retrohunt }, 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_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), 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_retrohunt_client_stub.call_rpc_count + end + end + + def test_get_retrohunt + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_retrohunt, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_retrohunt_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_retrohunt({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_retrohunt name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_retrohunt({ 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_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.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_retrohunt_client_stub.call_rpc_count + end + end + + def test_list_retrohunts + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_retrohunts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_retrohunts, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, 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_retrohunts_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_retrohunts({ 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_retrohunts 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_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts({ 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_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts_client_stub.call_rpc_count + end + end + + def test_get_rule_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_rule_deployment, name + assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_rule_deployment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_rule_deployment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_rule_deployment({ 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_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.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_rule_deployment_client_stub.call_rpc_count + end + end + + def test_list_rule_deployments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_rule_deployments, name + assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, 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_rule_deployments_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_rule_deployments({ 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_rule_deployments 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_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments({ 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_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments_client_stub.call_rpc_count + end + end + + def test_update_rule_deployment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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. + rule_deployment = {} + update_mask = {} + + update_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_rule_deployment, name + assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::RuleDeployment), request["rule_deployment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_rule_deployment_client_stub do + # Create client + client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.gitignore b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.repo-metadata.json new file mode 100644 index 000000000000..a2581d7a2255 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "cloudcontrolspartner.googleapis.com", + "api_shortname": "cloudcontrolspartner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest", + "distribution_name": "google-cloud-cloud_controls_partner-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudcontrolspartner", + "name_pretty": "Cloud Controls Partner V1 API", + "product_documentation": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml new file mode 100644 index 000000000000..17c9971c2682 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1.rb" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.toys.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/.yardopts b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.yardopts new file mode 100644 index 000000000000..73e8aa9b217d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Controls Partner 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-cloud_controls_partner-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..51638ae5dfbd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-cloud_controls_partner-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-cloud_controls_partner-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/cloud_controls_partner/v1" + +client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/cloud_controls_partner/v1" + +::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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-cloud_controls_partner-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/cloud_controls_partner/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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-cloud_controls_partner-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/LICENSE.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/README.md new file mode 100644 index 000000000000..5eb67ea1236e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Controls Partner V1 API + +Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. + +Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Controls Partner V1 API. Most users should consider using +the main client gem, +[google-cloud-cloud_controls_partner](https://rubygems.org/gems/google-cloud-cloud_controls_partner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-cloud_controls_partner-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/cloudcontrolspartner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/cloud_controls_partner/v1" + +client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new +request = ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new # (request fields as keyword arguments...) +response = client.get_workload request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest) +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/cloud_controls_partner/v1" +require "logger" + +client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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-cloud_controls_partner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-cloud_controls_partner-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-cloud_controls_partner`. +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-cloud_controls_partner-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-cloud_controls_partner-v1/Rakefile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Rakefile new file mode 100644 index 000000000000..7c9e46917fdf --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials" + ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-cloud_controls_partner-v1" + header "google-cloud-cloud_controls_partner-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-cloud_controls_partner-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/gapic_metadata.json new file mode 100644 index 000000000000..253ca87bbba5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.cloudcontrolspartner.v1", + "libraryPackage": "::Google::Cloud::CloudControlsPartner::V1", + "services": { + "CloudControlsPartnerCore": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client", + "rpcs": { + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + }, + "GetCustomer": { + "methods": [ + "get_customer" + ] + }, + "ListCustomers": { + "methods": [ + "list_customers" + ] + }, + "GetEkmConnections": { + "methods": [ + "get_ekm_connections" + ] + }, + "GetPartnerPermissions": { + "methods": [ + "get_partner_permissions" + ] + }, + "ListAccessApprovalRequests": { + "methods": [ + "list_access_approval_requests" + ] + }, + "GetPartner": { + "methods": [ + "get_partner" + ] + }, + "CreateCustomer": { + "methods": [ + "create_customer" + ] + }, + "UpdateCustomer": { + "methods": [ + "update_customer" + ] + }, + "DeleteCustomer": { + "methods": [ + "delete_customer" + ] + } + } + } + } + }, + "CloudControlsPartnerMonitoring": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client", + "rpcs": { + "ListViolations": { + "methods": [ + "list_violations" + ] + }, + "GetViolation": { + "methods": [ + "get_violation" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec new file mode 100644 index 000000000000..91d6dda79765 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/cloud_controls_partner/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-cloud_controls_partner-v1" + gem.version = Google::Cloud::CloudControlsPartner::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details." + gem.summary = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-v1.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-v1.rb new file mode 100644 index 000000000000..8a1d44564d43 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-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/cloud_controls_partner/v1" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb new file mode 100644 index 000000000000..0f081ef8c941 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring" +require "google/cloud/cloud_controls_partner/v1/version" + +module Google + module Cloud + module CloudControlsPartner + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/cloud_controls_partner/v1" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/cloud_controls_partner/v1" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/cloud_controls_partner/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb new file mode 100644 index 000000000000..f7633d8c43c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_controls_partner/v1/version" + +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" + +module Google + module Cloud + module CloudControlsPartner + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + module CloudControlsPartnerCore + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_controls_partner_core", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb new file mode 100644 index 000000000000..111383c3c748 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb @@ -0,0 +1,1504 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/core_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerCore + ## + # Client for the CloudControlsPartnerCore service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_core_stub + + ## + # Configure the CloudControlsPartnerCore Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerCore clients + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_customer.timeout = 60.0 + default_config.rpcs.get_customer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_customers.timeout = 60.0 + default_config.rpcs.list_customers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_ekm_connections.timeout = 60.0 + default_config.rpcs.get_ekm_connections.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_partner_permissions.timeout = 60.0 + default_config.rpcs.get_partner_permissions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_access_approval_requests.timeout = 60.0 + default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_core_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerCore client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerCore 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/cloudcontrolspartner/v1/core_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_core_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_controls_partner_core_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_core_stub.logger + end + + # Service calls + + ## + # Gets details of a single workload + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest + + # Converts hash 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_workload.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::CloudControlsPartner::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_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customer workloads for a given customer org id + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param page_size [::Integer] + # The maximum number of workloads to return. The service may return fewer + # than this value. If unspecified, at most 500 workloads will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListWorkloads` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads 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::CloudControlsPartner::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest + + # Converts hash 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_workloads.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::CloudControlsPartner::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_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single customer + # + # @overload get_customer(request, options = nil) + # Pass arguments to `get_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `get_customer` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new + # + # # Call the get_customer method. + # result = client.get_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + # p result + # + def get_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customers of a partner identified by its Google Cloud organization ID + # + # @overload list_customers(request, options = nil) + # Pass arguments to `list_customers` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_customers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of Customers to return. The service may return fewer + # than this value. If unspecified, at most 500 Customers will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCustomers` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.new + # + # # Call the list_customers method. + # result = client.list_customers 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::CloudControlsPartner::V1::Customer. + # p item + # end + # + def list_customers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest + + # Converts hash 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_customers.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::CloudControlsPartner::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_customers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_customers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :list_customers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, 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 EKM connections associated with a workload + # + # @overload get_ekm_connections(request, options = nil) + # Pass arguments to `get_ekm_connections` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) + # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new + # + # # Call the get_ekm_connections method. + # result = client.get_ekm_connections request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::EkmConnections. + # p result + # + def get_ekm_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest + + # Converts hash 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_ekm_connections.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::CloudControlsPartner::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_ekm_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_ekm_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_ekm_connections, 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 the partner permissions granted for a workload + # + # @overload get_partner_permissions(request, options = nil) + # Pass arguments to `get_partner_permissions` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) + # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource to get in the format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new + # + # # Call the get_partner_permissions method. + # result = client.get_partner_permissions request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::PartnerPermissions. + # p result + # + def get_partner_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest + + # Converts hash 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_partner_permissions.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::CloudControlsPartner::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_partner_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_partner_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_partner_permissions, 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 + + ## + # Deprecated: Only returns access approval requests directly associated with + # an assured workload folder. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_access_approval_requests(request, options = nil) + # Pass arguments to `list_access_approval_requests` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of access requests to return. The service may + # return fewer than this value. If unspecified, at most 500 access requests + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent + # page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.new + # + # # Call the list_access_approval_requests method. + # result = client.list_access_approval_requests 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::CloudControlsPartner::V1::AccessApprovalRequest. + # p item + # end + # + def list_access_approval_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest + + # Converts hash 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_access_approval_requests.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::CloudControlsPartner::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_access_approval_requests.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_approval_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :list_access_approval_requests, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a Partner. + # + # @overload get_partner(request, options = nil) + # Pass arguments to `get_partner` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner(name: nil) + # Pass arguments to `get_partner` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/partner` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Partner] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Partner] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new + # + # # Call the get_partner method. + # result = client.get_partner request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Partner. + # p result + # + def get_partner request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest + + # Converts hash 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_partner.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::CloudControlsPartner::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_partner.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_partner.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_partner, 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 customer. + # + # @overload create_customer(request, options = nil) + # Pass arguments to `create_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) + # Pass arguments to `create_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] + # Required. The customer to create. + # @param customer_id [::String] + # Required. The customer id to use for the customer, which will become the + # final component of the customer's resource name. The specified value must + # be a valid Google cloud organization id. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new + # + # # Call the create_customer method. + # result = client.create_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + # p result + # + def create_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :create_customer, 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 + + ## + # Update details of a single customer + # + # @overload update_customer(request, options = nil) + # Pass arguments to `update_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) + # Pass arguments to `update_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] + # Required. The customer to update + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new + # + # # Call the update_customer method. + # result = client.update_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + # p result + # + def update_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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.customer&.name + header_params["customer.name"] = request.customer.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_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :update_customer, 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 + + ## + # Delete details of a single customer + # + # @overload delete_customer(request, options = nil) + # Pass arguments to `delete_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `delete_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. name of the resource to be deleted + # format: name=organizations/*/locations/*/customers/* + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new + # + # # Call the delete_customer method. + # result = client.delete_customer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :delete_customer, 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 CloudControlsPartnerCore API. + # + # This class represents the configuration for CloudControlsPartnerCore, + # 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.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::CloudControlsPartner::V1::CloudControlsPartnerCore::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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `get_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer + ## + # RPC-specific configuration for `list_customers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customers + ## + # RPC-specific configuration for `get_ekm_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ekm_connections + ## + # RPC-specific configuration for `get_partner_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner_permissions + ## + # RPC-specific configuration for `list_access_approval_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_approval_requests + ## + # RPC-specific configuration for `get_partner` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner + ## + # RPC-specific configuration for `create_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer + ## + # RPC-specific configuration for `update_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer + ## + # RPC-specific configuration for `delete_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer + + # @private + def initialize parent_rpcs = nil + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer + @get_customer = ::Gapic::Config::Method.new get_customer_config + list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers + @list_customers = ::Gapic::Config::Method.new list_customers_config + get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections + @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config + get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions + @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config + list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests + @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config + get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner + @get_partner = ::Gapic::Config::Method.new get_partner_config + create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer + @create_customer = ::Gapic::Config::Method.new create_customer_config + update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer + @update_customer = ::Gapic::Config::Method.new update_customer_config + delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer + @delete_customer = ::Gapic::Config::Method.new delete_customer_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb new file mode 100644 index 000000000000..e02c2662d0e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerCore + # Credentials for the CloudControlsPartnerCore API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb new file mode 100644 index 000000000000..33445fcd9914 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb @@ -0,0 +1,149 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1 + module CloudControlsPartnerCore + # Path helper methods for the CloudControlsPartnerCore API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # + # @return [::String] + def customer_path organization:, location:, customer: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}" + end + + ## + # Create a fully-qualified EkmConnections resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def ekm_connections_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/ekmConnections" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Partner resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/partner` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def partner_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/partner" + end + + ## + # Create a fully-qualified PartnerPermissions resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def partner_permissions_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/partnerPermissions" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb new file mode 100644 index 000000000000..a84f2c823eb4 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1/version" + +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client" + +module Google + module Cloud + module CloudControlsPartner + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + module CloudControlsPartnerCore + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb new file mode 100644 index 000000000000..ef32079a378f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb @@ -0,0 +1,1382 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/core_pb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerCore + module Rest + ## + # REST client for the CloudControlsPartnerCore service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_core_stub + + ## + # Configure the CloudControlsPartnerCore Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerCore clients + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_customer.timeout = 60.0 + default_config.rpcs.get_customer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_customers.timeout = 60.0 + default_config.rpcs.list_customers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_ekm_connections.timeout = 60.0 + default_config.rpcs.get_ekm_connections.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_partner_permissions.timeout = 60.0 + default_config.rpcs.get_partner_permissions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_access_approval_requests.timeout = 60.0 + default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_core_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerCore REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerCore client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_core_stub = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_controls_partner_core_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_core_stub.logger + end + + # Service calls + + ## + # Gets details of a single workload + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest + + # Converts hash 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_workload.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::CloudControlsPartner::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_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customer workloads for a given customer org id + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param page_size [::Integer] + # The maximum number of workloads to return. The service may return fewer + # than this value. If unspecified, at most 500 workloads will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListWorkloads` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads 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::CloudControlsPartner::V1::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest + + # Converts hash 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_workloads.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::CloudControlsPartner::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_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.list_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, "workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single customer + # + # @overload get_customer(request, options = nil) + # Pass arguments to `get_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `get_customer` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new + # + # # Call the get_customer method. + # result = client.get_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + # p result + # + def get_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_customer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customers of a partner identified by its Google Cloud organization ID + # + # @overload list_customers(request, options = nil) + # Pass arguments to `list_customers` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_customers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of Customers to return. The service may return fewer + # than this value. If unspecified, at most 500 Customers will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCustomers` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.new + # + # # Call the list_customers method. + # result = client.list_customers 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::CloudControlsPartner::V1::Customer. + # p item + # end + # + def list_customers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest + + # Converts hash 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_customers.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::CloudControlsPartner::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_customers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_customers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.list_customers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, "customers", 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 EKM connections associated with a workload + # + # @overload get_ekm_connections(request, options = nil) + # Pass arguments to `get_ekm_connections` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) + # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new + # + # # Call the get_ekm_connections method. + # result = client.get_ekm_connections request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::EkmConnections. + # p result + # + def get_ekm_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest + + # Converts hash 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_ekm_connections.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::CloudControlsPartner::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_ekm_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_ekm_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_ekm_connections 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 the partner permissions granted for a workload + # + # @overload get_partner_permissions(request, options = nil) + # Pass arguments to `get_partner_permissions` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) + # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource to get in the format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new + # + # # Call the get_partner_permissions method. + # result = client.get_partner_permissions request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::PartnerPermissions. + # p result + # + def get_partner_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest + + # Converts hash 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_partner_permissions.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::CloudControlsPartner::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_partner_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_partner_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_partner_permissions 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 + + ## + # Deprecated: Only returns access approval requests directly associated with + # an assured workload folder. + # + # @overload list_access_approval_requests(request, options = nil) + # Pass arguments to `list_access_approval_requests` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of access requests to return. The service may + # return fewer than this value. If unspecified, at most 500 access requests + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent + # page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.new + # + # # Call the list_access_approval_requests method. + # result = client.list_access_approval_requests 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::CloudControlsPartner::V1::AccessApprovalRequest. + # p item + # end + # + def list_access_approval_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest + + # Converts hash 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_access_approval_requests.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::CloudControlsPartner::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_access_approval_requests.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_approval_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.list_access_approval_requests request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, "access_approval_requests", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a Partner. + # + # @overload get_partner(request, options = nil) + # Pass arguments to `get_partner` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner(name: nil) + # Pass arguments to `get_partner` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/partner` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Partner] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Partner] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new + # + # # Call the get_partner method. + # result = client.get_partner request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Partner. + # p result + # + def get_partner request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest + + # Converts hash 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_partner.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::CloudControlsPartner::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_partner.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_partner.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_partner 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 customer. + # + # @overload create_customer(request, options = nil) + # Pass arguments to `create_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) + # Pass arguments to `create_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] + # Required. The customer to create. + # @param customer_id [::String] + # Required. The customer id to use for the customer, which will become the + # final component of the customer's resource name. The specified value must + # be a valid Google cloud organization id. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new + # + # # Call the create_customer method. + # result = client.create_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + # p result + # + def create_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.create_customer 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 + + ## + # Update details of a single customer + # + # @overload update_customer(request, options = nil) + # Pass arguments to `update_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) + # Pass arguments to `update_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] + # Required. The customer to update + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new + # + # # Call the update_customer method. + # result = client.update_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + # p result + # + def update_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.update_customer 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 + + ## + # Delete details of a single customer + # + # @overload delete_customer(request, options = nil) + # Pass arguments to `delete_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `delete_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. name of the resource to be deleted + # format: name=organizations/*/locations/*/customers/* + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new + # + # # Call the delete_customer method. + # result = client.delete_customer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.delete_customer 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 CloudControlsPartnerCore REST API. + # + # This class represents the configuration for CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `get_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer + ## + # RPC-specific configuration for `list_customers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customers + ## + # RPC-specific configuration for `get_ekm_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ekm_connections + ## + # RPC-specific configuration for `get_partner_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner_permissions + ## + # RPC-specific configuration for `list_access_approval_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_approval_requests + ## + # RPC-specific configuration for `get_partner` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner + ## + # RPC-specific configuration for `create_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer + ## + # RPC-specific configuration for `update_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer + ## + # RPC-specific configuration for `delete_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer + + # @private + def initialize parent_rpcs = nil + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer + @get_customer = ::Gapic::Config::Method.new get_customer_config + list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers + @list_customers = ::Gapic::Config::Method.new list_customers_config + get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections + @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config + get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions + @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config + list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests + @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config + get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner + @get_partner = ::Gapic::Config::Method.new get_partner_config + create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer + @create_customer = ::Gapic::Config::Method.new create_customer_config + update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer + @update_customer = ::Gapic::Config::Method.new update_customer_config + delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer + @delete_customer = ::Gapic::Config::Method.new delete_customer_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb new file mode 100644 index 000000000000..f6067357e839 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb @@ -0,0 +1,754 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/core_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerCore + module Rest + ## + # REST service stub for the CloudControlsPartnerCore service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_workload REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest] + # 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::CloudControlsPartner::V1::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Workload] + # A result object deserialized from the server's reply + def get_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_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_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::Workload.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_workloads REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest] + # 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::CloudControlsPartner::V1::ListWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse] + # A result object deserialized from the server's reply + def list_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_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_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest] + # 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::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # A result object deserialized from the server's reply + def get_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customers REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest] + # 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::CloudControlsPartner::V1::ListCustomersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse] + # A result object deserialized from the server's reply + def list_customers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_customers_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_customers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse.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_ekm_connections REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest] + # 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::CloudControlsPartner::V1::EkmConnections] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] + # A result object deserialized from the server's reply + def get_ekm_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_ekm_connections_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_ekm_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::EkmConnections.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_partner_permissions REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest] + # 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::CloudControlsPartner::V1::PartnerPermissions] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] + # A result object deserialized from the server's reply + def get_partner_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_permissions_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_partner_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions.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_access_approval_requests REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest] + # 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::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse] + # A result object deserialized from the server's reply + def list_access_approval_requests request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_approval_requests_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_access_approval_requests", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse.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_partner REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest] + # 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::CloudControlsPartner::V1::Partner] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Partner] + # A result object deserialized from the server's reply + def get_partner request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_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_partner", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::Partner.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest] + # 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::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # A result object deserialized from the server's reply + def create_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest] + # 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::CloudControlsPartner::V1::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # A result object deserialized from the server's reply + def update_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest] + # 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_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workload REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest] + # 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_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workloads", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_customers REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest] + # 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_customers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/customers", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_ekm_connections REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest] + # 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_ekm_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/ekmConnections/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_partner_permissions REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest] + # 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_partner_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/partnerPermissions/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_approval_requests REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest] + # 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_access_approval_requests_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/accessApprovalRequests", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_partner REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest] + # 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_partner_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/partner/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/customers", + body: "customer", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{customer.name}", + body: "customer", + matches: [ + ["customer.name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb new file mode 100644 index 000000000000..79459bf48dc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_controls_partner/v1/version" + +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" + +module Google + module Cloud + module CloudControlsPartner + module V1 + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new + # + module CloudControlsPartnerMonitoring + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_controls_partner_monitoring", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb new file mode 100644 index 000000000000..c8d1710e4630 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb @@ -0,0 +1,605 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/monitoring_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerMonitoring + ## + # Client for the CloudControlsPartnerMonitoring service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_monitoring_stub + + ## + # Configure the CloudControlsPartnerMonitoring Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerMonitoring clients + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_violations.timeout = 60.0 + default_config.rpcs.list_violations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_violation.timeout = 60.0 + default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_monitoring_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerMonitoring client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerMonitoring 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/cloudcontrolspartner/v1/monitoring_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_monitoring_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_controls_partner_monitoring_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_monitoring_stub.logger + end + + # Service calls + + ## + # Lists Violations for a workload + # Callers may also choose to read across multiple Customers or for a single + # customer as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of \\{customer} & \\{workload}. + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @overload list_violations(request, options = nil) + # Pass arguments to `list_violations` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) + # Pass arguments to `list_violations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of customers row to return. The service may + # return fewer than this value. If unspecified, at most 10 customers will be + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListViolations` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @param interval [::Google::Type::Interval, ::Hash] + # Optional. Specifies the interval for retrieving violations. + # if unspecified, all violations will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new + # + # # Call the list_violations method. + # result = client.list_violations 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::CloudControlsPartner::V1::Violation. + # p item + # end + # + def list_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest + + # Converts hash 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_violations.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::CloudControlsPartner::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_violations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.call_rpc :list_violations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Violation. + # + # @overload get_violation(request, options = nil) + # Pass arguments to `get_violation` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violation(name: nil) + # Pass arguments to `get_violation` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Violation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new + # + # # Call the get_violation method. + # result = client.get_violation request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Violation. + # p result + # + def get_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest + + # Converts hash 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_violation.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::CloudControlsPartner::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_violation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.call_rpc :get_violation, 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 CloudControlsPartnerMonitoring API. + # + # This class represents the configuration for CloudControlsPartnerMonitoring, + # 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_violations + ## + # RPC-specific configuration for `get_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_violation + + # @private + def initialize parent_rpcs = nil + list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations + @list_violations = ::Gapic::Config::Method.new list_violations_config + get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation + @get_violation = ::Gapic::Config::Method.new get_violation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb new file mode 100644 index 000000000000..3c65665d39f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerMonitoring + # Credentials for the CloudControlsPartnerMonitoring API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb new file mode 100644 index 000000000000..dcbadc742464 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1 + module CloudControlsPartnerMonitoring + # Path helper methods for the CloudControlsPartnerMonitoring API. + module Paths + ## + # Create a fully-qualified Violation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # @param violation [String] + # + # @return [::String] + def violation_path organization:, location:, customer:, workload:, violation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/violations/#{violation}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb new file mode 100644 index 000000000000..f9da9cf55bb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1/version" + +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client" + +module Google + module Cloud + module CloudControlsPartner + module V1 + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new + # + module CloudControlsPartnerMonitoring + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb new file mode 100644 index 000000000000..21a1f9396290 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb @@ -0,0 +1,548 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/monitoring_pb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerMonitoring + module Rest + ## + # REST client for the CloudControlsPartnerMonitoring service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_monitoring_stub + + ## + # Configure the CloudControlsPartnerMonitoring Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerMonitoring clients + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_violations.timeout = 60.0 + default_config.rpcs.list_violations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_violation.timeout = 60.0 + default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_monitoring_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerMonitoring REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerMonitoring client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_monitoring_stub = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_controls_partner_monitoring_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_monitoring_stub.logger + end + + # Service calls + + ## + # Lists Violations for a workload + # Callers may also choose to read across multiple Customers or for a single + # customer as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of \\{customer} & \\{workload}. + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @overload list_violations(request, options = nil) + # Pass arguments to `list_violations` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) + # Pass arguments to `list_violations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of customers row to return. The service may + # return fewer than this value. If unspecified, at most 10 customers will be + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListViolations` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @param interval [::Google::Type::Interval, ::Hash] + # Optional. Specifies the interval for retrieving violations. + # if unspecified, all violations will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new + # + # # Call the list_violations method. + # result = client.list_violations 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::CloudControlsPartner::V1::Violation. + # p item + # end + # + def list_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest + + # Converts hash 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_violations.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::CloudControlsPartner::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_violations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.list_violations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, "violations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Violation. + # + # @overload get_violation(request, options = nil) + # Pass arguments to `get_violation` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violation(name: nil) + # Pass arguments to `get_violation` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Violation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new + # + # # Call the get_violation method. + # result = client.get_violation request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Violation. + # p result + # + def get_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest + + # Converts hash 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_violation.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::CloudControlsPartner::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_violation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.get_violation 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 CloudControlsPartnerMonitoring REST API. + # + # This class represents the configuration for CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_violations + ## + # RPC-specific configuration for `get_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_violation + + # @private + def initialize parent_rpcs = nil + list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations + @list_violations = ::Gapic::Config::Method.new list_violations_config + get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation + @get_violation = ::Gapic::Config::Method.new get_violation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb new file mode 100644 index 000000000000..3bebb5bd5e3d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/monitoring_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerMonitoring + module Rest + ## + # REST service stub for the CloudControlsPartnerMonitoring 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_violations REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest] + # 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::CloudControlsPartner::V1::ListViolationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse] + # A result object deserialized from the server's reply + def list_violations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_violations_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_violations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse.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_violation REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest] + # 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::CloudControlsPartner::V1::Violation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation] + # A result object deserialized from the server's reply + def get_violation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_violation_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_violation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1::Violation.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_violations REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest] + # 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_violations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/violations", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_violation REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest] + # 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_violation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/violations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb new file mode 100644 index 000000000000..fd5df820859c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" +require "google/cloud/cloud_controls_partner/v1/version" + +module Google + module Cloud + module CloudControlsPartner + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/cloud_controls_partner/v1/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/version.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/version.rb new file mode 100644 index 000000000000..4b918f0e53ff --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/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 CloudControlsPartner + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb new file mode 100644 index 000000000000..3641ff686ac5 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/access_approval_requests.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nCgoogle/cloud/cloudcontrolspartner/v1/access_approval_requests.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x03\n\x15\x41\x63\x63\x65ssApprovalRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10requested_reason\x18\x03 \x01(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1.AccessReason\x12=\n\x19requested_expiration_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xfd\x01\xea\x41\xf9\x01\n9cloudcontrolspartner.googleapis.com/AccessApprovalRequest\x12\x8c\x01organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}*\x16\x61\x63\x63\x65ssApprovalRequests2\x15\x61\x63\x63\x65ssApprovalRequest\"\xd3\x01\n!ListAccessApprovalRequestsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39\x63loudcontrolspartner.googleapis.com/AccessApprovalRequest\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\"\xb1\x01\n\"ListAccessApprovalRequestsResponse\x12]\n\x18\x61\x63\x63\x65ss_approval_requests\x18\x01 \x03(\x0b\x32;.google.cloud.cloudcontrolspartner.v1.AccessApprovalRequest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc2\x02\n\x0c\x41\x63\x63\x65ssReason\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.cloudcontrolspartner.v1.AccessReason.Type\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xda\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43USTOMER_INITIATED_SUPPORT\x10\x01\x12\x1c\n\x18GOOGLE_INITIATED_SERVICE\x10\x02\x12\x1b\n\x17GOOGLE_INITIATED_REVIEW\x10\x03\x12\x1c\n\x18THIRD_PARTY_DATA_REQUEST\x10\x04\x12\'\n#GOOGLE_RESPONSE_TO_PRODUCTION_ALERT\x10\x05\x12\x1a\n\x16\x43LOUD_INITIATED_ACCESS\x10\x06\x42\x9f\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x1b\x41\x63\x63\x65ssApprovalRequestsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + AccessApprovalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.AccessApprovalRequest").msgclass + ListAccessApprovalRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest").msgclass + ListAccessApprovalRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsResponse").msgclass + AccessReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.AccessReason").msgclass + AccessReason::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.AccessReason.Type").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb new file mode 100644 index 000000000000..4e4ac51dd617 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/completion_state.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/cloud/cloudcontrolspartner/v1/completion_state.proto\x12$google.cloud.cloudcontrolspartner.v1*o\n\x0f\x43ompletionState\x12 \n\x1c\x43OMPLETION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x12\n\x0eNOT_APPLICABLE\x10\x04\x42\x98\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x14\x43ompletionStateProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + CompletionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CompletionState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb new file mode 100644 index 000000000000..bc9bf98de3c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/core.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/cloudcontrolspartner/v1/access_approval_requests_pb' +require 'google/cloud/cloudcontrolspartner/v1/customer_workloads_pb' +require 'google/cloud/cloudcontrolspartner/v1/customers_pb' +require 'google/cloud/cloudcontrolspartner/v1/ekm_connections_pb' +require 'google/cloud/cloudcontrolspartner/v1/partner_permissions_pb' +require 'google/cloud/cloudcontrolspartner/v1/partners_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/cloudcontrolspartner/v1/core.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x43google/cloud/cloudcontrolspartner/v1/access_approval_requests.proto\x1a=google/cloud/cloudcontrolspartner/v1/customer_workloads.proto\x1a\x34google/cloud/cloudcontrolspartner/v1/customers.proto\x1a:google/cloud/cloudcontrolspartner/v1/ekm_connections.proto\x1a>google/cloud/cloudcontrolspartner/v1/partner_permissions.proto\x1a\x33google/cloud/cloudcontrolspartner/v1/partners.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\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\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xd3\x13\n\x18\x43loudControlsPartnerCore\x12\xc6\x01\n\x0bGetWorkload\x12\x38.google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest\x1a..google.cloud.cloudcontrolspartner.v1.Workload\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=organizations/*/locations/*/customers/*/workloads/*}\x12\xd9\x01\n\rListWorkloads\x12:.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest\x1a;.google.cloud.cloudcontrolspartner.v1.ListWorkloadsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=organizations/*/locations/*/customers/*}/workloads\x12\xba\x01\n\x0bGetCustomer\x12\x38.google.cloud.cloudcontrolspartner.v1.GetCustomerRequest\x1a..google.cloud.cloudcontrolspartner.v1.Customer\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/locations/*/customers/*}\x12\xcd\x01\n\rListCustomers\x12:.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest\x1a;.google.cloud.cloudcontrolspartner.v1.ListCustomersResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*/locations/*}/customers\x12\xe7\x01\n\x11GetEkmConnections\x12>.google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest\x1a\x34.google.cloud.cloudcontrolspartner.v1.EkmConnections\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\x12M/v1/{name=organizations/*/locations/*/customers/*/workloads/*/ekmConnections}\x12\xf7\x01\n\x15GetPartnerPermissions\x12\x42.google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest\x1a\x38.google.cloud.cloudcontrolspartner.v1.PartnerPermissions\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\x12Q/v1/{name=organizations/*/locations/*/customers/*/workloads/*/partnerPermissions}\x12\x9c\x02\n\x1aListAccessApprovalRequests\x12G.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest\x1aH.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsResponse\"k\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02Y\x12W/v1/{parent=organizations/*/locations/*/customers/*/workloads/*}/accessApprovalRequests\x12\xb3\x01\n\nGetPartner\x12\x37.google.cloud.cloudcontrolspartner.v1.GetPartnerRequest\x1a-.google.cloud.cloudcontrolspartner.v1.Partner\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=organizations/*/locations/*/partner}\x12\xe1\x01\n\x0e\x43reateCustomer\x12;.google.cloud.cloudcontrolspartner.v1.CreateCustomerRequest\x1a..google.cloud.cloudcontrolspartner.v1.Customer\"b\xda\x41\x1bparent,customer,customer_id\x82\xd3\xe4\x93\x02>\"2/v1/{parent=organizations/*/locations/*}/customers:\x08\x63ustomer\x12\xe3\x01\n\x0eUpdateCustomer\x12;.google.cloud.cloudcontrolspartner.v1.UpdateCustomerRequest\x1a..google.cloud.cloudcontrolspartner.v1.Customer\"d\xda\x41\x14\x63ustomer,update_mask\x82\xd3\xe4\x93\x02G2;/v1/{customer.name=organizations/*/locations/*/customers/*}:\x08\x63ustomer\x12\xa8\x01\n\x0e\x44\x65leteCustomer\x12;.google.cloud.cloudcontrolspartner.v1.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/locations/*/customers/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfd\x02\n(com.google.cloud.cloudcontrolspartner.v1B\tCoreProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1\xea\x41m\n8cloudcontrolspartner.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb new file mode 100644 index 000000000000..ed54cd6f0ff2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudcontrolspartner/v1/core.proto for package 'Google.Cloud.CloudControlsPartner.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1/core_pb' + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerCore + # Service describing handlers for resources + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore' + + # Gets details of a single workload + rpc :GetWorkload, ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, ::Google::Cloud::CloudControlsPartner::V1::Workload + # Lists customer workloads for a given customer org id + rpc :ListWorkloads, ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse + # Gets details of a single customer + rpc :GetCustomer, ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1::Customer + # Lists customers of a partner identified by its Google Cloud organization ID + rpc :ListCustomers, ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse + # Gets the EKM connections associated with a workload + rpc :GetEkmConnections, ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, ::Google::Cloud::CloudControlsPartner::V1::EkmConnections + # Gets the partner permissions granted for a workload + rpc :GetPartnerPermissions, ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions + # Deprecated: Only returns access approval requests directly associated with + # an assured workload folder. + rpc :ListAccessApprovalRequests, ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse + # Get details of a Partner. + rpc :GetPartner, ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, ::Google::Cloud::CloudControlsPartner::V1::Partner + # Creates a new customer. + rpc :CreateCustomer, ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1::Customer + # Update details of a single customer + rpc :UpdateCustomer, ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1::Customer + # Delete details of a single customer + rpc :DeleteCustomer, ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb new file mode 100644 index 000000000000..ee435a4499d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/customer_workloads.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudcontrolspartner/v1/completion_state_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n=google/cloud/cloudcontrolspartner/v1/customer_workloads.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/cloudcontrolspartner/v1/completion_state.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x06\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tfolder_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x66older\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12`\n\x19workload_onboarding_state\x18\x05 \x01(\x0b\x32=.google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingState\x12\x14\n\x0cis_onboarded\x18\x06 \x01(\x08\x12!\n\x19key_management_project_id\x18\x07 \x01(\t\x12\x10\n\x08location\x18\x08 \x01(\t\x12G\n\x07partner\x18\t \x01(\x0e\x32\x36.google.cloud.cloudcontrolspartner.v1.Workload.Partner\"\xa2\x02\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\"\n\x1ePARTNER_LOCAL_CONTROLS_BY_S3NS\x10\x01\x12+\n\'PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS\x10\x02\x12-\n)PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT\x10\x03\x12%\n!PARTNER_SOVEREIGN_CONTROLS_BY_PSN\x10\x04\x12\'\n#PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT\x10\x06\x12.\n*PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM\x10\x07:\xa4\x01\xea\x41\xa0\x01\n,cloudcontrolspartner.googleapis.com/Workload\x12[organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}*\tworkloads2\x08workload\"\xaf\x01\n\x14ListWorkloadsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x88\x01\n\x15ListWorkloadsResponse\x12\x41\n\tworkloads\x18\x01 \x03(\x0b\x32..google.cloud.cloudcontrolspartner.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x12GetWorkloadRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Workload\"q\n\x17WorkloadOnboardingState\x12V\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32<.google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep\"\xfe\x02\n\x16WorkloadOnboardingStep\x12O\n\x04step\x18\x01 \x01(\x0e\x32\x41.google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x35.google.cloud.cloudcontrolspartner.v1.CompletionStateB\x03\xe0\x41\x03\"X\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45KM_PROVISIONED\x10\x01\x12%\n!SIGNED_ACCESS_APPROVAL_CONFIGURED\x10\x02\x42\x9a\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x16\x43ustomerWorkloadsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Workload").msgclass + Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Workload.Partner").enummodule + ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest").msgclass + ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListWorkloadsResponse").msgclass + GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest").msgclass + WorkloadOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingState").msgclass + WorkloadOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep").msgclass + WorkloadOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep.Step").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb new file mode 100644 index 000000000000..2059551b6d72 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/customers.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudcontrolspartner/v1/completion_state_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/cloudcontrolspartner/v1/customers.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/cloudcontrolspartner/v1/completion_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xee\x02\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x19\x63ustomer_onboarding_state\x18\x03 \x01(\x0b\x32=.google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStateB\x03\xe0\x41\x03\x12\x19\n\x0cis_onboarded\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12 \n\x13organization_domain\x18\x05 \x01(\tB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n,cloudcontrolspartner.googleapis.com/Customer\x12\x46organizations/{organization}/locations/{location}/customers/{customer}*\tcustomers2\x08\x63ustomer\"\xaf\x01\n\x14ListCustomersRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x88\x01\n\x15ListCustomersResponse\x12\x41\n\tcustomers\x18\x01 \x03(\x0b\x32..google.cloud.cloudcontrolspartner.v1.Customer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbe\x01\n\x15\x43reateCustomerRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12\x45\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32..google.cloud.cloudcontrolspartner.v1.CustomerB\x03\xe0\x41\x02\x12\x18\n\x0b\x63ustomer_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"X\n\x12GetCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Customer\"q\n\x17\x43ustomerOnboardingState\x12V\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32<.google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep\"\xf0\x02\n\x16\x43ustomerOnboardingStep\x12O\n\x04step\x18\x01 \x01(\x0e\x32\x41.google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x35.google.cloud.cloudcontrolspartner.v1.CompletionStateB\x03\xe0\x41\x03\"J\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x12\n\x0eKAJ_ENROLLMENT\x10\x01\x12\x18\n\x14\x43USTOMER_ENVIRONMENT\x10\x02\"\x94\x01\n\x15UpdateCustomerRequest\x12\x45\n\x08\x63ustomer\x18\x01 \x01(\x0b\x32..google.cloud.cloudcontrolspartner.v1.CustomerB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x15\x44\x65leteCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/CustomerB\x92\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x0e\x43ustomersProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Customer").msgclass + ListCustomersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListCustomersRequest").msgclass + ListCustomersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListCustomersResponse").msgclass + CreateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CreateCustomerRequest").msgclass + GetCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetCustomerRequest").msgclass + CustomerOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CustomerOnboardingState").msgclass + CustomerOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep").msgclass + CustomerOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep.Step").enummodule + UpdateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.UpdateCustomerRequest").msgclass + DeleteCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.DeleteCustomerRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb new file mode 100644 index 000000000000..3ff330de7af0 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/ekm_connections.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n:google/cloud/cloudcontrolspartner/v1/ekm_connections.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x02\n\x0e\x45kmConnections\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x0f\x65km_connections\x18\x02 \x03(\x0b\x32\x33.google.cloud.cloudcontrolspartner.v1.EkmConnection:\xa4\x01\xea\x41\xa0\x01\n2cloudcontrolspartner.googleapis.com/EkmConnections\x12jorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections\"d\n\x18GetEkmConnectionsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2cloudcontrolspartner.googleapis.com/EkmConnections\"\xa4\x03\n\rEkmConnection\x12\x17\n\x0f\x63onnection_name\x18\x01 \x01(\t\x12\x62\n\x10\x63onnection_state\x18\x02 \x01(\x0e\x32\x43.google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionStateB\x03\xe0\x41\x03\x12]\n\x10\x63onnection_error\x18\x03 \x01(\x0b\x32\x43.google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionError\x1a>\n\x0f\x43onnectionError\x12\x14\n\x0c\x65rror_domain\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\"w\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\x11\n\rNOT_AVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x97\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x13\x45kmConnectionsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + EkmConnections = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnections").msgclass + GetEkmConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest").msgclass + EkmConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnection").msgclass + EkmConnection::ConnectionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionError").msgclass + EkmConnection::ConnectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb new file mode 100644 index 000000000000..25a80bcad97d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/monitoring.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/cloud/cloudcontrolspartner/v1/violations_pb' + + +descriptor_data = "\n5google/cloud/cloudcontrolspartner/v1/monitoring.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x35google/cloud/cloudcontrolspartner/v1/violations.proto2\xbe\x04\n\x1e\x43loudControlsPartnerMonitoring\x12\xe9\x01\n\x0eListViolations\x12;.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest\x1a<.google.cloud.cloudcontrolspartner.v1.ListViolationsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1/{parent=organizations/*/locations/*/customers/*/workloads/*}/violations\x12\xd6\x01\n\x0cGetViolation\x12\x39.google.cloud.cloudcontrolspartner.v1.GetViolationRequest\x1a/.google.cloud.cloudcontrolspartner.v1.Violation\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1/{name=organizations/*/locations/*/customers/*/workloads/*/violations/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x0fMonitoringProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb new file mode 100644 index 000000000000..0c721df0f898 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudcontrolspartner/v1/monitoring.proto for package 'Google.Cloud.CloudControlsPartner.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1/monitoring_pb' + +module Google + module Cloud + module CloudControlsPartner + module V1 + module CloudControlsPartnerMonitoring + # Service describing handlers for resources + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring' + + # Lists Violations for a workload + # Callers may also choose to read across multiple Customers or for a single + # customer as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of {customer} & {workload}. + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + rpc :ListViolations, ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse + # Gets details of a single Violation. + rpc :GetViolation, ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, ::Google::Cloud::CloudControlsPartner::V1::Violation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb new file mode 100644 index 000000000000..02bceae6486a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/partner_permissions.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/cloud/cloudcontrolspartner/v1/partner_permissions.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb5\x04\n\x12PartnerPermissions\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12`\n\x13partner_permissions\x18\x02 \x03(\x0e\x32\x43.google.cloud.cloudcontrolspartner.v1.PartnerPermissions.Permission\"\xfa\x01\n\nPermission\x12\x1a\n\x16PERMISSION_UNSPECIFIED\x10\x00\x12\x31\n-ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS\x10\x01\x12 \n\x1c\x41SSURED_WORKLOADS_MONITORING\x10\x02\x12\x1c\n\x18\x41\x43\x43\x45SS_APPROVAL_REQUESTS\x10\x03\x12+\n\'ASSURED_WORKLOADS_EKM_CONNECTION_STATUS\x10\x04\x12\x30\n,ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER\x10\x05:\xac\x01\xea\x41\xa8\x01\n6cloudcontrolspartner.googleapis.com/PartnerPermissions\x12norganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions\"l\n\x1cGetPartnerPermissionsRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6cloudcontrolspartner.googleapis.com/PartnerPermissionsB\x9b\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x17PartnerPermissionsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + PartnerPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.PartnerPermissions").msgclass + PartnerPermissions::Permission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.PartnerPermissions.Permission").enummodule + GetPartnerPermissionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb new file mode 100644 index 000000000000..2df1e161f7bd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/partners.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/cloudcontrolspartner/v1/partners.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x03\n\x07Partner\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x37\n\x04skus\x18\x03 \x03(\x0b\x32).google.cloud.cloudcontrolspartner.v1.Sku\x12H\n\rekm_solutions\x18\x04 \x03(\x0b\x32\x31.google.cloud.cloudcontrolspartner.v1.EkmMetadata\x12\x1e\n\x16operated_cloud_regions\x18\x05 \x03(\t\x12\x1a\n\x12partner_project_id\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:t\xea\x41q\n+cloudcontrolspartner.googleapis.com/Partner\x12\x39organizations/{organization}/locations/{location}/partner2\x07partner\"V\n\x11GetPartnerRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudcontrolspartner.googleapis.com/Partner\"\'\n\x03Sku\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xe0\x01\n\x0b\x45kmMetadata\x12S\n\x0c\x65km_solution\x18\x01 \x01(\x0e\x32=.google.cloud.cloudcontrolspartner.v1.EkmMetadata.EkmSolution\x12\x18\n\x10\x65km_endpoint_uri\x18\x02 \x01(\t\"b\n\x0b\x45kmSolution\x12\x1c\n\x18\x45KM_SOLUTION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46ORTANIX\x10\x01\x12\x0b\n\x07\x46UTUREX\x10\x02\x12\n\n\x06THALES\x10\x03\x12\x0e\n\x06VIRTRU\x10\x04\x1a\x02\x08\x01\x42\x91\x02\n(com.google.cloud.cloudcontrolspartner.v1B\rPartnersProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Partner").msgclass + GetPartnerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetPartnerRequest").msgclass + Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Sku").msgclass + EkmMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmMetadata").msgclass + EkmMetadata::EkmSolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmMetadata.EkmSolution").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb new file mode 100644 index 000000000000..5250447bae6a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1/violations.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n5google/cloud/cloudcontrolspartner/v1/violations.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xa1\r\n\tViolation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_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\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.cloudcontrolspartner.v1.Violation.StateB\x03\xe0\x41\x03\x12(\n\x18non_compliant_org_policy\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x11\n\tfolder_id\x18\t \x01(\x03\x12U\n\x0bremediation\x18\r \x01(\x0b\x32;.google.cloud.cloudcontrolspartner.v1.Violation.RemediationB\x03\xe0\x41\x03\x1a\xc0\x07\n\x0bRemediation\x12\x63\n\x0cinstructions\x18\x01 \x01(\x0b\x32H.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12j\n\x10remediation_type\x18\x03 \x01(\x0e\x32K.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\x82\x03\n\x0cInstructions\x12l\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32O.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Gcloud\x12n\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32P.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\xc0\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\x12\"\n\x1eREMEDIATION_RESOURCE_VIOLATION\x10\x05\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x01\x12\x0e\n\nUNRESOLVED\x10\x02\x12\r\n\tEXCEPTION\x10\x03:\xbe\x01\xea\x41\xba\x01\n-cloudcontrolspartner.googleapis.com/Violation\x12rorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}*\nviolations2\tviolation\"\xe9\x01\n\x15ListViolationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-cloudcontrolspartner.googleapis.com/Violation\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\x12,\n\x08interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\"\x8b\x01\n\x16ListViolationsResponse\x12\x43\n\nviolations\x18\x01 \x03(\x0b\x32/.google.cloud.cloudcontrolspartner.v1.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Z\n\x13GetViolationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-cloudcontrolspartner.googleapis.com/ViolationB\x93\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x0fViolationsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1 + Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation").msgclass + Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation").msgclass + Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions").msgclass + Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Gcloud").msgclass + Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Console").msgclass + Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.RemediationType").enummodule + Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.State").enummodule + ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListViolationsRequest").msgclass + ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListViolationsResponse").msgclass + GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetViolationRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md new file mode 100644 index 000000000000..d6f4544cf2de --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Controls Partner 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-cloud_controls_partner-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb new file mode 100644 index 000000000000..e421293d389b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1 + # Details about the Access request. + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}` + # @!attribute [rw] request_time + # @return [::Google::Protobuf::Timestamp] + # The time at which approval was requested. + # @!attribute [rw] requested_reason + # @return [::Google::Cloud::CloudControlsPartner::V1::AccessReason] + # The justification for which approval is being requested. + # @!attribute [rw] requested_expiration_time + # @return [::Google::Protobuf::Timestamp] + # The requested expiration for the approval. If the request is approved, + # access will be granted from the time of approval until the expiration time. + class AccessApprovalRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting the access requests associated with a workload. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of access requests to return. The service may + # return fewer than this value. If unspecified, at most 500 access requests + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent + # page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListAccessApprovalRequestsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list access requests. + # @!attribute [rw] access_approval_requests + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] + # List of access approval requests + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAccessApprovalRequestsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Reason for the access. + # @!attribute [rw] type + # @return [::Google::Cloud::CloudControlsPartner::V1::AccessReason::Type] + # Type of access justification. + # @!attribute [rw] detail + # @return [::String] + # More detail about certain reason types. See comments for each type above. + class AccessReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of access justification. + module Type + # Default value for proto, shouldn't be used. + TYPE_UNSPECIFIED = 0 + + # Customer made a request or raised an issue that required the principal to + # access customer data. `detail` is of the form ("#####" is the issue ID): + # + # - "Feedback Report: #####" + # - "Case Number: #####" + # - "Case ID: #####" + # - "E-PIN Reference: #####" + # - "Google-#####" + # - "T-#####" + CUSTOMER_INITIATED_SUPPORT = 1 + + # The principal accessed customer data in order to diagnose or resolve a + # suspected issue in services. Often this access is used to confirm that + # customers are not affected by a suspected service issue or to remediate a + # reversible system issue. + GOOGLE_INITIATED_SERVICE = 2 + + # Google initiated service for security, fraud, abuse, or compliance + # purposes. + GOOGLE_INITIATED_REVIEW = 3 + + # The principal was compelled to access customer data in order to respond + # to a legal third party data request or process, including legal processes + # from customers themselves. + THIRD_PARTY_DATA_REQUEST = 4 + + # The principal accessed customer data in order to diagnose or resolve a + # suspected issue in services or a known outage. + GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 5 + + # Similar to 'GOOGLE_INITIATED_SERVICE' or 'GOOGLE_INITIATED_REVIEW', but + # with universe agnostic naming. The principal accessed customer data in + # order to diagnose or resolve a suspected issue in services or a known + # outage, or for security, fraud, abuse, or compliance review purposes. + CLOUD_INITIATED_ACCESS = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb new file mode 100644 index 000000000000..9eba2e93c76c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudControlsPartner + module V1 + # Enum for possible completion states. + module CompletionState + # Unspecified completion state. + COMPLETION_STATE_UNSPECIFIED = 0 + + # Task started (has start date) but not yet completed. + PENDING = 1 + + # Succeeded state. + SUCCEEDED = 2 + + # Failed state. + FAILED = 3 + + # Not applicable state. + NOT_APPLICABLE = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb new file mode 100644 index 000000000000..8c4ed960d60e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudControlsPartner + module V1 + # 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_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have [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-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb new file mode 100644 index 000000000000..8613fad349b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb @@ -0,0 +1,177 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1 + # Contains metadata around the [Workload + # resource](https://cloud.google.com/assured-workloads/docs/reference/rest/Shared.Types/Workload) + # in the Assured Workloads API. + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @!attribute [r] folder_id + # @return [::Integer] + # Output only. Folder id this workload is associated with + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the resource was created. + # @!attribute [r] folder + # @return [::String] + # Output only. The name of container folder of the assured workload + # @!attribute [rw] workload_onboarding_state + # @return [::Google::Cloud::CloudControlsPartner::V1::WorkloadOnboardingState] + # Container for workload onboarding steps. + # @!attribute [rw] is_onboarded + # @return [::Boolean] + # Indicates whether a workload is fully onboarded. + # @!attribute [rw] key_management_project_id + # @return [::String] + # The project id of the key management project for the workload + # @!attribute [rw] location + # @return [::String] + # The Google Cloud location of the workload + # @!attribute [rw] partner + # @return [::Google::Cloud::CloudControlsPartner::V1::Workload::Partner] + # Partner associated with this workload. + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported Assured Workloads Partners. + module Partner + # Unknown Partner. + PARTNER_UNSPECIFIED = 0 + + # Enum representing S3NS (Thales) partner. + PARTNER_LOCAL_CONTROLS_BY_S3NS = 1 + + # Enum representing T_SYSTEM (TSI) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS = 2 + + # Enum representing SIA_MINSAIT (Indra) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 3 + + # Enum representing PSN (TIM) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_PSN = 4 + + # Enum representing CNTXT (Kingdom of Saudi Arabia) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT = 6 + + # Enum representing CNXT (Kingdom of Saudi Arabia) partner offering without + # EKM provisioning. + PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7 + end + end + + # Request to list customer workloads. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of workloads to return. The service may return fewer + # than this value. If unspecified, at most 500 workloads will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListWorkloads` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list customer workloads requests. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Workload>] + # List of customer workloads + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a customer workload. + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for workload onboarding steps. + # @!attribute [rw] onboarding_steps + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::WorkloadOnboardingStep>] + # List of workload onboarding steps. + class WorkloadOnboardingState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for workload onboarding information. + # @!attribute [rw] step + # @return [::Google::Cloud::CloudControlsPartner::V1::WorkloadOnboardingStep::Step] + # The onboarding step. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The starting time of the onboarding step. + # @!attribute [rw] completion_time + # @return [::Google::Protobuf::Timestamp] + # The completion time of the onboarding step. + # @!attribute [r] completion_state + # @return [::Google::Cloud::CloudControlsPartner::V1::CompletionState] + # Output only. The completion state of the onboarding step. + class WorkloadOnboardingStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for possible onboarding steps. + module Step + # Unspecified step. + STEP_UNSPECIFIED = 0 + + # EKM Provisioned step. + EKM_PROVISIONED = 1 + + # Signed Access Approval step. + SIGNED_ACCESS_APPROVAL_CONFIGURED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb new file mode 100644 index 000000000000..79358616c1ac --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb @@ -0,0 +1,180 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1 + # Contains metadata around a Cloud Controls Partner Customer + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name for the customer + # @!attribute [r] customer_onboarding_state + # @return [::Google::Cloud::CloudControlsPartner::V1::CustomerOnboardingState] + # Output only. Container for customer onboarding steps + # @!attribute [r] is_onboarded + # @return [::Boolean] + # Output only. Indicates whether a customer is fully onboarded + # @!attribute [r] organization_domain + # @return [::String] + # Output only. The customer organization domain, extracted from + # CRM Organization’s display_name field. e.g. "google.com" + class Customer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list customers + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of Customers to return. The service may return fewer + # than this value. If unspecified, at most 500 Customers will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListCustomers` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListCustomersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list customer Customers requests + # @!attribute [rw] customers + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Customer>] + # List of customers + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListCustomersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a customer + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @!attribute [rw] customer + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # Required. The customer to create. + # @!attribute [rw] customer_id + # @return [::String] + # Required. The customer id to use for the customer, which will become the + # final component of the customer's resource name. The specified value must + # be a valid Google cloud organization id. + class CreateCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a customer + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + class GetCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for customer onboarding steps + # @!attribute [rw] onboarding_steps + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::CustomerOnboardingStep>] + # List of customer onboarding steps + class CustomerOnboardingState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for customer onboarding information + # @!attribute [rw] step + # @return [::Google::Cloud::CloudControlsPartner::V1::CustomerOnboardingStep::Step] + # The onboarding step + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The starting time of the onboarding step + # @!attribute [rw] completion_time + # @return [::Google::Protobuf::Timestamp] + # The completion time of the onboarding step + # @!attribute [r] completion_state + # @return [::Google::Cloud::CloudControlsPartner::V1::CompletionState] + # Output only. Current state of the step + class CustomerOnboardingStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for possible onboarding steps + module Step + # Unspecified step + STEP_UNSPECIFIED = 0 + + # KAJ Enrollment + KAJ_ENROLLMENT = 1 + + # Customer Environment + CUSTOMER_ENVIRONMENT = 2 + end + end + + # Request to update a customer + # @!attribute [rw] customer + # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] + # Required. The customer to update + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdateCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting customer + # @!attribute [rw] name + # @return [::String] + # Required. name of the resource to be deleted + # format: name=organizations/*/locations/*/customers/* + class DeleteCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb new file mode 100644 index 000000000000..b3b41336e305 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1 + # The EKM connections associated with a workload + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # @!attribute [rw] ekm_connections + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::EkmConnection>] + # The EKM connections associated with the workload + class EkmConnections + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting the EKM connections associated with a workload + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + class GetEkmConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the EKM connection + # @!attribute [rw] connection_name + # @return [::String] + # Resource name of the EKM connection in the format: + # projects/\\{project}/locations/\\{location}/ekmConnections/\\{ekm_connection} + # @!attribute [r] connection_state + # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnection::ConnectionState] + # Output only. The connection state + # @!attribute [rw] connection_error + # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnection::ConnectionError] + # The connection error that occurred if any + class EkmConnection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information around the error that occurred if the connection state is + # anything other than available or unspecified + # @!attribute [rw] error_domain + # @return [::String] + # The error domain for the error + # @!attribute [rw] error_message + # @return [::String] + # The error message for the error + class ConnectionError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The EKM connection state. + module ConnectionState + # Unspecified EKM connection state + CONNECTION_STATE_UNSPECIFIED = 0 + + # Available EKM connection state + AVAILABLE = 1 + + # Not available EKM connection state + NOT_AVAILABLE = 2 + + # Error EKM connection state + ERROR = 3 + + # Permission denied EKM connection state + PERMISSION_DENIED = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.rb new file mode 100644 index 000000000000..dd897b0f5733 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.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! + + +module Google + module Cloud + module CloudControlsPartner + module V1 + # The permissions granted to the partner for a workload + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # @!attribute [rw] partner_permissions + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions::Permission>] + # The partner permissions granted for the workload + class PartnerPermissions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Permission + # Unspecified partner permission + PERMISSION_UNSPECIFIED = 0 + + # Permission for Access Transparency and emergency logs + ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS = 1 + + # Permission for Assured Workloads monitoring violations + ASSURED_WORKLOADS_MONITORING = 2 + + # Permission for Access Approval requests + ACCESS_APPROVAL_REQUESTS = 3 + + # Permission for External Key Manager connection status + ASSURED_WORKLOADS_EKM_CONNECTION_STATUS = 4 + + # Permission for support case details for Access Transparency log entries + ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER = 5 + end + end + + # Request for getting the partner permissions granted for a workload + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource to get in the format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + class GetPartnerPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb new file mode 100644 index 000000000000..b3cfb8c708ff --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1 + # Message describing Partner resource + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the partner. + # Format: `organizations/{organization}/locations/{location}/partner` + # Example: "organizations/123456/locations/us-central1/partner" + # @!attribute [rw] skus + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Sku>] + # List of SKUs the partner is offering + # @!attribute [rw] ekm_solutions + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::EkmMetadata>] + # List of Google Cloud supported EKM partners supported by the partner + # @!attribute [rw] operated_cloud_regions + # @return [::Array<::String>] + # List of Google Cloud regions that the partner sells services to customers. + # Valid Google Cloud regions found here: + # https://cloud.google.com/compute/docs/regions-zones + # @!attribute [rw] partner_project_id + # @return [::String] + # Google Cloud project ID in the partner's Google Cloud organization for + # receiving enhanced Logs for Partners. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the resource was created + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time the resource was updated + class Partner + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Partner + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/partner` + class GetPartnerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the SKU a partner owns inside Google Cloud to sell to customers. + # @!attribute [rw] id + # @return [::String] + # Argentum product SKU, that is associated with the partner offerings to + # customers used by Syntro for billing purposes. SKUs can represent resold + # Google products or support services. + # @!attribute [rw] display_name + # @return [::String] + # Display name of the product identified by the SKU. A partner may want to + # show partner branded names for their offerings such as local sovereign + # cloud solutions. + class Sku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds information needed by Mudbray to use partner EKMs for workloads. + # @!attribute [rw] ekm_solution + # @return [::Google::Cloud::CloudControlsPartner::V1::EkmMetadata::EkmSolution] + # The Cloud EKM partner. + # @!attribute [rw] ekm_endpoint_uri + # @return [::String] + # Endpoint for sending requests to the EKM for key provisioning during + # Assured Workload creation. + class EkmMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents Google Cloud supported external key management partners + # [Google Cloud EKM partners + # docs](https://cloud.google.com/kms/docs/ekm#supported_partners). + module EkmSolution + # Unspecified EKM solution + EKM_SOLUTION_UNSPECIFIED = 0 + + # EKM Partner Fortanix + FORTANIX = 1 + + # EKM Partner FutureX + FUTUREX = 2 + + # EKM Partner Thales + THALES = 3 + + # This enum value is never used. + VIRTRU = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.rb new file mode 100644 index 000000000000..ec1d17ab6f34 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.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 Cloud + module CloudControlsPartner + module V1 + # Details of resource Violation + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # @!attribute [r] description + # @return [::String] + # Output only. Description for the Violation. + # e.g. OrgPolicy gcp.resourceLocations has non compliant value. + # @!attribute [r] begin_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which triggered the Violation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time when the Violation record was updated. + # @!attribute [r] resolve_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which fixed the Violation. + # If the violation is ACTIVE this will be empty. + # @!attribute [r] category + # @return [::String] + # Output only. Category under which this violation is mapped. + # e.g. Location, Service Usage, Access, Encryption, etc. + # @!attribute [r] state + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::State] + # Output only. State of the violation + # @!attribute [r] non_compliant_org_policy + # @return [::String] + # Output only. Immutable. Name of the OrgPolicy which was modified with + # non-compliant change and resulted this violation. Format: + # `projects/{project_number}/policies/{constraint_name}` + # `folders/{folder_id}/policies/{constraint_name}` + # `organizations/{organization_id}/policies/{constraint_name}` + # @!attribute [rw] folder_id + # @return [::Integer] + # The folder_id of the violation + # @!attribute [r] remediation + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation] + # Output only. Compliance violation remediation + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents remediation guidance to resolve compliance violation for + # AssuredWorkload + # @!attribute [rw] instructions + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::Instructions] + # Required. Remediation instructions to resolve violations + # @!attribute [rw] compliant_values + # @return [::Array<::String>] + # Values that can resolve the violation + # For example: for list org policy violations, this will either be the list + # of allowed or denied values + # @!attribute [r] remediation_type + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::RemediationType] + # Output only. Remediation type based on the type of org policy values + # violated + class Remediation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Instructions to remediate violation + # @!attribute [rw] gcloud_instructions + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::Instructions::Gcloud] + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] console_instructions + # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::Instructions::Console] + # Remediation instructions to resolve violation via cloud console + class Instructions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] gcloud_commands + # @return [::Array<::String>] + # Gcloud command to resolve violation + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via gcloud cli + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Gcloud + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Remediation instructions to resolve violation via cloud console + # @!attribute [rw] console_uris + # @return [::Array<::String>] + # Link to console page where violations can be resolved + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via cloud console + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Console + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Classifying remediation into various types based on the kind of + # violation. For example, violations caused due to changes in boolean org + # policy requires different remediation instructions compared to violation + # caused due to changes in allowed values of list org policy. + module RemediationType + # Unspecified remediation type + REMEDIATION_TYPE_UNSPECIFIED = 0 + + # Remediation type for boolean org policy + REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 + + # Remediation type for list org policy which have allowed values in the + # monitoring rule + REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 + + # Remediation type for list org policy which have denied values in the + # monitoring rule + REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 + + # Remediation type for gcp.restrictCmekCryptoKeyProjects + REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 + + # Remediation type for resource violation. + REMEDIATION_RESOURCE_VIOLATION = 5 + end + end + + # Violation State Values + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Violation is resolved. + RESOLVED = 1 + + # Violation is Unresolved + UNRESOLVED = 2 + + # Violation is Exception + EXCEPTION = 3 + end + end + + # Message for requesting list of Violations + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of customers row to return. The service may + # return fewer than this value. If unspecified, at most 10 customers will be + # returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListViolations` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + # @!attribute [rw] interval + # @return [::Google::Type::Interval] + # Optional. Specifies the interval for retrieving violations. + # if unspecified, all violations will be returned. + class ListViolationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list customer violation requests + # @!attribute [rw] violations + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Violation>] + # List of violation + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Workloads that could not be reached due to permission errors or any other + # error. Ref: https://google.aip.dev/217 + class ListViolationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Violation + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + class GetViolationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/type/interval.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! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/Gemfile new file mode 100644 index 000000000000..b932a960b8e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1", path: "../" +else + gem "google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.rb new file mode 100644 index 000000000000..a45ceac9d292 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_CreateCustomer_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the create_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#create_customer. +# +def create_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new + + # Call the create_customer method. + result = client.create_customer request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_CreateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.rb new file mode 100644 index 000000000000..9774212278a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_DeleteCustomer_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the delete_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#delete_customer. +# +def delete_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new + + # Call the delete_customer method. + result = client.delete_customer request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_DeleteCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.rb new file mode 100644 index 000000000000..42cd7ccb19ef --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetCustomer_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the get_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_customer. +# +def get_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new + + # Call the get_customer method. + result = client.get_customer request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.rb new file mode 100644 index 000000000000..2dac573c8f19 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetEkmConnections_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the get_ekm_connections call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_ekm_connections. +# +def get_ekm_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new + + # Call the get_ekm_connections method. + result = client.get_ekm_connections request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::EkmConnections. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetEkmConnections_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.rb new file mode 100644 index 000000000000..cb954a687ad7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartner_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the get_partner call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner. +# +def get_partner + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new + + # Call the get_partner method. + result = client.get_partner request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Partner. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartner_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.rb new file mode 100644 index 000000000000..626a82198253 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the get_partner_permissions call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner_permissions. +# +def get_partner_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new + + # Call the get_partner_permissions method. + result = client.get_partner_permissions request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::PartnerPermissions. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.rb new file mode 100644 index 000000000000..a5aec167d113 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetWorkload_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the get_workload call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Workload. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.rb new file mode 100644 index 000000000000..7e5dd2978d0e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_access_approval_requests. +# +def list_access_approval_requests + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.new + + # Call the list_access_approval_requests method. + result = client.list_access_approval_requests 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::CloudControlsPartner::V1::AccessApprovalRequest. + p item + end +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.rb new file mode 100644 index 000000000000..d54537961a36 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListCustomers_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the list_customers call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_customers. +# +def list_customers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.new + + # Call the list_customers method. + result = client.list_customers 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::CloudControlsPartner::V1::Customer. + p item + end +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListCustomers_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.rb new file mode 100644 index 000000000000..68f8734c7870 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListWorkloads_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the list_workloads call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads 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::CloudControlsPartner::V1::Workload. + p item + end +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.rb new file mode 100644 index 000000000000..7503fab3475c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_UpdateCustomer_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the update_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#update_customer. +# +def update_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new + + # Call the update_customer method. + result = client.update_customer request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_UpdateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.rb new file mode 100644 index 000000000000..0112ef781977 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_GetViolation_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the get_violation call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#get_violation. +# +def get_violation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new + + # Call the get_violation method. + result = client.get_violation request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Violation. + p result +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.rb new file mode 100644 index 000000000000..f57a56e7073e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_ListViolations_sync] +require "google/cloud/cloud_controls_partner/v1" + +## +# Snippet for the list_violations call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#list_violations. +# +def list_violations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new + + # Call the list_violations method. + result = client.list_violations 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::CloudControlsPartner::V1::Violation. + p item + end +end +# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json new file mode 100644 index 000000000000..0da1a79028cd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-cloud_controls_partner-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.cloudcontrolspartner.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetWorkload_sync", + "title": "Snippet for the get_workload call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_workload.", + "file": "cloud_controls_partner_core/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::Workload", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetWorkload", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_workloads.", + "file": "cloud_controls_partner_core/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.ListWorkloads", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetCustomer_sync", + "title": "Snippet for the get_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_customer.", + "file": "cloud_controls_partner_core/get_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::Customer", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListCustomers_sync", + "title": "Snippet for the list_customers call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_customers.", + "file": "cloud_controls_partner_core/list_customers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_customers", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_customers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "ListCustomers", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.ListCustomers", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetEkmConnections_sync", + "title": "Snippet for the get_ekm_connections call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_ekm_connections.", + "file": "cloud_controls_partner_core/get_ekm_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_ekm_connections", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_ekm_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::EkmConnections", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetEkmConnections", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetEkmConnections", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync", + "title": "Snippet for the get_partner_permissions call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner_permissions.", + "file": "cloud_controls_partner_core/get_partner_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_partner_permissions", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetPartnerPermissions", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetPartnerPermissions", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync", + "title": "Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_access_approval_requests.", + "file": "cloud_controls_partner_core/list_access_approval_requests.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_approval_requests", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_access_approval_requests", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "ListAccessApprovalRequests", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.ListAccessApprovalRequests", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartner_sync", + "title": "Snippet for the get_partner call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner.", + "file": "cloud_controls_partner_core/get_partner.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_partner", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::Partner", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetPartner", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetPartner", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_CreateCustomer_sync", + "title": "Snippet for the create_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#create_customer.", + "file": "cloud_controls_partner_core/create_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#create_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::Customer", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "CreateCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.CreateCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_UpdateCustomer_sync", + "title": "Snippet for the update_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#update_customer.", + "file": "cloud_controls_partner_core/update_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#update_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::Customer", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "UpdateCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.UpdateCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_DeleteCustomer_sync", + "title": "Snippet for the delete_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#delete_customer.", + "file": "cloud_controls_partner_core/delete_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#delete_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "DeleteCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.DeleteCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_ListViolations_sync", + "title": "Snippet for the list_violations call in the CloudControlsPartnerMonitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#list_violations.", + "file": "cloud_controls_partner_monitoring/list_violations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_violations", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#list_violations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse", + "client": { + "short_name": "CloudControlsPartnerMonitoring::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client" + }, + "method": { + "short_name": "ListViolations", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring.ListViolations", + "service": { + "short_name": "CloudControlsPartnerMonitoring", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_GetViolation_sync", + "title": "Snippet for the get_violation call in the CloudControlsPartnerMonitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#get_violation.", + "file": "cloud_controls_partner_monitoring/get_violation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_violation", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#get_violation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1::Violation", + "client": { + "short_name": "CloudControlsPartnerMonitoring::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client" + }, + "method": { + "short_name": "GetViolation", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring.GetViolation", + "service": { + "short_name": "CloudControlsPartnerMonitoring", + "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring" + } + } + }, + "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-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb new file mode 100644 index 000000000000..dea574dfa3b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1/cloud_controls_partner_core" + +class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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_customer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.customer_path organization: "value0", location: "value1", customer: "value2" + assert_equal "organizations/value0/locations/value1/customers/value2", path + end + end + + def test_ekm_connections_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ekm_connections_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/ekmConnections", path + end + end + + def test_organization_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_partner_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.partner_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1/partner", path + end + end + + def test_partner_permissions_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.partner_permissions_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/partnerPermissions", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb new file mode 100644 index 000000000000..89ba8bbf34b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb @@ -0,0 +1,708 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/core_pb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" + + +class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_workload + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workload ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workload(::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_count + end + end + end + + def test_list_workloads + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse.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_workloads_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads_client_stub.call_count + end + end + end + + def test_get_customer + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_customer({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_customer name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_customer ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_customer({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_customer(::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_customer_client_stub.call_count + end + end + end + + def test_list_customers + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse.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_customers_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_customers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_customers_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers_client_stub.call_count + end + end + end + + def test_get_ekm_connections + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::EkmConnections.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_ekm_connections_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_ekm_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_ekm_connections_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_ekm_connections({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_ekm_connections name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_ekm_connections({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_ekm_connections(::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_ekm_connections_client_stub.call_count + end + end + end + + def test_get_partner_permissions + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partner_permissions_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_partner_permissions_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_partner_permissions({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_partner_permissions name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_partner_permissions({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_partner_permissions(::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_partner_permissions_client_stub.call_count + end + end + end + + def test_list_access_approval_requests + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse.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_access_approval_requests_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_access_approval_requests_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_approval_requests_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_count + end + end + end + + def test_get_partner + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::Partner.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partner_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_partner_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_partner({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_partner name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_partner ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_partner({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_partner(::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_partner_client_stub.call_count + end + end + end + + def test_create_customer + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + customer = {} + customer_id = "hello world" + + create_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_create_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_customer parent: parent, customer: customer, customer_id: customer_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_customer ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_customer(::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_customer_client_stub.call_count + end + end + end + + def test_update_customer + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + customer = {} + update_mask = {} + + update_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_update_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_customer({ customer: customer, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_customer customer: customer, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_customer ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_customer({ customer: customer, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_customer(::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_customer_client_stub.call_count + end + end + end + + def test_delete_customer + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_delete_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_customer({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_customer name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_customer ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_customer({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_customer(::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb new file mode 100644 index 000000000000..a108e391f9a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb @@ -0,0 +1,787 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/core_pb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core" + +class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Workload.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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workload ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workload({ 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_workload(::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.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_workload_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse.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_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, 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_workloads_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads_client_stub.call_rpc_count + end + end + + def test_get_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_customer({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_customer name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_customer ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.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_customer_client_stub.call_rpc_count + end + end + + def test_list_customers + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse.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_customers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_customers, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, 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_customers_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers_client_stub.call_rpc_count + end + end + + def test_get_ekm_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::EkmConnections.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_ekm_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_ekm_connections, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_ekm_connections_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_ekm_connections({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_ekm_connections name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_ekm_connections({ 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_ekm_connections(::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.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_ekm_connections_client_stub.call_rpc_count + end + end + + def test_get_partner_permissions + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions.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_partner_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_partner_permissions, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_partner_permissions_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_partner_permissions({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_partner_permissions name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_partner_permissions({ 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_partner_permissions(::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.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_partner_permissions_client_stub.call_rpc_count + end + end + + def test_list_access_approval_requests + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse.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_access_approval_requests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_approval_requests, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, 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_access_approval_requests_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_rpc_count + end + end + + def test_get_partner + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Partner.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_partner_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_partner, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_partner_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_partner({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_partner name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_partner ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_partner({ 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_partner(::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.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_partner_client_stub.call_rpc_count + end + end + + def test_create_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Customer.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" + customer = {} + customer_id = "hello world" + + create_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1::Customer), request["customer"] + assert_equal "hello world", request["customer_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_customer parent: parent, customer: customer, customer_id: customer_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_customer ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_customer(::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_customer_client_stub.call_rpc_count + end + end + + def test_update_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Customer.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. + customer = {} + update_mask = {} + + update_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1::Customer), request["customer"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_customer({ customer: customer, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_customer customer: customer, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_customer ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_customer({ customer: customer, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_customer(::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_customer_client_stub.call_rpc_count + end + end + + def test_delete_customer + # 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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_customer({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_customer name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_customer ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.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_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::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::CloudControlsPartner::V1::CloudControlsPartnerCore::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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb new file mode 100644 index 000000000000..4d65927bc426 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1/cloud_controls_partner_monitoring" + +class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.violation_path organization: "value0", location: "value1", customer: "value2", workload: "value3", violation: "value4" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/violations/value4", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb new file mode 100644 index 000000000000..ccaf6df922ff --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/monitoring_pb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" + + +class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse.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" + interval = {} + + list_violations_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_list_violations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_violations_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_violations ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_violations(::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_violations_client_stub.call_count + end + end + end + + def test_get_violation + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1::Violation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_violation_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_get_violation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_violation_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_violation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_violation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_violation ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_violation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_violation(::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_violation_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb new file mode 100644 index 000000000000..1223db0933fa --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1/monitoring_pb" +require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring" + +class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse.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" + interval = {} + + list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_violations, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, 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 Gapic::Protobuf.coerce({}, to: ::Google::Type::Interval), request["interval"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_violations_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) 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_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval 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_violations ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) 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_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, 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_violations(::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), 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_violations_client_stub.call_rpc_count + end + end + + def test_get_violation + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Violation.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_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_violation, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_violation_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_violation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_violation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_violation ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_violation({ 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_violation(::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.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_violation_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.gitignore b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.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-cloud_controls_partner-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..77528c756e3d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "cloudcontrolspartner.googleapis.com", + "api_shortname": "cloudcontrolspartner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1beta/latest", + "distribution_name": "google-cloud-cloud_controls_partner-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "cloudcontrolspartner", + "name_pretty": "Cloud Controls Partner V1BETA API", + "product_documentation": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml new file mode 100644 index 000000000000..619c07cd8b2a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-cloud_controls_partner-v1beta.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-cloud_controls_partner-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts new file mode 100644 index 000000000000..7d8dee2fe5f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Controls Partner V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..29ac24429250 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-cloud_controls_partner-v1beta library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-cloud_controls_partner-v1beta library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/cloud_controls_partner/v1beta" + +client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/cloud_controls_partner/v1beta" + +::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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-cloud_controls_partner-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/cloud_controls_partner/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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-cloud_controls_partner-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile @@ -0,0 +1,14 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md new file mode 100644 index 000000000000..c34429e01dbd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Controls Partner V1BETA API + +Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. + +Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Controls Partner V1BETA API. Most users should consider using +the main client gem, +[google-cloud-cloud_controls_partner](https://rubygems.org/gems/google-cloud-cloud_controls_partner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-cloud_controls_partner-v1beta +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudcontrolspartner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/cloud_controls_partner/v1beta" + +client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new +request = ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new # (request fields as keyword arguments...) +response = client.get_workload request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest) +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/cloud_controls_partner/v1beta" +require "logger" + +client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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-cloud_controls_partner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-cloud_controls_partner-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-cloud_controls_partner`. +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-cloud_controls_partner-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile new file mode 100644 index 000000000000..811ad03c15c9 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-cloud_controls_partner-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials" + ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-cloud_controls_partner-v1beta gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-cloud_controls_partner-v1beta gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-cloud_controls_partner-v1beta gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-cloud_controls_partner-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-cloud_controls_partner-v1beta" + header "google-cloud-cloud_controls_partner-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-cloud_controls_partner-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-cloud_controls_partner-v1beta test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-cloud_controls_partner-v1beta smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-cloud_controls_partner-v1beta acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..b5cceeab3104 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json @@ -0,0 +1,92 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.cloudcontrolspartner.v1beta", + "libraryPackage": "::Google::Cloud::CloudControlsPartner::V1beta", + "services": { + "CloudControlsPartnerCore": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client", + "rpcs": { + "GetWorkload": { + "methods": [ + "get_workload" + ] + }, + "ListWorkloads": { + "methods": [ + "list_workloads" + ] + }, + "GetCustomer": { + "methods": [ + "get_customer" + ] + }, + "ListCustomers": { + "methods": [ + "list_customers" + ] + }, + "GetEkmConnections": { + "methods": [ + "get_ekm_connections" + ] + }, + "GetPartnerPermissions": { + "methods": [ + "get_partner_permissions" + ] + }, + "ListAccessApprovalRequests": { + "methods": [ + "list_access_approval_requests" + ] + }, + "GetPartner": { + "methods": [ + "get_partner" + ] + }, + "CreateCustomer": { + "methods": [ + "create_customer" + ] + }, + "UpdateCustomer": { + "methods": [ + "update_customer" + ] + }, + "DeleteCustomer": { + "methods": [ + "delete_customer" + ] + } + } + } + } + }, + "CloudControlsPartnerMonitoring": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client", + "rpcs": { + "ListViolations": { + "methods": [ + "list_violations" + ] + }, + "GetViolation": { + "methods": [ + "get_violation" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec new file mode 100644 index 000000000000..c46b3446c8e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/cloud_controls_partner/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-cloud_controls_partner-v1beta" + gem.version = Google::Cloud::CloudControlsPartner::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details." + gem.summary = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb new file mode 100644 index 000000000000..f34b1627d4fb --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/cloud_controls_partner/v1beta" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb new file mode 100644 index 000000000000..4428df5755ae --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" +require "google/cloud/cloud_controls_partner/v1beta/version" + +module Google + module Cloud + module CloudControlsPartner + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/cloud_controls_partner/v1beta" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/cloud_controls_partner/v1beta" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/cloud_controls_partner/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb new file mode 100644 index 000000000000..3859b1bd3923 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_controls_partner/v1beta/version" + +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + module CloudControlsPartnerCore + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_controls_partner_core", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb new file mode 100644 index 000000000000..5aee76498c42 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb @@ -0,0 +1,1504 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/core_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerCore + ## + # Client for the CloudControlsPartnerCore service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_core_stub + + ## + # Configure the CloudControlsPartnerCore Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerCore clients + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_customer.timeout = 60.0 + default_config.rpcs.get_customer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_customers.timeout = 60.0 + default_config.rpcs.list_customers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_ekm_connections.timeout = 60.0 + default_config.rpcs.get_ekm_connections.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_partner_permissions.timeout = 60.0 + default_config.rpcs.get_partner_permissions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_access_approval_requests.timeout = 60.0 + default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_core_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerCore client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerCore 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/cloudcontrolspartner/v1beta/core_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_core_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_controls_partner_core_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_core_stub.logger + end + + # Service calls + + ## + # Gets details of a single workload + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Workload] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest + + # Converts hash 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_workload.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_workload, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customer workloads for a given customer org id + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param page_size [::Integer] + # The maximum number of workloads to return. The service may return fewer + # than this value. If unspecified, at most 500 workloads will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListWorkloads` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads 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::CloudControlsPartner::V1beta::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest + + # Converts hash 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_workloads.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :list_workloads, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single customer + # + # @overload get_customer(request, options = nil) + # Pass arguments to `get_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `get_customer` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new + # + # # Call the get_customer method. + # result = client.get_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + # p result + # + def get_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_customer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customers of a partner identified by its Google Cloud organization ID + # + # @overload list_customers(request, options = nil) + # Pass arguments to `list_customers` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_customers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of Customers to return. The service may return fewer + # than this value. If unspecified, at most 500 Customers will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCustomers` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.new + # + # # Call the list_customers method. + # result = client.list_customers 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::CloudControlsPartner::V1beta::Customer. + # p item + # end + # + def list_customers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest + + # Converts hash 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_customers.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_customers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_customers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :list_customers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, 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 EKM connections associated with a workload + # + # @overload get_ekm_connections(request, options = nil) + # Pass arguments to `get_ekm_connections` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) + # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new + # + # # Call the get_ekm_connections method. + # result = client.get_ekm_connections request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::EkmConnections. + # p result + # + def get_ekm_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest + + # Converts hash 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_ekm_connections.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_ekm_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_ekm_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_ekm_connections, 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 the partner permissions granted for a workload + # + # @overload get_partner_permissions(request, options = nil) + # Pass arguments to `get_partner_permissions` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) + # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource to get in the format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new + # + # # Call the get_partner_permissions method. + # result = client.get_partner_permissions request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions. + # p result + # + def get_partner_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest + + # Converts hash 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_partner_permissions.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_partner_permissions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_partner_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_partner_permissions, 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 + + ## + # Deprecated: Only returns access approval requests directly associated with + # an assured workload folder. + # + # @deprecated This method is deprecated and may be removed in the next major version update. + # + # @overload list_access_approval_requests(request, options = nil) + # Pass arguments to `list_access_approval_requests` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of access requests to return. The service may + # return fewer than this value. If unspecified, at most 500 access requests + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent + # page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.new + # + # # Call the list_access_approval_requests method. + # result = client.list_access_approval_requests 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::CloudControlsPartner::V1beta::AccessApprovalRequest. + # p item + # end + # + def list_access_approval_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest + + # Converts hash 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_access_approval_requests.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_access_approval_requests.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_access_approval_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :list_access_approval_requests, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a Partner. + # + # @overload get_partner(request, options = nil) + # Pass arguments to `get_partner` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner(name: nil) + # Pass arguments to `get_partner` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/partner` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Partner] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Partner] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new + # + # # Call the get_partner method. + # result = client.get_partner request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Partner. + # p result + # + def get_partner request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest + + # Converts hash 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_partner.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_partner.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_partner.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :get_partner, 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 customer. + # + # @overload create_customer(request, options = nil) + # Pass arguments to `create_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) + # Pass arguments to `create_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] + # Required. The customer to create. + # @param customer_id [::String] + # Required. The customer id to use for the customer, which will become the + # final component of the customer's resource name. The specified value must + # be a valid Google cloud organization id. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new + # + # # Call the create_customer method. + # result = client.create_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + # p result + # + def create_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :create_customer, 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 + + ## + # Update details of a single customer + # + # @overload update_customer(request, options = nil) + # Pass arguments to `update_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) + # Pass arguments to `update_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] + # Required. The customer to update + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new + # + # # Call the update_customer method. + # result = client.update_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + # p result + # + def update_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.customer&.name + header_params["customer.name"] = request.customer.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_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :update_customer, 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 + + ## + # Delete details of a single customer + # + # @overload delete_customer(request, options = nil) + # Pass arguments to `delete_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `delete_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. name of the resource to be deleted + # format: name=organizations/*/locations/*/customers/* + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new + # + # # Call the delete_customer method. + # result = client.delete_customer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.call_rpc :delete_customer, 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 CloudControlsPartnerCore API. + # + # This class represents the configuration for CloudControlsPartnerCore, + # 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `get_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer + ## + # RPC-specific configuration for `list_customers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customers + ## + # RPC-specific configuration for `get_ekm_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ekm_connections + ## + # RPC-specific configuration for `get_partner_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner_permissions + ## + # RPC-specific configuration for `list_access_approval_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_approval_requests + ## + # RPC-specific configuration for `get_partner` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner + ## + # RPC-specific configuration for `create_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer + ## + # RPC-specific configuration for `update_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer + ## + # RPC-specific configuration for `delete_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer + + # @private + def initialize parent_rpcs = nil + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer + @get_customer = ::Gapic::Config::Method.new get_customer_config + list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers + @list_customers = ::Gapic::Config::Method.new list_customers_config + get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections + @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config + get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions + @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config + list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests + @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config + get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner + @get_partner = ::Gapic::Config::Method.new get_partner_config + create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer + @create_customer = ::Gapic::Config::Method.new create_customer_config + update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer + @update_customer = ::Gapic::Config::Method.new update_customer_config + delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer + @delete_customer = ::Gapic::Config::Method.new delete_customer_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb new file mode 100644 index 000000000000..9576517a9adf --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerCore + # Credentials for the CloudControlsPartnerCore API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb new file mode 100644 index 000000000000..b6cae714497f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb @@ -0,0 +1,149 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1beta + module CloudControlsPartnerCore + # Path helper methods for the CloudControlsPartnerCore API. + module Paths + ## + # Create a fully-qualified Customer resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # + # @return [::String] + def customer_path organization:, location:, customer: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}" + end + + ## + # Create a fully-qualified EkmConnections resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def ekm_connections_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/ekmConnections" + end + + ## + # Create a fully-qualified OrganizationLocation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def organization_location_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}" + end + + ## + # Create a fully-qualified Partner resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/partner` + # + # @param organization [String] + # @param location [String] + # + # @return [::String] + def partner_path organization:, location: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/partner" + end + + ## + # Create a fully-qualified PartnerPermissions resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def partner_permissions_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/partnerPermissions" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb new file mode 100644 index 000000000000..9db4aa3cf9ec --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1beta/version" + +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + module CloudControlsPartnerCore + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb new file mode 100644 index 000000000000..ffbae9c077fc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb @@ -0,0 +1,1382 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/core_pb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerCore + module Rest + ## + # REST client for the CloudControlsPartnerCore service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_core_stub + + ## + # Configure the CloudControlsPartnerCore Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerCore clients + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_workload.timeout = 60.0 + default_config.rpcs.get_workload.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workloads.timeout = 60.0 + default_config.rpcs.list_workloads.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_customer.timeout = 60.0 + default_config.rpcs.get_customer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_customers.timeout = 60.0 + default_config.rpcs.list_customers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_ekm_connections.timeout = 60.0 + default_config.rpcs.get_ekm_connections.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_partner_permissions.timeout = 60.0 + default_config.rpcs.get_partner_permissions.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_access_approval_requests.timeout = 60.0 + default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_core_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerCore REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerCore client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_core_stub = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_controls_partner_core_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_core_stub.logger + end + + # Service calls + + ## + # Gets details of a single workload + # + # @overload get_workload(request, options = nil) + # Pass arguments to `get_workload` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workload(name: nil) + # Pass arguments to `get_workload` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new + # + # # Call the get_workload method. + # result = client.get_workload request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Workload. + # p result + # + def get_workload request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest + + # Converts hash 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_workload.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workload.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workload.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_workload request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customer workloads for a given customer org id + # + # @overload list_workloads(request, options = nil) + # Pass arguments to `list_workloads` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_workloads` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param page_size [::Integer] + # The maximum number of workloads to return. The service may return fewer + # than this value. If unspecified, at most 500 workloads will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListWorkloads` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.new + # + # # Call the list_workloads method. + # result = client.list_workloads 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::CloudControlsPartner::V1beta::Workload. + # p item + # end + # + def list_workloads request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest + + # Converts hash 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_workloads.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workloads.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.list_workloads request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, "workloads", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single customer + # + # @overload get_customer(request, options = nil) + # Pass arguments to `get_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `get_customer` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new + # + # # Call the get_customer method. + # result = client.get_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + # p result + # + def get_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_customer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists customers of a partner identified by its Google Cloud organization ID + # + # @overload list_customers(request, options = nil) + # Pass arguments to `list_customers` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_customers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param page_size [::Integer] + # The maximum number of Customers to return. The service may return fewer + # than this value. If unspecified, at most 500 Customers will be returned. + # @param page_token [::String] + # A page token, received from a previous `ListCustomers` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.new + # + # # Call the list_customers method. + # result = client.list_customers 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::CloudControlsPartner::V1beta::Customer. + # p item + # end + # + def list_customers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest + + # Converts hash 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_customers.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_customers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_customers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.list_customers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, "customers", 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 EKM connections associated with a workload + # + # @overload get_ekm_connections(request, options = nil) + # Pass arguments to `get_ekm_connections` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) + # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new + # + # # Call the get_ekm_connections method. + # result = client.get_ekm_connections request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::EkmConnections. + # p result + # + def get_ekm_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest + + # Converts hash 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_ekm_connections.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_ekm_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_ekm_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_ekm_connections 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 the partner permissions granted for a workload + # + # @overload get_partner_permissions(request, options = nil) + # Pass arguments to `get_partner_permissions` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) + # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource to get in the format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new + # + # # Call the get_partner_permissions method. + # result = client.get_partner_permissions request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions. + # p result + # + def get_partner_permissions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest + + # Converts hash 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_partner_permissions.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_partner_permissions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_partner_permissions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_partner_permissions 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 + + ## + # Deprecated: Only returns access approval requests directly associated with + # an assured workload folder. + # + # @overload list_access_approval_requests(request, options = nil) + # Pass arguments to `list_access_approval_requests` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of access requests to return. The service may + # return fewer than this value. If unspecified, at most 500 access requests + # will be returned. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent + # page. + # @param filter [::String] + # Optional. Filtering results. + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.new + # + # # Call the list_access_approval_requests method. + # result = client.list_access_approval_requests 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::CloudControlsPartner::V1beta::AccessApprovalRequest. + # p item + # end + # + def list_access_approval_requests request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest + + # Converts hash 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_access_approval_requests.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_access_approval_requests.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_access_approval_requests.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.list_access_approval_requests request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, "access_approval_requests", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Get details of a Partner. + # + # @overload get_partner(request, options = nil) + # Pass arguments to `get_partner` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_partner(name: nil) + # Pass arguments to `get_partner` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/partner` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Partner] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Partner] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new + # + # # Call the get_partner method. + # result = client.get_partner request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Partner. + # p result + # + def get_partner request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest + + # Converts hash 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_partner.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_partner.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_partner.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.get_partner 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 customer. + # + # @overload create_customer(request, options = nil) + # Pass arguments to `create_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) + # Pass arguments to `create_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] + # Required. The customer to create. + # @param customer_id [::String] + # Required. The customer id to use for the customer, which will become the + # final component of the customer's resource name. The specified value must + # be a valid Google cloud organization id. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new + # + # # Call the create_customer method. + # result = client.create_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + # p result + # + def create_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.create_customer 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 + + ## + # Update details of a single customer + # + # @overload update_customer(request, options = nil) + # Pass arguments to `update_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) + # Pass arguments to `update_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] + # Required. The customer to update + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new + # + # # Call the update_customer method. + # result = client.update_customer request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + # p result + # + def update_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.update_customer 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 + + ## + # Delete details of a single customer + # + # @overload delete_customer(request, options = nil) + # Pass arguments to `delete_customer` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_customer(name: nil) + # Pass arguments to `delete_customer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. name of the resource to be deleted + # format: name=organizations/*/locations/*/customers/* + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new + # + # # Call the delete_customer method. + # result = client.delete_customer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_customer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest + + # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_customer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_core_stub.delete_customer 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 CloudControlsPartnerCore REST API. + # + # This class represents the configuration for CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # get_workload to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workload.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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workload + ## + # RPC-specific configuration for `list_workloads` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workloads + ## + # RPC-specific configuration for `get_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_customer + ## + # RPC-specific configuration for `list_customers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_customers + ## + # RPC-specific configuration for `get_ekm_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :get_ekm_connections + ## + # RPC-specific configuration for `get_partner_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner_permissions + ## + # RPC-specific configuration for `list_access_approval_requests` + # @return [::Gapic::Config::Method] + # + attr_reader :list_access_approval_requests + ## + # RPC-specific configuration for `get_partner` + # @return [::Gapic::Config::Method] + # + attr_reader :get_partner + ## + # RPC-specific configuration for `create_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_customer + ## + # RPC-specific configuration for `update_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_customer + ## + # RPC-specific configuration for `delete_customer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_customer + + # @private + def initialize parent_rpcs = nil + get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload + @get_workload = ::Gapic::Config::Method.new get_workload_config + list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads + @list_workloads = ::Gapic::Config::Method.new list_workloads_config + get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer + @get_customer = ::Gapic::Config::Method.new get_customer_config + list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers + @list_customers = ::Gapic::Config::Method.new list_customers_config + get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections + @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config + get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions + @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config + list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests + @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config + get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner + @get_partner = ::Gapic::Config::Method.new get_partner_config + create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer + @create_customer = ::Gapic::Config::Method.new create_customer_config + update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer + @update_customer = ::Gapic::Config::Method.new update_customer_config + delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer + @delete_customer = ::Gapic::Config::Method.new delete_customer_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb new file mode 100644 index 000000000000..5b84acedf10a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb @@ -0,0 +1,754 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/core_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerCore + module Rest + ## + # REST service stub for the CloudControlsPartnerCore service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the get_workload REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest] + # 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::CloudControlsPartner::V1beta::Workload] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload] + # A result object deserialized from the server's reply + def get_workload request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_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_workload", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::Workload.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_workloads REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest] + # 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::CloudControlsPartner::V1beta::ListWorkloadsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse] + # A result object deserialized from the server's reply + def list_workloads request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_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_workloads", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest] + # 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::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # A result object deserialized from the server's reply + def get_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customers REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest] + # 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::CloudControlsPartner::V1beta::ListCustomersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse] + # A result object deserialized from the server's reply + def list_customers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_customers_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_customers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse.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_ekm_connections REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest] + # 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::CloudControlsPartner::V1beta::EkmConnections] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] + # A result object deserialized from the server's reply + def get_ekm_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_ekm_connections_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_ekm_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections.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_partner_permissions REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest] + # 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::CloudControlsPartner::V1beta::PartnerPermissions] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] + # A result object deserialized from the server's reply + def get_partner_permissions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_permissions_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_partner_permissions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions.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_access_approval_requests REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest] + # 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::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse] + # A result object deserialized from the server's reply + def list_access_approval_requests request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_access_approval_requests_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_access_approval_requests", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse.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_partner REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest] + # 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::CloudControlsPartner::V1beta::Partner] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Partner] + # A result object deserialized from the server's reply + def get_partner request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_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_partner", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::Partner.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest] + # 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::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # A result object deserialized from the server's reply + def create_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest] + # 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::CloudControlsPartner::V1beta::Customer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # A result object deserialized from the server's reply + def update_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest] + # 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_customer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_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_customer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workload REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest] + # 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_workload_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workloads REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest] + # 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_workloads_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/workloads", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_customers REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest] + # 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_customers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/customers", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_ekm_connections REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest] + # 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_ekm_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/ekmConnections/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_partner_permissions REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest] + # 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_partner_permissions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/partnerPermissions/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_access_approval_requests REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest] + # 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_access_approval_requests_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/accessApprovalRequests", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_partner REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest] + # 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_partner_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/partner/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/customers", + body: "customer", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{customer.name}", + body: "customer", + matches: [ + ["customer.name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_customer REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest] + # 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_customer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb new file mode 100644 index 000000000000..8e6b0f80d54f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/cloud_controls_partner/v1beta/version" + +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + ## + # Service describing handlers for resources + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new + # + module CloudControlsPartnerMonitoring + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_controls_partner_monitoring", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb new file mode 100644 index 000000000000..86c388758591 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb @@ -0,0 +1,605 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/monitoring_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerMonitoring + ## + # Client for the CloudControlsPartnerMonitoring service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_monitoring_stub + + ## + # Configure the CloudControlsPartnerMonitoring Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerMonitoring clients + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_violations.timeout = 60.0 + default_config.rpcs.list_violations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_violation.timeout = 60.0 + default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_monitoring_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerMonitoring client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerMonitoring 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/cloudcontrolspartner/v1beta/monitoring_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_monitoring_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @cloud_controls_partner_monitoring_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_monitoring_stub.logger + end + + # Service calls + + ## + # Lists Violations for a workload + # Callers may also choose to read across multiple Customers or for a single + # customer as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of \\{customer} & \\{workload}. + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @overload list_violations(request, options = nil) + # Pass arguments to `list_violations` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) + # Pass arguments to `list_violations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of customers row to return. The service may + # return fewer than this value. If unspecified, at most 10 customers will be + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListViolations` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @param interval [::Google::Type::Interval, ::Hash] + # Optional. Specifies the interval for retrieving violations. + # if unspecified, all violations will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new + # + # # Call the list_violations method. + # result = client.list_violations 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::CloudControlsPartner::V1beta::Violation. + # p item + # end + # + def list_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest + + # Converts hash 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_violations.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_violations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.call_rpc :list_violations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Violation. + # + # @overload get_violation(request, options = nil) + # Pass arguments to `get_violation` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violation(name: nil) + # Pass arguments to `get_violation` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Violation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new + # + # # Call the get_violation method. + # result = client.get_violation request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Violation. + # p result + # + def get_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest + + # Converts hash 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_violation.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::CloudControlsPartner::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_violation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.call_rpc :get_violation, 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 CloudControlsPartnerMonitoring API. + # + # This class represents the configuration for CloudControlsPartnerMonitoring, + # 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_violations + ## + # RPC-specific configuration for `get_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_violation + + # @private + def initialize parent_rpcs = nil + list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations + @list_violations = ::Gapic::Config::Method.new list_violations_config + get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation + @get_violation = ::Gapic::Config::Method.new get_violation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb new file mode 100644 index 000000000000..5bf9106b13c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerMonitoring + # Credentials for the CloudControlsPartnerMonitoring API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb new file mode 100644 index 000000000000..114dd3a7f708 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1beta + module CloudControlsPartnerMonitoring + # Path helper methods for the CloudControlsPartnerMonitoring API. + module Paths + ## + # Create a fully-qualified Violation resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # @param violation [String] + # + # @return [::String] + def violation_path organization:, location:, customer:, workload:, violation: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/violations/#{violation}" + end + + ## + # Create a fully-qualified Workload resource string. + # + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @param organization [String] + # @param location [String] + # @param customer [String] + # @param workload [String] + # + # @return [::String] + def workload_path organization:, location:, customer:, workload: + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb new file mode 100644 index 000000000000..037f72b394fc --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1beta/version" + +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + ## + # Service describing handlers for resources + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new + # + module CloudControlsPartnerMonitoring + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb new file mode 100644 index 000000000000..883871bdfd3b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb @@ -0,0 +1,548 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/monitoring_pb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerMonitoring + module Rest + ## + # REST client for the CloudControlsPartnerMonitoring service. + # + # Service describing handlers for resources + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_controls_partner_monitoring_stub + + ## + # Configure the CloudControlsPartnerMonitoring Client class. + # + # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudControlsPartnerMonitoring clients + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_violations.timeout = 60.0 + default_config.rpcs.list_violations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_violation.timeout = 60.0 + default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @cloud_controls_partner_monitoring_stub.universe_domain + end + + ## + # Create a new CloudControlsPartnerMonitoring REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudControlsPartnerMonitoring client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @cloud_controls_partner_monitoring_stub = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_controls_partner_monitoring_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_controls_partner_monitoring_stub.logger + end + + # Service calls + + ## + # Lists Violations for a workload + # Callers may also choose to read across multiple Customers or for a single + # customer as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of \\{customer} & \\{workload}. + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # + # @overload list_violations(request, options = nil) + # Pass arguments to `list_violations` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) + # Pass arguments to `list_violations` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent resource + # Format + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @param page_size [::Integer] + # Optional. The maximum number of customers row to return. The service may + # return fewer than this value. If unspecified, at most 10 customers will be + # returned. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListViolations` call. + # Provide this to retrieve the subsequent page. + # @param filter [::String] + # Optional. Filtering results + # @param order_by [::String] + # Optional. Hint for how to order the results + # @param interval [::Google::Type::Interval, ::Hash] + # Optional. Specifies the interval for retrieving violations. + # if unspecified, all violations will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new + # + # # Call the list_violations method. + # result = client.list_violations 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::CloudControlsPartner::V1beta::Violation. + # p item + # end + # + def list_violations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest + + # Converts hash 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_violations.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_violations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_violations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.list_violations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, "violations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Violation. + # + # @overload get_violation(request, options = nil) + # Pass arguments to `get_violation` via a request object, either of type + # {::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_violation(name: nil) + # Pass arguments to `get_violation` via keyword arguments. Note that at + # least one keyword argument is 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. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Violation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/cloud_controls_partner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new + # + # # Call the get_violation method. + # result = client.get_violation request + # + # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Violation. + # p result + # + def get_violation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest + + # Converts hash 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_violation.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::CloudControlsPartner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_violation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_violation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_controls_partner_monitoring_stub.get_violation 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 CloudControlsPartnerMonitoring REST API. + # + # This class represents the configuration for CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_violations.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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_violations + ## + # RPC-specific configuration for `get_violation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_violation + + # @private + def initialize parent_rpcs = nil + list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations + @list_violations = ::Gapic::Config::Method.new list_violations_config + get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation + @get_violation = ::Gapic::Config::Method.new get_violation_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb new file mode 100644 index 000000000000..5e2200cc4630 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb @@ -0,0 +1,203 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/monitoring_pb" + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerMonitoring + module Rest + ## + # REST service stub for the CloudControlsPartnerMonitoring 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_violations REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest] + # 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::CloudControlsPartner::V1beta::ListViolationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse] + # A result object deserialized from the server's reply + def list_violations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_violations_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_violations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse.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_violation REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest] + # 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::CloudControlsPartner::V1beta::Violation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation] + # A result object deserialized from the server's reply + def get_violation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_violation_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_violation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CloudControlsPartner::V1beta::Violation.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_violations REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest] + # 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_violations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/violations", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_violation REST call + # + # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest] + # 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_violation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/violations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb new file mode 100644 index 000000000000..a8a5a2af9320 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" +require "google/cloud/cloud_controls_partner/v1beta/version" + +module Google + module Cloud + module CloudControlsPartner + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/cloud_controls_partner/v1beta/rest" + # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb new file mode 100644 index 000000000000..e2b34ad15416 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudControlsPartner + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb new file mode 100644 index 000000000000..595cc841668f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nGgoogle/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x03\n\x15\x41\x63\x63\x65ssApprovalRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12P\n\x10requested_reason\x18\x03 \x01(\x0b\x32\x36.google.cloud.cloudcontrolspartner.v1beta.AccessReason\x12=\n\x19requested_expiration_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xfd\x01\xea\x41\xf9\x01\n9cloudcontrolspartner.googleapis.com/AccessApprovalRequest\x12\x8c\x01organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}*\x16\x61\x63\x63\x65ssApprovalRequests2\x15\x61\x63\x63\x65ssApprovalRequest\"\xd3\x01\n!ListAccessApprovalRequestsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39\x63loudcontrolspartner.googleapis.com/AccessApprovalRequest\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\"\xb5\x01\n\"ListAccessApprovalRequestsResponse\x12\x61\n\x18\x61\x63\x63\x65ss_approval_requests\x18\x01 \x03(\x0b\x32?.google.cloud.cloudcontrolspartner.v1beta.AccessApprovalRequest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc6\x02\n\x0c\x41\x63\x63\x65ssReason\x12I\n\x04type\x18\x01 \x01(\x0e\x32;.google.cloud.cloudcontrolspartner.v1beta.AccessReason.Type\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xda\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43USTOMER_INITIATED_SUPPORT\x10\x01\x12\x1c\n\x18GOOGLE_INITIATED_SERVICE\x10\x02\x12\x1b\n\x17GOOGLE_INITIATED_REVIEW\x10\x03\x12\x1c\n\x18THIRD_PARTY_DATA_REQUEST\x10\x04\x12\'\n#GOOGLE_RESPONSE_TO_PRODUCTION_ALERT\x10\x05\x12\x1a\n\x16\x43LOUD_INITIATED_ACCESS\x10\x06\x42\xb3\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x1b\x41\x63\x63\x65ssApprovalRequestsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + AccessApprovalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.AccessApprovalRequest").msgclass + ListAccessApprovalRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest").msgclass + ListAccessApprovalRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsResponse").msgclass + AccessReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.AccessReason").msgclass + AccessReason::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.AccessReason.Type").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb new file mode 100644 index 000000000000..e2239ab23c8c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/completion_state.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/cloud/cloudcontrolspartner/v1beta/completion_state.proto\x12(google.cloud.cloudcontrolspartner.v1beta*o\n\x0f\x43ompletionState\x12 \n\x1c\x43OMPLETION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x12\n\x0eNOT_APPLICABLE\x10\x04\x42\xac\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x14\x43ompletionStateProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + CompletionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CompletionState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb new file mode 100644 index 000000000000..9685d2152e3e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/core.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/cloudcontrolspartner/v1beta/access_approval_requests_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/customers_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/partners_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/cloudcontrolspartner/v1beta/core.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aGgoogle/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto\x1a\x41google/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto\x1a\x38google/cloud/cloudcontrolspartner/v1beta/customers.proto\x1a>google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto\x1a\x42google/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto\x1a\x37google/cloud/cloudcontrolspartner/v1beta/partners.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\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\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xd3\x14\n\x18\x43loudControlsPartnerCore\x12\xd2\x01\n\x0bGetWorkload\x12<.google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Workload\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*}\x12\xe5\x01\n\rListWorkloads\x12>.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest\x1a?.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta/{parent=organizations/*/locations/*/customers/*}/workloads\x12\xc6\x01\n\x0bGetCustomer\x12<.google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{name=organizations/*/locations/*/customers/*}\x12\xd9\x01\n\rListCustomers\x12>.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest\x1a?.google.cloud.cloudcontrolspartner.v1beta.ListCustomersResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{parent=organizations/*/locations/*}/customers\x12\xf3\x01\n\x11GetEkmConnections\x12\x42.google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest\x1a\x38.google.cloud.cloudcontrolspartner.v1beta.EkmConnections\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\x12Q/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/ekmConnections}\x12\x83\x02\n\x15GetPartnerPermissions\x12\x46.google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest\x1a<.google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions\"d\xda\x41\x04name\x82\xd3\xe4\x93\x02W\x12U/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/partnerPermissions}\x12\xa8\x02\n\x1aListAccessApprovalRequests\x12K.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest\x1aL.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsResponse\"o\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02]\x12[/v1beta/{parent=organizations/*/locations/*/customers/*/workloads/*}/accessApprovalRequests\x12\xbf\x01\n\nGetPartner\x12;.google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest\x1a\x31.google.cloud.cloudcontrolspartner.v1beta.Partner\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{name=organizations/*/locations/*/partner}\x12\xed\x01\n\x0e\x43reateCustomer\x12?.google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\"f\xda\x41\x1bparent,customer,customer_id\x82\xd3\xe4\x93\x02\x42\"6/v1beta/{parent=organizations/*/locations/*}/customers:\x08\x63ustomer\x12\xef\x01\n\x0eUpdateCustomer\x12?.google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\"h\xda\x41\x14\x63ustomer,update_mask\x82\xd3\xe4\x93\x02K2?/v1beta/{customer.name=organizations/*/locations/*/customers/*}:\x08\x63ustomer\x12\xb0\x01\n\x0e\x44\x65leteCustomer\x12?.google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1beta/{name=organizations/*/locations/*/customers/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x03\n,com.google.cloud.cloudcontrolspartner.v1betaB\tCoreProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1beta\xea\x41m\n8cloudcontrolspartner.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb new file mode 100644 index 000000000000..0db28e73dfd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudcontrolspartner/v1beta/core.proto for package 'Google.Cloud.CloudControlsPartner.V1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1beta/core_pb' + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerCore + # Service describing handlers for resources + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore' + + # Gets details of a single workload + rpc :GetWorkload, ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Workload + # Lists customer workloads for a given customer org id + rpc :ListWorkloads, ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse + # Gets details of a single customer + rpc :GetCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Customer + # Lists customers of a partner identified by its Google Cloud organization ID + rpc :ListCustomers, ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse + # Gets the EKM connections associated with a workload + rpc :GetEkmConnections, ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections + # Gets the partner permissions granted for a workload + rpc :GetPartnerPermissions, ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions + # Deprecated: Only returns access approval requests directly associated with + # an assured workload folder. + rpc :ListAccessApprovalRequests, ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse + # Get details of a Partner. + rpc :GetPartner, ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Partner + # Creates a new customer. + rpc :CreateCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Customer + # Update details of a single customer + rpc :UpdateCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Customer + # Delete details of a single customer + rpc :DeleteCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb new file mode 100644 index 000000000000..60e3b68258e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/completion_state_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nAgoogle/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a?google/cloud/cloudcontrolspartner/v1beta/completion_state.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x06\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tfolder_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x66older\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x19workload_onboarding_state\x18\x05 \x01(\x0b\x32\x41.google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingState\x12\x14\n\x0cis_onboarded\x18\x06 \x01(\x08\x12!\n\x19key_management_project_id\x18\x07 \x01(\t\x12\x10\n\x08location\x18\x08 \x01(\t\x12K\n\x07partner\x18\t \x01(\x0e\x32:.google.cloud.cloudcontrolspartner.v1beta.Workload.Partner\"\xa2\x02\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\"\n\x1ePARTNER_LOCAL_CONTROLS_BY_S3NS\x10\x01\x12+\n\'PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS\x10\x02\x12-\n)PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT\x10\x03\x12%\n!PARTNER_SOVEREIGN_CONTROLS_BY_PSN\x10\x04\x12\'\n#PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT\x10\x06\x12.\n*PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM\x10\x07:\xa4\x01\xea\x41\xa0\x01\n,cloudcontrolspartner.googleapis.com/Workload\x12[organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}*\tworkloads2\x08workload\"\xaf\x01\n\x14ListWorkloadsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x8c\x01\n\x15ListWorkloadsResponse\x12\x45\n\tworkloads\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x12GetWorkloadRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Workload\"u\n\x17WorkloadOnboardingState\x12Z\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32@.google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep\"\x86\x03\n\x16WorkloadOnboardingStep\x12S\n\x04step\x18\x01 \x01(\x0e\x32\x45.google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x39.google.cloud.cloudcontrolspartner.v1beta.CompletionStateB\x03\xe0\x41\x03\"X\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45KM_PROVISIONED\x10\x01\x12%\n!SIGNED_ACCESS_APPROVAL_CONFIGURED\x10\x02\x42\xae\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x16\x43ustomerWorkloadsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Workload").msgclass + Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Workload.Partner").enummodule + ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest").msgclass + ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsResponse").msgclass + GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest").msgclass + WorkloadOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingState").msgclass + WorkloadOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep").msgclass + WorkloadOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep.Step").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb new file mode 100644 index 000000000000..69c1a90d16e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/customers.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/completion_state_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/cloudcontrolspartner/v1beta/customers.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a?google/cloud/cloudcontrolspartner/v1beta/completion_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf2\x02\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12i\n\x19\x63ustomer_onboarding_state\x18\x03 \x01(\x0b\x32\x41.google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStateB\x03\xe0\x41\x03\x12\x19\n\x0cis_onboarded\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12 \n\x13organization_domain\x18\x05 \x01(\tB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n,cloudcontrolspartner.googleapis.com/Customer\x12\x46organizations/{organization}/locations/{location}/customers/{customer}*\tcustomers2\x08\x63ustomer\"\xaf\x01\n\x14ListCustomersRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x8c\x01\n\x15ListCustomersResponse\x12\x45\n\tcustomers\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc2\x01\n\x15\x43reateCustomerRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12I\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.CustomerB\x03\xe0\x41\x02\x12\x18\n\x0b\x63ustomer_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"X\n\x12GetCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Customer\"u\n\x17\x43ustomerOnboardingState\x12Z\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32@.google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep\"\xf8\x02\n\x16\x43ustomerOnboardingStep\x12S\n\x04step\x18\x01 \x01(\x0e\x32\x45.google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x39.google.cloud.cloudcontrolspartner.v1beta.CompletionStateB\x03\xe0\x41\x03\"J\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x12\n\x0eKAJ_ENROLLMENT\x10\x01\x12\x18\n\x14\x43USTOMER_ENVIRONMENT\x10\x02\"\x98\x01\n\x15UpdateCustomerRequest\x12I\n\x08\x63ustomer\x18\x01 \x01(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.CustomerB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x15\x44\x65leteCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/CustomerB\xa6\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x0e\x43ustomersProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Customer").msgclass + ListCustomersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest").msgclass + ListCustomersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListCustomersResponse").msgclass + CreateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest").msgclass + GetCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest").msgclass + CustomerOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingState").msgclass + CustomerOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep").msgclass + CustomerOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep.Step").enummodule + UpdateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest").msgclass + DeleteCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb new file mode 100644 index 000000000000..b0cbbbbc5e33 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n>google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9c\x02\n\x0e\x45kmConnections\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0f\x65km_connections\x18\x02 \x03(\x0b\x32\x37.google.cloud.cloudcontrolspartner.v1beta.EkmConnection:\xa4\x01\xea\x41\xa0\x01\n2cloudcontrolspartner.googleapis.com/EkmConnections\x12jorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections\"d\n\x18GetEkmConnectionsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2cloudcontrolspartner.googleapis.com/EkmConnections\"\xac\x03\n\rEkmConnection\x12\x17\n\x0f\x63onnection_name\x18\x01 \x01(\t\x12\x66\n\x10\x63onnection_state\x18\x02 \x01(\x0e\x32G.google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionStateB\x03\xe0\x41\x03\x12\x61\n\x10\x63onnection_error\x18\x03 \x01(\x0b\x32G.google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionError\x1a>\n\x0f\x43onnectionError\x12\x14\n\x0c\x65rror_domain\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\"w\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\x11\n\rNOT_AVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\xab\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x13\x45kmConnectionsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + EkmConnections = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnections").msgclass + GetEkmConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest").msgclass + EkmConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnection").msgclass + EkmConnection::ConnectionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionError").msgclass + EkmConnection::ConnectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb new file mode 100644 index 000000000000..658a14f6e22c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/monitoring.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/cloud/cloudcontrolspartner/v1beta/violations_pb' + + +descriptor_data = "\n9google/cloud/cloudcontrolspartner/v1beta/monitoring.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x39google/cloud/cloudcontrolspartner/v1beta/violations.proto2\xd6\x04\n\x1e\x43loudControlsPartnerMonitoring\x12\xf5\x01\n\x0eListViolations\x12?.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest\x1a@.google.cloud.cloudcontrolspartner.v1beta.ListViolationsResponse\"`\xda\x41\x06parent\x82\xd3\xe4\x93\x02Q\x12O/v1beta/{parent=organizations/*/locations/*/customers/*/workloads/*}/violations\x12\xe2\x01\n\x0cGetViolation\x12=.google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest\x1a\x33.google.cloud.cloudcontrolspartner.v1beta.Violation\"^\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\x12O/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/violations/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa7\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x0fMonitoringProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb new file mode 100644 index 000000000000..4959b4841e5b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb @@ -0,0 +1,53 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/cloudcontrolspartner/v1beta/monitoring.proto for package 'Google.Cloud.CloudControlsPartner.V1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1beta/monitoring_pb' + +module Google + module Cloud + module CloudControlsPartner + module V1beta + module CloudControlsPartnerMonitoring + # Service describing handlers for resources + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring' + + # Lists Violations for a workload + # Callers may also choose to read across multiple Customers or for a single + # customer as per + # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash + # character) as a wildcard character instead of {customer} & {workload}. + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + rpc :ListViolations, ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse + # Gets details of a single Violation. + rpc :GetViolation, ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Violation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb new file mode 100644 index 000000000000..d853b4a57047 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\nBgoogle/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb9\x04\n\x12PartnerPermissions\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x64\n\x13partner_permissions\x18\x02 \x03(\x0e\x32G.google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission\"\xfa\x01\n\nPermission\x12\x1a\n\x16PERMISSION_UNSPECIFIED\x10\x00\x12\x31\n-ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS\x10\x01\x12 \n\x1c\x41SSURED_WORKLOADS_MONITORING\x10\x02\x12\x1c\n\x18\x41\x43\x43\x45SS_APPROVAL_REQUESTS\x10\x03\x12+\n\'ASSURED_WORKLOADS_EKM_CONNECTION_STATUS\x10\x04\x12\x30\n,ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER\x10\x05:\xac\x01\xea\x41\xa8\x01\n6cloudcontrolspartner.googleapis.com/PartnerPermissions\x12norganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions\"l\n\x1cGetPartnerPermissionsRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6cloudcontrolspartner.googleapis.com/PartnerPermissionsB\xaf\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x17PartnerPermissionsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + PartnerPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions").msgclass + PartnerPermissions::Permission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission").enummodule + GetPartnerPermissionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb new file mode 100644 index 000000000000..86f98ef64c90 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb @@ -0,0 +1,29 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/partners.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/cloudcontrolspartner/v1beta/partners.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x03\n\x07Partner\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12;\n\x04skus\x18\x03 \x03(\x0b\x32-.google.cloud.cloudcontrolspartner.v1beta.Sku\x12L\n\rekm_solutions\x18\x04 \x03(\x0b\x32\x35.google.cloud.cloudcontrolspartner.v1beta.EkmMetadata\x12\x1e\n\x16operated_cloud_regions\x18\x05 \x03(\t\x12\x1a\n\x12partner_project_id\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:t\xea\x41q\n+cloudcontrolspartner.googleapis.com/Partner\x12\x39organizations/{organization}/locations/{location}/partner2\x07partner\"V\n\x11GetPartnerRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudcontrolspartner.googleapis.com/Partner\"\'\n\x03Sku\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xe4\x01\n\x0b\x45kmMetadata\x12W\n\x0c\x65km_solution\x18\x01 \x01(\x0e\x32\x41.google.cloud.cloudcontrolspartner.v1beta.EkmMetadata.EkmSolution\x12\x18\n\x10\x65km_endpoint_uri\x18\x02 \x01(\t\"b\n\x0b\x45kmSolution\x12\x1c\n\x18\x45KM_SOLUTION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46ORTANIX\x10\x01\x12\x0b\n\x07\x46UTUREX\x10\x02\x12\n\n\x06THALES\x10\x03\x12\x0e\n\x06VIRTRU\x10\x04\x1a\x02\x08\x01\x42\xa5\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\rPartnersProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Partner").msgclass + GetPartnerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest").msgclass + Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Sku").msgclass + EkmMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmMetadata").msgclass + EkmMetadata::EkmSolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmMetadata.EkmSolution").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb new file mode 100644 index 000000000000..6c00192dd2d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/cloudcontrolspartner/v1beta/violations.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/interval_pb' + + +descriptor_data = "\n9google/cloud/cloudcontrolspartner/v1beta/violations.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xb9\r\n\tViolation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_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\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.cloudcontrolspartner.v1beta.Violation.StateB\x03\xe0\x41\x03\x12(\n\x18non_compliant_org_policy\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x11\n\tfolder_id\x18\t \x01(\x03\x12Y\n\x0bremediation\x18\r \x01(\x0b\x32?.google.cloud.cloudcontrolspartner.v1beta.Violation.RemediationB\x03\xe0\x41\x03\x1a\xd0\x07\n\x0bRemediation\x12g\n\x0cinstructions\x18\x01 \x01(\x0b\x32L.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12n\n\x10remediation_type\x18\x03 \x01(\x0e\x32O.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\x8a\x03\n\x0cInstructions\x12p\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32S.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Gcloud\x12r\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32T.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\xc0\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\x12\"\n\x1eREMEDIATION_RESOURCE_VIOLATION\x10\x05\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x01\x12\x0e\n\nUNRESOLVED\x10\x02\x12\r\n\tEXCEPTION\x10\x03:\xbe\x01\xea\x41\xba\x01\n-cloudcontrolspartner.googleapis.com/Violation\x12rorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}*\nviolations2\tviolation\"\xe9\x01\n\x15ListViolationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-cloudcontrolspartner.googleapis.com/Violation\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\x12,\n\x08interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\"\x8f\x01\n\x16ListViolationsResponse\x12G\n\nviolations\x18\x01 \x03(\x0b\x32\x33.google.cloud.cloudcontrolspartner.v1beta.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Z\n\x13GetViolationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-cloudcontrolspartner.googleapis.com/ViolationB\xa7\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x0fViolationsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CloudControlsPartner + module V1beta + Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation").msgclass + Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation").msgclass + Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions").msgclass + Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Gcloud").msgclass + Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Console").msgclass + Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.RemediationType").enummodule + Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.State").enummodule + ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest").msgclass + ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListViolationsResponse").msgclass + GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..ca5eabdde450 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Controls Partner V1BETA Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..5089551e9ea4 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,589 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb new file mode 100644 index 000000000000..4b8bcf42cc7d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1beta + # Details about the Access request. + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}` + # @!attribute [rw] request_time + # @return [::Google::Protobuf::Timestamp] + # The time at which approval was requested. + # @!attribute [rw] requested_reason + # @return [::Google::Cloud::CloudControlsPartner::V1beta::AccessReason] + # The justification for which approval is being requested. + # @!attribute [rw] requested_expiration_time + # @return [::Google::Protobuf::Timestamp] + # The requested expiration for the approval. If the request is approved, + # access will be granted from the time of approval until the expiration time. + class AccessApprovalRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting the access requests associated with a workload. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of access requests to return. The service may + # return fewer than this value. If unspecified, at most 500 access requests + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent + # page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListAccessApprovalRequestsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list access requests. + # @!attribute [rw] access_approval_requests + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] + # List of access approval requests + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListAccessApprovalRequestsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Reason for the access. + # @!attribute [rw] type + # @return [::Google::Cloud::CloudControlsPartner::V1beta::AccessReason::Type] + # Type of access justification. + # @!attribute [rw] detail + # @return [::String] + # More detail about certain reason types. See comments for each type above. + class AccessReason + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Type of access justification. + module Type + # Default value for proto, shouldn't be used. + TYPE_UNSPECIFIED = 0 + + # Customer made a request or raised an issue that required the principal to + # access customer data. `detail` is of the form ("#####" is the issue ID): + # + # - "Feedback Report: #####" + # - "Case Number: #####" + # - "Case ID: #####" + # - "E-PIN Reference: #####" + # - "Google-#####" + # - "T-#####" + CUSTOMER_INITIATED_SUPPORT = 1 + + # The principal accessed customer data in order to diagnose or resolve a + # suspected issue in services. Often this access is used to confirm that + # customers are not affected by a suspected service issue or to remediate a + # reversible system issue. + GOOGLE_INITIATED_SERVICE = 2 + + # Google initiated service for security, fraud, abuse, or compliance + # purposes. + GOOGLE_INITIATED_REVIEW = 3 + + # The principal was compelled to access customer data in order to respond + # to a legal third party data request or process, including legal processes + # from customers themselves. + THIRD_PARTY_DATA_REQUEST = 4 + + # The principal accessed customer data in order to diagnose or resolve a + # suspected issue in services or a known outage. + GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 5 + + # Similar to 'GOOGLE_INITIATED_SERVICE' or 'GOOGLE_INITIATED_REVIEW', but + # with universe agnostic naming. The principal accessed customer data in + # order to diagnose or resolve a suspected issue in services or a known + # outage, or for security, fraud, abuse, or compliance review purposes. + CLOUD_INITIATED_ACCESS = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb new file mode 100644 index 000000000000..b2b78a51af66 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudControlsPartner + module V1beta + # Enum for possible completion states. + module CompletionState + # Unspecified completion state. + COMPLETION_STATE_UNSPECIFIED = 0 + + # Task started (has start date) but not yet completed. + PENDING = 1 + + # Succeeded state. + SUCCEEDED = 2 + + # Failed state. + FAILED = 3 + + # Not applicable state. + NOT_APPLICABLE = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb new file mode 100644 index 000000000000..0303e86d1521 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CloudControlsPartner + module V1beta + # 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_message + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] requested_cancellation + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have been cancelled successfully + # have [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-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb new file mode 100644 index 000000000000..c4116694fedf --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb @@ -0,0 +1,177 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1beta + # Contains metadata around the [Workload + # resource](https://cloud.google.com/assured-workloads/docs/reference/rest/Shared.Types/Workload) + # in the Assured Workloads API. + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @!attribute [r] folder_id + # @return [::Integer] + # Output only. Folder id this workload is associated with + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the resource was created. + # @!attribute [r] folder + # @return [::String] + # Output only. The name of container folder of the assured workload + # @!attribute [rw] workload_onboarding_state + # @return [::Google::Cloud::CloudControlsPartner::V1beta::WorkloadOnboardingState] + # Container for workload onboarding steps. + # @!attribute [rw] is_onboarded + # @return [::Boolean] + # Indicates whether a workload is fully onboarded. + # @!attribute [rw] key_management_project_id + # @return [::String] + # The project id of the key management project for the workload + # @!attribute [rw] location + # @return [::String] + # The Google Cloud location of the workload + # @!attribute [rw] partner + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload::Partner] + # Partner associated with this workload. + class Workload + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported Assured Workloads Partners. + module Partner + # Unknown Partner. + PARTNER_UNSPECIFIED = 0 + + # Enum representing S3NS (Thales) partner. + PARTNER_LOCAL_CONTROLS_BY_S3NS = 1 + + # Enum representing T_SYSTEM (TSI) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS = 2 + + # Enum representing SIA_MINSAIT (Indra) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 3 + + # Enum representing PSN (TIM) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_PSN = 4 + + # Enum representing CNTXT (Kingdom of Saudi Arabia) partner. + PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT = 6 + + # Enum representing CNXT (Kingdom of Saudi Arabia) partner offering without + # EKM provisioning. + PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7 + end + end + + # Request to list customer workloads. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of workloads to return. The service may return fewer + # than this value. If unspecified, at most 500 workloads will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListWorkloads` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListWorkloadsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list customer workloads requests. + # @!attribute [rw] workloads + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] + # List of customer workloads + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListWorkloadsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a customer workload. + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + class GetWorkloadRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for workload onboarding steps. + # @!attribute [rw] onboarding_steps + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::WorkloadOnboardingStep>] + # List of workload onboarding steps. + class WorkloadOnboardingState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for workload onboarding information. + # @!attribute [rw] step + # @return [::Google::Cloud::CloudControlsPartner::V1beta::WorkloadOnboardingStep::Step] + # The onboarding step. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The starting time of the onboarding step. + # @!attribute [rw] completion_time + # @return [::Google::Protobuf::Timestamp] + # The completion time of the onboarding step. + # @!attribute [r] completion_state + # @return [::Google::Cloud::CloudControlsPartner::V1beta::CompletionState] + # Output only. The completion state of the onboarding step. + class WorkloadOnboardingStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for possible onboarding steps. + module Step + # Unspecified step. + STEP_UNSPECIFIED = 0 + + # EKM Provisioned step. + EKM_PROVISIONED = 1 + + # Signed Access Approval step. + SIGNED_ACCESS_APPROVAL_CONFIGURED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb new file mode 100644 index 000000000000..a3f2009988ab --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb @@ -0,0 +1,180 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1beta + # Contains metadata around a Cloud Controls Partner Customer + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @!attribute [rw] display_name + # @return [::String] + # Required. Display name for the customer + # @!attribute [r] customer_onboarding_state + # @return [::Google::Cloud::CloudControlsPartner::V1beta::CustomerOnboardingState] + # Output only. Container for customer onboarding steps + # @!attribute [r] is_onboarded + # @return [::Boolean] + # Output only. Indicates whether a customer is fully onboarded + # @!attribute [r] organization_domain + # @return [::String] + # Output only. The customer organization domain, extracted from + # CRM Organization’s display_name field. e.g. "google.com" + class Customer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list customers + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of Customers to return. The service may return fewer + # than this value. If unspecified, at most 500 Customers will be returned. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListCustomers` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + class ListCustomersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list customer Customers requests + # @!attribute [rw] customers + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] + # List of customers + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListCustomersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a customer + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format: `organizations/{organization}/locations/{location}` + # @!attribute [rw] customer + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # Required. The customer to create. + # @!attribute [rw] customer_id + # @return [::String] + # Required. The customer id to use for the customer, which will become the + # final component of the customer's resource name. The specified value must + # be a valid Google cloud organization id. + class CreateCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a customer + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + class GetCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for customer onboarding steps + # @!attribute [rw] onboarding_steps + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::CustomerOnboardingStep>] + # List of customer onboarding steps + class CustomerOnboardingState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Container for customer onboarding information + # @!attribute [rw] step + # @return [::Google::Cloud::CloudControlsPartner::V1beta::CustomerOnboardingStep::Step] + # The onboarding step + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The starting time of the onboarding step + # @!attribute [rw] completion_time + # @return [::Google::Protobuf::Timestamp] + # The completion time of the onboarding step + # @!attribute [r] completion_state + # @return [::Google::Cloud::CloudControlsPartner::V1beta::CompletionState] + # Output only. Current state of the step + class CustomerOnboardingStep + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for possible onboarding steps + module Step + # Unspecified step + STEP_UNSPECIFIED = 0 + + # KAJ Enrollment + KAJ_ENROLLMENT = 1 + + # Customer Environment + CUSTOMER_ENVIRONMENT = 2 + end + end + + # Request to update a customer + # @!attribute [rw] customer + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] + # Required. The customer to update + # Format: + # `organizations/{organization}/locations/{location}/customers/{customer}` + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update + class UpdateCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting customer + # @!attribute [rw] name + # @return [::String] + # Required. name of the resource to be deleted + # format: name=organizations/*/locations/*/customers/* + class DeleteCustomerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb new file mode 100644 index 000000000000..94d26e9bf728 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1beta + # The EKM connections associated with a workload + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + # @!attribute [rw] ekm_connections + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::EkmConnection>] + # The EKM connections associated with the workload + class EkmConnections + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting the EKM connections associated with a workload + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` + class GetEkmConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about the EKM connection + # @!attribute [rw] connection_name + # @return [::String] + # Resource name of the EKM connection in the format: + # projects/\\{project}/locations/\\{location}/ekmConnections/\\{ekm_connection} + # @!attribute [r] connection_state + # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnection::ConnectionState] + # Output only. The connection state + # @!attribute [rw] connection_error + # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnection::ConnectionError] + # The connection error that occurred if any + class EkmConnection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information around the error that occurred if the connection state is + # anything other than available or unspecified + # @!attribute [rw] error_domain + # @return [::String] + # The error domain for the error + # @!attribute [rw] error_message + # @return [::String] + # The error message for the error + class ConnectionError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The EKM connection state. + module ConnectionState + # Unspecified EKM connection state + CONNECTION_STATE_UNSPECIFIED = 0 + + # Available EKM connection state + AVAILABLE = 1 + + # Not available EKM connection state + NOT_AVAILABLE = 2 + + # Error EKM connection state + ERROR = 3 + + # Permission denied EKM connection state + PERMISSION_DENIED = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.rb new file mode 100644 index 000000000000..b9ad01e93ef2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.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! + + +module Google + module Cloud + module CloudControlsPartner + module V1beta + # The permissions granted to the partner for a workload + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + # @!attribute [rw] partner_permissions + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions::Permission>] + # The partner permissions granted for the workload + class PartnerPermissions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module Permission + # Unspecified partner permission + PERMISSION_UNSPECIFIED = 0 + + # Permission for Access Transparency and emergency logs + ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS = 1 + + # Permission for Assured Workloads monitoring violations + ASSURED_WORKLOADS_MONITORING = 2 + + # Permission for Access Approval requests + ACCESS_APPROVAL_REQUESTS = 3 + + # Permission for External Key Manager connection status + ASSURED_WORKLOADS_EKM_CONNECTION_STATUS = 4 + + # Permission for support case details for Access Transparency log entries + ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER = 5 + end + end + + # Request for getting the partner permissions granted for a workload + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource to get in the format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` + class GetPartnerPermissionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb new file mode 100644 index 000000000000..6cd330668d88 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb @@ -0,0 +1,117 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 CloudControlsPartner + module V1beta + # Message describing Partner resource + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the partner. + # Format: `organizations/{organization}/locations/{location}/partner` + # Example: "organizations/123456/locations/us-central1/partner" + # @!attribute [rw] skus + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Sku>] + # List of SKUs the partner is offering + # @!attribute [rw] ekm_solutions + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::EkmMetadata>] + # List of Google Cloud supported EKM partners supported by the partner + # @!attribute [rw] operated_cloud_regions + # @return [::Array<::String>] + # List of Google Cloud regions that the partner sells services to customers. + # Valid Google Cloud regions found here: + # https://cloud.google.com/compute/docs/regions-zones + # @!attribute [rw] partner_project_id + # @return [::String] + # Google Cloud project ID in the partner's Google Cloud organization for + # receiving enhanced Logs for Partners. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time the resource was created + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time the resource was updated + class Partner + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Partner + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/partner` + class GetPartnerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the SKU a partner owns inside Google Cloud to sell to customers. + # @!attribute [rw] id + # @return [::String] + # Argentum product SKU, that is associated with the partner offerings to + # customers used by Syntro for billing purposes. SKUs can represent resold + # Google products or support services. + # @!attribute [rw] display_name + # @return [::String] + # Display name of the product identified by the SKU. A partner may want to + # show partner branded names for their offerings such as local sovereign + # cloud solutions. + class Sku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Holds information needed by Mudbray to use partner EKMs for workloads. + # @!attribute [rw] ekm_solution + # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmMetadata::EkmSolution] + # The Cloud EKM partner. + # @!attribute [rw] ekm_endpoint_uri + # @return [::String] + # Endpoint for sending requests to the EKM for key provisioning during + # Assured Workload creation. + class EkmMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents Google Cloud supported external key management partners + # [Google Cloud EKM partners + # docs](https://cloud.google.com/kms/docs/ekm#supported_partners). + module EkmSolution + # Unspecified EKM solution + EKM_SOLUTION_UNSPECIFIED = 0 + + # EKM Partner Fortanix + FORTANIX = 1 + + # EKM Partner FutureX + FUTUREX = 2 + + # EKM Partner Thales + THALES = 3 + + # This enum value is never used. + VIRTRU = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.rb new file mode 100644 index 000000000000..137c14ba03e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.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 Cloud + module CloudControlsPartner + module V1beta + # Details of resource Violation + # @!attribute [rw] name + # @return [::String] + # Identifier. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + # @!attribute [r] description + # @return [::String] + # Output only. Description for the Violation. + # e.g. OrgPolicy gcp.resourceLocations has non compliant value. + # @!attribute [r] begin_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which triggered the Violation. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last time when the Violation record was updated. + # @!attribute [r] resolve_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time of the event which fixed the Violation. + # If the violation is ACTIVE this will be empty. + # @!attribute [r] category + # @return [::String] + # Output only. Category under which this violation is mapped. + # e.g. Location, Service Usage, Access, Encryption, etc. + # @!attribute [r] state + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::State] + # Output only. State of the violation + # @!attribute [r] non_compliant_org_policy + # @return [::String] + # Output only. Immutable. Name of the OrgPolicy which was modified with + # non-compliant change and resulted this violation. Format: + # `projects/{project_number}/policies/{constraint_name}` + # `folders/{folder_id}/policies/{constraint_name}` + # `organizations/{organization_id}/policies/{constraint_name}` + # @!attribute [rw] folder_id + # @return [::Integer] + # The folder_id of the violation + # @!attribute [r] remediation + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation] + # Output only. Compliance violation remediation + class Violation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents remediation guidance to resolve compliance violation for + # AssuredWorkload + # @!attribute [rw] instructions + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::Instructions] + # Required. Remediation instructions to resolve violations + # @!attribute [rw] compliant_values + # @return [::Array<::String>] + # Values that can resolve the violation + # For example: for list org policy violations, this will either be the list + # of allowed or denied values + # @!attribute [r] remediation_type + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::RemediationType] + # Output only. Remediation type based on the type of org policy values + # violated + class Remediation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Instructions to remediate violation + # @!attribute [rw] gcloud_instructions + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::Instructions::Gcloud] + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] console_instructions + # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::Instructions::Console] + # Remediation instructions to resolve violation via cloud console + class Instructions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Remediation instructions to resolve violation via gcloud cli + # @!attribute [rw] gcloud_commands + # @return [::Array<::String>] + # Gcloud command to resolve violation + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via gcloud cli + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Gcloud + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Remediation instructions to resolve violation via cloud console + # @!attribute [rw] console_uris + # @return [::Array<::String>] + # Link to console page where violations can be resolved + # @!attribute [rw] steps + # @return [::Array<::String>] + # Steps to resolve violation via cloud console + # @!attribute [rw] additional_links + # @return [::Array<::String>] + # Additional urls for more information about steps + class Console + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Classifying remediation into various types based on the kind of + # violation. For example, violations caused due to changes in boolean org + # policy requires different remediation instructions compared to violation + # caused due to changes in allowed values of list org policy. + module RemediationType + # Unspecified remediation type + REMEDIATION_TYPE_UNSPECIFIED = 0 + + # Remediation type for boolean org policy + REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 + + # Remediation type for list org policy which have allowed values in the + # monitoring rule + REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 + + # Remediation type for list org policy which have denied values in the + # monitoring rule + REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 + + # Remediation type for gcp.restrictCmekCryptoKeyProjects + REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 + + # Remediation type for resource violation. + REMEDIATION_RESOURCE_VIOLATION = 5 + end + end + + # Violation State Values + module State + # Unspecified state. + STATE_UNSPECIFIED = 0 + + # Violation is resolved. + RESOLVED = 1 + + # Violation is Unresolved + UNRESOLVED = 2 + + # Violation is Exception + EXCEPTION = 3 + end + end + + # Message for requesting list of Violations + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource + # Format + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of customers row to return. The service may + # return fewer than this value. If unspecified, at most 10 customers will be + # returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListViolations` call. + # Provide this to retrieve the subsequent page. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering results + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results + # @!attribute [rw] interval + # @return [::Google::Type::Interval] + # Optional. Specifies the interval for retrieving violations. + # if unspecified, all violations will be returned. + class ListViolationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for list customer violation requests + # @!attribute [rw] violations + # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] + # List of violation + # @!attribute [rw] next_page_token + # @return [::String] + # A token that can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Workloads that could not be reached due to permission errors or any other + # error. Ref: https://google.aip.dev/217 + class ListViolationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Violation + # @!attribute [rw] name + # @return [::String] + # Required. Format: + # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` + class GetViolationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.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! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..a091fbb5659a --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-cloud_controls_partner-v1beta", path: "../" +else + gem "google-cloud-cloud_controls_partner-v1beta" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.rb new file mode 100644 index 000000000000..d6f85e8509ce --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the create_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#create_customer. +# +def create_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new + + # Call the create_customer method. + result = client.create_customer request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.rb new file mode 100644 index 000000000000..2b1afc033f4d --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the delete_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#delete_customer. +# +def delete_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new + + # Call the delete_customer method. + result = client.delete_customer request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.rb new file mode 100644 index 000000000000..4715fe342c69 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetCustomer_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the get_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_customer. +# +def get_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new + + # Call the get_customer method. + result = client.get_customer request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.rb new file mode 100644 index 000000000000..d140fd22b3d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetEkmConnections_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the get_ekm_connections call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_ekm_connections. +# +def get_ekm_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new + + # Call the get_ekm_connections method. + result = client.get_ekm_connections request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::EkmConnections. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetEkmConnections_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.rb new file mode 100644 index 000000000000..a4f9b998195e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartner_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the get_partner call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner. +# +def get_partner + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new + + # Call the get_partner method. + result = client.get_partner request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Partner. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartner_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.rb new file mode 100644 index 000000000000..f1199e9a3c0e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the get_partner_permissions call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner_permissions. +# +def get_partner_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new + + # Call the get_partner_permissions method. + result = client.get_partner_permissions request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.rb new file mode 100644 index 000000000000..72a92981c75e --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetWorkload_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the get_workload call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_workload. +# +def get_workload + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new + + # Call the get_workload method. + result = client.get_workload request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Workload. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.rb new file mode 100644 index 000000000000..ff06ead45058 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_access_approval_requests. +# +def list_access_approval_requests + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.new + + # Call the list_access_approval_requests method. + result = client.list_access_approval_requests 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::CloudControlsPartner::V1beta::AccessApprovalRequest. + p item + end +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.rb new file mode 100644 index 000000000000..0f91c15e4a46 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListCustomers_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the list_customers call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_customers. +# +def list_customers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.new + + # Call the list_customers method. + result = client.list_customers 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::CloudControlsPartner::V1beta::Customer. + p item + end +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListCustomers_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.rb new file mode 100644 index 000000000000..1630e3bb72b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListWorkloads_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the list_workloads call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_workloads. +# +def list_workloads + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.new + + # Call the list_workloads method. + result = client.list_workloads 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::CloudControlsPartner::V1beta::Workload. + p item + end +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.rb new file mode 100644 index 000000000000..30bf4a93f9d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_UpdateCustomer_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the update_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#update_customer. +# +def update_customer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new + + # Call the update_customer method. + result = client.update_customer request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_UpdateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.rb new file mode 100644 index 000000000000..793ef997abcd --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_GetViolation_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the get_violation call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#get_violation. +# +def get_violation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new + + # Call the get_violation method. + result = client.get_violation request + + # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Violation. + p result +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.rb new file mode 100644 index 000000000000..e49b5f624836 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_ListViolations_sync] +require "google/cloud/cloud_controls_partner/v1beta" + +## +# Snippet for the list_violations call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#list_violations. +# +def list_violations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new + + # Call the list_violations method. + result = client.list_violations 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::CloudControlsPartner::V1beta::Violation. + p item + end +end +# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json new file mode 100644 index 000000000000..2e32d796b88c --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-cloud_controls_partner-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.cloudcontrolspartner.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetWorkload_sync", + "title": "Snippet for the get_workload call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_workload.", + "file": "cloud_controls_partner_core/get_workload.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workload", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_workload", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Workload", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetWorkload", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetWorkload", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListWorkloads_sync", + "title": "Snippet for the list_workloads call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_workloads.", + "file": "cloud_controls_partner_core/list_workloads.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workloads", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_workloads", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "ListWorkloads", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.ListWorkloads", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetCustomer_sync", + "title": "Snippet for the get_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_customer.", + "file": "cloud_controls_partner_core/get_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Customer", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListCustomers_sync", + "title": "Snippet for the list_customers call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_customers.", + "file": "cloud_controls_partner_core/list_customers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_customers", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_customers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "ListCustomers", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.ListCustomers", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetEkmConnections_sync", + "title": "Snippet for the get_ekm_connections call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_ekm_connections.", + "file": "cloud_controls_partner_core/get_ekm_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_ekm_connections", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_ekm_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetEkmConnections", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetEkmConnections", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync", + "title": "Snippet for the get_partner_permissions call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner_permissions.", + "file": "cloud_controls_partner_core/get_partner_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_partner_permissions", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetPartnerPermissions", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetPartnerPermissions", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync", + "title": "Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_access_approval_requests.", + "file": "cloud_controls_partner_core/list_access_approval_requests.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_access_approval_requests", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_access_approval_requests", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "ListAccessApprovalRequests", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.ListAccessApprovalRequests", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartner_sync", + "title": "Snippet for the get_partner call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner.", + "file": "cloud_controls_partner_core/get_partner.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_partner", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Partner", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "GetPartner", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetPartner", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync", + "title": "Snippet for the create_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#create_customer.", + "file": "cloud_controls_partner_core/create_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#create_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Customer", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "CreateCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.CreateCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_UpdateCustomer_sync", + "title": "Snippet for the update_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#update_customer.", + "file": "cloud_controls_partner_core/update_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#update_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Customer", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "UpdateCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.UpdateCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_sync", + "title": "Snippet for the delete_customer call in the CloudControlsPartnerCore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#delete_customer.", + "file": "cloud_controls_partner_core/delete_customer.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_customer", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#delete_customer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CloudControlsPartnerCore::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" + }, + "method": { + "short_name": "DeleteCustomer", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.DeleteCustomer", + "service": { + "short_name": "CloudControlsPartnerCore", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_ListViolations_sync", + "title": "Snippet for the list_violations call in the CloudControlsPartnerMonitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#list_violations.", + "file": "cloud_controls_partner_monitoring/list_violations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_violations", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#list_violations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse", + "client": { + "short_name": "CloudControlsPartnerMonitoring::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client" + }, + "method": { + "short_name": "ListViolations", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring.ListViolations", + "service": { + "short_name": "CloudControlsPartnerMonitoring", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_GetViolation_sync", + "title": "Snippet for the get_violation call in the CloudControlsPartnerMonitoring service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#get_violation.", + "file": "cloud_controls_partner_monitoring/get_violation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_violation", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#get_violation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Violation", + "client": { + "short_name": "CloudControlsPartnerMonitoring::Client", + "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client" + }, + "method": { + "short_name": "GetViolation", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring.GetViolation", + "service": { + "short_name": "CloudControlsPartnerMonitoring", + "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring" + } + } + }, + "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-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb new file mode 100644 index 000000000000..4c1fddc0f919 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb @@ -0,0 +1,115 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1beta/cloud_controls_partner_core" + +class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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_customer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.customer_path organization: "value0", location: "value1", customer: "value2" + assert_equal "organizations/value0/locations/value1/customers/value2", path + end + end + + def test_ekm_connections_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.ekm_connections_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/ekmConnections", path + end + end + + def test_organization_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.organization_location_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1", path + end + end + + def test_partner_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.partner_path organization: "value0", location: "value1" + assert_equal "organizations/value0/locations/value1/partner", path + end + end + + def test_partner_permissions_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.partner_permissions_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/partnerPermissions", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb new file mode 100644 index 000000000000..7f2c6b45e896 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb @@ -0,0 +1,708 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/core_pb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" + + +class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_workload + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Workload.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workload_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workload({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workload name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workload ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workload({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workload(::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workload_client_stub.call_count + end + end + end + + def test_list_workloads + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse.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_workloads_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads_client_stub.call_count + end + end + end + + def test_get_customer + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_customer({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_customer name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_customer ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_customer({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_customer(::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_customer_client_stub.call_count + end + end + end + + def test_list_customers + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse.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_customers_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_customers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_customers_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers_client_stub.call_count + end + end + end + + def test_get_ekm_connections + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_ekm_connections_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_ekm_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_ekm_connections_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_ekm_connections({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_ekm_connections name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_ekm_connections({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_ekm_connections(::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_ekm_connections_client_stub.call_count + end + end + end + + def test_get_partner_permissions + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partner_permissions_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_permissions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_partner_permissions_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_partner_permissions({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_partner_permissions name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_partner_permissions({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_partner_permissions(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_partner_permissions_client_stub.call_count + end + end + end + + def test_list_access_approval_requests + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse.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_access_approval_requests_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_access_approval_requests_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_access_approval_requests_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_count + end + end + end + + def test_get_partner + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Partner.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_partner_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_partner_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_partner({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_partner name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_partner ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_partner({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_partner(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_partner_client_stub.call_count + end + end + end + + def test_create_customer + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + customer = {} + customer_id = "hello world" + + create_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_create_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_customer parent: parent, customer: customer, customer_id: customer_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_customer ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_customer(::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_customer_client_stub.call_count + end + end + end + + def test_update_customer + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + customer = {} + update_mask = {} + + update_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_update_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_customer({ customer: customer, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_customer customer: customer, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_customer ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_customer({ customer: customer, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_customer(::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_customer_client_stub.call_count + end + end + end + + def test_delete_customer + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_delete_customer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_customer({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_customer name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_customer ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_customer({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_customer(::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb new file mode 100644 index 000000000000..bc2e69792fb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb @@ -0,0 +1,787 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/core_pb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core" + +class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_get_workload + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Workload.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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workload, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workload_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workload({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workload name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workload ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workload({ 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_workload(::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.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_workload_client_stub.call_rpc_count + end + end + + def test_list_workloads + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse.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_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workloads, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, 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_workloads_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads_client_stub.call_rpc_count + end + end + + def test_get_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_customer({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_customer name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_customer ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.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_customer_client_stub.call_rpc_count + end + end + + def test_list_customers + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse.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_customers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_customers, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, 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_customers_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers_client_stub.call_rpc_count + end + end + + def test_get_ekm_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections.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_ekm_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_ekm_connections, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_ekm_connections_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_ekm_connections({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_ekm_connections name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_ekm_connections({ 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_ekm_connections(::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.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_ekm_connections_client_stub.call_rpc_count + end + end + + def test_get_partner_permissions + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions.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_partner_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_partner_permissions, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_partner_permissions_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_partner_permissions({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_partner_permissions name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_partner_permissions({ 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_partner_permissions(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.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_partner_permissions_client_stub.call_rpc_count + end + end + + def test_list_access_approval_requests + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse.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_access_approval_requests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_access_approval_requests, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, 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_access_approval_requests_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_rpc_count + end + end + + def test_get_partner + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Partner.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_partner_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_partner, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_partner_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_partner({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_partner name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_partner ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_partner({ 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_partner(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.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_partner_client_stub.call_rpc_count + end + end + + def test_create_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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" + customer = {} + customer_id = "hello world" + + create_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1beta::Customer), request["customer"] + assert_equal "hello world", request["customer_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_customer parent: parent, customer: customer, customer_id: customer_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_customer ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_customer(::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_customer_client_stub.call_rpc_count + end + end + + def test_update_customer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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. + customer = {} + update_mask = {} + + update_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1beta::Customer), request["customer"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_customer({ customer: customer, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_customer customer: customer, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_customer ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_customer({ customer: customer, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_customer(::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_customer_client_stub.call_rpc_count + end + end + + def test_delete_customer + # 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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_customer, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_customer_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_customer({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_customer name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_customer ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.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_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb new file mode 100644 index 000000000000..57fb77cada50 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" + +class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.violation_path organization: "value0", location: "value1", customer: "value2", workload: "value3", violation: "value4" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/violations/value4", path + end + end + + def test_workload_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" + assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb new file mode 100644 index 000000000000..d13641fb267f --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb @@ -0,0 +1,212 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/monitoring_pb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" + + +class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse.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" + interval = {} + + list_violations_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_list_violations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_violations_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_violations ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_violations(::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_violations_client_stub.call_count + end + end + end + + def test_get_violation + # Create test objects. + client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Violation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_violation_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_get_violation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_violation_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_violation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_violation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_violation ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_violation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_violation(::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_violation_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb new file mode 100644 index 000000000000..ce2125d69622 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb @@ -0,0 +1,235 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/cloudcontrolspartner/v1beta/monitoring_pb" +require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" + +class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse.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" + interval = {} + + list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_violations, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, 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 Gapic::Protobuf.coerce({}, to: ::Google::Type::Interval), request["interval"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_violations_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) 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_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval 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_violations ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) 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_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, 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_violations(::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), 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_violations_client_stub.call_rpc_count + end + end + + def test_get_violation + # Create GRPC objects. + grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Violation.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_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_violation, name + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_violation_client_stub do + # Create client + client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_violation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_violation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_violation ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_violation({ 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_violation(::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.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_violation_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 2a36860f122b65659f634be99d86cee9875b4408 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 25 Mar 2026 21:17:37 +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 --- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/routing.rb | 10 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/routing.rb | 10 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../proto_docs/google/api/client.rb | 174 +- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 93 - ...oud-bigquery-data_exchange-v1beta1.gemspec | 30 - ...le-cloud-bigquery-data_exchange-v1beta1.rb | 21 - .../cloud/bigquery/data_exchange/v1beta1.rb | 42 - .../v1beta1/analytics_hub_service.rb | 56 - .../v1beta1/analytics_hub_service/client.rb | 1890 --------- .../analytics_hub_service/credentials.rb | 50 - .../v1beta1/analytics_hub_service/paths.rb | 109 - .../bigquery/data_exchange/v1beta1/version.rb | 30 - .../dataexchange/v1beta1/dataexchange_pb.rb | 57 - .../v1beta1/dataexchange_services_pb.rb | 86 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../dataexchange/v1beta1/dataexchange.rb | 497 --- .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../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/wrappers.rb | 148 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../create_data_exchange.rb | 47 - .../analytics_hub_service/create_listing.rb | 47 - .../delete_data_exchange.rb | 47 - .../analytics_hub_service/delete_listing.rb | 47 - .../get_data_exchange.rb | 47 - .../analytics_hub_service/get_iam_policy.rb | 47 - .../analytics_hub_service/get_listing.rb | 47 - .../list_data_exchanges.rb | 51 - .../analytics_hub_service/list_listings.rb | 51 - .../list_org_data_exchanges.rb | 51 - .../analytics_hub_service/set_iam_policy.rb | 47 - .../subscribe_listing.rb | 47 - .../test_iam_permissions.rb | 47 - .../update_data_exchange.rb | 47 - .../analytics_hub_service/update_listing.rb | 47 - ...e.cloud.bigquery.dataexchange.v1beta1.json | 615 --- .../analytics_hub_service_paths_test.rb | 91 - .../v1beta1/analytics_hub_service_test.rb | 1024 ----- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 63 - ...le-cloud-bigquery-data_policies-v1.gemspec | 29 - .../google-cloud-bigquery-data_policies-v1.rb | 21 - .../google/cloud/bigquery/data_policies/v1.rb | 47 - .../data_policies/v1/data_policy_service.rb | 57 - .../v1/data_policy_service/client.rb | 1323 ------ .../v1/data_policy_service/credentials.rb | 50 - .../v1/data_policy_service/paths.rb | 71 - .../v1/data_policy_service/rest.rb | 54 - .../v1/data_policy_service/rest/client.rb | 1217 ------ .../data_policy_service/rest/service_stub.rb | 638 --- .../cloud/bigquery/data_policies/v1/rest.rb | 39 - .../bigquery/data_policies/v1/version.rb | 30 - .../bigquery/datapolicies/v1/datapolicy_pb.rb | 42 - .../datapolicies/v1/datapolicy_services_pb.rb | 65 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../bigquery/datapolicies/v1/datapolicy.rb | 269 -- .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../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/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../data_policy_service/create_data_policy.rb | 47 - .../data_policy_service/delete_data_policy.rb | 47 - .../data_policy_service/get_data_policy.rb | 47 - .../data_policy_service/get_iam_policy.rb | 47 - .../data_policy_service/list_data_policies.rb | 51 - .../data_policy_service/rename_data_policy.rb | 47 - .../data_policy_service/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../data_policy_service/update_data_policy.rb | 47 - ...google.cloud.bigquery.datapolicies.v1.json | 375 -- .../v1/data_policy_service_paths_test.rb | 67 - .../v1/data_policy_service_rest_test.rb | 595 --- .../v1/data_policy_service_test.rb | 651 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 58 - ...oud-bigquery-data_policies-v1beta1.gemspec | 29 - ...le-cloud-bigquery-data_policies-v1beta1.rb | 21 - .../cloud/bigquery/data_policies/v1beta1.rb | 42 - .../v1beta1/data_policy_service.rb | 51 - .../v1beta1/data_policy_service/client.rb | 1214 ------ .../data_policy_service/credentials.rb | 50 - .../v1beta1/data_policy_service/paths.rb | 71 - .../bigquery/data_policies/v1beta1/version.rb | 30 - .../datapolicies/v1beta1/datapolicy_pb.rb | 41 - .../v1beta1/datapolicy_services_pb.rb | 63 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../datapolicies/v1beta1/datapolicy.rb | 195 - .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../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/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../data_policy_service/create_data_policy.rb | 47 - .../data_policy_service/delete_data_policy.rb | 47 - .../data_policy_service/get_data_policy.rb | 47 - .../data_policy_service/get_iam_policy.rb | 47 - .../data_policy_service/list_data_policies.rb | 51 - .../data_policy_service/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../data_policy_service/update_data_policy.rb | 47 - ...e.cloud.bigquery.datapolicies.v1beta1.json | 335 -- .../v1beta1/data_policy_service_paths_test.rb | 67 - .../v1beta1/data_policy_service_test.rb | 589 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 168 - .../gapic_metadata.json | 98 - ...le-cloud-bigquery-data_transfer-v1.gemspec | 29 - .../google-cloud-bigquery-data_transfer-v1.rb | 21 - .../google/cloud/bigquery/data_transfer/v1.rb | 47 - .../data_transfer/v1/bindings_override.rb | 77 - .../data_transfer/v1/data_transfer_service.rb | 57 - .../v1/data_transfer_service/client.rb | 2170 ---------- .../v1/data_transfer_service/credentials.rb | 53 - .../v1/data_transfer_service/paths.rb | 193 - .../v1/data_transfer_service/rest.rb | 55 - .../v1/data_transfer_service/rest/client.rb | 2021 ---------- .../rest/service_stub.rb | 1177 ------ .../cloud/bigquery/data_transfer/v1/rest.rb | 40 - .../bigquery/data_transfer/v1/version.rb | 30 - .../datatransfer/v1/datatransfer_pb.rb | 63 - .../v1/datatransfer_services_pb.rb | 99 - .../bigquery/datatransfer/v1/transfer_pb.rb | 43 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../bigquery/datatransfer/v1/datatransfer.rb | 726 ---- .../bigquery/datatransfer/v1/transfer.rb | 411 -- .../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/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../check_valid_creds.rb | 47 - .../create_transfer_config.rb | 47 - .../delete_transfer_config.rb | 47 - .../delete_transfer_run.rb | 47 - .../enroll_data_sources.rb | 47 - .../data_transfer_service/get_data_source.rb | 47 - .../get_transfer_config.rb | 47 - .../data_transfer_service/get_transfer_run.rb | 47 - .../list_data_sources.rb | 51 - .../list_transfer_configs.rb | 51 - .../list_transfer_logs.rb | 51 - .../list_transfer_runs.rb | 51 - .../schedule_transfer_runs.rb | 47 - .../start_manual_transfer_runs.rb | 47 - .../unenroll_data_sources.rb | 47 - .../update_transfer_config.rb | 47 - ...google.cloud.bigquery.datatransfer.v1.json | 655 --- .../v1/data_transfer_service_paths_test.rb | 112 - .../v1/data_transfer_service_rest_test.rb | 988 ----- .../v1/data_transfer_service_test.rb | 1103 ----- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 53 - ...google-cloud-bigquery-migration-v2.gemspec | 28 - .../lib/google-cloud-bigquery-migration-v2.rb | 21 - .../lib/google/cloud/bigquery/migration/v2.rb | 47 - .../migration/v2/migration_entities_pb.rb | 40 - .../v2/migration_error_details_pb.rb | 28 - .../migration/v2/migration_metrics_pb.rb | 31 - .../migration/v2/migration_service.rb | 57 - .../migration/v2/migration_service/client.rb | 1101 ----- .../v2/migration_service/credentials.rb | 49 - .../migration/v2/migration_service/paths.rb | 92 - .../migration/v2/migration_service/rest.rb | 54 - .../v2/migration_service/rest/client.rb | 1009 ----- .../v2/migration_service/rest/service_stub.rb | 512 --- .../migration/v2/migration_service_pb.rb | 39 - .../v2/migration_service_services_pb.rb | 62 - .../cloud/bigquery/migration/v2/rest.rb | 39 - .../migration/v2/translation_config_pb.rb | 50 - .../migration/v2/translation_details_pb.rb | 30 - .../migration/v2/translation_suggestion_pb.rb | 27 - .../migration/v2/translation_usability_pb.rb | 26 - .../cloud/bigquery/migration/v2/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/distribution.rb | 233 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/label.rb | 49 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/metric.rb | 299 -- .../proto_docs/google/api/resource.rb | 227 -- .../migration/v2/migration_entities.rb | 278 -- .../migration/v2/migration_error_details.rb | 72 - .../migration/v2/migration_metrics.rb | 129 - .../migration/v2/migration_service.rb | 166 - .../migration/v2/translation_config.rb | 389 -- .../migration/v2/translation_details.rb | 138 - .../migration/v2/translation_suggestion.rb | 67 - .../migration/v2/translation_usability.rb | 69 - .../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/error_details.rb | 420 -- .../snippets/Gemfile | 32 - .../create_migration_workflow.rb | 47 - .../delete_migration_workflow.rb | 47 - .../get_migration_subtask.rb | 47 - .../get_migration_workflow.rb | 47 - .../list_migration_subtasks.rb | 51 - .../list_migration_workflows.rb | 51 - .../start_migration_workflow.rb | 47 - ...ta_google.cloud.bigquery.migration.v2.json | 295 -- .../v2/migration_service_paths_test.rb | 79 - .../v2/migration_service_rest_test.rb | 487 --- .../migration/v2/migration_service_test.rb | 540 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 163 - ...ogle-cloud-bigquery-reservation-v1.gemspec | 29 - .../google-cloud-bigquery-reservation-v1.rb | 21 - .../google/cloud/bigquery/reservation/v1.rb | 47 - .../bigquery/reservation/v1/reservation_pb.rb | 82 - .../reservation/v1/reservation_service.rb | 71 - .../v1/reservation_service/client.rb | 3514 ---------------- .../v1/reservation_service/credentials.rb | 54 - .../v1/reservation_service/paths.rb | 147 - .../v1/reservation_service/rest.rb | 68 - .../v1/reservation_service/rest/client.rb | 3266 --------------- .../reservation_service/rest/service_stub.rb | 1889 --------- .../reservation/v1/reservation_services_pb.rb | 297 -- .../cloud/bigquery/reservation/v1/rest.rb | 39 - .../cloud/bigquery/reservation/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../bigquery/reservation/v1/reservation.rb | 1190 ------ .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../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 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../reservation_service/create_assignment.rb | 47 - .../create_capacity_commitment.rb | 47 - .../reservation_service/create_reservation.rb | 47 - .../create_reservation_group.rb | 47 - .../reservation_service/delete_assignment.rb | 47 - .../delete_capacity_commitment.rb | 47 - .../reservation_service/delete_reservation.rb | 47 - .../delete_reservation_group.rb | 47 - .../failover_reservation.rb | 47 - .../reservation_service/get_bi_reservation.rb | 47 - .../get_capacity_commitment.rb | 47 - .../reservation_service/get_iam_policy.rb | 47 - .../reservation_service/get_reservation.rb | 47 - .../get_reservation_group.rb | 47 - .../reservation_service/list_assignments.rb | 51 - .../list_capacity_commitments.rb | 51 - .../list_reservation_groups.rb | 51 - .../reservation_service/list_reservations.rb | 51 - .../merge_capacity_commitments.rb | 47 - .../reservation_service/move_assignment.rb | 47 - .../search_all_assignments.rb | 51 - .../reservation_service/search_assignments.rb | 51 - .../reservation_service/set_iam_policy.rb | 47 - .../split_capacity_commitment.rb | 47 - .../test_iam_permissions.rb | 47 - .../reservation_service/update_assignment.rb | 47 - .../update_bi_reservation.rb | 47 - .../update_capacity_commitment.rb | 47 - .../reservation_service/update_reservation.rb | 47 - ..._google.cloud.bigquery.reservation.v1.json | 1175 ------ .../v1/reservation_service_paths_test.rb | 115 - .../v1/reservation_service_rest_test.rb | 1703 -------- .../v1/reservation_service_test.rb | 1892 --------- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-bigquery-storage-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-bigquery-storage-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../google-cloud-bigquery-storage-v1/Rakefile | 169 - .../gapic_metadata.json | 72 - .../google-cloud-bigquery-storage-v1.gemspec | 28 - .../lib/google-cloud-bigquery-storage-v1.rb | 21 - .../lib/google/cloud/bigquery/storage/v1.rb | 43 - .../bigquery/storage/v1/annotations_pb.rb | 24 - .../cloud/bigquery/storage/v1/arrow_pb.rb | 27 - .../cloud/bigquery/storage/v1/avro_pb.rb | 26 - .../bigquery/storage/v1/big_query_read.rb | 53 - .../storage/v1/big_query_read/client.rb | 750 ---- .../storage/v1/big_query_read/credentials.rb | 54 - .../storage/v1/big_query_read/paths.rb | 108 - .../bigquery/storage/v1/big_query_write.rb | 56 - .../storage/v1/big_query_write/client.rb | 1026 ----- .../storage/v1/big_query_write/credentials.rb | 55 - .../storage/v1/big_query_write/paths.rb | 75 - .../cloud/bigquery/storage/v1/protobuf_pb.rb | 26 - .../cloud/bigquery/storage/v1/storage_pb.rb | 61 - .../storage/v1/storage_services_pb.rb | 167 - .../cloud/bigquery/storage/v1/stream_pb.rb | 39 - .../cloud/bigquery/storage/v1/table_pb.rb | 30 - .../cloud/bigquery/storage/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/cloud/bigquery/storage/v1/arrow.rb | 103 - .../google/cloud/bigquery/storage/v1/avro.rb | 95 - .../cloud/bigquery/storage/v1/protobuf.rb | 56 - .../cloud/bigquery/storage/v1/storage.rb | 618 --- .../cloud/bigquery/storage/v1/stream.rb | 321 -- .../google/cloud/bigquery/storage/v1/table.rb | 208 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../big_query_read/create_read_session.rb | 47 - .../snippets/big_query_read/read_rows.rb | 50 - .../big_query_read/split_read_stream.rb | 47 - .../snippets/big_query_write/append_rows.rb | 56 - .../batch_commit_write_streams.rb | 47 - .../big_query_write/create_write_stream.rb | 47 - .../big_query_write/finalize_write_stream.rb | 47 - .../snippets/big_query_write/flush_rows.rb | 47 - .../big_query_write/get_write_stream.rb | 47 - ...data_google.cloud.bigquery.storage.v1.json | 375 -- .../storage/v1/big_query_read_paths_test.rb | 91 - .../storage/v1/big_query_read_test.rb | 303 -- .../storage/v1/big_query_write_paths_test.rb | 67 - .../storage/v1/big_query_write_test.rb | 501 --- .../test/helper.rb | 26 - .../google-cloud-bigtable-v2/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-bigtable-v2/.rubocop.yml | 33 - .../google-cloud-bigtable-v2/.toys.rb | 28 - .../google-cloud-bigtable-v2/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-bigtable-v2/CHANGELOG.md | 2 - .../google-cloud-bigtable-v2/Gemfile | 14 - .../google-cloud-bigtable-v2/LICENSE.md | 201 - .../google-cloud-bigtable-v2/README.md | 154 - .../google-cloud-bigtable-v2/Rakefile | 169 - .../gapic_metadata.json | 73 - .../google-cloud-bigtable-v2.gemspec | 28 - .../lib/google-cloud-bigtable-v2.rb | 21 - .../lib/google/bigtable/v2/bigtable_pb.rb | 66 - .../bigtable/v2/bigtable_services_pb.rb | 86 - .../lib/google/bigtable/v2/data_pb.rb | 59 - .../google/bigtable/v2/feature_flags_pb.rb | 21 - .../lib/google/bigtable/v2/peer_info_pb.rb | 22 - .../google/bigtable/v2/request_stats_pb.rb | 26 - .../google/bigtable/v2/response_params_pb.rb | 21 - .../lib/google/bigtable/v2/types_pb.rb | 55 - .../lib/google/cloud/bigtable/v2.rb | 40 - .../lib/google/cloud/bigtable/v2/bigtable.rb | 49 - .../cloud/bigtable/v2/bigtable/client.rb | 1820 --------- .../cloud/bigtable/v2/bigtable/credentials.rb | 56 - .../cloud/bigtable/v2/bigtable/paths.rb | 109 - .../lib/google/cloud/bigtable/v2/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/api/routing.rb | 463 --- .../proto_docs/google/bigtable/v2/bigtable.rb | 940 ----- .../proto_docs/google/bigtable/v2/data.rb | 997 ----- .../google/bigtable/v2/feature_flags.rb | 77 - .../google/bigtable/v2/peer_info.rb | 81 - .../google/bigtable/v2/request_stats.rb | 103 - .../google/bigtable/v2/response_params.rb | 42 - .../proto_docs/google/bigtable/v2/types.rb | 593 --- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 148 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 53 - .../google-cloud-bigtable-v2/snippets/Gemfile | 32 - .../snippets/bigtable/check_and_mutate_row.rb | 47 - .../snippets/bigtable/execute_query.rb | 50 - ...nerate_initial_change_stream_partitions.rb | 50 - .../snippets/bigtable/mutate_row.rb | 47 - .../snippets/bigtable/mutate_rows.rb | 50 - .../snippets/bigtable/ping_and_warm.rb | 47 - .../snippets/bigtable/prepare_query.rb | 47 - .../snippets/bigtable/read_change_stream.rb | 50 - .../bigtable/read_modify_write_row.rb | 47 - .../snippets/bigtable/read_rows.rb | 50 - .../snippets/bigtable/sample_row_keys.rb | 50 - .../snippet_metadata_google.bigtable.v2.json | 455 --- .../cloud/bigtable/v2/bigtable_paths_test.rb | 91 - .../google/cloud/bigtable/v2/bigtable_test.rb | 927 ----- .../google-cloud-bigtable-v2/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-billing-budgets-v1/.toys.rb | 28 - .../google-cloud-billing-budgets-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-billing-budgets-v1/Gemfile | 14 - .../LICENSE.md | 201 - .../google-cloud-billing-budgets-v1/README.md | 154 - .../google-cloud-billing-budgets-v1/Rakefile | 169 - .../gapic_metadata.json | 43 - .../google-cloud-billing-budgets-v1.gemspec | 28 - .../lib/google-cloud-billing-budgets-v1.rb | 21 - .../lib/google/cloud/billing/budgets/v1.rb | 47 - .../billing/budgets/v1/budget_model_pb.rb | 38 - .../billing/budgets/v1/budget_service.rb | 58 - .../budgets/v1/budget_service/client.rb | 917 ----- .../budgets/v1/budget_service/credentials.rb | 54 - .../budgets/v1/budget_service/paths.rb | 66 - .../billing/budgets/v1/budget_service/rest.rb | 55 - .../budgets/v1/budget_service/rest/client.rb | 839 ---- .../v1/budget_service/rest/service_stub.rb | 390 -- .../billing/budgets/v1/budget_service_pb.rb | 36 - .../budgets/v1/budget_service_services_pb.rb | 72 - .../google/cloud/billing/budgets/v1/rest.rb | 39 - .../cloud/billing/budgets/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/billing/budgets/v1/budget_model.rb | 389 -- .../billing/budgets/v1/budget_service.rb | 119 - .../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/struct.rb | 108 - .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/money.rb | 43 - .../snippets/Gemfile | 32 - .../snippets/budget_service/create_budget.rb | 47 - .../snippets/budget_service/delete_budget.rb | 47 - .../snippets/budget_service/get_budget.rb | 47 - .../snippets/budget_service/list_budgets.rb | 51 - .../snippets/budget_service/update_budget.rb | 47 - ...adata_google.cloud.billing.budgets.v1.json | 215 - .../budgets/v1/budget_service_paths_test.rb | 67 - .../budgets/v1/budget_service_rest_test.rb | 374 -- .../billing/budgets/v1/budget_service_test.rb | 409 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 43 - ...ogle-cloud-billing-budgets-v1beta1.gemspec | 28 - .../google-cloud-billing-budgets-v1beta1.rb | 21 - .../google/cloud/billing/budgets/v1beta1.rb | 42 - .../budgets/v1beta1/budget_model_pb.rb | 38 - .../billing/budgets/v1beta1/budget_service.rb | 52 - .../budgets/v1beta1/budget_service/client.rb | 917 ----- .../v1beta1/budget_service/credentials.rb | 54 - .../budgets/v1beta1/budget_service/paths.rb | 66 - .../budgets/v1beta1/budget_service_pb.rb | 36 - .../v1beta1/budget_service_services_pb.rb | 72 - .../cloud/billing/budgets/v1beta1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../billing/budgets/v1beta1/budget_model.rb | 362 -- .../billing/budgets/v1beta1/budget_service.rb | 119 - .../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/struct.rb | 108 - .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/money.rb | 43 - .../snippets/Gemfile | 32 - .../snippets/budget_service/create_budget.rb | 47 - .../snippets/budget_service/delete_budget.rb | 47 - .../snippets/budget_service/get_budget.rb | 47 - .../snippets/budget_service/list_budgets.rb | 51 - .../snippets/budget_service/update_budget.rb | 47 - ..._google.cloud.billing.budgets.v1beta1.json | 215 - .../v1beta1/budget_service_paths_test.rb | 67 - .../budgets/v1beta1/budget_service_test.rb | 409 -- .../test/helper.rb | 26 - .../google-cloud-billing-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-billing-v1/.rubocop.yml | 33 - .../google-cloud-billing-v1/.toys.rb | 28 - .../google-cloud-billing-v1/.yardopts | 12 - .../google-cloud-billing-v1/AUTHENTICATION.md | 122 - .../google-cloud-billing-v1/CHANGELOG.md | 2 - .../google-cloud-billing-v1/Gemfile | 14 - .../google-cloud-billing-v1/LICENSE.md | 201 - .../google-cloud-billing-v1/README.md | 153 - .../google-cloud-billing-v1/Rakefile | 169 - .../gapic_metadata.json | 92 - .../google-cloud-billing-v1.gemspec | 29 - .../lib/google-cloud-billing-v1.rb | 21 - .../lib/google/cloud/billing/v1.rb | 46 - .../google/cloud/billing/v1/cloud_billing.rb | 56 - .../cloud/billing/v1/cloud_billing/client.rb | 1588 -------- .../billing/v1/cloud_billing/credentials.rb | 53 - .../cloud/billing/v1/cloud_billing/paths.rb | 111 - .../cloud/billing/v1/cloud_billing/rest.rb | 53 - .../billing/v1/cloud_billing/rest/client.rb | 1484 ------- .../v1/cloud_billing/rest/service_stub.rb | 792 ---- .../cloud/billing/v1/cloud_billing_pb.rb | 40 - .../billing/v1/cloud_billing_services_pb.rb | 136 - .../google/cloud/billing/v1/cloud_catalog.rb | 57 - .../cloud/billing/v1/cloud_catalog/client.rb | 605 --- .../billing/v1/cloud_catalog/credentials.rb | 53 - .../cloud/billing/v1/cloud_catalog/paths.rb | 47 - .../cloud/billing/v1/cloud_catalog/rest.rb | 54 - .../billing/v1/cloud_catalog/rest/client.rb | 556 --- .../v1/cloud_catalog/rest/service_stub.rb | 201 - .../cloud/billing/v1/cloud_catalog_pb.rb | 42 - .../billing/v1/cloud_catalog_services_pb.rb | 49 - .../lib/google/cloud/billing/v1/rest.rb | 38 - .../lib/google/cloud/billing/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/cloud/billing/v1/cloud_billing.rb | 276 -- .../google/cloud/billing/v1/cloud_catalog.rb | 352 -- .../proto_docs/google/iam/v1/iam_policy.rb | 87 - .../proto_docs/google/iam/v1/options.rb | 50 - .../proto_docs/google/iam/v1/policy.rb | 426 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/type/expr.rb | 75 - .../proto_docs/google/type/money.rb | 43 - .../google-cloud-billing-v1/snippets/Gemfile | 32 - .../cloud_billing/create_billing_account.rb | 47 - .../cloud_billing/get_billing_account.rb | 47 - .../snippets/cloud_billing/get_iam_policy.rb | 47 - .../cloud_billing/get_project_billing_info.rb | 47 - .../cloud_billing/list_billing_accounts.rb | 51 - .../list_project_billing_info.rb | 51 - .../cloud_billing/move_billing_account.rb | 47 - .../snippets/cloud_billing/set_iam_policy.rb | 47 - .../cloud_billing/test_iam_permissions.rb | 47 - .../cloud_billing/update_billing_account.rb | 47 - .../update_project_billing_info.rb | 47 - .../snippets/cloud_catalog/list_services.rb | 51 - .../snippets/cloud_catalog/list_skus.rb | 51 - ...ppet_metadata_google.cloud.billing.v1.json | 535 --- .../billing/v1/cloud_billing_paths_test.rb | 94 - .../billing/v1/cloud_billing_rest_test.rb | 707 ---- .../cloud/billing/v1/cloud_billing_test.rb | 780 ---- .../billing/v1/cloud_catalog_paths_test.rb | 55 - .../billing/v1/cloud_catalog_rest_test.rb | 213 - .../cloud/billing/v1/cloud_catalog_test.rb | 242 -- .../google-cloud-billing-v1/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 19 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 168 - .../gapic_metadata.json | 81 - ...ogle-cloud-binary_authorization-v1.gemspec | 29 - .../google-cloud-binary_authorization-v1.rb | 21 - .../google/cloud/binary_authorization/v1.rb | 47 - .../v1/binauthz_management_service.rb | 61 - .../v1/binauthz_management_service/client.rb | 1108 ----- .../credentials.rb | 51 - .../v1/binauthz_management_service/paths.rb | 97 - .../v1/binauthz_management_service/rest.rb | 58 - .../rest/client.rb | 1016 ----- .../rest/service_stub.rb | 511 --- .../cloud/binary_authorization/v1/rest.rb | 39 - .../binary_authorization/v1/system_policy.rb | 55 - .../v1/system_policy/client.rb | 475 --- .../v1/system_policy/credentials.rb | 51 - .../v1/system_policy/paths.rb | 66 - .../v1/system_policy/rest.rb | 52 - .../v1/system_policy/rest/client.rb | 425 -- .../v1/system_policy/rest/service_stub.rb | 142 - .../v1/validation_helper.rb | 54 - .../v1/validation_helper/client.rb | 486 --- .../v1/validation_helper/credentials.rb | 51 - .../v1/validation_helper/rest.rb | 51 - .../v1/validation_helper/rest/client.rb | 436 -- .../v1/validation_helper/rest/service_stub.rb | 143 - .../cloud/binary_authorization/v1/version.rb | 28 - .../binaryauthorization/v1/resources_pb.rb | 35 - .../binaryauthorization/v1/service_pb.rb | 40 - .../v1/service_services_pb.rb | 115 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/binaryauthorization/v1/resources.rb | 374 -- .../cloud/binaryauthorization/v1/service.rb | 189 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/grafeas/v1/attestation.rb | 98 - .../proto_docs/grafeas/v1/common.rb | 243 -- .../snippets/Gemfile | 32 - .../create_attestor.rb | 47 - .../delete_attestor.rb | 47 - .../get_attestor.rb | 47 - .../binauthz_management_service/get_policy.rb | 47 - .../list_attestors.rb | 51 - .../update_attestor.rb | 47 - .../update_policy.rb | 47 - ...a_google.cloud.binaryauthorization.v1.json | 375 -- .../system_policy/get_system_policy.rb | 47 - .../validate_attestation_occurrence.rb | 47 - .../binauthz_management_service_paths_test.rb | 82 - .../binauthz_management_service_rest_test.rb | 481 --- .../v1/binauthz_management_service_test.rb | 523 --- .../v1/system_policy_paths_test.rb | 58 - .../v1/system_policy_rest_test.rb | 153 - .../v1/system_policy_test.rb | 162 - .../v1/validation_helper_rest_test.rb | 156 - .../v1/validation_helper_test.rb | 168 - .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 19 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 67 - ...cloud-binary_authorization-v1beta1.gemspec | 28 - ...ogle-cloud-binary_authorization-v1beta1.rb | 21 - .../cloud/binary_authorization/v1beta1.rb | 46 - .../v1beta1/binauthz_management_service.rb | 61 - .../binauthz_management_service/client.rb | 1108 ----- .../credentials.rb | 51 - .../binauthz_management_service/paths.rb | 97 - .../binauthz_management_service/rest.rb | 58 - .../rest/client.rb | 1016 ----- .../rest/service_stub.rb | 511 --- .../binary_authorization/v1beta1/rest.rb | 38 - .../v1beta1/system_policy.rb | 55 - .../v1beta1/system_policy/client.rb | 475 --- .../v1beta1/system_policy/credentials.rb | 51 - .../v1beta1/system_policy/paths.rb | 66 - .../v1beta1/system_policy/rest.rb | 52 - .../v1beta1/system_policy/rest/client.rb | 425 -- .../system_policy/rest/service_stub.rb | 142 - .../binary_authorization/v1beta1/version.rb | 28 - .../continuous_validation_logging_pb.rb | 32 - .../v1beta1/resources_pb.rb | 35 - .../binaryauthorization/v1beta1/service_pb.rb | 36 - .../v1beta1/service_services_pb.rb | 98 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../v1beta1/continuous_validation_logging.rb | 201 - .../binaryauthorization/v1beta1/resources.rb | 376 -- .../binaryauthorization/v1beta1/service.rb | 138 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - .../create_attestor.rb | 47 - .../delete_attestor.rb | 47 - .../get_attestor.rb | 47 - .../binauthz_management_service/get_policy.rb | 47 - .../list_attestors.rb | 51 - .../update_attestor.rb | 47 - .../update_policy.rb | 47 - ...gle.cloud.binaryauthorization.v1beta1.json | 335 -- .../system_policy/get_system_policy.rb | 47 - .../binauthz_management_service_paths_test.rb | 82 - .../binauthz_management_service_rest_test.rb | 481 --- .../binauthz_management_service_test.rb | 523 --- .../v1beta1/system_policy_paths_test.rb | 58 - .../v1beta1/system_policy_rest_test.rb | 153 - .../v1beta1/system_policy_test.rb | 162 - .../test/helper.rb | 26 - .../google-cloud-build-v1/.gitignore | 22 - .../google-cloud-build-v1/.repo-metadata.json | 18 - .../google-cloud-build-v1/.rubocop.yml | 33 - .../google-cloud-build-v1/.toys.rb | 28 - .../google-cloud-build-v1/.yardopts | 12 - .../google-cloud-build-v1/AUTHENTICATION.md | 122 - .../google-cloud-build-v1/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-build-v1/Gemfile | 14 - .../google-cloud-build-v1/LICENSE.md | 201 - .../google-cloud-build-v1/README.md | 154 - .../google-cloud-build-v1/Rakefile | 169 - .../google-cloud-build-v1/gapic_metadata.json | 113 - .../google-cloud-build-v1.gemspec | 28 - .../lib/google-cloud-build-v1.rb | 21 - .../lib/google/cloud/build/v1.rb | 45 - .../lib/google/cloud/build/v1/cloud_build.rb | 63 - .../cloud/build/v1/cloud_build/client.rb | 2518 ------------ .../cloud/build/v1/cloud_build/credentials.rb | 51 - .../cloud/build/v1/cloud_build/operations.rb | 841 ---- .../cloud/build/v1/cloud_build/paths.rb | 392 -- .../google/cloud/build/v1/cloud_build/rest.rb | 60 - .../cloud/build/v1/cloud_build/rest/client.rb | 2285 ----------- .../build/v1/cloud_build/rest/operations.rb | 940 ----- .../build/v1/cloud_build/rest/service_stub.rb | 1357 ------- .../lib/google/cloud/build/v1/rest.rb | 37 - .../lib/google/cloud/build/v1/version.rb | 28 - .../devtools/cloudbuild/v1/cloudbuild_pb.rb | 138 - .../cloudbuild/v1/cloudbuild_services_pb.rb | 136 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/httpbody.rb | 80 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../proto_docs/google/api/routing.rb | 463 --- .../devtools/cloudbuild/v1/cloudbuild.rb | 2751 ------------- .../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-build-v1/snippets/Gemfile | 32 - .../snippets/cloud_build/approve_build.rb | 54 - .../snippets/cloud_build/cancel_build.rb | 47 - .../snippets/cloud_build/create_build.rb | 54 - .../cloud_build/create_build_trigger.rb | 47 - .../cloud_build/create_worker_pool.rb | 54 - .../cloud_build/delete_build_trigger.rb | 47 - .../cloud_build/delete_worker_pool.rb | 54 - .../snippets/cloud_build/get_build.rb | 47 - .../snippets/cloud_build/get_build_trigger.rb | 47 - .../get_default_service_account.rb | 47 - .../snippets/cloud_build/get_worker_pool.rb | 47 - .../cloud_build/list_build_triggers.rb | 51 - .../snippets/cloud_build/list_builds.rb | 51 - .../snippets/cloud_build/list_worker_pools.rb | 51 - .../cloud_build/receive_trigger_webhook.rb | 47 - .../snippets/cloud_build/retry_build.rb | 54 - .../snippets/cloud_build/run_build_trigger.rb | 54 - .../cloud_build/update_build_trigger.rb | 47 - .../cloud_build/update_worker_pool.rb | 54 - ...etadata_google.devtools.cloudbuild.v1.json | 775 ---- .../build/v1/cloud_build_operations_test.rb | 400 -- .../cloud/build/v1/cloud_build_paths_test.rb | 244 -- .../cloud/build/v1/cloud_build_rest_test.rb | 1167 ------ .../google/cloud/build/v1/cloud_build_test.rb | 1354 ------- .../google-cloud-build-v1/test/helper.rb | 26 - .../google-cloud-build-v2/.gitignore | 22 - .../google-cloud-build-v2/.repo-metadata.json | 18 - .../google-cloud-build-v2/.rubocop.yml | 33 - .../google-cloud-build-v2/.toys.rb | 28 - .../google-cloud-build-v2/.yardopts | 12 - .../google-cloud-build-v2/AUTHENTICATION.md | 122 - .../google-cloud-build-v2/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-build-v2/Gemfile | 14 - .../google-cloud-build-v2/LICENSE.md | 201 - .../google-cloud-build-v2/README.md | 154 - .../google-cloud-build-v2/Rakefile | 169 - .../google-cloud-build-v2/gapic_metadata.json | 88 - .../google-cloud-build-v2.gemspec | 30 - .../lib/google-cloud-build-v2.rb | 21 - .../lib/google/cloud/build/v2.rb | 40 - .../cloud/build/v2/repository_manager.rb | 50 - .../build/v2/repository_manager/client.rb | 1909 --------- .../v2/repository_manager/credentials.rb | 51 - .../build/v2/repository_manager/operations.rb | 841 ---- .../build/v2/repository_manager/paths.rb | 130 - .../lib/google/cloud/build/v2/version.rb | 28 - .../devtools/cloudbuild/v2/cloudbuild_pb.rb | 28 - .../devtools/cloudbuild/v2/repositories_pb.rb | 66 - .../cloudbuild/v2/repositories_services_pb.rb | 72 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/httpbody.rb | 80 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../devtools/cloudbuild/v2/cloudbuild.rb | 88 - .../devtools/cloudbuild/v2/repositories.rb | 697 ---- .../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 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-build-v2/snippets/Gemfile | 32 - .../batch_create_repositories.rb | 54 - .../repository_manager/create_connection.rb | 54 - .../repository_manager/create_repository.rb | 54 - .../repository_manager/delete_connection.rb | 54 - .../repository_manager/delete_repository.rb | 54 - .../repository_manager/fetch_git_refs.rb | 47 - .../fetch_linkable_repositories.rb | 51 - .../repository_manager/fetch_read_token.rb | 47 - .../fetch_read_write_token.rb | 47 - .../repository_manager/get_connection.rb | 47 - .../repository_manager/get_repository.rb | 47 - .../repository_manager/list_connections.rb | 51 - .../repository_manager/list_repositories.rb | 51 - .../repository_manager/update_connection.rb | 54 - ...etadata_google.devtools.cloudbuild.v2.json | 575 --- .../v2/repository_manager_operations_test.rb | 400 -- .../build/v2/repository_manager_paths_test.rb | 103 - .../cloud/build/v2/repository_manager_test.rb | 1015 ----- .../google-cloud-build-v2/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 153 - .../Rakefile | 169 - .../gapic_metadata.json | 48 - ...ogle-cloud-capacity_planner-v1beta.gemspec | 28 - .../google-cloud-capacity_planner-v1beta.rb | 21 - .../google/cloud/capacity_planner/v1beta.rb | 45 - .../cloud/capacity_planner/v1beta/rest.rb | 37 - .../capacity_planner/v1beta/usage_service.rb | 56 - .../v1beta/usage_service/client.rb | 1231 ------ .../v1beta/usage_service/credentials.rb | 48 - .../v1beta/usage_service/operations.rb | 841 ---- .../v1beta/usage_service/paths.rb | 50 - .../v1beta/usage_service/rest.rb | 53 - .../v1beta/usage_service/rest/client.rb | 1146 ------ .../v1beta/usage_service/rest/operations.rb | 925 ----- .../v1beta/usage_service/rest/service_stub.rb | 546 --- .../cloud/capacity_planner/v1beta/version.rb | 28 - .../capacityplanner/v1beta/allocation_pb.rb | 31 - .../v1beta/future_reservation_pb.rb | 28 - .../capacityplanner/v1beta/location_pb.rb | 25 - .../capacityplanner/v1beta/resource_pb.rb | 30 - .../v1beta/usage_service_pb.rb | 65 - .../v1beta/usage_service_services_pb.rb | 61 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../capacityplanner/v1beta/allocation.rb | 206 - .../v1beta/future_reservation.rb | 185 - .../cloud/capacityplanner/v1beta/location.rb | 79 - .../cloud/capacityplanner/v1beta/resource.rb | 159 - .../capacityplanner/v1beta/usage_service.rb | 912 ----- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 53 - .../snippets/Gemfile | 32 - ...a_google.cloud.capacityplanner.v1beta.json | 255 -- .../usage_service/export_forecasts.rb | 54 - .../export_reservations_usage.rb | 54 - .../usage_service/export_usage_histories.rb | 54 - .../snippets/usage_service/query_forecasts.rb | 47 - .../usage_service/query_reservations.rb | 47 - .../usage_service/query_usage_histories.rb | 47 - .../v1beta/usage_service_operations_test.rb | 400 -- .../v1beta/usage_service_paths_test.rb | 55 - .../v1beta/usage_service_rest_test.rb | 488 --- .../v1beta/usage_service_test.rb | 612 --- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 163 - ...oogle-cloud-certificate_manager-v1.gemspec | 29 - .../google-cloud-certificate_manager-v1.rb | 21 - .../google/cloud/certificate_manager/v1.rb | 45 - .../v1/bindings_override.rb | 75 - .../v1/certificate_manager.rb | 81 - .../v1/certificate_manager/client.rb | 3567 ----------------- .../v1/certificate_manager/credentials.rb | 47 - .../v1/certificate_manager/operations.rb | 841 ---- .../v1/certificate_manager/paths.rb | 185 - .../v1/certificate_manager/rest.rb | 79 - .../v1/certificate_manager/rest/client.rb | 3329 --------------- .../v1/certificate_manager/rest/operations.rb | 925 ----- .../certificate_manager/rest/service_stub.rb | 1861 --------- .../cloud/certificate_manager/v1/rest.rb | 38 - .../cloud/certificate_manager/v1/version.rb | 28 - .../v1/certificate_issuance_config_pb.rb | 34 - .../v1/certificate_manager_pb.rb | 75 - .../v1/certificate_manager_services_pb.rb | 128 - .../certificatemanager/v1/trust_config_pb.rb | 35 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../v1/certificate_issuance_config.rb | 186 - .../v1/certificate_manager.rb | 896 ----- .../certificatemanager/v1/trust_config.rb | 210 - .../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 - .../snippets/Gemfile | 32 - .../certificate_manager/create_certificate.rb | 54 - .../create_certificate_issuance_config.rb | 54 - .../create_certificate_map.rb | 54 - .../create_certificate_map_entry.rb | 54 - .../create_dns_authorization.rb | 54 - .../create_trust_config.rb | 54 - .../certificate_manager/delete_certificate.rb | 54 - .../delete_certificate_issuance_config.rb | 54 - .../delete_certificate_map.rb | 54 - .../delete_certificate_map_entry.rb | 54 - .../delete_dns_authorization.rb | 54 - .../delete_trust_config.rb | 54 - .../certificate_manager/get_certificate.rb | 47 - .../get_certificate_issuance_config.rb | 47 - .../get_certificate_map.rb | 47 - .../get_certificate_map_entry.rb | 47 - .../get_dns_authorization.rb | 47 - .../certificate_manager/get_trust_config.rb | 47 - .../list_certificate_issuance_configs.rb | 51 - .../list_certificate_map_entries.rb | 51 - .../list_certificate_maps.rb | 51 - .../certificate_manager/list_certificates.rb | 51 - .../list_dns_authorizations.rb | 51 - .../certificate_manager/list_trust_configs.rb | 51 - .../certificate_manager/update_certificate.rb | 54 - .../update_certificate_map.rb | 54 - .../update_certificate_map_entry.rb | 54 - .../update_dns_authorization.rb | 54 - .../update_trust_config.rb | 54 - ...ta_google.cloud.certificatemanager.v1.json | 1175 ------ .../v1/certificate_manager_operations_test.rb | 400 -- .../v1/certificate_manager_paths_test.rb | 139 - .../v1/certificate_manager_rest_test.rb | 1707 -------- .../v1/certificate_manager_test.rb | 1999 --------- .../test/helper.rb | 26 - .../google-cloud-chronicle-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-chronicle-v1/.rubocop.yml | 33 - .../google-cloud-chronicle-v1/.toys.rb | 28 - .../google-cloud-chronicle-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-chronicle-v1/CHANGELOG.md | 2 - .../google-cloud-chronicle-v1/Gemfile | 14 - .../google-cloud-chronicle-v1/LICENSE.md | 201 - .../google-cloud-chronicle-v1/README.md | 154 - .../google-cloud-chronicle-v1/Rakefile | 169 - .../gapic_metadata.json | 214 - .../google-cloud-chronicle-v1.gemspec | 28 - .../lib/google-cloud-chronicle-v1.rb | 21 - .../lib/google/cloud/chronicle/v1.rb | 49 - .../chronicle/v1/data_access_control_pb.rb | 44 - .../v1/data_access_control_service.rb | 56 - .../v1/data_access_control_service/client.rb | 1431 ------- .../credentials.rb | 47 - .../v1/data_access_control_service/paths.rb | 94 - .../v1/data_access_control_service/rest.rb | 53 - .../rest/client.rb | 1318 ------ .../rest/service_stub.rb | 695 ---- .../v1/data_access_control_services_pb.rb | 76 - .../google/cloud/chronicle/v1/entity_pb.rb | 39 - .../cloud/chronicle/v1/entity_service.rb | 55 - .../chronicle/v1/entity_service/client.rb | 908 ----- .../v1/entity_service/credentials.rb | 47 - .../chronicle/v1/entity_service/paths.rb | 73 - .../cloud/chronicle/v1/entity_service/rest.rb | 52 - .../v1/entity_service/rest/client.rb | 830 ---- .../v1/entity_service/rest/service_stub.rb | 388 -- .../cloud/chronicle/v1/entity_services_pb.rb | 54 - .../google/cloud/chronicle/v1/instance_pb.rb | 27 - .../cloud/chronicle/v1/instance_service.rb | 55 - .../chronicle/v1/instance_service/client.rb | 481 --- .../v1/instance_service/credentials.rb | 47 - .../chronicle/v1/instance_service/paths.rb | 52 - .../chronicle/v1/instance_service/rest.rb | 52 - .../v1/instance_service/rest/client.rb | 431 -- .../v1/instance_service/rest/service_stub.rb | 142 - .../chronicle/v1/instance_services_pb.rb | 45 - .../cloud/chronicle/v1/reference_list_pb.rb | 38 - .../chronicle/v1/reference_list_service.rb | 55 - .../v1/reference_list_service/client.rb | 809 ---- .../v1/reference_list_service/credentials.rb | 47 - .../v1/reference_list_service/paths.rb | 73 - .../v1/reference_list_service/rest.rb | 52 - .../v1/reference_list_service/rest/client.rb | 738 ---- .../rest/service_stub.rb | 327 -- .../v1/reference_list_services_pb.rb | 51 - .../lib/google/cloud/chronicle/v1/rest.rb | 41 - .../lib/google/cloud/chronicle/v1/rule_pb.rb | 61 - .../google/cloud/chronicle/v1/rule_service.rb | 56 - .../cloud/chronicle/v1/rule_service/client.rb | 1691 -------- .../chronicle/v1/rule_service/credentials.rb | 47 - .../chronicle/v1/rule_service/operations.rb | 841 ---- .../cloud/chronicle/v1/rule_service/paths.rb | 159 - .../cloud/chronicle/v1/rule_service/rest.rb | 53 - .../chronicle/v1/rule_service/rest/client.rb | 1564 -------- .../v1/rule_service/rest/operations.rb | 925 ----- .../v1/rule_service/rest/service_stub.rb | 817 ---- .../cloud/chronicle/v1/rule_services_pb.rb | 70 - .../lib/google/cloud/chronicle/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/chronicle/v1/data_access_control.rb | 364 -- .../google/cloud/chronicle/v1/entity.rb | 210 - .../google/cloud/chronicle/v1/instance.rb | 47 - .../cloud/chronicle/v1/reference_list.rb | 232 -- .../google/cloud/chronicle/v1/rule.rb | 701 ---- .../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 - .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../create_data_access_label.rb | 47 - .../create_data_access_scope.rb | 47 - .../delete_data_access_label.rb | 47 - .../delete_data_access_scope.rb | 47 - .../get_data_access_label.rb | 47 - .../get_data_access_scope.rb | 47 - .../list_data_access_labels.rb | 51 - .../list_data_access_scopes.rb | 51 - .../update_data_access_label.rb | 47 - .../update_data_access_scope.rb | 47 - .../entity_service/create_watchlist.rb | 47 - .../entity_service/delete_watchlist.rb | 47 - .../snippets/entity_service/get_watchlist.rb | 47 - .../entity_service/list_watchlists.rb | 51 - .../entity_service/update_watchlist.rb | 47 - .../snippets/instance_service/get_instance.rb | 47 - .../create_reference_list.rb | 47 - .../get_reference_list.rb | 47 - .../list_reference_lists.rb | 51 - .../update_reference_list.rb | 47 - .../snippets/rule_service/create_retrohunt.rb | 54 - .../snippets/rule_service/create_rule.rb | 47 - .../snippets/rule_service/delete_rule.rb | 47 - .../snippets/rule_service/get_retrohunt.rb | 47 - .../snippets/rule_service/get_rule.rb | 47 - .../rule_service/get_rule_deployment.rb | 47 - .../snippets/rule_service/list_retrohunts.rb | 51 - .../rule_service/list_rule_deployments.rb | 51 - .../rule_service/list_rule_revisions.rb | 51 - .../snippets/rule_service/list_rules.rb | 51 - .../snippets/rule_service/update_rule.rb | 47 - .../rule_service/update_rule_deployment.rb | 47 - ...et_metadata_google.cloud.chronicle.v1.json | 1295 ------ .../data_access_control_service_paths_test.rb | 79 - .../data_access_control_service_rest_test.rb | 651 --- .../v1/data_access_control_service_test.rb | 718 ---- .../chronicle/v1/entity_service_paths_test.rb | 67 - .../chronicle/v1/entity_service_rest_test.rb | 376 -- .../cloud/chronicle/v1/entity_service_test.rb | 413 -- .../v1/instance_service_paths_test.rb | 55 - .../v1/instance_service_rest_test.rb | 153 - .../chronicle/v1/instance_service_test.rb | 162 - .../v1/reference_list_service_paths_test.rb | 67 - .../v1/reference_list_service_rest_test.rb | 322 -- .../v1/reference_list_service_test.rb | 355 -- .../v1/rule_service_operations_test.rb | 400 -- .../chronicle/v1/rule_service_paths_test.rb | 115 - .../chronicle/v1/rule_service_rest_test.rb | 766 ---- .../cloud/chronicle/v1/rule_service_test.rb | 877 ---- .../google-cloud-chronicle-v1/test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 92 - ...le-cloud-cloud_controls_partner-v1.gemspec | 28 - .../google-cloud-cloud_controls_partner-v1.rb | 21 - .../google/cloud/cloud_controls_partner/v1.rb | 46 - .../v1/cloud_controls_partner_core.rb | 55 - .../v1/cloud_controls_partner_core/client.rb | 1504 ------- .../credentials.rb | 47 - .../v1/cloud_controls_partner_core/paths.rb | 149 - .../v1/cloud_controls_partner_core/rest.rb | 52 - .../rest/client.rb | 1382 ------- .../rest/service_stub.rb | 754 ---- .../v1/cloud_controls_partner_monitoring.rb | 55 - .../client.rb | 605 --- .../credentials.rb | 47 - .../paths.rb | 77 - .../cloud_controls_partner_monitoring/rest.rb | 52 - .../rest/client.rb | 548 --- .../rest/service_stub.rb | 203 - .../cloud/cloud_controls_partner/v1/rest.rb | 38 - .../cloud_controls_partner/v1/version.rb | 28 - .../v1/access_approval_requests_pb.rb | 29 - .../v1/completion_state_pb.rb | 21 - .../cloud/cloudcontrolspartner/v1/core_pb.rb | 34 - .../v1/core_services_pb.rb | 66 - .../v1/customer_workloads_pb.rb | 33 - .../cloudcontrolspartner/v1/customers_pb.rb | 36 - .../v1/ekm_connections_pb.rb | 28 - .../cloudcontrolspartner/v1/monitoring_pb.rb | 24 - .../v1/monitoring_services_pb.rb | 53 - .../v1/partner_permissions_pb.rb | 26 - .../cloudcontrolspartner/v1/partners_pb.rb | 29 - .../cloudcontrolspartner/v1/violations_pb.rb | 35 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../v1/access_approval_requests.rb | 143 - .../v1/completion_state.rb | 44 - .../cloud/cloudcontrolspartner/v1/core.rb | 57 - .../v1/customer_workloads.rb | 177 - .../cloudcontrolspartner/v1/customers.rb | 180 - .../v1/ekm_connections.rb | 96 - .../v1/partner_permissions.rb | 69 - .../cloud/cloudcontrolspartner/v1/partners.rb | 117 - .../cloudcontrolspartner/v1/violations.rb | 229 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../create_customer.rb | 47 - .../delete_customer.rb | 47 - .../get_customer.rb | 47 - .../get_ekm_connections.rb | 47 - .../get_partner.rb | 47 - .../get_partner_permissions.rb | 47 - .../get_workload.rb | 47 - .../list_access_approval_requests.rb | 51 - .../list_customers.rb | 51 - .../list_workloads.rb | 51 - .../update_customer.rb | 47 - .../get_violation.rb | 47 - .../list_violations.rb | 51 - ..._google.cloud.cloudcontrolspartner.v1.json | 535 --- .../cloud_controls_partner_core_paths_test.rb | 115 - .../cloud_controls_partner_core_rest_test.rb | 708 ---- .../v1/cloud_controls_partner_core_test.rb | 787 ---- ..._controls_partner_monitoring_paths_test.rb | 67 - ...d_controls_partner_monitoring_rest_test.rb | 212 - .../cloud_controls_partner_monitoring_test.rb | 235 -- .../test/helper.rb | 26 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 92 - ...loud-cloud_controls_partner-v1beta.gemspec | 28 - ...gle-cloud-cloud_controls_partner-v1beta.rb | 21 - .../cloud/cloud_controls_partner/v1beta.rb | 46 - .../v1beta/cloud_controls_partner_core.rb | 55 - .../cloud_controls_partner_core/client.rb | 1504 ------- .../credentials.rb | 47 - .../cloud_controls_partner_core/paths.rb | 149 - .../cloud_controls_partner_core/rest.rb | 52 - .../rest/client.rb | 1382 ------- .../rest/service_stub.rb | 754 ---- .../cloud_controls_partner_monitoring.rb | 55 - .../client.rb | 605 --- .../credentials.rb | 47 - .../paths.rb | 77 - .../cloud_controls_partner_monitoring/rest.rb | 52 - .../rest/client.rb | 548 --- .../rest/service_stub.rb | 203 - .../cloud_controls_partner/v1beta/rest.rb | 38 - .../cloud_controls_partner/v1beta/version.rb | 28 - .../v1beta/access_approval_requests_pb.rb | 29 - .../v1beta/completion_state_pb.rb | 21 - .../cloudcontrolspartner/v1beta/core_pb.rb | 34 - .../v1beta/core_services_pb.rb | 66 - .../v1beta/customer_workloads_pb.rb | 33 - .../v1beta/customers_pb.rb | 36 - .../v1beta/ekm_connections_pb.rb | 28 - .../v1beta/monitoring_pb.rb | 24 - .../v1beta/monitoring_services_pb.rb | 53 - .../v1beta/partner_permissions_pb.rb | 26 - .../v1beta/partners_pb.rb | 29 - .../v1beta/violations_pb.rb | 35 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 589 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../v1beta/access_approval_requests.rb | 143 - .../v1beta/completion_state.rb | 44 - .../cloud/cloudcontrolspartner/v1beta/core.rb | 57 - .../v1beta/customer_workloads.rb | 177 - .../cloudcontrolspartner/v1beta/customers.rb | 180 - .../v1beta/ekm_connections.rb | 96 - .../v1beta/partner_permissions.rb | 69 - .../cloudcontrolspartner/v1beta/partners.rb | 117 - .../cloudcontrolspartner/v1beta/violations.rb | 229 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../create_customer.rb | 47 - .../delete_customer.rb | 47 - .../get_customer.rb | 47 - .../get_ekm_connections.rb | 47 - .../get_partner.rb | 47 - .../get_partner_permissions.rb | 47 - .../get_workload.rb | 47 - .../list_access_approval_requests.rb | 51 - .../list_customers.rb | 51 - .../list_workloads.rb | 51 - .../update_customer.rb | 47 - .../get_violation.rb | 47 - .../list_violations.rb | 51 - ...gle.cloud.cloudcontrolspartner.v1beta.json | 535 --- .../cloud_controls_partner_core_paths_test.rb | 115 - .../cloud_controls_partner_core_rest_test.rb | 708 ---- .../cloud_controls_partner_core_test.rb | 787 ---- ..._controls_partner_monitoring_paths_test.rb | 67 - ...d_controls_partner_monitoring_rest_test.rb | 212 - .../cloud_controls_partner_monitoring_test.rb | 235 -- .../test/helper.rb | 26 - 1396 files changed, 2914 insertions(+), 251498 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_error_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_metrics_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/check_and_mutate_row.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb delete mode 100644 owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-v1.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/create_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-billing-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-billing-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-billing-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-billing-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-billing-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-billing-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-billing-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-billing-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-billing-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-billing-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-v1.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/create_billing_account.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json delete mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb delete mode 100644 owl-bot-staging/google-cloud-billing-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-v1.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/attestation.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-build-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-build-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-build-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-build-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-build-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-build-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-build-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-build-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-build-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-build-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-v1.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/operations.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/httpbody.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/approve_build.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json delete mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb delete mode 100644 owl-bot-staging/google-cloud-build-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-build-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-build-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-build-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-build-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-build-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-build-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-build-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-build-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-build-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-build-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/httpbody.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/batch_create_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json delete mode 100644 owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-build-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/location_pb.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/resource_pb.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-v1.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-v1.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb delete mode 100644 owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb diff --git a/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb b/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb index 44c6bee7f2e5..97193034f37c 100644 --- a/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb b/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb b/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb b/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb +++ b/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigtable-v2/proto_docs/google/api/client.rb b/google-cloud-bigtable-v2/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/api/client.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb b/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb index 3cc2ed9c4d8b..5a211ede7ee1 100644 --- a/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb +++ b/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb @@ -49,9 +49,13 @@ module Api # app_profile_id: profiles/prof_qux # } # - # The routing header consists of one or multiple key-value pairs. Every key - # and value must be percent-encoded, and joined together in the format of - # `key1=value1&key2=value2`. + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. # The examples below skip the percent-encoding for readability. # # Example 1 diff --git a/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb b/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb +++ b/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb b/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-billing-v1/proto_docs/google/api/client.rb b/google-cloud-billing-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-billing-v1/proto_docs/google/api/client.rb +++ b/google-cloud-billing-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb b/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb +++ b/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb b/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb +++ b/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-build-v1/proto_docs/google/api/client.rb b/google-cloud-build-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-build-v1/proto_docs/google/api/client.rb +++ b/google-cloud-build-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-build-v1/proto_docs/google/api/routing.rb b/google-cloud-build-v1/proto_docs/google/api/routing.rb index b70c2c09ad7a..30fb5caa2453 100644 --- a/google-cloud-build-v1/proto_docs/google/api/routing.rb +++ b/google-cloud-build-v1/proto_docs/google/api/routing.rb @@ -49,9 +49,13 @@ module Api # app_profile_id: profiles/prof_qux # } # - # The routing header consists of one or multiple key-value pairs. Every key - # and value must be percent-encoded, and joined together in the format of - # `key1=value1&key2=value2`. + # The routing header consists of one or multiple key-value pairs. The order of + # the key-value pairs is undefined, the order of the `routing_parameters` in + # the `RoutingRule` only matters for the evaluation order of the path + # templates when `field` is the same. See the examples below for more details. + # + # Every key and value in the routing header must be percent-encoded, + # and joined together in the following format: `key1=value1&key2=value2`. # The examples below skip the percent-encoding for readability. # # Example 1 diff --git a/google-cloud-build-v2/proto_docs/google/api/client.rb b/google-cloud-build-v2/proto_docs/google/api/client.rb index 44c6bee7f2e5..97193034f37c 100644 --- a/google-cloud-build-v2/proto_docs/google/api/client.rb +++ b/google-cloud-build-v2/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-capacity_planner-v1beta/proto_docs/google/api/client.rb b/google-cloud-capacity_planner-v1beta/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-cloud-capacity_planner-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-capacity_planner-v1beta/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb b/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb index 8f4ca4b4d6e5..7796382e3a21 100644 --- a/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb +++ b/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-chronicle-v1/proto_docs/google/api/client.rb b/google-cloud-chronicle-v1/proto_docs/google/api/client.rb index c6b6b60729c9..25b227e61cdc 100644 --- a/google-cloud-chronicle-v1/proto_docs/google/api/client.rb +++ b/google-cloud-chronicle-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb b/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb +++ b/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb b/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb index 483a6510978e..a8b1b06d1cad 100644 --- a/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb +++ b/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb @@ -141,9 +141,10 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 # @!attribute [rw] service_class_names # @return [::Google::Protobuf::Map{::String => ::String}] # Configure the Java class name to use instead of the service's for its @@ -155,11 +156,11 @@ class Publishing # # Example of a YAML configuration:: # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # 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. @@ -190,6 +191,20 @@ class CppSettings # @!attribute [rw] common # @return [::Google::Api::CommonLanguageSettings] # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 class PhpSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -318,10 +333,12 @@ class RubySettings # service names and values are the name to be used for the service client # and call options. # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin class GoSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -344,10 +361,10 @@ class RenamedServicesEntry # # Example: # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... + # 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 @@ -356,14 +373,14 @@ class RenamedServicesEntry # # 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 + # 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 @@ -372,11 +389,24 @@ class RenamedServicesEntry # # Example of a YAML configuration: # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 class MethodSettings include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -428,6 +458,77 @@ class SelectiveGapicGeneration extend ::Google::Protobuf::MessageExts::ClassMethods end + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # The organization for which the client libraries are being published. # Affects the url where generated docs are published, etc. module ClientLibraryOrganization @@ -469,5 +570,20 @@ module ClientLibraryDestination # Publish the library to package managers like nuget.org and npmjs.com. PACKAGE_MANAGER = 20 end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end end end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json deleted file mode 100644 index e0a4faff0029..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "analyticshub.googleapis.com", - "api_shortname": "analyticshub", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_exchange-v1beta1/latest", - "distribution_name": "google-cloud-bigquery-data_exchange-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "analyticshub", - "name_pretty": "Analytics Hub V1beta1 API", - "product_documentation": "https://cloud.google.com/analytics-hub/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Analytics Hub is a data exchange that allows you to efficiently and securely exchange data assets across organizations to address challenges of data reliability and cost. Curate a library of internal and external assets, including unique datasets like Google Trends, backed by the power of BigQuery. Note that google-cloud-bigquery-data_exchange-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_exchange instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/analytics-hub/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml deleted file mode 100644 index 2d3faf077487..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-data_exchange-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-data_exchange-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts deleted file mode 100644 index 802b60f2370f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Analytics Hub V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 938b466bdbfa..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-data_exchange-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-data_exchange-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/data_exchange/v1beta1" - -client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/data_exchange/v1beta1" - -::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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-bigquery-data_exchange-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/data_exchange/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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-bigquery-data_exchange-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md deleted file mode 100644 index 1953ba166c8f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Analytics Hub V1beta1 API - -Exchange data and analytics assets securely and efficiently. - -Analytics Hub is a data exchange that allows you to efficiently and securely exchange data assets across organizations to address challenges of data reliability and cost. Curate a library of internal and external assets, including unique datasets like Google Trends, backed by the power of BigQuery. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Analytics Hub V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-data_exchange](https://rubygems.org/gems/google-cloud-bigquery-data_exchange). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-data_exchange-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/analyticshub.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/data_exchange/v1beta1" - -client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new -request = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.new # (request fields as keyword arguments...) -response = client.list_data_exchanges request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_exchange-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/analytics-hub/) -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/bigquery/data_exchange/v1beta1" -require "logger" - -client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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-bigquery-data_exchange`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-data_exchange-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-data_exchange`. -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-bigquery-data_exchange-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile deleted file mode 100644 index 917c08f76a66..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-data_exchange-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials" - ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-data_exchange-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-data_exchange-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-data_exchange-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-data_exchange-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-data_exchange-v1beta1" - header "google-cloud-bigquery-data_exchange-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-data_exchange-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-data_exchange-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-data_exchange-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-data_exchange-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json deleted file mode 100644 index 1d12ec52273e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.dataexchange.v1beta1", - "libraryPackage": "::Google::Cloud::Bigquery::DataExchange::V1beta1", - "services": { - "AnalyticsHubService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client", - "rpcs": { - "ListDataExchanges": { - "methods": [ - "list_data_exchanges" - ] - }, - "ListOrgDataExchanges": { - "methods": [ - "list_org_data_exchanges" - ] - }, - "GetDataExchange": { - "methods": [ - "get_data_exchange" - ] - }, - "CreateDataExchange": { - "methods": [ - "create_data_exchange" - ] - }, - "UpdateDataExchange": { - "methods": [ - "update_data_exchange" - ] - }, - "DeleteDataExchange": { - "methods": [ - "delete_data_exchange" - ] - }, - "ListListings": { - "methods": [ - "list_listings" - ] - }, - "GetListing": { - "methods": [ - "get_listing" - ] - }, - "CreateListing": { - "methods": [ - "create_listing" - ] - }, - "UpdateListing": { - "methods": [ - "update_listing" - ] - }, - "DeleteListing": { - "methods": [ - "delete_listing" - ] - }, - "SubscribeListing": { - "methods": [ - "subscribe_listing" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec deleted file mode 100644 index efaf0336c86b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/google-cloud-bigquery-data_exchange-v1beta1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/data_exchange/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-data_exchange-v1beta1" - gem.version = Google::Cloud::Bigquery::DataExchange::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Analytics Hub is a data exchange that allows you to efficiently and securely exchange data assets across organizations to address challenges of data reliability and cost. Curate a library of internal and external assets, including unique datasets like Google Trends, backed by the power of BigQuery. Note that google-cloud-bigquery-data_exchange-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_exchange instead. See the readme for more details." - gem.summary = "Exchange data and analytics assets securely and efficiently." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb deleted file mode 100644 index a09a78a6e7e0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google-cloud-bigquery-data_exchange-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/data_exchange/v1beta1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb deleted file mode 100644 index 52bef81bdee4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1.rb +++ /dev/null @@ -1,42 +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/bigquery/data_exchange/v1beta1/analytics_hub_service" -require "google/cloud/bigquery/data_exchange/v1beta1/version" - -module Google - module Cloud - module Bigquery - module DataExchange - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_exchange/v1beta1" - # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - module V1beta1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/bigquery/data_exchange/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb deleted file mode 100644 index 9cfbeb207776..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_exchange/v1beta1/version" - -require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials" -require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths" -require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client" - -module Google - module Cloud - module Bigquery - module DataExchange - module V1beta1 - ## - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service" - # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - module AnalyticsHubService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "analytics_hub_service", "helpers.rb" -require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb deleted file mode 100644 index 2008c915b94c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/client.rb +++ /dev/null @@ -1,1890 +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/bigquery/dataexchange/v1beta1/dataexchange_pb" -require "google/cloud/location" - -module Google - module Cloud - module Bigquery - module DataExchange - module V1beta1 - module AnalyticsHubService - ## - # Client for the AnalyticsHubService service. - # - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "analyticshub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :analytics_hub_service_stub - - ## - # Configure the AnalyticsHubService Client class. - # - # See {::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AnalyticsHubService clients - # ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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", "Bigquery", "DataExchange", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 - @analytics_hub_service_stub.universe_domain - end - - ## - # Create a new AnalyticsHubService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AnalyticsHubService 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/bigquery/dataexchange/v1beta1/dataexchange_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 - - @analytics_hub_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 - ) - - @analytics_hub_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @analytics_hub_service_stub.endpoint - config.universe_domain = @analytics_hub_service_stub.universe_domain - config.logger = @analytics_hub_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @analytics_hub_service_stub.logger - end - - # Service calls - - ## - # Lists all data exchanges in a given project and location. - # - # @overload list_data_exchanges(request, options = nil) - # Pass arguments to `list_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_exchanges(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is 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 resource path of the data exchanges. - # e.g. `projects/myproject/locations/US`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.new - # - # # Call the list_data_exchanges method. - # result = client.list_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. - # p item - # end - # - def list_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest - - # Converts hash 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_data_exchanges.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_exchanges.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_data_exchanges, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_data_exchanges, 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 all data exchanges from projects in a given organization and - # location. - # - # @overload list_org_data_exchanges(request, options = nil) - # Pass arguments to `list_org_data_exchanges` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_org_data_exchanges(organization: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_org_data_exchanges` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param organization [::String] - # Required. The organization resource path of the projects containing DataExchanges. - # e.g. `organizations/myorg/locations/US`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new - # - # # Call the list_org_data_exchanges method. - # result = client.list_org_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. - # p item - # end - # - def list_org_data_exchanges request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest - - # Converts hash 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_org_data_exchanges.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.organization - header_params["organization"] = request.organization - 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_org_data_exchanges.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_org_data_exchanges.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_org_data_exchanges, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_org_data_exchanges, 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 data exchange. - # - # @overload get_data_exchange(request, options = nil) - # Pass arguments to `get_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_exchange(name: nil) - # Pass arguments to `get_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/US/dataExchanges/123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.new - # - # # Call the get_data_exchange method. - # result = client.get_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. - # p result - # - def get_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest - - # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_data_exchange, 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 data exchange. - # - # @overload create_data_exchange(request, options = nil) - # Pass arguments to `create_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_exchange(parent: nil, data_exchange_id: nil, data_exchange: nil) - # Pass arguments to `create_data_exchange` via keyword arguments. Note that at - # least one keyword argument is 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 resource path of the data exchange. - # e.g. `projects/myproject/locations/US`. - # @param data_exchange_id [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Should not use characters that require URL-escaping, or characters - # outside of ASCII, spaces. - # Max length: 100 bytes. - # @param data_exchange [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange, ::Hash] - # Required. The data exchange to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new - # - # # Call the create_data_exchange method. - # result = client.create_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. - # p result - # - def create_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest - - # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing data exchange. - # - # @overload update_data_exchange(request, options = nil) - # Pass arguments to `update_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_exchange(update_mask: nil, data_exchange: nil) - # Pass arguments to `update_data_exchange` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @param data_exchange [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange, ::Hash] - # Required. The data exchange to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new - # - # # Call the update_data_exchange method. - # result = client.update_data_exchange request - # - # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. - # p result - # - def update_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest - - # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_exchange&.name - header_params["data_exchange.name"] = request.data_exchange.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_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing data exchange. - # - # @overload delete_data_exchange(request, options = nil) - # Pass arguments to `delete_data_exchange` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_exchange(name: nil) - # Pass arguments to `delete_data_exchange` via keyword arguments. Note that at - # least one keyword argument is 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 full name of the data exchange resource that you want to delete. - # For example, `projects/myproject/locations/US/dataExchanges/123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.new - # - # # Call the delete_data_exchange method. - # result = client.delete_data_exchange request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_exchange request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest - - # Converts hash 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_data_exchange.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_exchange.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_exchange.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_data_exchange, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all listings in a given project and location. - # - # @overload list_listings(request, options = nil) - # Pass arguments to `list_listings` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_listings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_listings` via keyword arguments. Note that at - # least one keyword argument is 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 resource path of the listing. - # e.g. `projects/myproject/locations/US/dataExchanges/123`. - # @param page_size [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @param page_token [::String] - # Page token, returned by a previous call, to request the next page of - # results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.new - # - # # Call the list_listings method. - # result = client.list_listings 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::Bigquery::DataExchange::V1beta1::Listing. - # p item - # end - # - def list_listings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest - - # Converts hash 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_listings.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_listings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_listings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :list_listings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @analytics_hub_service_stub, :list_listings, 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 listing. - # - # @overload get_listing(request, options = nil) - # Pass arguments to `get_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_listing(name: nil) - # Pass arguments to `get_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.new - # - # # Call the get_listing method. - # result = client.get_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. - # p result - # - def get_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest - - # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_listing, 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 listing. - # - # @overload create_listing(request, options = nil) - # Pass arguments to `create_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_listing(parent: nil, listing_id: nil, listing: nil) - # Pass arguments to `create_listing` via keyword arguments. Note that at - # least one keyword argument is 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 resource path of the listing. - # e.g. `projects/myproject/locations/US/dataExchanges/123`. - # @param listing_id [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Should not use characters that require URL-escaping, or characters - # outside of ASCII, spaces. - # Max length: 100 bytes. - # @param listing [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing, ::Hash] - # Required. The listing to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new - # - # # Call the create_listing method. - # result = client.create_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. - # p result - # - def create_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest - - # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :create_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing listing. - # - # @overload update_listing(request, options = nil) - # Pass arguments to `update_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_listing(update_mask: nil, listing: nil) - # Pass arguments to `update_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Field mask specifies the fields to update in the listing resource. The - # fields specified in the `updateMask` are relative to the resource and are - # not a full request. - # @param listing [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing, ::Hash] - # Required. The listing to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new - # - # # Call the update_listing method. - # result = client.update_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. - # p result - # - def update_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest - - # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.listing&.name - header_params["listing.name"] = request.listing.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_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :update_listing, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a listing. - # - # @overload delete_listing(request, options = nil) - # Pass arguments to `delete_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_listing(name: nil) - # Pass arguments to `delete_listing` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.new - # - # # Call the delete_listing method. - # result = client.delete_listing request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest - - # Converts hash 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_listing.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :delete_listing, 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 - - ## - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - # - # @overload subscribe_listing(request, options = nil) - # Pass arguments to `subscribe_listing` via a request object, either of type - # {::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload subscribe_listing(destination_dataset: nil, name: nil) - # Pass arguments to `subscribe_listing` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param destination_dataset [::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDataset, ::Hash] - # BigQuery destination dataset to create for the subscriber. - # @param name [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new - # - # # Call the subscribe_listing method. - # result = client.subscribe_listing request - # - # # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse. - # p result - # - def subscribe_listing request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest - - # Converts hash 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.subscribe_listing.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.subscribe_listing.timeout, - metadata: metadata, - retry_policy: @config.rpcs.subscribe_listing.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :subscribe_listing, 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 the IAM policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - 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_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - 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.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the permissions that a caller has. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_exchange/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Bigquery::DataExchange::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - 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.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @analytics_hub_service_stub.call_rpc :test_iam_permissions, 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 AnalyticsHubService API. - # - # This class represents the configuration for AnalyticsHubService, - # 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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_data_exchanges to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_data_exchanges.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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 = "analyticshub.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 AnalyticsHubService 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_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_exchanges - ## - # RPC-specific configuration for `list_org_data_exchanges` - # @return [::Gapic::Config::Method] - # - attr_reader :list_org_data_exchanges - ## - # RPC-specific configuration for `get_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_exchange - ## - # RPC-specific configuration for `create_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_exchange - ## - # RPC-specific configuration for `update_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_exchange - ## - # RPC-specific configuration for `delete_data_exchange` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_exchange - ## - # RPC-specific configuration for `list_listings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_listings - ## - # RPC-specific configuration for `get_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :get_listing - ## - # RPC-specific configuration for `create_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :create_listing - ## - # RPC-specific configuration for `update_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :update_listing - ## - # RPC-specific configuration for `delete_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_listing - ## - # RPC-specific configuration for `subscribe_listing` - # @return [::Gapic::Config::Method] - # - attr_reader :subscribe_listing - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_data_exchanges_config = parent_rpcs.list_data_exchanges if parent_rpcs.respond_to? :list_data_exchanges - @list_data_exchanges = ::Gapic::Config::Method.new list_data_exchanges_config - list_org_data_exchanges_config = parent_rpcs.list_org_data_exchanges if parent_rpcs.respond_to? :list_org_data_exchanges - @list_org_data_exchanges = ::Gapic::Config::Method.new list_org_data_exchanges_config - get_data_exchange_config = parent_rpcs.get_data_exchange if parent_rpcs.respond_to? :get_data_exchange - @get_data_exchange = ::Gapic::Config::Method.new get_data_exchange_config - create_data_exchange_config = parent_rpcs.create_data_exchange if parent_rpcs.respond_to? :create_data_exchange - @create_data_exchange = ::Gapic::Config::Method.new create_data_exchange_config - update_data_exchange_config = parent_rpcs.update_data_exchange if parent_rpcs.respond_to? :update_data_exchange - @update_data_exchange = ::Gapic::Config::Method.new update_data_exchange_config - delete_data_exchange_config = parent_rpcs.delete_data_exchange if parent_rpcs.respond_to? :delete_data_exchange - @delete_data_exchange = ::Gapic::Config::Method.new delete_data_exchange_config - list_listings_config = parent_rpcs.list_listings if parent_rpcs.respond_to? :list_listings - @list_listings = ::Gapic::Config::Method.new list_listings_config - get_listing_config = parent_rpcs.get_listing if parent_rpcs.respond_to? :get_listing - @get_listing = ::Gapic::Config::Method.new get_listing_config - create_listing_config = parent_rpcs.create_listing if parent_rpcs.respond_to? :create_listing - @create_listing = ::Gapic::Config::Method.new create_listing_config - update_listing_config = parent_rpcs.update_listing if parent_rpcs.respond_to? :update_listing - @update_listing = ::Gapic::Config::Method.new update_listing_config - delete_listing_config = parent_rpcs.delete_listing if parent_rpcs.respond_to? :delete_listing - @delete_listing = ::Gapic::Config::Method.new delete_listing_config - subscribe_listing_config = parent_rpcs.subscribe_listing if parent_rpcs.respond_to? :subscribe_listing - @subscribe_listing = ::Gapic::Config::Method.new subscribe_listing_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb deleted file mode 100644 index 6841d5db915f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/credentials.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module DataExchange - module V1beta1 - module AnalyticsHubService - # Credentials for the AnalyticsHubService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb deleted file mode 100644 index 385b4b439ec9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service/paths.rb +++ /dev/null @@ -1,109 +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 Bigquery - module DataExchange - module V1beta1 - module AnalyticsHubService - # Path helper methods for the AnalyticsHubService API. - module Paths - ## - # Create a fully-qualified DataExchange resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # - # @return [::String] - def data_exchange_path project:, location:, data_exchange: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}` - # - # @param project [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project:, dataset: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified Listing resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}` - # - # @param project [String] - # @param location [String] - # @param data_exchange [String] - # @param listing [String] - # - # @return [::String] - def listing_path project:, location:, data_exchange:, listing: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "data_exchange cannot contain /" if data_exchange.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataExchanges/#{data_exchange}/listings/#{listing}" - 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 - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb deleted file mode 100644 index 32537fe9e184..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/data_exchange/v1beta1/version.rb +++ /dev/null @@ -1,30 +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 Bigquery - module DataExchange - module V1beta1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb deleted file mode 100644 index 4371d42ffd33..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/dataexchange/v1beta1/dataexchange.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/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n=google/cloud/bigquery/dataexchange/v1beta1/dataexchange.proto\x12*google.cloud.bigquery.dataexchange.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xb5\x02\n\x0c\x44\x61taExchange\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\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rlisting_count\x18\x06 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01:t\xea\x41q\n(analyticshub.googleapis.com/DataExchange\x12\x45projects/{project}/locations/{location}/dataExchanges/{data_exchange}\"?\n\x0c\x44\x61taProvider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"<\n\tPublisher\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x02 \x01(\tB\x03\xe0\x41\x01\"O\n\x1b\x44\x65stinationDatasetReference\x12\x17\n\ndataset_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x96\x03\n\x12\x44\x65stinationDataset\x12g\n\x11\x64\x61taset_reference\x18\x01 \x01(\x0b\x32G.google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReferenceB\x03\xe0\x41\x02\x12\x38\n\rfriendly_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12\x36\n\x0b\x64\x65scription\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.StringValueB\x03\xe0\x41\x01\x12_\n\x06labels\x18\x04 \x03(\x0b\x32J.google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset.LabelsEntryB\x03\xe0\x41\x01\x12\x15\n\x08location\x18\x05 \x01(\tB\x03\xe0\x41\x02\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x0b\n\x07Listing\x12j\n\x10\x62igquery_dataset\x18\x06 \x01(\x0b\x32I.google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSourceB\x03\xe0\x41\x02H\x00\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\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fprimary_contact\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rdocumentation\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.bigquery.dataexchange.v1beta1.Listing.StateB\x03\xe0\x41\x03\x12\x11\n\x04icon\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12T\n\rdata_provider\x18\t \x01(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataProviderB\x03\xe0\x41\x01\x12U\n\ncategories\x18\n \x03(\x0e\x32<.google.cloud.bigquery.dataexchange.v1beta1.Listing.CategoryB\x03\xe0\x41\x01\x12M\n\tpublisher\x18\x0b \x01(\x0b\x32\x35.google.cloud.bigquery.dataexchange.v1beta1.PublisherB\x03\xe0\x41\x01\x12\x1b\n\x0erequest_access\x18\x0c \x01(\tB\x03\xe0\x41\x01\x1aN\n\x15\x42igQueryDatasetSource\x12\x35\n\x07\x64\x61taset\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x62igquery.googleapis.com/Dataset\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\"\xb7\x04\n\x08\x43\x61tegory\x12\x18\n\x14\x43\x41TEGORY_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43\x41TEGORY_OTHERS\x10\x01\x12&\n\"CATEGORY_ADVERTISING_AND_MARKETING\x10\x02\x12\x15\n\x11\x43\x41TEGORY_COMMERCE\x10\x03\x12$\n CATEGORY_CLIMATE_AND_ENVIRONMENT\x10\x04\x12\x19\n\x15\x43\x41TEGORY_DEMOGRAPHICS\x10\x05\x12\x16\n\x12\x43\x41TEGORY_ECONOMICS\x10\x06\x12\x16\n\x12\x43\x41TEGORY_EDUCATION\x10\x07\x12\x13\n\x0f\x43\x41TEGORY_ENERGY\x10\x08\x12\x16\n\x12\x43\x41TEGORY_FINANCIAL\x10\t\x12\x13\n\x0f\x43\x41TEGORY_GAMING\x10\n\x12\x17\n\x13\x43\x41TEGORY_GEOSPATIAL\x10\x0b\x12(\n$CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE\x10\x0c\x12\x12\n\x0e\x43\x41TEGORY_MEDIA\x10\r\x12\x1a\n\x16\x43\x41TEGORY_PUBLIC_SECTOR\x10\x0e\x12\x13\n\x0f\x43\x41TEGORY_RETAIL\x10\x0f\x12\x13\n\x0f\x43\x41TEGORY_SPORTS\x10\x10\x12!\n\x1d\x43\x41TEGORY_SCIENCE_AND_RESEARCH\x10\x11\x12)\n%CATEGORY_TRANSPORTATION_AND_LOGISTICS\x10\x12\x12\x1f\n\x1b\x43\x41TEGORY_TRAVEL_AND_TOURISM\x10\x13:\x82\x01\xea\x41\x7f\n#analyticshub.googleapis.com/Listing\x12Xprojects/{project}/locations/{location}/dataExchanges/{data_exchange}/listings/{listing}B\x08\n\x06source\"|\n\x18ListDataExchangesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x86\x01\n\x19ListDataExchangesResponse\x12P\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"_\n\x1bListOrgDataExchangesRequest\x12\x19\n\x0corganization\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x89\x01\n\x1cListOrgDataExchangesResponse\x12P\n\x0e\x64\x61ta_exchanges\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"X\n\x16GetDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"\xcb\x01\n\x19\x43reateDataExchangeRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1d\n\x10\x64\x61ta_exchange_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\rdata_exchange\x18\x03 \x01(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchangeB\x03\xe0\x41\x02\"\xa7\x01\n\x19UpdateDataExchangeRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12T\n\rdata_exchange\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchangeB\x03\xe0\x41\x02\"[\n\x19\x44\x65leteDataExchangeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\"~\n\x13ListListingsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"v\n\x14ListListingsResponse\x12\x45\n\x08listings\x18\x01 \x03(\x0b\x32\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"N\n\x11GetListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xbc\x01\n\x14\x43reateListingRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(analyticshub.googleapis.com/DataExchange\x12\x17\n\nlisting_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x07listing\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.dataexchange.v1beta1.ListingB\x03\xe0\x41\x02\"\x97\x01\n\x14UpdateListingRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12I\n\x07listing\x18\x02 \x01(\x0b\x32\x33.google.cloud.bigquery.dataexchange.v1beta1.ListingB\x03\xe0\x41\x02\"Q\n\x14\x44\x65leteListingRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/Listing\"\xc2\x01\n\x17SubscribeListingRequest\x12]\n\x13\x64\x65stination_dataset\x18\x03 \x01(\x0b\x32>.google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetH\x00\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#analyticshub.googleapis.com/ListingB\r\n\x0b\x64\x65stination\"\x1a\n\x18SubscribeListingResponse2\xa6\x1d\n\x13\x41nalyticsHubService\x12\xe9\x01\n\x11ListDataExchanges\x12\x44.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest\x1a\x45.google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta1/{parent=projects/*/locations/*}/dataExchanges\x12\x83\x02\n\x14ListOrgDataExchanges\x12G.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest\x1aH.google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse\"X\xda\x41\x0corganization\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta1/{organization=organizations/*/locations/*}/dataExchanges\x12\xd6\x01\n\x0fGetDataExchange\x12\x42.google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest\x1a\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta1/{name=projects/*/locations/*/dataExchanges/*}\x12\xfb\x01\n\x12\x43reateDataExchange\x12\x45.google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest\x1a\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\"d\xda\x41\x14parent,data_exchange\x82\xd3\xe4\x93\x02G\"6/v1beta1/{parent=projects/*/locations/*}/dataExchanges:\rdata_exchange\x12\x8e\x02\n\x12UpdateDataExchange\x12\x45.google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest\x1a\x38.google.cloud.bigquery.dataexchange.v1beta1.DataExchange\"w\xda\x41\x19\x64\x61ta_exchange,update_mask\x82\xd3\xe4\x93\x02U2D/v1beta1/{data_exchange.name=projects/*/locations/*/dataExchanges/*}:\rdata_exchange\x12\xba\x01\n\x12\x44\x65leteDataExchange\x12\x45.google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1beta1/{name=projects/*/locations/*/dataExchanges/*}\x12\xe5\x01\n\x0cListListings\x12?.google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest\x1a@.google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings\x12\xd2\x01\n\nGetListing\x12=.google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest\x1a\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}\x12\xeb\x01\n\rCreateListing\x12@.google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest\x1a\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\"c\xda\x41\x0eparent,listing\x82\xd3\xe4\x93\x02L\"A/v1beta1/{parent=projects/*/locations/*/dataExchanges/*}/listings:\x07listing\x12\xf8\x01\n\rUpdateListing\x12@.google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest\x1a\x33.google.cloud.bigquery.dataexchange.v1beta1.Listing\"p\xda\x41\x13listing,update_mask\x82\xd3\xe4\x93\x02T2I/v1beta1/{listing.name=projects/*/locations/*/dataExchanges/*/listings/*}:\x07listing\x12\xbb\x01\n\rDeleteListing\x12@.google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest\x1a\x16.google.protobuf.Empty\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}\x12\xfc\x01\n\x10SubscribeListing\x12\x43.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest\x1a\x44.google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse\"]\xda\x41\x04name\x82\xd3\xe4\x93\x02P\"K/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe:\x01*\x12\xf8\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xac\x01\x82\xd3\xe4\x93\x02\xa5\x01\"G/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:getIamPolicy:\x01*ZW\"R/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:getIamPolicy:\x01*\x12\xf8\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xac\x01\x82\xd3\xe4\x93\x02\xa5\x01\"G/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:setIamPolicy:\x01*ZW\"R/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:setIamPolicy:\x01*\x12\xa4\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xb8\x01\x82\xd3\xe4\x93\x02\xb1\x01\"M/v1beta1/{resource=projects/*/locations/*/dataExchanges/*}:testIamPermissions:\x01*Z]\"X/v1beta1/{resource=projects/*/locations/*/dataExchanges/*/listings/*}:testIamPermissions:\x01*\x1ax\xca\x41\x1b\x61nalyticshub.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xef\x02\n.com.google.cloud.bigquery.dataexchange.v1beta1B\x11\x44\x61taExchangeProtoP\x01ZRcloud.google.com/go/bigquery/dataexchange/apiv1beta1/dataexchangepb;dataexchangepb\xaa\x02*Google.Cloud.BigQuery.DataExchange.V1Beta1\xca\x02*Google\\Cloud\\BigQuery\\DataExchange\\V1beta1\xea\x02.Google::Cloud::Bigquery::DataExchange::V1beta1\xea\x41H\n\x1f\x62igquery.googleapis.com/Dataset\x12%projects/{project}/datasets/{dataset}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module DataExchange - module V1beta1 - DataExchange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DataExchange").msgclass - DataProvider = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DataProvider").msgclass - Publisher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Publisher").msgclass - DestinationDatasetReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DestinationDatasetReference").msgclass - DestinationDataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DestinationDataset").msgclass - Listing = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing").msgclass - Listing::BigQueryDatasetSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing.BigQueryDatasetSource").msgclass - Listing::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing.State").enummodule - Listing::Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.Listing.Category").enummodule - ListDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesRequest").msgclass - ListDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListDataExchangesResponse").msgclass - ListOrgDataExchangesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesRequest").msgclass - ListOrgDataExchangesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListOrgDataExchangesResponse").msgclass - GetDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.GetDataExchangeRequest").msgclass - CreateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.CreateDataExchangeRequest").msgclass - UpdateDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.UpdateDataExchangeRequest").msgclass - DeleteDataExchangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DeleteDataExchangeRequest").msgclass - ListListingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListListingsRequest").msgclass - ListListingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.ListListingsResponse").msgclass - GetListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.GetListingRequest").msgclass - CreateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.CreateListingRequest").msgclass - UpdateListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.UpdateListingRequest").msgclass - DeleteListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.DeleteListingRequest").msgclass - SubscribeListingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingRequest").msgclass - SubscribeListingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.dataexchange.v1beta1.SubscribeListingResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb deleted file mode 100644 index 6e08cf0c2ac2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/lib/google/cloud/bigquery/dataexchange/v1beta1/dataexchange_services_pb.rb +++ /dev/null @@ -1,86 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/dataexchange/v1beta1/dataexchange.proto for package 'Google.Cloud.Bigquery.DataExchange.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigquery/dataexchange/v1beta1/dataexchange_pb' - -module Google - module Cloud - module Bigquery - module DataExchange - module V1beta1 - module AnalyticsHubService - # The `AnalyticsHubService` API facilitates data sharing within and across - # organizations. It allows data providers to publish listings that reference - # shared datasets. With Analytics Hub, users can discover and search for - # listings that they have access to. Subscribers can view and subscribe to - # listings. When you subscribe to a listing, Analytics Hub creates a linked - # dataset in your project. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService' - - # Lists all data exchanges in a given project and location. - rpc :ListDataExchanges, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse - # Lists all data exchanges from projects in a given organization and - # location. - rpc :ListOrgDataExchanges, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse - # Gets the details of a data exchange. - rpc :GetDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange - # Creates a new data exchange. - rpc :CreateDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange - # Updates an existing data exchange. - rpc :UpdateDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange - # Deletes an existing data exchange. - rpc :DeleteDataExchange, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest, ::Google::Protobuf::Empty - # Lists all listings in a given project and location. - rpc :ListListings, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse - # Gets the details of a listing. - rpc :GetListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing - # Creates a new listing. - rpc :CreateListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing - # Updates an existing listing. - rpc :UpdateListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing - # Deletes a listing. - rpc :DeleteListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest, ::Google::Protobuf::Empty - # Subscribes to a listing. - # - # Currently, with Analytics Hub, you can create listings that - # reference only BigQuery datasets. - # Upon subscription to a listing for a BigQuery dataset, Analytics Hub - # creates a linked dataset in the subscriber's project. - rpc :SubscribeListing, ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest, ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse - # Gets the IAM policy. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the IAM policy. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the permissions that a caller has. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md deleted file mode 100644 index a8048c6a1a41..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Analytics Hub V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb deleted file mode 100644 index 7c55d8f22d46..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/cloud/bigquery/dataexchange/v1beta1/dataexchange.rb +++ /dev/null @@ -1,497 +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 Bigquery - module DataExchange - module V1beta1 - # A data exchange is a container that lets you share data. Along with the - # descriptive information about the data exchange, it contains listings that - # reference shared datasets. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the data exchange. - # e.g. `projects/myproject/locations/US/dataExchanges/123`. - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the data exchange. The display name must - # contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), - # spaces ( ), ampersands (&) and must not start or end with spaces. - # Default value is an empty string. - # Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the data exchange. The description must not contain Unicode - # non-characters as well as C0 and C1 control codes except tabs (HT), - # new lines (LF), carriage returns (CR), and page breaks (FF). - # Default value is an empty string. - # Max length: 2000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the data exchange. - # Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the data exchange. - # @!attribute [r] listing_count - # @return [::Integer] - # Output only. Number of listings contained in the data exchange. - # @!attribute [rw] icon - # @return [::String] - # Optional. Base64 encoded image representing the data exchange. Max Size: 3.0MiB - # Expected image dimensions are 512x512 pixels, however the API only - # performs validation on size of the encoded data. - # Note: For byte fields, the content of the fields are base64-encoded (which - # increases the size of the data by 33-36%) when using JSON on the wire. - class DataExchange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains details of the data provider. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the data provider. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the data provider. - # Max Length: 1000 bytes. - class DataProvider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains details of the listing publisher. - # @!attribute [rw] name - # @return [::String] - # Optional. Name of the listing publisher. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the listing publisher. - # Max Length: 1000 bytes. - class Publisher - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains the reference that identifies a destination bigquery dataset. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. A unique ID for this dataset, without the project name. The ID - # must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - # The maximum length is 1,024 characters. - # @!attribute [rw] project_id - # @return [::String] - # Required. The ID of the project containing this dataset. - class DestinationDatasetReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the destination bigquery dataset. - # @!attribute [rw] dataset_reference - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDatasetReference] - # Required. A reference that identifies the destination dataset. - # @!attribute [rw] friendly_name - # @return [::Google::Protobuf::StringValue] - # Optional. A descriptive name for the dataset. - # @!attribute [rw] description - # @return [::Google::Protobuf::StringValue] - # Optional. A user-friendly description of the dataset. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels associated with this dataset. You can use these - # to organize and group your datasets. - # You can set this property when inserting or updating a dataset. - # See https://cloud.google.com/resource-manager/docs/creating-managing-labels - # for more information. - # @!attribute [rw] location - # @return [::String] - # Required. The geographic location where the dataset should reside. See - # https://cloud.google.com/bigquery/docs/locations for supported - # locations. - class DestinationDataset - 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 - - # A listing is what gets published into a data exchange that a subscriber can - # subscribe to. It contains a reference to the data source along with - # descriptive information that will help subscribers find and subscribe the - # data. - # @!attribute [rw] bigquery_dataset - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing::BigQueryDatasetSource] - # Required. Shared dataset i.e. BigQuery dataset source. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the listing. - # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456` - # @!attribute [rw] display_name - # @return [::String] - # Required. Human-readable display name of the listing. The display name must contain - # only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces - # ( ), ampersands (&) and can't start or end with spaces. - # Default value is an empty string. - # Max length: 63 bytes. - # @!attribute [rw] description - # @return [::String] - # Optional. Short description of the listing. The description must not contain - # Unicode non-characters and C0 and C1 control codes except tabs (HT), - # new lines (LF), carriage returns (CR), and page breaks (FF). - # Default value is an empty string. - # Max length: 2000 bytes. - # @!attribute [rw] primary_contact - # @return [::String] - # Optional. Email or URL of the primary point of contact of the listing. - # Max Length: 1000 bytes. - # @!attribute [rw] documentation - # @return [::String] - # Optional. Documentation describing the listing. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing::State] - # Output only. Current state of the listing. - # @!attribute [rw] icon - # @return [::String] - # Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB - # Expected image dimensions are 512x512 pixels, however the API only - # performs validation on size of the encoded data. - # Note: For byte fields, the contents of the field are base64-encoded (which - # increases the size of the data by 33-36%) when using JSON on the wire. - # @!attribute [rw] data_provider - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataProvider] - # Optional. Details of the data provider who owns the source data. - # @!attribute [rw] categories - # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing::Category>] - # Optional. Categories of the listing. Up to two categories are allowed. - # @!attribute [rw] publisher - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Publisher] - # Optional. Details of the publisher who owns the listing and who can share - # the source data. - # @!attribute [rw] request_access - # @return [::String] - # Optional. Email or URL of the request access of the listing. - # Subscribers can use this reference to request access. - # Max Length: 1000 bytes. - class Listing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A reference to a shared dataset. It is an existing BigQuery dataset with a - # collection of objects such as tables and views that you want to share - # with subscribers. - # When subscriber's subscribe to a listing, Analytics Hub creates a linked - # dataset in - # the subscriber's project. A Linked dataset is an opaque, read-only BigQuery - # dataset that serves as a _symbolic link_ to a shared dataset. - # @!attribute [rw] dataset - # @return [::String] - # Resource name of the dataset source for this listing. - # e.g. `projects/myproject/datasets/123` - class BigQueryDatasetSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of the listing. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # Subscribable state. Users with dataexchange.listings.subscribe permission - # can subscribe to this listing. - ACTIVE = 1 - end - - # Listing categories. - module Category - CATEGORY_UNSPECIFIED = 0 - - CATEGORY_OTHERS = 1 - - CATEGORY_ADVERTISING_AND_MARKETING = 2 - - CATEGORY_COMMERCE = 3 - - CATEGORY_CLIMATE_AND_ENVIRONMENT = 4 - - CATEGORY_DEMOGRAPHICS = 5 - - CATEGORY_ECONOMICS = 6 - - CATEGORY_EDUCATION = 7 - - CATEGORY_ENERGY = 8 - - CATEGORY_FINANCIAL = 9 - - CATEGORY_GAMING = 10 - - CATEGORY_GEOSPATIAL = 11 - - CATEGORY_HEALTHCARE_AND_LIFE_SCIENCE = 12 - - CATEGORY_MEDIA = 13 - - CATEGORY_PUBLIC_SECTOR = 14 - - CATEGORY_RETAIL = 15 - - CATEGORY_SPORTS = 16 - - CATEGORY_SCIENCE_AND_RESEARCH = 17 - - CATEGORY_TRANSPORTATION_AND_LOGISTICS = 18 - - CATEGORY_TRAVEL_AND_TOURISM = 19 - end - end - - # Message for requesting the list of data exchanges. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the data exchanges. - # e.g. `projects/myproject/locations/US`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListDataExchangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of data exchanges. - # @!attribute [rw] data_exchanges - # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] - # The list of data exchanges. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListDataExchangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of data exchanges from projects in an - # organization and location. - # @!attribute [rw] organization - # @return [::String] - # Required. The organization resource path of the projects containing DataExchanges. - # e.g. `organizations/myorg/locations/US`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListOrgDataExchangesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing data exchanges in an organization and - # location. - # @!attribute [rw] data_exchanges - # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange>] - # The list of data exchanges. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListOrgDataExchangesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a data exchange. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the data exchange. - # e.g. `projects/myproject/locations/US/dataExchanges/123`. - class GetDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a data exchange. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the data exchange. - # e.g. `projects/myproject/locations/US`. - # @!attribute [rw] data_exchange_id - # @return [::String] - # Required. The ID of the data exchange. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Should not use characters that require URL-escaping, or characters - # outside of ASCII, spaces. - # Max length: 100 bytes. - # @!attribute [rw] data_exchange - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # Required. The data exchange to create. - class CreateDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a data exchange. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask specifies the fields to update in the data exchange - # resource. The fields specified in the - # `updateMask` are relative to the resource and are not a full request. - # @!attribute [rw] data_exchange - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange] - # Required. The data exchange to update. - class UpdateDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a data exchange. - # @!attribute [rw] name - # @return [::String] - # Required. The full name of the data exchange resource that you want to delete. - # For example, `projects/myproject/locations/US/dataExchanges/123`. - class DeleteDataExchangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting the list of listings. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/US/dataExchanges/123`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return in a single response page. Leverage - # the page tokens to iterate through the entire collection. - # @!attribute [rw] page_token - # @return [::String] - # Page token, returned by a previous call, to request the next page of - # results. - class ListListingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to the list of Listings. - # @!attribute [rw] listings - # @return [::Array<::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing>] - # The list of Listing. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of results. - class ListListingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a listing. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the listing. - # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - class GetListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a listing. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource path of the listing. - # e.g. `projects/myproject/locations/US/dataExchanges/123`. - # @!attribute [rw] listing_id - # @return [::String] - # Required. The ID of the listing to create. - # Must contain only Unicode letters, numbers (0-9), underscores (_). - # Should not use characters that require URL-escaping, or characters - # outside of ASCII, spaces. - # Max length: 100 bytes. - # @!attribute [rw] listing - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # Required. The listing to create. - class CreateListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a Listing. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Field mask specifies the fields to update in the listing resource. The - # fields specified in the `updateMask` are relative to the resource and are - # not a full request. - # @!attribute [rw] listing - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing] - # Required. The listing to update. - class UpdateListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a listing. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the listing to delete. - # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - class DeleteListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for subscribing to a listing. - # @!attribute [rw] destination_dataset - # @return [::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDataset] - # BigQuery destination dataset to create for the subscriber. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the listing that you want to subscribe to. - # e.g. `projects/myproject/locations/US/dataExchanges/123/listings/456`. - class SubscribeListingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response when you subscribe to a listing. - class SubscribeListingResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +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 Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +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 Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/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-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/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-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +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 - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile deleted file mode 100644 index 87ca6d431f0b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-data_exchange-v1beta1", path: "../" -else - gem "google-cloud-bigquery-data_exchange-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.rb deleted file mode 100644 index c5c3e8d5a71b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the create_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_data_exchange. -# -def create_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new - - # Call the create_data_exchange method. - result = client.create_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.rb deleted file mode 100644 index 1611914c6c44..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/create_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the create_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_listing. -# -def create_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new - - # Call the create_listing method. - result = client.create_listing request - - # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.rb deleted file mode 100644 index 2a170f67c4e9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the delete_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_data_exchange. -# -def delete_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.new - - # Call the delete_data_exchange method. - result = client.delete_data_exchange request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.rb deleted file mode 100644 index c92d3aff1a38..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/delete_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the delete_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_listing. -# -def delete_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.new - - # Call the delete_listing method. - result = client.delete_listing request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.rb deleted file mode 100644 index 3076ddb16087..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the get_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_data_exchange. -# -def get_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.new - - # Call the get_data_exchange method. - result = client.get_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb deleted file mode 100644 index 4543da253547..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the get_iam_policy call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.rb deleted file mode 100644 index ac7ef32ed868..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/get_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the get_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_listing. -# -def get_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.new - - # Call the get_listing method. - result = client.get_listing request - - # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.rb deleted file mode 100644 index 50c1431dd722..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_data_exchanges.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 analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the list_data_exchanges call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_data_exchanges. -# -def list_data_exchanges - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.new - - # Call the list_data_exchanges method. - result = client.list_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. - p item - end -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.rb deleted file mode 100644 index dddf015f5091..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_listings.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 analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the list_listings call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_listings. -# -def list_listings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.new - - # Call the list_listings method. - result = client.list_listings 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::Bigquery::DataExchange::V1beta1::Listing. - p item - end -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.rb deleted file mode 100644 index 0a3a4b12d7b9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/list_org_data_exchanges.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 analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the list_org_data_exchanges call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_org_data_exchanges. -# -def list_org_data_exchanges - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new - - # Call the list_org_data_exchanges method. - result = client.list_org_data_exchanges 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::Bigquery::DataExchange::V1beta1::DataExchange. - p item - end -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb deleted file mode 100644 index d3e096bd1bf1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the set_iam_policy call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.rb deleted file mode 100644 index 46ac028d39cd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/subscribe_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the subscribe_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#subscribe_listing. -# -def subscribe_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new - - # Call the subscribe_listing method. - result = client.subscribe_listing request - - # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.rb deleted file mode 100644 index c10c649a795a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/test_iam_permissions.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 analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the test_iam_permissions call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.rb deleted file mode 100644 index c9de8a92a423..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_data_exchange.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 analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the update_data_exchange call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_data_exchange. -# -def update_data_exchange - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new - - # Call the update_data_exchange method. - result = client.update_data_exchange request - - # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.rb deleted file mode 100644 index 35d7c03e9fd2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/analytics_hub_service/update_listing.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 analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync] -require "google/cloud/bigquery/data_exchange/v1beta1" - -## -# Snippet for the update_listing call in the AnalyticsHubService 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_listing. -# -def update_listing - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new - - # Call the update_listing method. - result = client.update_listing request - - # The returned object is of type Google::Cloud::Bigquery::DataExchange::V1beta1::Listing. - p result -end -# [END analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json deleted file mode 100644 index 0a0baa0b5b80..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.dataexchange.v1beta1.json +++ /dev/null @@ -1,615 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-data_exchange-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.dataexchange.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_ListDataExchanges_sync", - "title": "Snippet for the list_data_exchanges call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_data_exchanges.", - "file": "analytics_hub_service/list_data_exchanges.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_exchanges", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_data_exchanges", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListDataExchanges", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.ListDataExchanges", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_ListOrgDataExchanges_sync", - "title": "Snippet for the list_org_data_exchanges call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_org_data_exchanges.", - "file": "analytics_hub_service/list_org_data_exchanges.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_org_data_exchanges", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_org_data_exchanges", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListOrgDataExchanges", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.ListOrgDataExchanges", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_GetDataExchange_sync", - "title": "Snippet for the get_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_data_exchange.", - "file": "analytics_hub_service/get_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_exchange", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetDataExchange", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.GetDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_CreateDataExchange_sync", - "title": "Snippet for the create_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_data_exchange.", - "file": "analytics_hub_service/create_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_exchange", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateDataExchange", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.CreateDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_UpdateDataExchange_sync", - "title": "Snippet for the update_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_data_exchange.", - "file": "analytics_hub_service/update_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_exchange", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateDataExchange", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.UpdateDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_DeleteDataExchange_sync", - "title": "Snippet for the delete_data_exchange call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_data_exchange.", - "file": "analytics_hub_service/delete_data_exchange.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_exchange", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_data_exchange", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteDataExchange", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.DeleteDataExchange", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_ListListings_sync", - "title": "Snippet for the list_listings call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_listings.", - "file": "analytics_hub_service/list_listings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_listings", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#list_listings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "ListListings", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.ListListings", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_GetListing_sync", - "title": "Snippet for the get_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_listing.", - "file": "analytics_hub_service/get_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_listing", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetListing", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.GetListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_CreateListing_sync", - "title": "Snippet for the create_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_listing.", - "file": "analytics_hub_service/create_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_listing", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#create_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "CreateListing", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.CreateListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_UpdateListing_sync", - "title": "Snippet for the update_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_listing.", - "file": "analytics_hub_service/update_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_listing", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#update_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "UpdateListing", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.UpdateListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_DeleteListing_sync", - "title": "Snippet for the delete_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_listing.", - "file": "analytics_hub_service/delete_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_listing", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#delete_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "DeleteListing", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.DeleteListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_SubscribeListing_sync", - "title": "Snippet for the subscribe_listing call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#subscribe_listing.", - "file": "analytics_hub_service/subscribe_listing.rb", - "language": "RUBY", - "client_method": { - "short_name": "subscribe_listing", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#subscribe_listing", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SubscribeListing", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.SubscribeListing", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_iam_policy.", - "file": "analytics_hub_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.GetIamPolicy", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#set_iam_policy.", - "file": "analytics_hub_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.SetIamPolicy", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "analyticshub_v1beta1_generated_AnalyticsHubService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the AnalyticsHubService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#test_iam_permissions.", - "file": "analytics_hub_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "AnalyticsHubService::Client", - "full_name": "::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService.TestIamPermissions", - "service": { - "short_name": "AnalyticsHubService", - "full_name": "google.cloud.bigquery.dataexchange.v1beta1.AnalyticsHubService" - } - } - }, - "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-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb deleted file mode 100644 index be0aaf144603..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_paths_test.rb +++ /dev/null @@ -1,91 +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/bigquery/data_exchange/v1beta1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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_data_exchange_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_exchange_path project: "value0", location: "value1", data_exchange: "value2" - assert_equal "projects/value0/locations/value1/dataExchanges/value2", path - end - end - - def test_dataset_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project: "value0", dataset: "value1" - assert_equal "projects/value0/datasets/value1", path - end - end - - def test_listing_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.listing_path project: "value0", location: "value1", data_exchange: "value2", listing: "value3" - assert_equal "projects/value0/locations/value1/dataExchanges/value2/listings/value3", 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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb deleted file mode 100644 index e08fd16717a1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service_test.rb +++ /dev/null @@ -1,1024 +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/bigquery/dataexchange/v1beta1/dataexchange_pb" -require "google/cloud/bigquery/data_exchange/v1beta1/analytics_hub_service" - -class ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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_data_exchanges - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesResponse.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_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_exchanges, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest, 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_data_exchanges_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_exchanges({ 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_data_exchanges 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_data_exchanges ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.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_data_exchanges({ 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_data_exchanges(::Google::Cloud::Bigquery::DataExchange::V1beta1::ListDataExchangesRequest.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_data_exchanges_client_stub.call_rpc_count - end - end - - def test_list_org_data_exchanges - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesResponse.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. - organization = "hello world" - page_size = 42 - page_token = "hello world" - - list_org_data_exchanges_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_org_data_exchanges, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest, request - assert_equal "hello world", request["organization"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_org_data_exchanges_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_org_data_exchanges({ organization: organization, 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_org_data_exchanges organization: organization, 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_org_data_exchanges ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges({ organization: organization, 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_org_data_exchanges(::Google::Cloud::Bigquery::DataExchange::V1beta1::ListOrgDataExchangesRequest.new(organization: organization, 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_org_data_exchanges_client_stub.call_rpc_count - end - end - - def test_get_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.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_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_exchange({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_exchange name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_exchange({ 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_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::GetDataExchangeRequest.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_data_exchange_client_stub.call_rpc_count - end - end - - def test_create_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.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" - data_exchange_id = "hello world" - data_exchange = {} - - create_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["data_exchange_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange), request["data_exchange"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_exchange parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_exchange({ parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateDataExchangeRequest.new(parent: parent, data_exchange_id: data_exchange_id, data_exchange: data_exchange), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_exchange_client_stub.call_rpc_count - end - end - - def test_update_data_exchange - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - data_exchange = {} - - update_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DataExchange), request["data_exchange"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_exchange update_mask: update_mask, data_exchange: data_exchange do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_exchange({ update_mask: update_mask, data_exchange: data_exchange }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateDataExchangeRequest.new(update_mask: update_mask, data_exchange: data_exchange), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_exchange_client_stub.call_rpc_count - end - end - - def test_delete_data_exchange - # 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_data_exchange_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_exchange, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_exchange_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_exchange({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_exchange name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_exchange ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_exchange({ 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_data_exchange(::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteDataExchangeRequest.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_data_exchange_client_stub.call_rpc_count - end - end - - def test_list_listings - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsResponse.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_listings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_listings, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest, 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_listings_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_listings({ 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_listings 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_listings ::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.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_listings({ 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_listings(::Google::Cloud::Bigquery::DataExchange::V1beta1::ListListingsRequest.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_listings_client_stub.call_rpc_count - end - end - - def test_get_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.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_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_listing, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_listing({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_listing name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_listing({ 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_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::GetListingRequest.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_listing_client_stub.call_rpc_count - end - end - - def test_create_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.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" - listing_id = "hello world" - listing = {} - - create_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_listing, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["listing_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing), request["listing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_listing parent: parent, listing_id: listing_id, listing: listing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_listing({ parent: parent, listing_id: listing_id, listing: listing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::CreateListingRequest.new(parent: parent, listing_id: listing_id, listing: listing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_listing_client_stub.call_rpc_count - end - end - - def test_update_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - listing = {} - - update_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_listing, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::Listing), request["listing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_listing({ update_mask: update_mask, listing: listing }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_listing update_mask: update_mask, listing: listing do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new(update_mask: update_mask, listing: listing) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_listing({ update_mask: update_mask, listing: listing }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::UpdateListingRequest.new(update_mask: update_mask, listing: listing), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_listing_client_stub.call_rpc_count - end - end - - def test_delete_listing - # 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_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_listing, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_listing({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_listing name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_listing({ 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_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::DeleteListingRequest.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_listing_client_stub.call_rpc_count - end - end - - def test_subscribe_listing - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingResponse.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. - destination_dataset = {} - name = "hello world" - - subscribe_listing_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :subscribe_listing, name - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataExchange::V1beta1::DestinationDataset), request["destination_dataset"] - assert_equal :destination_dataset, request.destination - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, subscribe_listing_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.subscribe_listing({ destination_dataset: destination_dataset, name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.subscribe_listing destination_dataset: destination_dataset, name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.subscribe_listing ::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.subscribe_listing({ destination_dataset: destination_dataset, name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.subscribe_listing(::Google::Cloud::Bigquery::DataExchange::V1beta1::SubscribeListingRequest.new(destination_dataset: destination_dataset, name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, subscribe_listing_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::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::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::DataExchange::V1beta1::AnalyticsHubService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_exchange-v1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.repo-metadata.json deleted file mode 100644 index bb5cc865dee4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "bigquerydatapolicy.googleapis.com", - "api_shortname": "bigquerydatapolicy", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest", - "distribution_name": "google-cloud-bigquery-data_policies-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigquerydatapolicy", - "name_pretty": "BigQuery Data Policy Service V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml deleted file mode 100644 index 44bd142b9ba7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.yardopts deleted file mode 100644 index 31aca60843a9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Data Policy Service 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-bigquery-data_policies-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/AUTHENTICATION.md deleted file mode 100644 index 266fe5d650c4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-data_policies-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-bigquery-data_policies-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/bigquery/data_policies/v1" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/data_policies/v1" - -::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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-bigquery-data_policies-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/bigquery/data_policies/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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-bigquery-data_policies-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/README.md deleted file mode 100644 index 698192733f1e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Data Policy Service V1 API - -Allows users to manage BigQuery data policies. - -The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Data Policy Service V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-data_policies](https://rubygems.org/gems/google-cloud-bigquery-data_policies). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-data_policies-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/bigquerydatapolicy.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/data_policies/v1" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new -request = ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new # (request fields as keyword arguments...) -response = client.create_data_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/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/bigquery/data_policies/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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-bigquery-data_policies`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-data_policies-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-bigquery-data_policies`. -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-bigquery-data_policies-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-bigquery-data_policies-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/Rakefile deleted file mode 100644 index 6191502be580..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/data_policies/v1/data_policy_service/credentials" - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-data_policies-v1" - header "google-cloud-bigquery-data_policies-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-data_policies-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-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-bigquery-data_policies-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/gapic_metadata.json deleted file mode 100644 index 8058dfc06b6d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.datapolicies.v1", - "libraryPackage": "::Google::Cloud::Bigquery::DataPolicies::V1", - "services": { - "DataPolicyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client", - "rpcs": { - "CreateDataPolicy": { - "methods": [ - "create_data_policy" - ] - }, - "UpdateDataPolicy": { - "methods": [ - "update_data_policy" - ] - }, - "RenameDataPolicy": { - "methods": [ - "rename_data_policy" - ] - }, - "DeleteDataPolicy": { - "methods": [ - "delete_data_policy" - ] - }, - "GetDataPolicy": { - "methods": [ - "get_data_policy" - ] - }, - "ListDataPolicies": { - "methods": [ - "list_data_policies" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec deleted file mode 100644 index cd2d174af029..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/google-cloud-bigquery-data_policies-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/data_policies/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-data_policies-v1" - gem.version = Google::Cloud::Bigquery::DataPolicies::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details." - gem.summary = "Allows users to manage BigQuery data policies." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-v1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-v1.rb deleted file mode 100644 index a8b8ca94901d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google-cloud-bigquery-data_policies-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/bigquery/data_policies/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb deleted file mode 100644 index dd9ce0608822..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/data_policies/v1/data_policy_service" -require "google/cloud/bigquery/data_policies/v1/version" - -module Google - module Cloud - module Bigquery - module DataPolicies - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_policies/v1" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/data_policies/v1" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/data_policies/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb deleted file mode 100644 index 2cbe6062a0d2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_policies/v1/version" - -require "google/cloud/bigquery/data_policies/v1/data_policy_service/credentials" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/paths" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/client" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - ## - # Data Policy Service provides APIs for managing the label-policy bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_policies/v1/data_policy_service" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - module DataPolicyService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_policy_service", "helpers.rb" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb deleted file mode 100644 index 0dca412d4c0a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/client.rb +++ /dev/null @@ -1,1323 +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/bigquery/datapolicies/v1/datapolicy_pb" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - module DataPolicyService - ## - # Client for the DataPolicyService service. - # - # Data Policy Service provides APIs for managing the label-policy bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatapolicy.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_policy_service_stub - - ## - # Configure the DataPolicyService Client class. - # - # See {::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataPolicyService clients - # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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", "Bigquery", "DataPolicies", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_data_policy.timeout = 60.0 - default_config.rpcs.create_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_policy.timeout = 60.0 - default_config.rpcs.update_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.rename_data_policy.timeout = 60.0 - default_config.rpcs.rename_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_data_policy.timeout = 60.0 - default_config.rpcs.delete_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_policy.timeout = 60.0 - default_config.rpcs.get_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_policies.timeout = 60.0 - default_config.rpcs.list_data_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - default_config.rpcs.set_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.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 DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::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 - @data_policy_service_stub.universe_domain - end - - ## - # Create a new DataPolicyService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataPolicyService 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/bigquery/datapolicies/v1/datapolicy_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 - - @data_policy_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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 - ) - - @data_policy_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_policy_service_stub.logger - end - - # Service calls - - ## - # Creates a new data policy under a project with the given `dataPolicyId` - # (used as the display name), policy tag, and data policy type. - # - # @overload create_data_policy(request, options = nil) - # Pass arguments to `create_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(parent: nil, data_policy: nil) - # Pass arguments to `create_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project that the data policy will belong to. - # The format is `projects/{project_number}/locations/{location_id}`. - # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] - # Required. The data policy to create. The `name` field does not need to be - # provided for the data policy creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new - # - # # Call the create_data_policy method. - # result = client.create_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def create_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :create_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the metadata for an existing data policy. The target data policy - # can be specified by the resource name. - # - # @overload update_data_policy(request, options = nil) - # Pass arguments to `update_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(data_policy: nil, update_mask: nil) - # Pass arguments to `update_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] - # Required. Update the data policy's metadata. - # - # The target data policy is determined by the `name` field. - # Other fields are updated to the specified values based on the field masks. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # If not set, defaults to all of the fields that are allowed to update. - # - # Updates to the `name` and `dataPolicyId` fields are not allowed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new - # - # # Call the update_data_policy method. - # result = client.update_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def update_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.data_policy&.name - header_params["data_policy.name"] = request.data_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :update_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Renames the id (display name) of the specified data policy. - # - # @overload rename_data_policy(request, options = nil) - # Pass arguments to `rename_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rename_data_policy(name: nil, new_data_policy_id: nil) - # Pass arguments to `rename_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the data policy to rename. The format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - # @param new_data_policy_id [::String] - # Required. The new data policy id. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new - # - # # Call the rename_data_policy method. - # result = client.rename_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def rename_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest - - # Converts hash 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.rename_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.rename_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rename_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :rename_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the data policy specified by its resource name. - # - # @overload delete_data_policy(request, options = nil) - # Pass arguments to `delete_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(name: nil) - # Pass arguments to `delete_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the data policy to delete. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new - # - # # Call the delete_data_policy method. - # result = client.delete_data_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :delete_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the data policy specified by its resource name. - # - # @overload get_data_policy(request, options = nil) - # Pass arguments to `get_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(name: nil) - # Pass arguments to `get_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the requested data policy. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new - # - # # Call the get_data_policy method. - # result = client.get_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def get_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :get_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all of the data policies in the specified parent project. - # - # @overload list_data_policies(request, options = nil) - # Pass arguments to `list_data_policies` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policies(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_policies` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the project for which to list data policies. - # Format is `projects/{project_number}/locations/{location_id}`. - # @param page_size [::Integer] - # The maximum number of data policies to return. Must be a value between 1 - # and 1000. - # If not set, defaults to 50. - # @param page_token [::String] - # The `nextPageToken` value returned from a previous list request, if any. If - # not set, defaults to an empty string. - # @param filter [::String] - # Filters the data policies by policy tags that they - # are associated with. Currently filter only supports - # "policy_tag" based filtering and OR based predicates. Sample - # filter can be "policy_tag: - # projects/1/locations/us/taxonomies/2/policyTags/3". - # You may also use wildcard such as "policy_tag: - # projects/1/locations/us/taxonomies/2*". Please note that OR predicates - # cannot be used with wildcard filters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.new - # - # # Call the list_data_policies method. - # result = client.list_data_policies 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::Bigquery::DataPolicies::V1::DataPolicy. - # p item - # end - # - def list_data_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest - - # Converts hash 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_data_policies.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::Bigquery::DataPolicies::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_data_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :list_data_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_policy_service_stub, :list_data_policies, 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 IAM policy for the specified data policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.resource - header_params["resource"] = request.resource - 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_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified data policy. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.resource - header_params["resource"] = request.resource - 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.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the caller's permission on the specified data policy resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Bigquery::DataPolicies::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.resource - header_params["resource"] = request.resource - 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.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :test_iam_permissions, 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 DataPolicyService API. - # - # This class represents the configuration for DataPolicyService, - # 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::Bigquery::DataPolicies::V1::DataPolicyService::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 - # # create_data_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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 = "bigquerydatapolicy.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 DataPolicyService 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 `create_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_policy - ## - # RPC-specific configuration for `update_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_policy - ## - # RPC-specific configuration for `rename_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_data_policy - ## - # RPC-specific configuration for `delete_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_policy - ## - # RPC-specific configuration for `get_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_policy - ## - # RPC-specific configuration for `list_data_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_policies - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - create_data_policy_config = parent_rpcs.create_data_policy if parent_rpcs.respond_to? :create_data_policy - @create_data_policy = ::Gapic::Config::Method.new create_data_policy_config - update_data_policy_config = parent_rpcs.update_data_policy if parent_rpcs.respond_to? :update_data_policy - @update_data_policy = ::Gapic::Config::Method.new update_data_policy_config - rename_data_policy_config = parent_rpcs.rename_data_policy if parent_rpcs.respond_to? :rename_data_policy - @rename_data_policy = ::Gapic::Config::Method.new rename_data_policy_config - delete_data_policy_config = parent_rpcs.delete_data_policy if parent_rpcs.respond_to? :delete_data_policy - @delete_data_policy = ::Gapic::Config::Method.new delete_data_policy_config - get_data_policy_config = parent_rpcs.get_data_policy if parent_rpcs.respond_to? :get_data_policy - @get_data_policy = ::Gapic::Config::Method.new get_data_policy_config - list_data_policies_config = parent_rpcs.list_data_policies if parent_rpcs.respond_to? :list_data_policies - @list_data_policies = ::Gapic::Config::Method.new list_data_policies_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb deleted file mode 100644 index aa0718faf149..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/credentials.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - module DataPolicyService - # Credentials for the DataPolicyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.rb deleted file mode 100644 index 72ac3bb9cf7e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/paths.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 Cloud - module Bigquery - module DataPolicies - module V1 - module DataPolicyService - # Path helper methods for the DataPolicyService API. - module Paths - ## - # Create a fully-qualified DataPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataPolicies/{data_policy}` - # - # @param project [String] - # @param location [String] - # @param data_policy [String] - # - # @return [::String] - def data_policy_path project:, location:, data_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataPolicies/#{data_policy}" - 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 - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.rb deleted file mode 100644 index ccca008bec8d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_policies/v1/version" - -require "google/cloud/bigquery/data_policies/v1/data_policy_service/credentials" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/paths" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - ## - # Data Policy Service provides APIs for managing the label-policy bindings. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - module DataPolicyService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb deleted file mode 100644 index 9841d00b291d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/client.rb +++ /dev/null @@ -1,1217 +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/bigquery/datapolicies/v1/datapolicy_pb" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - module DataPolicyService - module Rest - ## - # REST client for the DataPolicyService service. - # - # Data Policy Service provides APIs for managing the label-policy bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatapolicy.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_policy_service_stub - - ## - # Configure the DataPolicyService Client class. - # - # See {::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataPolicyService clients - # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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", "Bigquery", "DataPolicies", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_data_policy.timeout = 60.0 - default_config.rpcs.create_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_policy.timeout = 60.0 - default_config.rpcs.update_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.rename_data_policy.timeout = 60.0 - default_config.rpcs.rename_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_data_policy.timeout = 60.0 - default_config.rpcs.delete_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_policy.timeout = 60.0 - default_config.rpcs.get_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_policies.timeout = 60.0 - default_config.rpcs.list_data_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - default_config.rpcs.set_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.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 DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::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 - @data_policy_service_stub.universe_domain - end - - ## - # Create a new DataPolicyService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataPolicyService 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 - - @data_policy_service_stub = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_policy_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_policy_service_stub.logger - end - - # Service calls - - ## - # Creates a new data policy under a project with the given `dataPolicyId` - # (used as the display name), policy tag, and data policy type. - # - # @overload create_data_policy(request, options = nil) - # Pass arguments to `create_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(parent: nil, data_policy: nil) - # Pass arguments to `create_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project that the data policy will belong to. - # The format is `projects/{project_number}/locations/{location_id}`. - # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] - # Required. The data policy to create. The `name` field does not need to be - # provided for the data policy creation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new - # - # # Call the create_data_policy method. - # result = client.create_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def create_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.create_data_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the metadata for an existing data policy. The target data policy - # can be specified by the resource name. - # - # @overload update_data_policy(request, options = nil) - # Pass arguments to `update_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(data_policy: nil, update_mask: nil) - # Pass arguments to `update_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy, ::Hash] - # Required. Update the data policy's metadata. - # - # The target data policy is determined by the `name` field. - # Other fields are updated to the specified values based on the field masks. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # If not set, defaults to all of the fields that are allowed to update. - # - # Updates to the `name` and `dataPolicyId` fields are not allowed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new - # - # # Call the update_data_policy method. - # result = client.update_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def update_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.update_data_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Renames the id (display name) of the specified data policy. - # - # @overload rename_data_policy(request, options = nil) - # Pass arguments to `rename_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rename_data_policy(name: nil, new_data_policy_id: nil) - # Pass arguments to `rename_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the data policy to rename. The format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - # @param new_data_policy_id [::String] - # Required. The new data policy id. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new - # - # # Call the rename_data_policy method. - # result = client.rename_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def rename_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest - - # Converts hash 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.rename_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.rename_data_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rename_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.rename_data_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the data policy specified by its resource name. - # - # @overload delete_data_policy(request, options = nil) - # Pass arguments to `delete_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(name: nil) - # Pass arguments to `delete_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the data policy to delete. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new - # - # # Call the delete_data_policy method. - # result = client.delete_data_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.delete_data_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the data policy specified by its resource name. - # - # @overload get_data_policy(request, options = nil) - # Pass arguments to `get_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(name: nil) - # Pass arguments to `get_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the requested data policy. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new - # - # # Call the get_data_policy method. - # result = client.get_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - # p result - # - def get_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_data_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.get_data_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all of the data policies in the specified parent project. - # - # @overload list_data_policies(request, options = nil) - # Pass arguments to `list_data_policies` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policies(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_policies` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the project for which to list data policies. - # Format is `projects/{project_number}/locations/{location_id}`. - # @param page_size [::Integer] - # The maximum number of data policies to return. Must be a value between 1 - # and 1000. - # If not set, defaults to 50. - # @param page_token [::String] - # The `nextPageToken` value returned from a previous list request, if any. If - # not set, defaults to an empty string. - # @param filter [::String] - # Filters the data policies by policy tags that they - # are associated with. Currently filter only supports - # "policy_tag" based filtering and OR based predicates. Sample - # filter can be "policy_tag: - # projects/1/locations/us/taxonomies/2/policyTags/3". - # You may also use wildcard such as "policy_tag: - # projects/1/locations/us/taxonomies/2*". Please note that OR predicates - # cannot be used with wildcard filters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.new - # - # # Call the list_data_policies method. - # result = client.list_data_policies 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::Bigquery::DataPolicies::V1::DataPolicy. - # p item - # end - # - def list_data_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest - - # Converts hash 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_data_policies.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::Bigquery::DataPolicies::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_data_policies.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.list_data_policies request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_policy_service_stub, :list_data_policies, "data_policies", 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 IAM policy for the specified data policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified data policy. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::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.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the caller's permission on the specified data policy resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Bigquery::DataPolicies::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.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.test_iam_permissions 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 DataPolicyService REST API. - # - # This class represents the configuration for DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::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 - # # create_data_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "bigquerydatapolicy.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 DataPolicyService 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 `create_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_policy - ## - # RPC-specific configuration for `update_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_policy - ## - # RPC-specific configuration for `rename_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :rename_data_policy - ## - # RPC-specific configuration for `delete_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_policy - ## - # RPC-specific configuration for `get_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_policy - ## - # RPC-specific configuration for `list_data_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_policies - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - create_data_policy_config = parent_rpcs.create_data_policy if parent_rpcs.respond_to? :create_data_policy - @create_data_policy = ::Gapic::Config::Method.new create_data_policy_config - update_data_policy_config = parent_rpcs.update_data_policy if parent_rpcs.respond_to? :update_data_policy - @update_data_policy = ::Gapic::Config::Method.new update_data_policy_config - rename_data_policy_config = parent_rpcs.rename_data_policy if parent_rpcs.respond_to? :rename_data_policy - @rename_data_policy = ::Gapic::Config::Method.new rename_data_policy_config - delete_data_policy_config = parent_rpcs.delete_data_policy if parent_rpcs.respond_to? :delete_data_policy - @delete_data_policy = ::Gapic::Config::Method.new delete_data_policy_config - get_data_policy_config = parent_rpcs.get_data_policy if parent_rpcs.respond_to? :get_data_policy - @get_data_policy = ::Gapic::Config::Method.new get_data_policy_config - list_data_policies_config = parent_rpcs.list_data_policies if parent_rpcs.respond_to? :list_data_policies - @list_data_policies = ::Gapic::Config::Method.new list_data_policies_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb deleted file mode 100644 index fb02c8818682..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/data_policy_service/rest/service_stub.rb +++ /dev/null @@ -1,638 +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/bigquery/datapolicies/v1/datapolicy_pb" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - module DataPolicyService - module Rest - ## - # REST service stub for the DataPolicyService 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 create_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest] - # 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::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # A result object deserialized from the server's reply - def create_data_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_data_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest] - # 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::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # A result object deserialized from the server's reply - def update_data_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_data_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rename_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest] - # 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::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # A result object deserialized from the server's reply - def rename_data_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rename_data_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rename_data_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest] - # 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_data_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_data_policy", - 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 get_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest] - # 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::Bigquery::DataPolicies::V1::DataPolicy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # A result object deserialized from the server's reply - def get_data_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_data_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policies REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest] - # 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::Bigquery::DataPolicies::V1::ListDataPoliciesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse] - # A result object deserialized from the server's reply - def list_data_policies request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_policies_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_data_policies", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse.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_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # 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::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # 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::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # 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::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.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_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest] - # 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_data_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataPolicies", - body: "data_policy", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest] - # 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_data_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_policy.name}", - body: "data_policy", - matches: [ - ["data_policy.name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rename_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rename_data_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:rename", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest] - # 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_data_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_policy REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest] - # 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_data_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_policies REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest] - # 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_data_policies_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataPolicies", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # 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_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:getIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/dataPolicies/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb deleted file mode 100644 index be172fff042a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" -require "google/cloud/bigquery/data_policies/v1/version" - -module Google - module Cloud - module Bigquery - module DataPolicies - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/data_policies/v1/rest" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb deleted file mode 100644 index b1678e9b1786..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/data_policies/v1/version.rb +++ /dev/null @@ -1,30 +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 Bigquery - module DataPolicies - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb deleted file mode 100644 index 1d344beaf468..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/datapolicies/v1/datapolicy.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/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n6google/cloud/bigquery/datapolicies/v1/datapolicy.proto\x12%google.cloud.bigquery.datapolicies.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xac\x01\n\x17\x43reateDataPolicyRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\x12K\n\x0b\x64\x61ta_policy\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.datapolicies.v1.DataPolicyB\x03\xe0\x41\x02\"\x97\x01\n\x17UpdateDataPolicyRequest\x12K\n\x0b\x64\x61ta_policy\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.datapolicies.v1.DataPolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"M\n\x17RenameDataPolicyRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12new_data_policy_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"]\n\x17\x44\x65leteDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"Z\n\x14GetDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"\x96\x01\n\x17ListDataPoliciesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\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\"}\n\x18ListDataPoliciesResponse\x12H\n\rdata_policies\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x84\x04\n\nDataPolicy\x12\x14\n\npolicy_tag\x18\x04 \x01(\tH\x00\x12W\n\x13\x64\x61ta_masking_policy\x18\x05 \x01(\x0b\x32\x38.google.cloud.bigquery.datapolicies.v1.DataMaskingPolicyH\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x10\x64\x61ta_policy_type\x18\x02 \x01(\x0e\x32@.google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType\x12\x16\n\x0e\x64\x61ta_policy_id\x18\x03 \x01(\t\"m\n\x0e\x44\x61taPolicyType\x12 \n\x1c\x44\x41TA_POLICY_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1c\x43OLUMN_LEVEL_SECURITY_POLICY\x10\x03\x12\x17\n\x13\x44\x41TA_MASKING_POLICY\x10\x02:u\xea\x41r\n,bigquerydatapolicy.googleapis.com/DataPolicy\x12\x42projects/{project}/locations/{location}/dataPolicies/{data_policy}B\x10\n\x0ematching_labelB\x08\n\x06policy\"\xfd\x02\n\x11\x44\x61taMaskingPolicy\x12n\n\x15predefined_expression\x18\x01 \x01(\x0e\x32M.google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpressionH\x00\x12\x11\n\x07routine\x18\x03 \x01(\tH\x00\"\xce\x01\n\x14PredefinedExpression\x12%\n!PREDEFINED_EXPRESSION_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x03\x12\x0f\n\x0b\x41LWAYS_NULL\x10\x05\x12\x19\n\x15\x44\x45\x46\x41ULT_MASKING_VALUE\x10\x07\x12\x18\n\x14LAST_FOUR_CHARACTERS\x10\t\x12\x19\n\x15\x46IRST_FOUR_CHARACTERS\x10\n\x12\x0e\n\nEMAIL_MASK\x10\x0c\x12\x12\n\x0e\x44\x41TE_YEAR_MASK\x10\rB\x14\n\x12masking_expression2\x90\x0f\n\x11\x44\x61taPolicyService\x12\xe1\x01\n\x10\x43reateDataPolicy\x12>.google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"Z\xda\x41\x12parent,data_policy\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/dataPolicies:\x0b\x64\x61ta_policy\x12\xf2\x01\n\x10UpdateDataPolicy\x12>.google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"k\xda\x41\x17\x64\x61ta_policy,update_mask\x82\xd3\xe4\x93\x02K2.google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"\\\xda\x41\x17name,new_data_policy_id\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/locations/*/dataPolicies/*}:rename:\x01*\x12\xab\x01\n\x10\x44\x65leteDataPolicy\x12>.google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/dataPolicies/*}\x12\xc0\x01\n\rGetDataPolicy\x12;.google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest\x1a\x31.google.cloud.bigquery.datapolicies.v1.DataPolicy\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/dataPolicies/*}\x12\xd6\x01\n\x10ListDataPolicies\x12>.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest\x1a?.google.cloud.bigquery.datapolicies.v1.ListDataPoliciesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/dataPolicies\x12\x97\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy:\x01*\x12\x97\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy:\x01*\x12\xbd\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"R\x82\xd3\xe4\x93\x02L\"G/v1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions:\x01*\x1a~\xca\x41!bigquerydatapolicy.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\x89\x02\n)com.google.cloud.bigquery.datapolicies.v1B\x0f\x44\x61taPolicyProtoP\x01ZMcloud.google.com/go/bigquery/datapolicies/apiv1/datapoliciespb;datapoliciespb\xaa\x02%Google.Cloud.BigQuery.DataPolicies.V1\xca\x02%Google\\Cloud\\BigQuery\\DataPolicies\\V1\xea\x02)Google::Cloud::Bigquery::DataPolicies::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - CreateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.CreateDataPolicyRequest").msgclass - UpdateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.UpdateDataPolicyRequest").msgclass - RenameDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.RenameDataPolicyRequest").msgclass - DeleteDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DeleteDataPolicyRequest").msgclass - GetDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.GetDataPolicyRequest").msgclass - ListDataPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.ListDataPoliciesRequest").msgclass - ListDataPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.ListDataPoliciesResponse").msgclass - DataPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataPolicy").msgclass - DataPolicy::DataPolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataPolicy.DataPolicyType").enummodule - DataMaskingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy").msgclass - DataMaskingPolicy::PredefinedExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1.DataMaskingPolicy.PredefinedExpression").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb deleted file mode 100644 index e36a853b040a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/lib/google/cloud/bigquery/datapolicies/v1/datapolicy_services_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/datapolicies/v1/datapolicy.proto for package 'Google.Cloud.Bigquery.DataPolicies.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigquery/datapolicies/v1/datapolicy_pb' - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1 - module DataPolicyService - # Data Policy Service provides APIs for managing the label-policy bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.datapolicies.v1.DataPolicyService' - - # Creates a new data policy under a project with the given `dataPolicyId` - # (used as the display name), policy tag, and data policy type. - rpc :CreateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy - # Updates the metadata for an existing data policy. The target data policy - # can be specified by the resource name. - rpc :UpdateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy - # Renames the id (display name) of the specified data policy. - rpc :RenameDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy - # Deletes the data policy specified by its resource name. - rpc :DeleteDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, ::Google::Protobuf::Empty - # Gets the data policy specified by its resource name. - rpc :GetDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy - # List all of the data policies in the specified parent project. - rpc :ListDataPolicies, ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse - # Gets the IAM policy for the specified data policy. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the IAM policy for the specified data policy. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the caller's permission on the specified data policy resource. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md deleted file mode 100644 index 62ba9a3872ea..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Data Policy Service 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-bigquery-data_policies-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb deleted file mode 100644 index 12aef1a09eec..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/cloud/bigquery/datapolicies/v1/datapolicy.rb +++ /dev/null @@ -1,269 +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 Bigquery - module DataPolicies - module V1 - # Request message for the CreateDataPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project that the data policy will belong to. - # The format is `projects/{project_number}/locations/{location_id}`. - # @!attribute [rw] data_policy - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # Required. The data policy to create. The `name` field does not need to be - # provided for the data policy creation. - class CreateDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the UpdateDataPolicy method. - # @!attribute [rw] data_policy - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy] - # Required. Update the data policy's metadata. - # - # The target data policy is determined by the `name` field. - # Other fields are updated to the specified values based on the field masks. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # If not set, defaults to all of the fields that are allowed to update. - # - # Updates to the `name` and `dataPolicyId` fields are not allowed. - class UpdateDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the RenameDataPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the data policy to rename. The format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}` - # @!attribute [rw] new_data_policy_id - # @return [::String] - # Required. The new data policy id. - class RenameDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteDataPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the data policy to delete. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - class DeleteDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetDataPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the requested data policy. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - class GetDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListDataPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project for which to list data policies. - # Format is `projects/{project_number}/locations/{location_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data policies to return. Must be a value between 1 - # and 1000. - # If not set, defaults to 50. - # @!attribute [rw] page_token - # @return [::String] - # The `nextPageToken` value returned from a previous list request, if any. If - # not set, defaults to an empty string. - # @!attribute [rw] filter - # @return [::String] - # Filters the data policies by policy tags that they - # are associated with. Currently filter only supports - # "policy_tag" based filtering and OR based predicates. Sample - # filter can be "policy_tag: - # projects/1/locations/us/taxonomies/2/policyTags/3". - # You may also use wildcard such as "policy_tag: - # projects/1/locations/us/taxonomies/2*". Please note that OR predicates - # cannot be used with wildcard filters. - class ListDataPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListDataPolicies method. - # @!attribute [rw] data_policies - # @return [::Array<::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy>] - # Data policies that belong to the requested project. - # @!attribute [rw] next_page_token - # @return [::String] - # Token used to retrieve the next page of results, or empty if there are no - # more results. - class ListDataPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the label-policy binding. - # @!attribute [rw] policy_tag - # @return [::String] - # Policy tag resource name, in the format of - # `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. - # @!attribute [rw] data_masking_policy - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy] - # The data masking policy that specifies the data masking rule to use. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of this data policy, in the format of - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # @!attribute [rw] data_policy_type - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy::DataPolicyType] - # Type of data policy. - # @!attribute [rw] data_policy_id - # @return [::String] - # User-assigned (human readable) ID of the data policy that needs to be - # unique within a project. Used as \\{data_policy_id} in part of the resource - # name. - class DataPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of supported data policy types. - module DataPolicyType - # Default value for the data policy type. This should not be used. - DATA_POLICY_TYPE_UNSPECIFIED = 0 - - # Used to create a data policy for column-level security, without data - # masking. - COLUMN_LEVEL_SECURITY_POLICY = 3 - - # Used to create a data policy for data masking. - DATA_MASKING_POLICY = 2 - end - end - - # The data masking policy that is used to specify data masking rule. - # @!attribute [rw] predefined_expression - # @return [::Google::Cloud::Bigquery::DataPolicies::V1::DataMaskingPolicy::PredefinedExpression] - # A predefined masking expression. - # - # Note: The following fields are mutually exclusive: `predefined_expression`, `routine`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] routine - # @return [::String] - # The name of the BigQuery routine that contains the custom masking - # routine, in the format of - # `projects/{project_number}/datasets/{dataset_id}/routines/{routine_id}`. - # - # Note: The following fields are mutually exclusive: `routine`, `predefined_expression`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DataMaskingPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The available masking rules. Learn more here: - # https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. - module PredefinedExpression - # Default, unspecified predefined expression. No masking will take place - # since no expression is specified. - PREDEFINED_EXPRESSION_UNSPECIFIED = 0 - - # Masking expression to replace data with SHA-256 hash. - SHA256 = 3 - - # Masking expression to replace data with NULLs. - ALWAYS_NULL = 5 - - # Masking expression to replace data with their default masking values. - # The default masking values for each type listed as below: - # - # * STRING: "" - # * BYTES: b'' - # * INTEGER: 0 - # * FLOAT: 0.0 - # * NUMERIC: 0 - # * BOOLEAN: FALSE - # * TIMESTAMP: 1970-01-01 00:00:00 UTC - # * DATE: 1970-01-01 - # * TIME: 00:00:00 - # * DATETIME: 1970-01-01T00:00:00 - # * GEOGRAPHY: POINT(0 0) - # * BIGNUMERIC: 0 - # * ARRAY: [] - # * STRUCT: NOT_APPLICABLE - # * JSON: NULL - DEFAULT_MASKING_VALUE = 7 - - # Masking expression shows the last four characters of text. - # The masking behavior is as follows: - # - # * If text length > 4 characters: Replace text with XXXXX, append last - # four characters of original text. - # * If text length <= 4 characters: Apply SHA-256 hash. - LAST_FOUR_CHARACTERS = 9 - - # Masking expression shows the first four characters of text. - # The masking behavior is as follows: - # - # * If text length > 4 characters: Replace text with XXXXX, prepend first - # four characters of original text. - # * If text length <= 4 characters: Apply SHA-256 hash. - FIRST_FOUR_CHARACTERS = 10 - - # Masking expression for email addresses. - # The masking behavior is as follows: - # - # * Syntax-valid email address: Replace username with XXXXX. For example, - # cloudysanfrancisco@gmail.com becomes XXXXX@gmail.com. - # * Syntax-invalid email address: Apply SHA-256 hash. - # - # For more information, see [Email - # mask](https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options). - EMAIL_MASK = 12 - - # Masking expression to only show the year of `Date`, - # `DateTime` and `TimeStamp`. For example, with the - # year 2076: - # - # * DATE : 2076-01-01 - # * DATETIME : 2076-01-01T00:00:00 - # * TIMESTAMP : 2076-01-01 00:00:00 UTC - # - # Truncation occurs according to the UTC time zone. To change this, adjust - # the default time zone using the `time_zone` system variable. - # For more information, see the System - # variables reference. - DATE_YEAR_MASK = 13 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +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 Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +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 Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/Gemfile deleted file mode 100644 index 153abdcf5d18..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1", path: "../" -else - gem "google-cloud-bigquery-data_policies-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-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb deleted file mode 100644 index e4a3e67b443c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/create_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the create_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#create_data_policy. -# -def create_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new - - # Call the create_data_policy method. - result = client.create_data_policy request - - # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb deleted file mode 100644 index 14e0c6216ecf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/delete_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the delete_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#delete_data_policy. -# -def delete_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new - - # Call the delete_data_policy method. - result = client.delete_data_policy request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb deleted file mode 100644 index af76763ff958..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the get_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_data_policy. -# -def get_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new - - # Call the get_data_policy method. - result = client.get_data_policy request - - # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb deleted file mode 100644 index ed25f30af7f4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the get_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.rb deleted file mode 100644 index 4964e03505da..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/list_data_policies.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 bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the list_data_policies call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#list_data_policies. -# -def list_data_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.new - - # Call the list_data_policies method. - result = client.list_data_policies 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::Bigquery::DataPolicies::V1::DataPolicy. - p item - end -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb deleted file mode 100644 index 0aa5de79fc6f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/rename_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the rename_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#rename_data_policy. -# -def rename_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new - - # Call the rename_data_policy method. - result = client.rename_data_policy request - - # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb deleted file mode 100644 index 5c1e443d55d7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the set_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.rb deleted file mode 100644 index 57ec42f60ca3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/test_iam_permissions.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 bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the test_iam_permissions call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb deleted file mode 100644 index cf009da7c10b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/data_policy_service/update_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1" - -## -# Snippet for the update_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1::DataPolicyService::Client#update_data_policy. -# -def update_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new - - # Call the update_data_policy method. - result = client.update_data_policy request - - # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy. - p result -end -# [END bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json deleted file mode 100644 index 881f072008f3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-data_policies-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.datapolicies.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_CreateDataPolicy_sync", - "title": "Snippet for the create_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#create_data_policy.", - "file": "data_policy_service/create_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#create_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "CreateDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.CreateDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_UpdateDataPolicy_sync", - "title": "Snippet for the update_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#update_data_policy.", - "file": "data_policy_service/update_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#update_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "UpdateDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.UpdateDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_RenameDataPolicy_sync", - "title": "Snippet for the rename_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#rename_data_policy.", - "file": "data_policy_service/rename_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "rename_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#rename_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "RenameDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.RenameDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_DeleteDataPolicy_sync", - "title": "Snippet for the delete_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#delete_data_policy.", - "file": "data_policy_service/delete_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#delete_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "DeleteDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.DeleteDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_GetDataPolicy_sync", - "title": "Snippet for the get_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_data_policy.", - "file": "data_policy_service/get_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "GetDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.GetDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_ListDataPolicies_sync", - "title": "Snippet for the list_data_policies call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#list_data_policies.", - "file": "data_policy_service/list_data_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_policies", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#list_data_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "ListDataPolicies", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.ListDataPolicies", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_iam_policy.", - "file": "data_policy_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.GetIamPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#set_iam_policy.", - "file": "data_policy_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.SetIamPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1_generated_DataPolicyService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#test_iam_permissions.", - "file": "data_policy_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService.TestIamPermissions", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1.DataPolicyService" - } - } - }, - "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-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb deleted file mode 100644 index 8a563f1a97d7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_paths_test.rb +++ /dev/null @@ -1,67 +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/bigquery/data_policies/v1/data_policy_service" - -class ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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_data_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_policy_path project: "value0", location: "value1", data_policy: "value2" - assert_equal "projects/value0/locations/value1/dataPolicies/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::Bigquery::DataPolicies::V1::DataPolicyService::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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb deleted file mode 100644 index 7dd63260bb41..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_rest_test.rb +++ /dev/null @@ -1,595 +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/bigquery/datapolicies/v1/datapolicy_pb" -require "google/cloud/bigquery/data_policies/v1/data_policy_service/rest" - - -class ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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_create_data_policy - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_policy = {} - - create_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_create_data_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_policy({ parent: parent, data_policy: data_policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_policy parent: parent, data_policy: data_policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_policy({ parent: parent, data_policy: data_policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_policy_client_stub.call_count - end - end - end - - def test_update_data_policy - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_policy = {} - update_mask = {} - - update_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_update_data_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_policy data_policy: data_policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_policy_client_stub.call_count - end - end - end - - def test_rename_data_policy - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - new_data_policy_id = "hello world" - - rename_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_rename_data_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rename_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rename_data_policy name: name, new_data_policy_id: new_data_policy_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rename_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rename_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rename_data_policy_client_stub.call_count - end - end - end - - def test_delete_data_policy - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_delete_data_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_policy_client_stub.call_count - end - end - end - - def test_get_data_policy - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_get_data_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_policy_client_stub.call_count - end - end - end - - def test_list_data_policies - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse.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_data_policies_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::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_list_data_policies_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_policies_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_policies({ 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_data_policies 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_data_policies ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies({ 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_data_policies(::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_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::Bigquery::DataPolicies::V1::DataPolicyService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_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::Bigquery::DataPolicies::V1::DataPolicyService::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::Bigquery::DataPolicies::V1::DataPolicyService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb deleted file mode 100644 index 4dad1affc7c2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/google/cloud/bigquery/data_policies/v1/data_policy_service_test.rb +++ /dev/null @@ -1,651 +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/bigquery/datapolicies/v1/datapolicy_pb" -require "google/cloud/bigquery/data_policies/v1/data_policy_service" - -class ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::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_create_data_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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" - data_policy = {} - - create_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy), request["data_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_policy({ parent: parent, data_policy: data_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_policy parent: parent, data_policy: data_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_policy({ parent: parent, data_policy: data_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_policy_client_stub.call_rpc_count - end - end - - def test_update_data_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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. - data_policy = {} - update_mask = {} - - update_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy), request["data_policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_policy data_policy: data_policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_policy_client_stub.call_rpc_count - end - end - - def test_rename_data_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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" - new_data_policy_id = "hello world" - - rename_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rename_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["new_data_policy_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rename_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rename_data_policy name: name, new_data_policy_id: new_data_policy_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rename_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rename_data_policy({ name: name, new_data_policy_id: new_data_policy_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rename_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::RenameDataPolicyRequest.new(name: name, new_data_policy_id: new_data_policy_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rename_data_policy_client_stub.call_rpc_count - end - end - - def test_delete_data_policy - # 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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::DeleteDataPolicyRequest.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_data_policy_client_stub.call_rpc_count - end - end - - def test_get_data_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicy.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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1::GetDataPolicyRequest.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_data_policy_client_stub.call_rpc_count - end - end - - def test_list_data_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesResponse.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_data_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_policies, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest, 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_data_policies_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_policies({ 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_data_policies 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_data_policies ::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies({ 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_data_policies(::Google::Cloud::Bigquery::DataPolicies::V1::ListDataPoliciesRequest.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_data_policies_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_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::Bigquery::DataPolicies::V1::DataPolicyService::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::Bigquery::DataPolicies::V1::DataPolicyService::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::Bigquery::DataPolicies::V1::DataPolicyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1::DataPolicyService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json deleted file mode 100644 index f99980dd6166..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "bigquerydatapolicy.googleapis.com", - "api_shortname": "bigquerydatapolicy", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1beta1/latest", - "distribution_name": "google-cloud-bigquery-data_policies-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "bigquerydatapolicy", - "name_pretty": "BigQuery Data Policy Service V1beta1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml deleted file mode 100644 index 5bc06b98259a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-data_policies-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-bigquery-data_policies-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts deleted file mode 100644 index b6d22c8f5e9d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Data Policy Service V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 2c265559d728..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-data_policies-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-bigquery-data_policies-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/bigquery/data_policies/v1beta1" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/data_policies/v1beta1" - -::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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-bigquery-data_policies-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/bigquery/data_policies/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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-bigquery-data_policies-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md deleted file mode 100644 index 8c51dbe8a3c0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Data Policy Service V1beta1 API - -Allows users to manage BigQuery data policies. - -The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Data Policy Service V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-data_policies](https://rubygems.org/gems/google-cloud-bigquery-data_policies). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-data_policies-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/bigquerydatapolicy.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/data_policies/v1beta1" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new -request = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new # (request fields as keyword arguments...) -response = client.create_data_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_policies-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/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/bigquery/data_policies/v1beta1" -require "logger" - -client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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-bigquery-data_policies`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-data_policies-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-bigquery-data_policies`. -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-bigquery-data_policies-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile deleted file mode 100644 index 90e022e89585..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-bigquery-data_policies-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials" - ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-data_policies-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-data_policies-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-bigquery-data_policies-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-data_policies-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-data_policies-v1beta1" - header "google-cloud-bigquery-data_policies-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-data_policies-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-data_policies-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-data_policies-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-bigquery-data_policies-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json deleted file mode 100644 index 227bf55066b6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.datapolicies.v1beta1", - "libraryPackage": "::Google::Cloud::Bigquery::DataPolicies::V1beta1", - "services": { - "DataPolicyService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client", - "rpcs": { - "CreateDataPolicy": { - "methods": [ - "create_data_policy" - ] - }, - "UpdateDataPolicy": { - "methods": [ - "update_data_policy" - ] - }, - "DeleteDataPolicy": { - "methods": [ - "delete_data_policy" - ] - }, - "GetDataPolicy": { - "methods": [ - "get_data_policy" - ] - }, - "ListDataPolicies": { - "methods": [ - "list_data_policies" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec deleted file mode 100644 index 2a621472fe24..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/google-cloud-bigquery-data_policies-v1beta1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/data_policies/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-data_policies-v1beta1" - gem.version = Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Data Policy Service provides APIs for managing the BigQuery label-policy bindings. Note that google-cloud-bigquery-data_policies-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_policies instead. See the readme for more details." - gem.summary = "Allows users to manage BigQuery data policies." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb deleted file mode 100644 index 7ccb61d64c00..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google-cloud-bigquery-data_policies-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/bigquery/data_policies/v1beta1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb deleted file mode 100644 index 04b5c0edb0d9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1.rb +++ /dev/null @@ -1,42 +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/bigquery/data_policies/v1beta1/data_policy_service" -require "google/cloud/bigquery/data_policies/v1beta1/version" - -module Google - module Cloud - module Bigquery - module DataPolicies - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_policies/v1beta1" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - module V1beta1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/bigquery/data_policies/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.rb deleted file mode 100644 index 141dc5e37c77..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service.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 "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_policies/v1beta1/version" - -require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials" -require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths" -require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1beta1 - ## - # Data Policy Service provides APIs for managing the label-policy bindings. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service" - # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - module DataPolicyService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_policy_service", "helpers.rb" -require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb deleted file mode 100644 index 5822509fdb6e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/client.rb +++ /dev/null @@ -1,1214 +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/bigquery/datapolicies/v1beta1/datapolicy_pb" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1beta1 - module DataPolicyService - ## - # Client for the DataPolicyService service. - # - # Data Policy Service provides APIs for managing the label-policy bindings. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatapolicy.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_policy_service_stub - - ## - # Configure the DataPolicyService Client class. - # - # See {::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataPolicyService clients - # ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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", "Bigquery", "DataPolicies", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_data_policy.timeout = 60.0 - default_config.rpcs.create_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_policy.timeout = 60.0 - default_config.rpcs.update_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_data_policy.timeout = 60.0 - default_config.rpcs.delete_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_data_policy.timeout = 60.0 - default_config.rpcs.get_data_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_policies.timeout = 60.0 - default_config.rpcs.list_data_policies.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - default_config.rpcs.set_iam_policy.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.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 DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 - @data_policy_service_stub.universe_domain - end - - ## - # Create a new DataPolicyService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataPolicyService 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/bigquery/datapolicies/v1beta1/datapolicy_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 - - @data_policy_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 - ) - - @data_policy_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_policy_service_stub.logger - end - - # Service calls - - ## - # Creates a new data policy under a project with the given `dataPolicyId` - # (used as the display name), policy tag, and data policy type. - # - # @overload create_data_policy(request, options = nil) - # Pass arguments to `create_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(parent: nil, data_policy: nil) - # Pass arguments to `create_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Resource name of the project that the data policy will belong to. The - # format is `projects/{project_number}/locations/{location_id}`. - # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy, ::Hash] - # Required. The data policy to create. The `name` field does not need to be - # provided for the data policy creation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new - # - # # Call the create_data_policy method. - # result = client.create_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. - # p result - # - def create_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :create_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the metadata for an existing data policy. The target data policy - # can be specified by the resource name. - # - # @overload update_data_policy(request, options = nil) - # Pass arguments to `update_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(data_policy: nil, update_mask: nil) - # Pass arguments to `update_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_policy [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy, ::Hash] - # Required. Update the data policy's metadata. - # - # The target data policy is determined by the `name` field. - # Other fields are updated to the specified values based on the field masks. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # If not set, defaults to all of the fields that are allowed to update. - # - # Updates to the `name` and `dataPolicyId` fields are not allowed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new - # - # # Call the update_data_policy method. - # result = client.update_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. - # p result - # - def update_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.data_policy&.name - header_params["data_policy.name"] = request.data_policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :update_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the data policy specified by its resource name. - # - # @overload delete_data_policy(request, options = nil) - # Pass arguments to `delete_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(name: nil) - # Pass arguments to `delete_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the data policy to delete. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.new - # - # # Call the delete_data_policy method. - # result = client.delete_data_policy request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :delete_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the data policy specified by its resource name. - # - # @overload get_data_policy(request, options = nil) - # Pass arguments to `get_data_policy` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policy(name: nil) - # Pass arguments to `get_data_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the requested data policy. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.new - # - # # Call the get_data_policy method. - # result = client.get_data_policy request - # - # # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. - # p result - # - def get_data_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest - - # Converts hash 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_data_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_data_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :get_data_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all of the data policies in the specified parent project. - # - # @overload list_data_policies(request, options = nil) - # Pass arguments to `list_data_policies` via a request object, either of type - # {::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_policies(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_data_policies` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the project for which to list data policies. Format is - # `projects/{project_number}/locations/{location_id}`. - # @param page_size [::Integer] - # The maximum number of data policies to return. Must be a value between 1 - # and 1000. - # If not set, defaults to 50. - # @param page_token [::String] - # The `nextPageToken` value returned from a previous list request, if any. If - # not set, defaults to an empty string. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.new - # - # # Call the list_data_policies method. - # result = client.list_data_policies 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::Bigquery::DataPolicies::V1beta1::DataPolicy. - # p item - # end - # - def list_data_policies request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest - - # Converts hash 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_data_policies.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::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_data_policies.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_policies.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :list_data_policies, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_policy_service_stub, :list_data_policies, 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 IAM policy for the specified data policy. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - 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_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the IAM policy for the specified data policy. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - 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.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the caller's permission on the specified data policy resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_policies/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Bigquery::DataPolicies::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.resource - header_params["resource"] = request.resource - 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.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_policy_service_stub.call_rpc :test_iam_permissions, 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 DataPolicyService API. - # - # This class represents the configuration for DataPolicyService, - # 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 - # # create_data_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 = "bigquerydatapolicy.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 DataPolicyService 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 `create_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_policy - ## - # RPC-specific configuration for `update_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_policy - ## - # RPC-specific configuration for `delete_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_policy - ## - # RPC-specific configuration for `get_data_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_policy - ## - # RPC-specific configuration for `list_data_policies` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_policies - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - create_data_policy_config = parent_rpcs.create_data_policy if parent_rpcs.respond_to? :create_data_policy - @create_data_policy = ::Gapic::Config::Method.new create_data_policy_config - update_data_policy_config = parent_rpcs.update_data_policy if parent_rpcs.respond_to? :update_data_policy - @update_data_policy = ::Gapic::Config::Method.new update_data_policy_config - delete_data_policy_config = parent_rpcs.delete_data_policy if parent_rpcs.respond_to? :delete_data_policy - @delete_data_policy = ::Gapic::Config::Method.new delete_data_policy_config - get_data_policy_config = parent_rpcs.get_data_policy if parent_rpcs.respond_to? :get_data_policy - @get_data_policy = ::Gapic::Config::Method.new get_data_policy_config - list_data_policies_config = parent_rpcs.list_data_policies if parent_rpcs.respond_to? :list_data_policies - @list_data_policies = ::Gapic::Config::Method.new list_data_policies_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb deleted file mode 100644 index 19e1a6bc6831..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/credentials.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1beta1 - module DataPolicyService - # Credentials for the DataPolicyService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.rb deleted file mode 100644 index e6a14ca04c67..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/data_policy_service/paths.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 Cloud - module Bigquery - module DataPolicies - module V1beta1 - module DataPolicyService - # Path helper methods for the DataPolicyService API. - module Paths - ## - # Create a fully-qualified DataPolicy resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataPolicies/{data_policy}` - # - # @param project [String] - # @param location [String] - # @param data_policy [String] - # - # @return [::String] - def data_policy_path project:, location:, data_policy: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataPolicies/#{data_policy}" - 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 - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb deleted file mode 100644 index 3c2b8c1ec9ed..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/data_policies/v1beta1/version.rb +++ /dev/null @@ -1,30 +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 Bigquery - module DataPolicies - module V1beta1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb deleted file mode 100644 index 7a5a337e5939..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_pb.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/datapolicies/v1beta1/datapolicy.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/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n;google/cloud/bigquery/datapolicies/v1beta1/datapolicy.proto\x12*google.cloud.bigquery.datapolicies.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb1\x01\n\x17\x43reateDataPolicyRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\x12P\n\x0b\x64\x61ta_policy\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicyB\x03\xe0\x41\x02\"\x9c\x01\n\x17UpdateDataPolicyRequest\x12P\n\x0b\x64\x61ta_policy\x18\x01 \x01(\x0b\x32\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"]\n\x17\x44\x65leteDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"Z\n\x14GetDataPolicyRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,bigquerydatapolicy.googleapis.com/DataPolicy\"\x86\x01\n\x17ListDataPoliciesRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,bigquerydatapolicy.googleapis.com/DataPolicy\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x82\x01\n\x18ListDataPoliciesResponse\x12M\n\rdata_policies\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8e\x04\n\nDataPolicy\x12\x14\n\npolicy_tag\x18\x04 \x01(\tH\x00\x12\\\n\x13\x64\x61ta_masking_policy\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicyH\x01\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12_\n\x10\x64\x61ta_policy_type\x18\x02 \x01(\x0e\x32\x45.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy.DataPolicyType\x12\x16\n\x0e\x64\x61ta_policy_id\x18\x03 \x01(\t\"m\n\x0e\x44\x61taPolicyType\x12 \n\x1c\x44\x41TA_POLICY_TYPE_UNSPECIFIED\x10\x00\x12 \n\x1c\x43OLUMN_LEVEL_SECURITY_POLICY\x10\x03\x12\x17\n\x13\x44\x41TA_MASKING_POLICY\x10\x02:u\xea\x41r\n,bigquerydatapolicy.googleapis.com/DataPolicy\x12\x42projects/{project}/locations/{location}/dataPolicies/{data_policy}B\x10\n\x0ematching_labelB\x08\n\x06policy\"\x95\x02\n\x11\x44\x61taMaskingPolicy\x12s\n\x15predefined_expression\x18\x01 \x01(\x0e\x32R.google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicy.PredefinedExpressionH\x00\"u\n\x14PredefinedExpression\x12%\n!PREDEFINED_EXPRESSION_UNSPECIFIED\x10\x00\x12\n\n\x06SHA256\x10\x03\x12\x0f\n\x0b\x41LWAYS_NULL\x10\x05\x12\x19\n\x15\x44\x45\x46\x41ULT_MASKING_VALUE\x10\x07\x42\x14\n\x12masking_expression2\xff\r\n\x11\x44\x61taPolicyService\x12\xf0\x01\n\x10\x43reateDataPolicy\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest\x1a\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\"_\xda\x41\x12parent,data_policy\x82\xd3\xe4\x93\x02\x44\"5/v1beta1/{parent=projects/*/locations/*}/dataPolicies:\x0b\x64\x61ta_policy\x12\x81\x02\n\x10UpdateDataPolicy\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest\x1a\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\"p\xda\x41\x17\x64\x61ta_policy,update_mask\x82\xd3\xe4\x93\x02P2A/v1beta1/{data_policy.name=projects/*/locations/*/dataPolicies/*}:\x0b\x64\x61ta_policy\x12\xb5\x01\n\x10\x44\x65leteDataPolicy\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1beta1/{name=projects/*/locations/*/dataPolicies/*}\x12\xcf\x01\n\rGetDataPolicy\x12@.google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest\x1a\x36.google.cloud.bigquery.datapolicies.v1beta1.DataPolicy\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{name=projects/*/locations/*/dataPolicies/*}\x12\xe5\x01\n\x10ListDataPolicies\x12\x43.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest\x1a\x44.google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta1/{parent=projects/*/locations/*}/dataPolicies\x12\x9c\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy:\x01*\x12\x9c\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"Q\x82\xd3\xe4\x93\x02K\"F/v1beta1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy:\x01*\x12\xc2\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"W\x82\xd3\xe4\x93\x02Q\"L/v1beta1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions:\x01*\x1a~\xca\x41!bigquerydatapolicy.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xa2\x02\n.com.google.cloud.bigquery.datapolicies.v1beta1B\x0f\x44\x61taPolicyProtoP\x01ZRcloud.google.com/go/bigquery/datapolicies/apiv1beta1/datapoliciespb;datapoliciespb\xaa\x02*Google.Cloud.BigQuery.DataPolicies.V1Beta1\xca\x02*Google\\Cloud\\BigQuery\\DataPolicies\\V1beta1\xea\x02.Google::Cloud::Bigquery::DataPolicies::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1beta1 - CreateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.CreateDataPolicyRequest").msgclass - UpdateDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.UpdateDataPolicyRequest").msgclass - DeleteDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DeleteDataPolicyRequest").msgclass - GetDataPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.GetDataPolicyRequest").msgclass - ListDataPoliciesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesRequest").msgclass - ListDataPoliciesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.ListDataPoliciesResponse").msgclass - DataPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataPolicy").msgclass - DataPolicy::DataPolicyType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataPolicy.DataPolicyType").enummodule - DataMaskingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicy").msgclass - DataMaskingPolicy::PredefinedExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datapolicies.v1beta1.DataMaskingPolicy.PredefinedExpression").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb deleted file mode 100644 index 995d66ad93ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/lib/google/cloud/bigquery/datapolicies/v1beta1/datapolicy_services_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/datapolicies/v1beta1/datapolicy.proto for package 'Google.Cloud.Bigquery.DataPolicies.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigquery/datapolicies/v1beta1/datapolicy_pb' - -module Google - module Cloud - module Bigquery - module DataPolicies - module V1beta1 - module DataPolicyService - # Data Policy Service provides APIs for managing the label-policy bindings. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService' - - # Creates a new data policy under a project with the given `dataPolicyId` - # (used as the display name), policy tag, and data policy type. - rpc :CreateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy - # Updates the metadata for an existing data policy. The target data policy - # can be specified by the resource name. - rpc :UpdateDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy - # Deletes the data policy specified by its resource name. - rpc :DeleteDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest, ::Google::Protobuf::Empty - # Gets the data policy specified by its resource name. - rpc :GetDataPolicy, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy - # List all of the data policies in the specified parent project. - rpc :ListDataPolicies, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest, ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesResponse - # Gets the IAM policy for the specified data policy. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the IAM policy for the specified data policy. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Returns the caller's permission on the specified data policy resource. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md deleted file mode 100644 index 3018ae05ec87..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Data Policy Service V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb deleted file mode 100644 index 716e8714b276..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/cloud/bigquery/datapolicies/v1beta1/datapolicy.rb +++ /dev/null @@ -1,195 +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 Bigquery - module DataPolicies - module V1beta1 - # Request message for the CreateDataPolicy method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project that the data policy will belong to. The - # format is `projects/{project_number}/locations/{location_id}`. - # @!attribute [rw] data_policy - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # Required. The data policy to create. The `name` field does not need to be - # provided for the data policy creation. - class CreateDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the UpdateDataPolicy method. - # @!attribute [rw] data_policy - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy] - # Required. Update the data policy's metadata. - # - # The target data policy is determined by the `name` field. - # Other fields are updated to the specified values based on the field masks. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applies to the resource. For the `FieldMask` definition, - # see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - # If not set, defaults to all of the fields that are allowed to update. - # - # Updates to the `name` and `dataPolicyId` fields are not allowed. - class UpdateDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteDataPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the data policy to delete. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - class DeleteDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the GetDataPolicy method. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the requested data policy. Format is - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - class GetDataPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the ListDataPolicies method. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the project for which to list data policies. Format is - # `projects/{project_number}/locations/{location_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data policies to return. Must be a value between 1 - # and 1000. - # If not set, defaults to 50. - # @!attribute [rw] page_token - # @return [::String] - # The `nextPageToken` value returned from a previous list request, if any. If - # not set, defaults to an empty string. - class ListDataPoliciesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the ListDataPolicies method. - # @!attribute [rw] data_policies - # @return [::Array<::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy>] - # Data policies that belong to the requested project. - # @!attribute [rw] next_page_token - # @return [::String] - # Token used to retrieve the next page of results, or empty if there are no - # more results. - class ListDataPoliciesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the label-policy binding. - # @!attribute [rw] policy_tag - # @return [::String] - # Policy tag resource name, in the format of - # `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. - # @!attribute [rw] data_masking_policy - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataMaskingPolicy] - # The data masking policy that specifies the data masking rule to use. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of this data policy, in the format of - # `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. - # @!attribute [rw] data_policy_type - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy::DataPolicyType] - # Type of data policy. - # @!attribute [rw] data_policy_id - # @return [::String] - # User-assigned (human readable) ID of the data policy that needs to be - # unique within a project. Used as \\{data_policy_id} in part of the resource - # name. - class DataPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A list of supported data policy types. - module DataPolicyType - # Default value for the data policy type. This should not be used. - DATA_POLICY_TYPE_UNSPECIFIED = 0 - - # Used to create a data policy for column-level security, without data - # masking. - COLUMN_LEVEL_SECURITY_POLICY = 3 - - # Used to create a data policy for data masking. - DATA_MASKING_POLICY = 2 - end - end - - # The data masking policy that is used to specify data masking rule. - # @!attribute [rw] predefined_expression - # @return [::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataMaskingPolicy::PredefinedExpression] - # A predefined masking expression. - class DataMaskingPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The available masking rules. Learn more here: - # https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. - module PredefinedExpression - # Default, unspecified predefined expression. No masking will take place - # since no expression is specified. - PREDEFINED_EXPRESSION_UNSPECIFIED = 0 - - # Masking expression to replace data with SHA-256 hash. - SHA256 = 3 - - # Masking expression to replace data with NULLs. - ALWAYS_NULL = 5 - - # Masking expression to replace data with their default masking values. - # The default masking values for each type listed as below: - # - # * STRING: "" - # * BYTES: b'' - # * INTEGER: 0 - # * FLOAT: 0.0 - # * NUMERIC: 0 - # * BOOLEAN: FALSE - # * TIMESTAMP: 0001-01-01 00:00:00 UTC - # * DATE: 0001-01-01 - # * TIME: 00:00:00 - # * DATETIME: 0001-01-01T00:00:00 - # * GEOGRAPHY: POINT(0 0) - # * BIGNUMERIC: 0 - # * ARRAY: [] - # * STRUCT: NOT_APPLICABLE - # * JSON: NULL - DEFAULT_MASKING_VALUE = 7 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +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 Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +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 Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/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-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile deleted file mode 100644 index 1f956db7ba2f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-bigquery-data_policies-v1beta1", path: "../" -else - gem "google-cloud-bigquery-data_policies-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb deleted file mode 100644 index e0f6e18a70d2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/create_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_CreateDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the create_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#create_data_policy. -# -def create_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new - - # Call the create_data_policy method. - result = client.create_data_policy request - - # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. - p result -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_CreateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb deleted file mode 100644 index 82841540276f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/delete_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_DeleteDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the delete_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#delete_data_policy. -# -def delete_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.new - - # Call the delete_data_policy method. - result = client.delete_data_policy request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_DeleteDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb deleted file mode 100644 index 06346d4fa74a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the get_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_data_policy. -# -def get_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.new - - # Call the get_data_policy method. - result = client.get_data_policy request - - # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. - p result -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb deleted file mode 100644 index 10d09b67bb31..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetIamPolicy_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the get_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.rb deleted file mode 100644 index 5313931c7fd3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/list_data_policies.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 bigquerydatapolicy_v1beta1_generated_DataPolicyService_ListDataPolicies_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the list_data_policies call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#list_data_policies. -# -def list_data_policies - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.new - - # Call the list_data_policies method. - result = client.list_data_policies 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::Bigquery::DataPolicies::V1beta1::DataPolicy. - p item - end -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_ListDataPolicies_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb deleted file mode 100644 index 6b29d784af3c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_SetIamPolicy_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the set_iam_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.rb deleted file mode 100644 index ea03c1a5fef1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/test_iam_permissions.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 bigquerydatapolicy_v1beta1_generated_DataPolicyService_TestIamPermissions_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the test_iam_permissions call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb deleted file mode 100644 index 6ae87ad19971..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/data_policy_service/update_data_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerydatapolicy_v1beta1_generated_DataPolicyService_UpdateDataPolicy_sync] -require "google/cloud/bigquery/data_policies/v1beta1" - -## -# Snippet for the update_data_policy call in the DataPolicyService 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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#update_data_policy. -# -def update_data_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new - - # Call the update_data_policy method. - result = client.update_data_policy request - - # The returned object is of type Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy. - p result -end -# [END bigquerydatapolicy_v1beta1_generated_DataPolicyService_UpdateDataPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json deleted file mode 100644 index fb3d73e3a450..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/snippets/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-data_policies-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.datapolicies.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_CreateDataPolicy_sync", - "title": "Snippet for the create_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#create_data_policy.", - "file": "data_policy_service/create_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#create_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "CreateDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.CreateDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_UpdateDataPolicy_sync", - "title": "Snippet for the update_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#update_data_policy.", - "file": "data_policy_service/update_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#update_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "UpdateDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.UpdateDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_DeleteDataPolicy_sync", - "title": "Snippet for the delete_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#delete_data_policy.", - "file": "data_policy_service/delete_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#delete_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "DeleteDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.DeleteDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetDataPolicy_sync", - "title": "Snippet for the get_data_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_data_policy.", - "file": "data_policy_service/get_data_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_data_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "GetDataPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.GetDataPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_ListDataPolicies_sync", - "title": "Snippet for the list_data_policies call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#list_data_policies.", - "file": "data_policy_service/list_data_policies.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_policies", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#list_data_policies", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesResponse", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "ListDataPolicies", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.ListDataPolicies", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_iam_policy.", - "file": "data_policy_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.GetIamPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#set_iam_policy.", - "file": "data_policy_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.SetIamPolicy", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatapolicy_v1beta1_generated_DataPolicyService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the DataPolicyService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#test_iam_permissions.", - "file": "data_policy_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "DataPolicyService::Client", - "full_name": "::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService.TestIamPermissions", - "service": { - "short_name": "DataPolicyService", - "full_name": "google.cloud.bigquery.datapolicies.v1beta1.DataPolicyService" - } - } - }, - "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-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb deleted file mode 100644 index e58c0bec835a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_paths_test.rb +++ /dev/null @@ -1,67 +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/bigquery/data_policies/v1beta1/data_policy_service" - -class ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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_data_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_policy_path project: "value0", location: "value1", data_policy: "value2" - assert_equal "projects/value0/locations/value1/dataPolicies/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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb deleted file mode 100644 index 92dbc43ac06a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/google/cloud/bigquery/data_policies/v1beta1/data_policy_service_test.rb +++ /dev/null @@ -1,589 +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/bigquery/datapolicies/v1beta1/datapolicy_pb" -require "google/cloud/bigquery/data_policies/v1beta1/data_policy_service" - -class ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::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_create_data_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy.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" - data_policy = {} - - create_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy), request["data_policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_policy({ parent: parent, data_policy: data_policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_policy parent: parent, data_policy: data_policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_policy({ parent: parent, data_policy: data_policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::CreateDataPolicyRequest.new(parent: parent, data_policy: data_policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_policy_client_stub.call_rpc_count - end - end - - def test_update_data_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy.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. - data_policy = {} - update_mask = {} - - update_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy), request["data_policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_policy data_policy: data_policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_policy({ data_policy: data_policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::UpdateDataPolicyRequest.new(data_policy: data_policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_policy_client_stub.call_rpc_count - end - end - - def test_delete_data_policy - # 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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::DeleteDataPolicyRequest.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_data_policy_client_stub.call_rpc_count - end - end - - def test_get_data_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicy.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_data_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_policy, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_policy ::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_policy({ 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_data_policy(::Google::Cloud::Bigquery::DataPolicies::V1beta1::GetDataPolicyRequest.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_data_policy_client_stub.call_rpc_count - end - end - - def test_list_data_policies - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesResponse.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_data_policies_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_policies, name - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest, 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_data_policies_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_policies({ 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_data_policies 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_data_policies ::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.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_data_policies({ 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_data_policies(::Google::Cloud::Bigquery::DataPolicies::V1beta1::ListDataPoliciesRequest.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_data_policies_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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::Bigquery::DataPolicies::V1beta1::DataPolicyService::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::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::DataPolicies::V1beta1::DataPolicyService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_policies-v1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json deleted file mode 100644 index 682905e95539..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigquerydatatransfer.googleapis.com", - "api_shortname": "bigquerydatatransfer", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest", - "distribution_name": "google-cloud-bigquery-data_transfer-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigquerydatatransfer", - "name_pretty": "BigQuery Data Transfer Service V1 API", - "product_documentation": "https://cloud.google.com/bigquery/transfer", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details.", - "ruby-cloud-env-prefix": "DATA_TRANSFER", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/transfer", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml deleted file mode 100644 index 6f5635fddf0e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts deleted file mode 100644 index 304c3609fa4b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Data Transfer Service 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-bigquery-data_transfer-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md deleted file mode 100644 index 4740aa501122..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-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/bigquery/data_transfer/v1" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/data_transfer/v1" - -::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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-bigquery-data_transfer-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/bigquery/data_transfer/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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-bigquery-data_transfer-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md deleted file mode 100644 index 9ed2e29c2933..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Data Transfer Service V1 API - -Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis. - -Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Data Transfer Service V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-data_transfer](https://rubygems.org/gems/google-cloud-bigquery-data_transfer). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-data_transfer-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/bigquerydatatransfer.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/data_transfer/v1" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new -request = ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new # (request fields as keyword arguments...) -response = client.get_data_source request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-data_transfer-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/transfer) -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/bigquery/data_transfer/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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-bigquery-data_transfer`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-data_transfer-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-bigquery-data_transfer`. -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-bigquery-data_transfer-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-bigquery-data_transfer-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile deleted file mode 100644 index 0be31481319e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/Rakefile +++ /dev/null @@ -1,168 +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-bigquery-data_transfer-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["DATA_TRANSFER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["DATA_TRANSFER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["DATA_TRANSFER_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 DATA_TRANSFER_TEST_PROJECT=test123 DATA_TRANSFER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["DATA_TRANSFER_PROJECT"] = project - ENV["DATA_TRANSFER_TEST_PROJECT"] = project - ENV["DATA_TRANSFER_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-bigquery-data_transfer-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-bigquery-data_transfer-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-bigquery-data_transfer-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-bigquery-data_transfer-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-data_transfer-v1" - header "google-cloud-bigquery-data_transfer-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-data_transfer-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-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-bigquery-data_transfer-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-bigquery-data_transfer-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json deleted file mode 100644 index 7ae4ebcd10a5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/gapic_metadata.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.datatransfer.v1", - "libraryPackage": "::Google::Cloud::Bigquery::DataTransfer::V1", - "services": { - "DataTransferService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client", - "rpcs": { - "GetDataSource": { - "methods": [ - "get_data_source" - ] - }, - "ListDataSources": { - "methods": [ - "list_data_sources" - ] - }, - "CreateTransferConfig": { - "methods": [ - "create_transfer_config" - ] - }, - "UpdateTransferConfig": { - "methods": [ - "update_transfer_config" - ] - }, - "DeleteTransferConfig": { - "methods": [ - "delete_transfer_config" - ] - }, - "GetTransferConfig": { - "methods": [ - "get_transfer_config" - ] - }, - "ListTransferConfigs": { - "methods": [ - "list_transfer_configs" - ] - }, - "ScheduleTransferRuns": { - "methods": [ - "schedule_transfer_runs" - ] - }, - "StartManualTransferRuns": { - "methods": [ - "start_manual_transfer_runs" - ] - }, - "GetTransferRun": { - "methods": [ - "get_transfer_run" - ] - }, - "DeleteTransferRun": { - "methods": [ - "delete_transfer_run" - ] - }, - "ListTransferRuns": { - "methods": [ - "list_transfer_runs" - ] - }, - "ListTransferLogs": { - "methods": [ - "list_transfer_logs" - ] - }, - "CheckValidCreds": { - "methods": [ - "check_valid_creds" - ] - }, - "EnrollDataSources": { - "methods": [ - "enroll_data_sources" - ] - }, - "UnenrollDataSources": { - "methods": [ - "unenroll_data_sources" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec deleted file mode 100644 index fd94f92ed1e0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/google-cloud-bigquery-data_transfer-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/data_transfer/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-data_transfer-v1" - gem.version = Google::Cloud::Bigquery::DataTransfer::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Schedules queries and transfers external data from SaaS applications to Google BigQuery on a regular basis. Note that google-cloud-bigquery-data_transfer-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-data_transfer instead. See the readme for more details." - gem.summary = "Schedule queries or transfer external data from SaaS applications to Google BigQuery on a regular basis." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-v1.rb deleted file mode 100644 index 78206ec74e36..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google-cloud-bigquery-data_transfer-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/bigquery/data_transfer/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb deleted file mode 100644 index 3d075d750da4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" -require "google/cloud/bigquery/data_transfer/v1/version" - -module Google - module Cloud - module Bigquery - module DataTransfer - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_transfer/v1" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/data_transfer/v1" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/data_transfer/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb deleted file mode 100644 index 40a072a3828e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/bindings_override.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module Bigquery - module DataTransfer - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/bigquery/data_transfer/v1/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Bigquery", "DataTransfer"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb deleted file mode 100644 index 6800f1bff3af..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_transfer/v1/version" - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/client" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - ## - # This API allows users to manage their data transfers into BigQuery. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module DataTransferService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_transfer_service", "helpers.rb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb deleted file mode 100644 index ce07ad9249a9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/client.rb +++ /dev/null @@ -1,2170 +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/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/location" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - ## - # Client for the DataTransferService service. - # - # This API allows users to manage their data transfers into BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_transfer_service_stub - - ## - # Configure the DataTransferService Client class. - # - # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTransferService clients - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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", "Bigquery", "DataTransfer", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_data_source.timeout = 20.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_data_sources.timeout = 20.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_transfer_config.timeout = 30.0 - - default_config.rpcs.update_transfer_config.timeout = 30.0 - - default_config.rpcs.delete_transfer_config.timeout = 20.0 - default_config.rpcs.delete_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_transfer_config.timeout = 20.0 - default_config.rpcs.get_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_configs.timeout = 20.0 - default_config.rpcs.list_transfer_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.schedule_transfer_runs.timeout = 30.0 - - default_config.rpcs.get_transfer_run.timeout = 20.0 - default_config.rpcs.get_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_transfer_run.timeout = 20.0 - default_config.rpcs.delete_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_runs.timeout = 20.0 - default_config.rpcs.list_transfer_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_logs.timeout = 20.0 - default_config.rpcs.list_transfer_logs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.check_valid_creds.timeout = 20.0 - default_config.rpcs.check_valid_creds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::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 - @data_transfer_service_stub.universe_domain - end - - ## - # Create a new DataTransferService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTransferService 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/bigquery/datatransfer/v1/datatransfer_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 - - @data_transfer_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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 - ) - - @data_transfer_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_transfer_service_stub.endpoint - config.universe_domain = @data_transfer_service_stub.universe_domain - config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_transfer_service_stub.logger - end - - # Service calls - - ## - # Retrieves a supported data source and returns its settings. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest - - # Converts hash 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_data_source.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::Bigquery::DataTransfer::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_data_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :get_data_source, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists supported data sources and returns their settings. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is 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 BigQuery project id for which data sources should be - # returned. Must be in the form: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListDataSourcesRequest` list results. For multiple-page - # results, `ListDataSourcesResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources 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::Bigquery::DataTransfer::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest - - # Converts hash 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_data_sources.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::Bigquery::DataTransfer::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_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_data_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, 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 - - ## - # Creates a new data transfer configuration. - # - # @overload create_transfer_config(request, options = nil) - # Pass arguments to `create_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `create_transfer_config` via keyword arguments. Note that at - # least one keyword argument is 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 BigQuery project id where the transfer configuration should - # be created. Must be in the format - # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If - # specified location and location of the destination bigquery dataset do not - # match - the request will fail. - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new - # - # # Call the create_transfer_config method. - # result = client.create_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def create_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :create_transfer_config, 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 data transfer configuration. - # All fields must be set, even if they are not updated. - # - # @overload update_transfer_config(request, options = nil) - # Pass arguments to `update_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `update_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Required list of fields to be updated in this request. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-              #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-              #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new - # - # # Call the update_transfer_config method. - # result = client.update_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def update_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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.transfer_config&.name - header_params["transfer_config.name"] = request.transfer_config.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_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :update_transfer_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data transfer configuration, including any associated transfer - # runs and logs. - # - # @overload delete_transfer_config(request, options = nil) - # Pass arguments to `delete_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(name: nil) - # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new - # - # # Call the delete_transfer_config method. - # result = client.delete_transfer_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :delete_transfer_config, 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 - - ## - # Returns information about a data transfer config. - # - # @overload get_transfer_config(request, options = nil) - # Pass arguments to `get_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(name: nil) - # Pass arguments to `get_transfer_config` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new - # - # # Call the get_transfer_config method. - # result = client.get_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def get_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :get_transfer_config, 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 - - ## - # Returns information about all transfer configs owned by a project in the - # specified location. - # - # @overload list_transfer_configs(request, options = nil) - # Pass arguments to `list_transfer_configs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at - # least one keyword argument is 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 BigQuery project id for which transfer configs - # should be returned: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param data_source_ids [::Array<::String>] - # When specified, only configurations of requested data sources are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransfersRequest` list results. For multiple-page - # results, `ListTransfersResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new - # - # # Call the list_transfer_configs method. - # result = client.list_transfer_configs 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::Bigquery::DataTransfer::V1::TransferConfig. - # p item - # end - # - def list_transfer_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest - - # Converts hash 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_transfer_configs.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::Bigquery::DataTransfer::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_transfer_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transfer_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_transfer_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, 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 - - ## - # Creates transfer runs for a time range [start_time, end_time]. - # For each date - or whatever granularity the data source supports - in the - # range, one transfer run is created. - # Note that runs are created per UTC time in the time range. - # DEPRECATED: use StartManualTransferRuns instead. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload schedule_transfer_runs(request, options = nil) - # Pass arguments to `schedule_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) - # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is 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. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new - # - # # Call the schedule_transfer_runs method. - # result = client.schedule_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. - # p result - # - def schedule_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest - - # Converts hash 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.schedule_transfer_runs.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::Bigquery::DataTransfer::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.schedule_transfer_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :schedule_transfer_runs, 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 - - ## - # Start manual transfer runs to be executed now with schedule_time equal to - # current time. The transfer runs can be created for a time range where the - # run_time is between start_time (inclusive) and end_time (exclusive), or for - # a specific run_time. - # - # @overload start_manual_transfer_runs(request, options = nil) - # Pass arguments to `start_manual_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) - # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is 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. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] - # A time_range start and end timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_time_range must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] - # A run_time timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_run_time must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new - # - # # Call the start_manual_transfer_runs method. - # result = client.start_manual_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. - # p result - # - def start_manual_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest - - # Converts hash 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.start_manual_transfer_runs.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::Bigquery::DataTransfer::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.start_manual_transfer_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :start_manual_transfer_runs, 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 - - ## - # Returns information about the particular transfer run. - # - # @overload get_transfer_run(request, options = nil) - # Pass arguments to `get_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_run(name: nil) - # Pass arguments to `get_transfer_run` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new - # - # # Call the get_transfer_run method. - # result = client.get_transfer_run request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - # p result - # - def get_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest - - # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :get_transfer_run, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified transfer run. - # - # @overload delete_transfer_run(request, options = nil) - # Pass arguments to `delete_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_run(name: nil) - # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new - # - # # Call the delete_transfer_run method. - # result = client.delete_transfer_run request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest - - # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :delete_transfer_run, 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 - - ## - # Returns information about running and completed transfer runs. - # - # @overload list_transfer_runs(request, options = nil) - # Pass arguments to `list_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) - # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is 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. Name of transfer configuration for which transfer runs should be - # retrieved. Format of transfer configuration resource name is: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] - # When specified, only transfer runs with requested states are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferRunsRequest` list results. For multiple-page - # results, `ListTransferRunsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] - # Indicates how run attempts are to be pulled. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new - # - # # Call the list_transfer_runs method. - # result = client.list_transfer_runs 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::Bigquery::DataTransfer::V1::TransferRun. - # p item - # end - # - def list_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest - - # Converts hash 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_transfer_runs.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::Bigquery::DataTransfer::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_transfer_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_transfer_runs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, 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 log messages for the transfer run. - # - # @overload list_transfer_logs(request, options = nil) - # Pass arguments to `list_transfer_logs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) - # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at - # least one keyword argument is 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. Transfer run name in the form: - # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferLogsRequest` list results. For multiple-page - # results, `ListTransferLogsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] - # Message types to return. If not populated - INFO, WARNING and ERROR - # messages are returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new - # - # # Call the list_transfer_logs method. - # result = client.list_transfer_logs 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::Bigquery::DataTransfer::V1::TransferMessage. - # p item - # end - # - def list_transfer_logs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest - - # Converts hash 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_transfer_logs.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::Bigquery::DataTransfer::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_transfer_logs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_transfer_logs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :list_transfer_logs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, 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 true if valid credentials exist for the given data source and - # requesting user. - # - # @overload check_valid_creds(request, options = nil) - # Pass arguments to `check_valid_creds` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload check_valid_creds(name: nil) - # Pass arguments to `check_valid_creds` via keyword arguments. Note that at - # least one keyword argument is 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 data source in the form: - # `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new - # - # # Call the check_valid_creds method. - # result = client.check_valid_creds request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. - # p result - # - def check_valid_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest - - # Converts hash 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.check_valid_creds.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::Bigquery::DataTransfer::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.check_valid_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.check_valid_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :check_valid_creds, 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 - - ## - # Enroll data sources in a user project. This allows users to create transfer - # configurations for these data sources. They will also appear in the - # ListDataSources RPC and as such, will appear in the - # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents - # can be found in the public guide for - # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and - # [Data Transfer - # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). - # - # @overload enroll_data_sources(request, options = nil) - # Pass arguments to `enroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are enrolled. It is required to provide at least one - # data source id. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new - # - # # Call the enroll_data_sources method. - # result = client.enroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def enroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest - - # Converts hash 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.enroll_data_sources.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::Bigquery::DataTransfer::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.enroll_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :enroll_data_sources, 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 - - ## - # Unenroll data sources in a user project. This allows users to remove - # transfer configurations for these data sources. They will no longer appear - # in the ListDataSources RPC and will also no longer appear in the [BigQuery - # UI](https://console.cloud.google.com/bigquery). Data transfers - # configurations of unenrolled data sources will not be scheduled. - # - # @overload unenroll_data_sources(request, options = nil) - # Pass arguments to `unenroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload unenroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are unenrolled. It is required to provide at least one - # data source id. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new - # - # # Call the unenroll_data_sources method. - # result = client.unenroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def unenroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest - - # Converts hash 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.unenroll_data_sources.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::Bigquery::DataTransfer::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.unenroll_data_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.unenroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.call_rpc :unenroll_data_sources, 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 DataTransferService API. - # - # This class represents the configuration for DataTransferService, - # 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::Bigquery::DataTransfer::V1::DataTransferService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.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::Bigquery::DataTransfer::V1::DataTransferService::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 = "bigquerydatatransfer.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 DataTransferService 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 `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_transfer_config - ## - # RPC-specific configuration for `update_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_transfer_config - ## - # RPC-specific configuration for `delete_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_config - ## - # RPC-specific configuration for `get_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_config - ## - # RPC-specific configuration for `list_transfer_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_configs - ## - # RPC-specific configuration for `schedule_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :schedule_transfer_runs - ## - # RPC-specific configuration for `start_manual_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :start_manual_transfer_runs - ## - # RPC-specific configuration for `get_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_run - ## - # RPC-specific configuration for `delete_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_run - ## - # RPC-specific configuration for `list_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_runs - ## - # RPC-specific configuration for `list_transfer_logs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_logs - ## - # RPC-specific configuration for `check_valid_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :check_valid_creds - ## - # RPC-specific configuration for `enroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :enroll_data_sources - ## - # RPC-specific configuration for `unenroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :unenroll_data_sources - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config - @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config - update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config - @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config - delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config - @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config - get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config - @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config - list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs - @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config - schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs - @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config - start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs - @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config - get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run - @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config - delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run - @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config - list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs - @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config - list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs - @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config - check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds - @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config - enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources - @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config - unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources - @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb deleted file mode 100644 index bc7f9b48f764..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - # Credentials for the DataTransferService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "DATA_TRANSFER_CREDENTIALS", - "DATA_TRANSFER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "DATA_TRANSFER_CREDENTIALS_JSON", - "DATA_TRANSFER_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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb deleted file mode 100644 index ad6b7baec0f5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths.rb +++ /dev/null @@ -1,193 +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 Bigquery - module DataTransfer - module V1 - module DataTransferService - # Path helper methods for the DataTransferService API. - module Paths - ## - # Create a fully-qualified DataSource resource string. - # - # @overload data_source_path(project:, data_source:) - # The resource will be in the following format: - # - # `projects/{project}/dataSources/{data_source}` - # - # @param project [String] - # @param data_source [String] - # - # @overload data_source_path(project:, location:, data_source:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dataSources/{data_source}` - # - # @param project [String] - # @param location [String] - # @param data_source [String] - # - # @return [::String] - def data_source_path **args - resources = { - "data_source:project" => (proc do |project:, data_source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/dataSources/#{data_source}" - end), - "data_source:location:project" => (proc do |project:, location:, data_source:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dataSources/#{data_source}" - 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 Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Run resource string. - # - # @overload run_path(project:, transfer_config:, run:) - # The resource will be in the following format: - # - # `projects/{project}/transferConfigs/{transfer_config}/runs/{run}` - # - # @param project [String] - # @param transfer_config [String] - # @param run [String] - # - # @overload run_path(project:, location:, transfer_config:, run:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}` - # - # @param project [String] - # @param location [String] - # @param transfer_config [String] - # @param run [String] - # - # @return [::String] - def run_path **args - resources = { - "project:run:transfer_config" => (proc do |project:, transfer_config:, run:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" - - "projects/#{project}/transferConfigs/#{transfer_config}/runs/#{run}" - end), - "location:project:run:transfer_config" => (proc do |project:, location:, transfer_config:, run:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "transfer_config cannot contain /" if transfer_config.to_s.include? "/" - - "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}/runs/#{run}" - 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 TransferConfig resource string. - # - # @overload transfer_config_path(project:, transfer_config:) - # The resource will be in the following format: - # - # `projects/{project}/transferConfigs/{transfer_config}` - # - # @param project [String] - # @param transfer_config [String] - # - # @overload transfer_config_path(project:, location:, transfer_config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/transferConfigs/{transfer_config}` - # - # @param project [String] - # @param location [String] - # @param transfer_config [String] - # - # @return [::String] - def transfer_config_path **args - resources = { - "project:transfer_config" => (proc do |project:, transfer_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/transferConfigs/#{transfer_config}" - end), - "location:project:transfer_config" => (proc do |project:, location:, transfer_config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/transferConfigs/#{transfer_config}" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb deleted file mode 100644 index 542bca69647b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/data_transfer/v1/version" -require "google/cloud/bigquery/data_transfer/v1/bindings_override" - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/credentials" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/paths" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - ## - # This API allows users to manage their data transfers into BigQuery. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module DataTransferService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb deleted file mode 100644 index f8deec7b0b18..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/client.rb +++ /dev/null @@ -1,2021 +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/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - module Rest - ## - # REST client for the DataTransferService service. - # - # This API allows users to manage their data transfers into BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerydatatransfer.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_transfer_service_stub - - ## - # Configure the DataTransferService Client class. - # - # See {::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataTransferService clients - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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", "Bigquery", "DataTransfer", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_data_source.timeout = 20.0 - default_config.rpcs.get_data_source.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_data_sources.timeout = 20.0 - default_config.rpcs.list_data_sources.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_transfer_config.timeout = 30.0 - - default_config.rpcs.update_transfer_config.timeout = 30.0 - - default_config.rpcs.delete_transfer_config.timeout = 20.0 - default_config.rpcs.delete_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_transfer_config.timeout = 20.0 - default_config.rpcs.get_transfer_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_configs.timeout = 20.0 - default_config.rpcs.list_transfer_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.schedule_transfer_runs.timeout = 30.0 - - default_config.rpcs.get_transfer_run.timeout = 20.0 - default_config.rpcs.get_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_transfer_run.timeout = 20.0 - default_config.rpcs.delete_transfer_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_runs.timeout = 20.0 - default_config.rpcs.list_transfer_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_transfer_logs.timeout = 20.0 - default_config.rpcs.list_transfer_logs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.check_valid_creds.timeout = 20.0 - default_config.rpcs.check_valid_creds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::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 - @data_transfer_service_stub.universe_domain - end - - ## - # Create a new DataTransferService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataTransferService 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 - - @data_transfer_service_stub = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_transfer_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @data_transfer_service_stub.endpoint - config.universe_domain = @data_transfer_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @data_transfer_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_transfer_service_stub.logger - end - - # Service calls - - ## - # Retrieves a supported data source and returns its settings. - # - # @overload get_data_source(request, options = nil) - # Pass arguments to `get_data_source` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_source(name: nil) - # Pass arguments to `get_data_source` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new - # - # # Call the get_data_source method. - # result = client.get_data_source request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - # p result - # - def get_data_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest - - # Converts hash 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_data_source.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::Bigquery::DataTransfer::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_data_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.get_data_source request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists supported data sources and returns their settings. - # - # @overload list_data_sources(request, options = nil) - # Pass arguments to `list_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_sources(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_data_sources` via keyword arguments. Note that at - # least one keyword argument is 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 BigQuery project id for which data sources should be - # returned. Must be in the form: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListDataSourcesRequest` list results. For multiple-page - # results, `ListDataSourcesResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new - # - # # Call the list_data_sources method. - # result = client.list_data_sources 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::Bigquery::DataTransfer::V1::DataSource. - # p item - # end - # - def list_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest - - # Converts hash 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_data_sources.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::Bigquery::DataTransfer::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_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_data_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_data_sources, "data_sources", 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 - - ## - # Creates a new data transfer configuration. - # - # @overload create_transfer_config(request, options = nil) - # Pass arguments to `create_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(parent: nil, transfer_config: nil, authorization_code: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `create_transfer_config` via keyword arguments. Note that at - # least one keyword argument is 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 BigQuery project id where the transfer configuration should - # be created. Must be in the format - # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If - # specified location and location of the destination bigquery dataset do not - # match - the request will fail. - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new - # - # # Call the create_transfer_config method. - # result = client.create_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def create_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.create_transfer_config 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 data transfer configuration. - # All fields must be set, even if they are not updated. - # - # @overload update_transfer_config(request, options = nil) - # Pass arguments to `update_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(transfer_config: nil, authorization_code: nil, update_mask: nil, version_info: nil, service_account_name: nil) - # Pass arguments to `update_transfer_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param transfer_config [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig, ::Hash] - # Required. Data transfer configuration to create. - # @param authorization_code [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Required list of fields to be updated in this request. - # @param version_info [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-                #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-                #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @param service_account_name [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new - # - # # Call the update_transfer_config method. - # result = client.update_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def update_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.update_transfer_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data transfer configuration, including any associated transfer - # runs and logs. - # - # @overload delete_transfer_config(request, options = nil) - # Pass arguments to `delete_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(name: nil) - # Pass arguments to `delete_transfer_config` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new - # - # # Call the delete_transfer_config method. - # result = client.delete_transfer_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.delete_transfer_config 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 - - ## - # Returns information about a data transfer config. - # - # @overload get_transfer_config(request, options = nil) - # Pass arguments to `get_transfer_config` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_config(name: nil) - # Pass arguments to `get_transfer_config` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new - # - # # Call the get_transfer_config method. - # result = client.get_transfer_config request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - # p result - # - def get_transfer_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest - - # Converts hash 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_transfer_config.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::Bigquery::DataTransfer::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_transfer_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_transfer_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.get_transfer_config 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 - - ## - # Returns information about all transfer configs owned by a project in the - # specified location. - # - # @overload list_transfer_configs(request, options = nil) - # Pass arguments to `list_transfer_configs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_configs(parent: nil, data_source_ids: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_transfer_configs` via keyword arguments. Note that at - # least one keyword argument is 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 BigQuery project id for which transfer configs - # should be returned: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @param data_source_ids [::Array<::String>] - # When specified, only configurations of requested data sources are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransfersRequest` list results. For multiple-page - # results, `ListTransfersResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new - # - # # Call the list_transfer_configs method. - # result = client.list_transfer_configs 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::Bigquery::DataTransfer::V1::TransferConfig. - # p item - # end - # - def list_transfer_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest - - # Converts hash 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_transfer_configs.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::Bigquery::DataTransfer::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_transfer_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transfer_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_transfer_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_configs, "transfer_configs", 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 - - ## - # Creates transfer runs for a time range [start_time, end_time]. - # For each date - or whatever granularity the data source supports - in the - # range, one transfer run is created. - # Note that runs are created per UTC time in the time range. - # DEPRECATED: use StartManualTransferRuns instead. - # - # @overload schedule_transfer_runs(request, options = nil) - # Pass arguments to `schedule_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload schedule_transfer_runs(parent: nil, start_time: nil, end_time: nil) - # Pass arguments to `schedule_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is 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. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Required. End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new - # - # # Call the schedule_transfer_runs method. - # result = client.schedule_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. - # p result - # - def schedule_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest - - # Converts hash 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.schedule_transfer_runs.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::Bigquery::DataTransfer::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.schedule_transfer_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.schedule_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.schedule_transfer_runs 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 - - ## - # Start manual transfer runs to be executed now with schedule_time equal to - # current time. The transfer runs can be created for a time range where the - # run_time is between start_time (inclusive) and end_time (exclusive), or for - # a specific run_time. - # - # @overload start_manual_transfer_runs(request, options = nil) - # Pass arguments to `start_manual_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_manual_transfer_runs(parent: nil, requested_time_range: nil, requested_run_time: nil) - # Pass arguments to `start_manual_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is 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. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param requested_time_range [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange, ::Hash] - # A time_range start and end timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_time_range must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_time_range`, `requested_run_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param requested_run_time [::Google::Protobuf::Timestamp, ::Hash] - # A run_time timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_run_time must be a past time and cannot include future time - # values. - # - # Note: The following parameters are mutually exclusive: `requested_run_time`, `requested_time_range`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new - # - # # Call the start_manual_transfer_runs method. - # result = client.start_manual_transfer_runs request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. - # p result - # - def start_manual_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest - - # Converts hash 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.start_manual_transfer_runs.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::Bigquery::DataTransfer::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.start_manual_transfer_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_manual_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.start_manual_transfer_runs 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 - - ## - # Returns information about the particular transfer run. - # - # @overload get_transfer_run(request, options = nil) - # Pass arguments to `get_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_run(name: nil) - # Pass arguments to `get_transfer_run` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new - # - # # Call the get_transfer_run method. - # result = client.get_transfer_run request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - # p result - # - def get_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest - - # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.get_transfer_run request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified transfer run. - # - # @overload delete_transfer_run(request, options = nil) - # Pass arguments to `delete_transfer_run` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_run(name: nil) - # Pass arguments to `delete_transfer_run` via keyword arguments. Note that at - # least one keyword argument is 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 field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new - # - # # Call the delete_transfer_run method. - # result = client.delete_transfer_run request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_transfer_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest - - # Converts hash 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_transfer_run.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::Bigquery::DataTransfer::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_transfer_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_transfer_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.delete_transfer_run 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 - - ## - # Returns information about running and completed transfer runs. - # - # @overload list_transfer_runs(request, options = nil) - # Pass arguments to `list_transfer_runs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_runs(parent: nil, states: nil, page_token: nil, page_size: nil, run_attempt: nil) - # Pass arguments to `list_transfer_runs` via keyword arguments. Note that at - # least one keyword argument is 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. Name of transfer configuration for which transfer runs should be - # retrieved. Format of transfer configuration resource name is: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @param states [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] - # When specified, only transfer runs with requested states are returned. - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferRunsRequest` list results. For multiple-page - # results, `ListTransferRunsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param run_attempt [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] - # Indicates how run attempts are to be pulled. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new - # - # # Call the list_transfer_runs method. - # result = client.list_transfer_runs 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::Bigquery::DataTransfer::V1::TransferRun. - # p item - # end - # - def list_transfer_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest - - # Converts hash 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_transfer_runs.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::Bigquery::DataTransfer::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_transfer_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transfer_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_transfer_runs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_runs, "transfer_runs", 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 log messages for the transfer run. - # - # @overload list_transfer_logs(request, options = nil) - # Pass arguments to `list_transfer_logs` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_transfer_logs(parent: nil, page_token: nil, page_size: nil, message_types: nil) - # Pass arguments to `list_transfer_logs` via keyword arguments. Note that at - # least one keyword argument is 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. Transfer run name in the form: - # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @param page_token [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferLogsRequest` list results. For multiple-page - # results, `ListTransferLogsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @param page_size [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @param message_types [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] - # Message types to return. If not populated - INFO, WARNING and ERROR - # messages are returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new - # - # # Call the list_transfer_logs method. - # result = client.list_transfer_logs 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::Bigquery::DataTransfer::V1::TransferMessage. - # p item - # end - # - def list_transfer_logs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest - - # Converts hash 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_transfer_logs.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::Bigquery::DataTransfer::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_transfer_logs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_transfer_logs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.list_transfer_logs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_transfer_service_stub, :list_transfer_logs, "transfer_messages", 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 true if valid credentials exist for the given data source and - # requesting user. - # - # @overload check_valid_creds(request, options = nil) - # Pass arguments to `check_valid_creds` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload check_valid_creds(name: nil) - # Pass arguments to `check_valid_creds` via keyword arguments. Note that at - # least one keyword argument is 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 data source in the form: - # `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new - # - # # Call the check_valid_creds method. - # result = client.check_valid_creds request - # - # # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. - # p result - # - def check_valid_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest - - # Converts hash 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.check_valid_creds.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::Bigquery::DataTransfer::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.check_valid_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.check_valid_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.check_valid_creds 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 - - ## - # Enroll data sources in a user project. This allows users to create transfer - # configurations for these data sources. They will also appear in the - # ListDataSources RPC and as such, will appear in the - # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents - # can be found in the public guide for - # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and - # [Data Transfer - # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). - # - # @overload enroll_data_sources(request, options = nil) - # Pass arguments to `enroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `enroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are enrolled. It is required to provide at least one - # data source id. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new - # - # # Call the enroll_data_sources method. - # result = client.enroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def enroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest - - # Converts hash 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.enroll_data_sources.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::Bigquery::DataTransfer::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.enroll_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.enroll_data_sources 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 - - ## - # Unenroll data sources in a user project. This allows users to remove - # transfer configurations for these data sources. They will no longer appear - # in the ListDataSources RPC and will also no longer appear in the [BigQuery - # UI](https://console.cloud.google.com/bigquery). Data transfers - # configurations of unenrolled data sources will not be scheduled. - # - # @overload unenroll_data_sources(request, options = nil) - # Pass arguments to `unenroll_data_sources` via a request object, either of type - # {::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload unenroll_data_sources(name: nil, data_source_ids: nil) - # Pass arguments to `unenroll_data_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @param data_source_ids [::Array<::String>] - # Data sources that are unenrolled. It is required to provide at least one - # data source id. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/data_transfer/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new - # - # # Call the unenroll_data_sources method. - # result = client.unenroll_data_sources request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def unenroll_data_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest - - # Converts hash 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.unenroll_data_sources.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::Bigquery::DataTransfer::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.unenroll_data_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.unenroll_data_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_transfer_service_stub.unenroll_data_sources 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 DataTransferService REST API. - # - # This class represents the configuration for DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_data_source to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_data_source.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 = "bigquerydatatransfer.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the DataTransferService 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 `get_data_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_source - ## - # RPC-specific configuration for `list_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_sources - ## - # RPC-specific configuration for `create_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_transfer_config - ## - # RPC-specific configuration for `update_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_transfer_config - ## - # RPC-specific configuration for `delete_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_config - ## - # RPC-specific configuration for `get_transfer_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_config - ## - # RPC-specific configuration for `list_transfer_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_configs - ## - # RPC-specific configuration for `schedule_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :schedule_transfer_runs - ## - # RPC-specific configuration for `start_manual_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :start_manual_transfer_runs - ## - # RPC-specific configuration for `get_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_transfer_run - ## - # RPC-specific configuration for `delete_transfer_run` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_transfer_run - ## - # RPC-specific configuration for `list_transfer_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_runs - ## - # RPC-specific configuration for `list_transfer_logs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_transfer_logs - ## - # RPC-specific configuration for `check_valid_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :check_valid_creds - ## - # RPC-specific configuration for `enroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :enroll_data_sources - ## - # RPC-specific configuration for `unenroll_data_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :unenroll_data_sources - - # @private - def initialize parent_rpcs = nil - get_data_source_config = parent_rpcs.get_data_source if parent_rpcs.respond_to? :get_data_source - @get_data_source = ::Gapic::Config::Method.new get_data_source_config - list_data_sources_config = parent_rpcs.list_data_sources if parent_rpcs.respond_to? :list_data_sources - @list_data_sources = ::Gapic::Config::Method.new list_data_sources_config - create_transfer_config_config = parent_rpcs.create_transfer_config if parent_rpcs.respond_to? :create_transfer_config - @create_transfer_config = ::Gapic::Config::Method.new create_transfer_config_config - update_transfer_config_config = parent_rpcs.update_transfer_config if parent_rpcs.respond_to? :update_transfer_config - @update_transfer_config = ::Gapic::Config::Method.new update_transfer_config_config - delete_transfer_config_config = parent_rpcs.delete_transfer_config if parent_rpcs.respond_to? :delete_transfer_config - @delete_transfer_config = ::Gapic::Config::Method.new delete_transfer_config_config - get_transfer_config_config = parent_rpcs.get_transfer_config if parent_rpcs.respond_to? :get_transfer_config - @get_transfer_config = ::Gapic::Config::Method.new get_transfer_config_config - list_transfer_configs_config = parent_rpcs.list_transfer_configs if parent_rpcs.respond_to? :list_transfer_configs - @list_transfer_configs = ::Gapic::Config::Method.new list_transfer_configs_config - schedule_transfer_runs_config = parent_rpcs.schedule_transfer_runs if parent_rpcs.respond_to? :schedule_transfer_runs - @schedule_transfer_runs = ::Gapic::Config::Method.new schedule_transfer_runs_config - start_manual_transfer_runs_config = parent_rpcs.start_manual_transfer_runs if parent_rpcs.respond_to? :start_manual_transfer_runs - @start_manual_transfer_runs = ::Gapic::Config::Method.new start_manual_transfer_runs_config - get_transfer_run_config = parent_rpcs.get_transfer_run if parent_rpcs.respond_to? :get_transfer_run - @get_transfer_run = ::Gapic::Config::Method.new get_transfer_run_config - delete_transfer_run_config = parent_rpcs.delete_transfer_run if parent_rpcs.respond_to? :delete_transfer_run - @delete_transfer_run = ::Gapic::Config::Method.new delete_transfer_run_config - list_transfer_runs_config = parent_rpcs.list_transfer_runs if parent_rpcs.respond_to? :list_transfer_runs - @list_transfer_runs = ::Gapic::Config::Method.new list_transfer_runs_config - list_transfer_logs_config = parent_rpcs.list_transfer_logs if parent_rpcs.respond_to? :list_transfer_logs - @list_transfer_logs = ::Gapic::Config::Method.new list_transfer_logs_config - check_valid_creds_config = parent_rpcs.check_valid_creds if parent_rpcs.respond_to? :check_valid_creds - @check_valid_creds = ::Gapic::Config::Method.new check_valid_creds_config - enroll_data_sources_config = parent_rpcs.enroll_data_sources if parent_rpcs.respond_to? :enroll_data_sources - @enroll_data_sources = ::Gapic::Config::Method.new enroll_data_sources_config - unenroll_data_sources_config = parent_rpcs.unenroll_data_sources if parent_rpcs.respond_to? :unenroll_data_sources - @unenroll_data_sources = ::Gapic::Config::Method.new unenroll_data_sources_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb deleted file mode 100644 index 0683fbfed415..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest/service_stub.rb +++ /dev/null @@ -1,1177 +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/bigquery/datatransfer/v1/datatransfer_pb" - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - module Rest - ## - # REST service stub for the DataTransferService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] - # 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::Bigquery::DataTransfer::V1::DataSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource] - # A result object deserialized from the server's reply - def get_data_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_source_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_data_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.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_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] - # 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::Bigquery::DataTransfer::V1::ListDataSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse] - # A result object deserialized from the server's reply - def list_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_sources_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_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.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_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] - # 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::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # A result object deserialized from the server's reply - def create_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_transfer_config_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_transfer_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] - # 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::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # A result object deserialized from the server's reply - def update_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_transfer_config_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_transfer_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] - # 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_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_config_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_transfer_config", - 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 get_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] - # 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::Bigquery::DataTransfer::V1::TransferConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # A result object deserialized from the server's reply - def get_transfer_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_config_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_transfer_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_configs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] - # 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::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse] - # A result object deserialized from the server's reply - def list_transfer_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_configs_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_transfer_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the schedule_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] - # 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::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse] - # A result object deserialized from the server's reply - def schedule_transfer_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_schedule_transfer_runs_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: "schedule_transfer_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the start_manual_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] - # 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::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse] - # A result object deserialized from the server's reply - def start_manual_transfer_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_manual_transfer_runs_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: "start_manual_transfer_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.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_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] - # 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::Bigquery::DataTransfer::V1::TransferRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun] - # A result object deserialized from the server's reply - def get_transfer_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_transfer_run_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_transfer_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.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_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] - # 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_transfer_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_transfer_run_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_transfer_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] - # 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::Bigquery::DataTransfer::V1::ListTransferRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse] - # A result object deserialized from the server's reply - def list_transfer_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_runs_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_transfer_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.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_transfer_logs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] - # 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::Bigquery::DataTransfer::V1::ListTransferLogsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse] - # A result object deserialized from the server's reply - def list_transfer_logs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_transfer_logs_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_transfer_logs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the check_valid_creds REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] - # 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::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse] - # A result object deserialized from the server's reply - def check_valid_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_check_valid_creds_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: "check_valid_creds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] - # 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 enroll_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enroll_data_sources_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: "enroll_data_sources", - 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 unenroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] - # 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 unenroll_data_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_unenroll_data_sources_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: "unenroll_data_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_source REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest] - # 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_data_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest] - # 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_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataSources", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest] - # 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_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/transferConfigs", - body: "transfer_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/transferConfigs", - body: "transfer_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest] - # 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_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{transfer_config.name}", - body: "transfer_config", - matches: [ - ["transfer_config.name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{transfer_config.name}", - body: "transfer_config", - matches: [ - ["transfer_config.name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest] - # 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_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_transfer_config REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest] - # 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_transfer_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transfer_configs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest] - # 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_transfer_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the schedule_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_schedule_transfer_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:scheduleRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:scheduleRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_manual_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_manual_transfer_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:startManualRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:startManualRuns", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest] - # 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_transfer_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_transfer_run REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest] - # 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_transfer_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transfer_runs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest] - # 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_transfer_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/runs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/runs", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_transfer_logs REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest] - # 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_transfer_logs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferLogs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/transferLogs", - matches: [ - ["parent", %r{^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the check_valid_creds REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_check_valid_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:checkValidCreds", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:checkValidCreds", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/dataSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enroll_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:enrollDataSources", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:enrollDataSources", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the unenroll_data_sources REST call - # - # @param request_pb [::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_unenroll_data_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:unenrollDataSources", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb deleted file mode 100644 index f6e1e405ec02..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/rest.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" -require "google/cloud/bigquery/data_transfer/v1/bindings_override" -require "google/cloud/bigquery/data_transfer/v1/version" - -module Google - module Cloud - module Bigquery - module DataTransfer - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/data_transfer/v1/rest" - # client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb deleted file mode 100644 index 048f745f46a1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/data_transfer/v1/version.rb +++ /dev/null @@ -1,30 +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 Bigquery - module DataTransfer - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb deleted file mode 100644 index 2e3350ee7636..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/datatransfer/v1/datatransfer.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/bigquery/datatransfer/v1/transfer_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n8google/cloud/bigquery/datatransfer/v1/datatransfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/bigquery/datatransfer/v1/transfer.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x8f\x05\n\x13\x44\x61taSourceParameter\x12\x10\n\x08param_id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12M\n\x04type\x18\x04 \x01(\x0e\x32?.google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type\x12\x10\n\x08required\x18\x05 \x01(\x08\x12\x10\n\x08repeated\x18\x06 \x01(\x08\x12\x18\n\x10validation_regex\x18\x07 \x01(\t\x12\x16\n\x0e\x61llowed_values\x18\x08 \x03(\t\x12/\n\tmin_value\x18\t \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12/\n\tmax_value\x18\n \x01(\x0b\x32\x1c.google.protobuf.DoubleValue\x12J\n\x06\x66ields\x18\x0b \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x1e\n\x16validation_description\x18\x0c \x01(\t\x12\x1b\n\x13validation_help_url\x18\r \x01(\t\x12\x11\n\timmutable\x18\x0e \x01(\x08\x12\x0f\n\x07recurse\x18\x0f \x01(\x08\x12\x12\n\ndeprecated\x18\x14 \x01(\x08\"s\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\x0b\n\x07INTEGER\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\x0b\n\x07\x42OOLEAN\x10\x04\x12\n\n\x06RECORD\x10\x05\x12\r\n\tPLUS_PAGE\x10\x06\x12\x08\n\x04LIST\x10\x07\"\x9c\t\n\nDataSource\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\x0e\x64\x61ta_source_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x11\n\tclient_id\x18\x05 \x01(\t\x12\x0e\n\x06scopes\x18\x06 \x03(\t\x12N\n\rtransfer_type\x18\x07 \x01(\x0e\x32\x33.google.cloud.bigquery.datatransfer.v1.TransferTypeB\x02\x18\x01\x12\'\n\x1bsupports_multiple_transfers\x18\x08 \x01(\x08\x42\x02\x18\x01\x12\x1f\n\x17update_deadline_seconds\x18\t \x01(\x05\x12\x18\n\x10\x64\x65\x66\x61ult_schedule\x18\n \x01(\t\x12 \n\x18supports_custom_schedule\x18\x0b \x01(\x08\x12N\n\nparameters\x18\x0c \x03(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.DataSourceParameter\x12\x10\n\x08help_url\x18\r \x01(\t\x12_\n\x12\x61uthorization_type\x18\x0e \x01(\x0e\x32\x43.google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType\x12\\\n\x11\x64\x61ta_refresh_type\x18\x0f \x01(\x0e\x32\x41.google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType\x12(\n default_data_refresh_window_days\x18\x10 \x01(\x05\x12\x1c\n\x14manual_runs_disabled\x18\x11 \x01(\x08\x12<\n\x19minimum_schedule_interval\x18\x12 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x8a\x01\n\x11\x41uthorizationType\x12\"\n\x1e\x41UTHORIZATION_TYPE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41UTHORIZATION_CODE\x10\x01\x12\"\n\x1eGOOGLE_PLUS_AUTHORIZATION_CODE\x10\x02\x12\x15\n\x11\x46IRST_PARTY_OAUTH\x10\x03\"c\n\x0f\x44\x61taRefreshType\x12!\n\x1d\x44\x41TA_REFRESH_TYPE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSLIDING_WINDOW\x10\x01\x12\x19\n\x15\x43USTOM_SLIDING_WINDOW\x10\x02:\xa5\x01\xea\x41\xa1\x01\n.bigquerydatatransfer.googleapis.com/DataSource\x12,projects/{project}/dataSources/{data_source}\x12\x41projects/{project}/locations/{location}/dataSources/{data_source}\"\\\n\x14GetDataSourceRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"\x87\x01\n\x16ListDataSourcesRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigquerydatatransfer.googleapis.com/DataSource\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x80\x01\n\x17ListDataSourcesResponse\x12G\n\x0c\x64\x61ta_sources\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.datatransfer.v1.DataSource\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\x92\x02\n\x1b\x43reateTransferConfigRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12S\n\x0ftransfer_config\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"\xfc\x01\n\x1bUpdateTransferConfigRequest\x12S\n\x0ftransfer_config\x18\x01 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x02\x12\x1e\n\x12\x61uthorization_code\x18\x03 \x01(\tB\x02\x18\x01\x12\x34\n\x0bupdate_mask\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x14\n\x0cversion_info\x18\x05 \x01(\t\x12\x1c\n\x14service_account_name\x18\x06 \x01(\t\"d\n\x18GetTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"g\n\x1b\x44\x65leteTransferConfigRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\"V\n\x15GetTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"Y\n\x18\x44\x65leteTransferRunRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\"\xa8\x01\n\x1aListTransferConfigsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32\x62igquerydatatransfer.googleapis.com/TransferConfig\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"\x91\x01\n\x1bListTransferConfigsResponse\x12T\n\x10transfer_configs\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.TransferConfigB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xde\x02\n\x17ListTransferRunsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'bigquerydatatransfer.googleapis.com/Run\x12\x44\n\x06states\x18\x02 \x03(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\x12^\n\x0brun_attempt\x18\x05 \x01(\x0e\x32I.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt\"5\n\nRunAttempt\x12\x1b\n\x17RUN_ATTEMPT_UNSPECIFIED\x10\x00\x12\n\n\x06LATEST\x10\x01\"\x88\x01\n\x18ListTransferRunsResponse\x12N\n\rtransfer_runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRunB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xe0\x01\n\x17ListTransferLogsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'bigquerydatatransfer.googleapis.com/Run\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12]\n\rmessage_types\x18\x06 \x03(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\"\x90\x01\n\x18ListTransferLogsResponse\x12V\n\x11transfer_messages\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.TransferMessageB\x03\xe0\x41\x03\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x03\"^\n\x16\x43heckValidCredsRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigquerydatatransfer.googleapis.com/DataSource\"2\n\x17\x43heckValidCredsResponse\x12\x17\n\x0fhas_valid_creds\x18\x01 \x01(\x08\"\xd1\x01\n\x1bScheduleTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"`\n\x1cScheduleTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"\x8a\x03\n\x1eStartManualTransferRunsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12o\n\x14requested_time_range\x18\x03 \x01(\x0b\x32O.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRangeH\x00\x12\x38\n\x12requested_run_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x1ai\n\tTimeRange\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x06\n\x04time\"c\n\x1fStartManualTransferRunsResponse\x12@\n\x04runs\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"F\n\x18\x45nrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t\"H\n\x1aUnenrollDataSourcesRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\x0f\x64\x61ta_source_ids\x18\x02 \x03(\t2\xd5\"\n\x13\x44\x61taTransferService\x12\xe6\x01\n\rGetDataSource\x12;.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest\x1a\x31.google.cloud.bigquery.datatransfer.v1.DataSource\"e\xda\x41\x04name\x82\xd3\xe4\x93\x02X\x12//v1/{name=projects/*/locations/*/dataSources/*}Z%\x12#/v1/{name=projects/*/dataSources/*}\x12\xf9\x01\n\x0fListDataSources\x12=.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest\x1a>.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse\"g\xda\x41\x06parent\x82\xd3\xe4\x93\x02X\x12//v1/{parent=projects/*/locations/*}/dataSourcesZ%\x12#/v1/{parent=projects/*}/dataSources\x12\xb6\x02\n\x14\x43reateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xa2\x01\xda\x41\x16parent,transfer_config\x82\xd3\xe4\x93\x02\x82\x01\"3/v1/{parent=projects/*/locations/*}/transferConfigs:\x0ftransfer_configZ:\"\'/v1/{parent=projects/*}/transferConfigs:\x0ftransfer_config\x12\xdb\x02\n\x14UpdateTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"\xc7\x01\xda\x41\x1btransfer_config,update_mask\x82\xd3\xe4\x93\x02\xa2\x01\x32\x43/v1/{transfer_config.name=projects/*/locations/*/transferConfigs/*}:\x0ftransfer_configZJ27/v1/{transfer_config.name=projects/*/transferConfigs/*}:\x0ftransfer_config\x12\xe1\x01\n\x14\x44\x65leteTransferConfig\x12\x42.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest\x1a\x16.google.protobuf.Empty\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`*3/v1/{name=projects/*/locations/*/transferConfigs/*}Z)*\'/v1/{name=projects/*/transferConfigs/*}\x12\xfa\x01\n\x11GetTransferConfig\x12?.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest\x1a\x35.google.cloud.bigquery.datatransfer.v1.TransferConfig\"m\xda\x41\x04name\x82\xd3\xe4\x93\x02`\x12\x33/v1/{name=projects/*/locations/*/transferConfigs/*}Z)\x12\'/v1/{name=projects/*/transferConfigs/*}\x12\x8d\x02\n\x13ListTransferConfigs\x12\x41.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest\x1a\x42.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse\"o\xda\x41\x06parent\x82\xd3\xe4\x93\x02`\x12\x33/v1/{parent=projects/*/locations/*}/transferConfigsZ)\x12\'/v1/{parent=projects/*}/transferConfigs\x12\xcd\x02\n\x14ScheduleTransferRuns\x12\x42.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest\x1a\x43.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse\"\xab\x01\x88\x02\x01\xda\x41\x1aparent,start_time,end_time\x82\xd3\xe4\x93\x02\x84\x01\"B/v1/{parent=projects/*/locations/*/transferConfigs/*}:scheduleRuns:\x01*Z;\"6/v1/{parent=projects/*/transferConfigs/*}:scheduleRuns:\x01*\x12\xbc\x02\n\x17StartManualTransferRuns\x12\x45.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest\x1a\x46.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse\"\x91\x01\x82\xd3\xe4\x93\x02\x8a\x01\"E/v1/{parent=projects/*/locations/*/transferConfigs/*}:startManualRuns:\x01*Z>\"9/v1/{parent=projects/*/transferConfigs/*}:startManualRuns:\x01*\x12\xff\x01\n\x0eGetTransferRun\x12<.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest\x1a\x32.google.cloud.bigquery.datatransfer.v1.TransferRun\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n\x12:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0\x12./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\xe9\x01\n\x11\x44\x65leteTransferRun\x12?.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest\x1a\x16.google.protobuf.Empty\"{\xda\x41\x04name\x82\xd3\xe4\x93\x02n*:/v1/{name=projects/*/locations/*/transferConfigs/*/runs/*}Z0*./v1/{name=projects/*/transferConfigs/*/runs/*}\x12\x92\x02\n\x10ListTransferRuns\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse\"}\xda\x41\x06parent\x82\xd3\xe4\x93\x02n\x12:/v1/{parent=projects/*/locations/*/transferConfigs/*}/runsZ0\x12./v1/{parent=projects/*/transferConfigs/*}/runs\x12\xb2\x02\n\x10ListTransferLogs\x12>.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest\x1a?.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse\"\x9c\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x8c\x01\x12I/v1/{parent=projects/*/locations/*/transferConfigs/*/runs/*}/transferLogsZ?\x12=/v1/{parent=projects/*/transferConfigs/*/runs/*}/transferLogs\x12\x9e\x02\n\x0f\x43heckValidCreds\x12=.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest\x1a>.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse\"\x8b\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02~\"?/v1/{name=projects/*/locations/*/dataSources/*}:checkValidCreds:\x01*Z8\"3/v1/{name=projects/*/dataSources/*}:checkValidCreds:\x01*\x12\xda\x01\n\x11\x45nrollDataSources\x12?.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"l\x82\xd3\xe4\x93\x02\x66\"3/v1/{name=projects/*/locations/*}:enrollDataSources:\x01*Z,\"\'/v1/{name=projects/*}:enrollDataSources:\x01*\x12\xb2\x01\n\x13UnenrollDataSources\x12\x41.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest\x1a\x16.google.protobuf.Empty\"@\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*}:unenrollDataSources:\x01*\x1aW\xca\x41#bigquerydatatransfer.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8b\x02\n)com.google.cloud.bigquery.datatransfer.v1B\x11\x44\x61taTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - DataSourceParameter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter").msgclass - DataSourceParameter::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSourceParameter.Type").enummodule - DataSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource").msgclass - DataSource::AuthorizationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.AuthorizationType").enummodule - DataSource::DataRefreshType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DataSource.DataRefreshType").enummodule - GetDataSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest").msgclass - ListDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest").msgclass - ListDataSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse").msgclass - CreateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest").msgclass - UpdateTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest").msgclass - GetTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest").msgclass - DeleteTransferConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest").msgclass - GetTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest").msgclass - DeleteTransferRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest").msgclass - ListTransferConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest").msgclass - ListTransferConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse").msgclass - ListTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest").msgclass - ListTransferRunsRequest::RunAttempt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest.RunAttempt").enummodule - ListTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse").msgclass - ListTransferLogsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest").msgclass - ListTransferLogsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse").msgclass - CheckValidCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest").msgclass - CheckValidCredsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse").msgclass - ScheduleTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest").msgclass - ScheduleTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse").msgclass - StartManualTransferRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest").msgclass - StartManualTransferRunsRequest::TimeRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest.TimeRange").msgclass - StartManualTransferRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse").msgclass - EnrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest").msgclass - UnenrollDataSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb deleted file mode 100644 index 87f710bad15b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/datatransfer_services_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto for package 'Google.Cloud.Bigquery.DataTransfer.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigquery/datatransfer/v1/datatransfer_pb' - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - module DataTransferService - # This API allows users to manage their data transfers into BigQuery. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.datatransfer.v1.DataTransferService' - - # Retrieves a supported data source and returns its settings. - rpc :GetDataSource, ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource - # Lists supported data sources and returns their settings. - rpc :ListDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse - # Creates a new data transfer configuration. - rpc :CreateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig - # Updates a data transfer configuration. - # All fields must be set, even if they are not updated. - rpc :UpdateTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig - # Deletes a data transfer configuration, including any associated transfer - # runs and logs. - rpc :DeleteTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, ::Google::Protobuf::Empty - # Returns information about a data transfer config. - rpc :GetTransferConfig, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig - # Returns information about all transfer configs owned by a project in the - # specified location. - rpc :ListTransferConfigs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse - # Creates transfer runs for a time range [start_time, end_time]. - # For each date - or whatever granularity the data source supports - in the - # range, one transfer run is created. - # Note that runs are created per UTC time in the time range. - # DEPRECATED: use StartManualTransferRuns instead. - rpc :ScheduleTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse - # Start manual transfer runs to be executed now with schedule_time equal to - # current time. The transfer runs can be created for a time range where the - # run_time is between start_time (inclusive) and end_time (exclusive), or for - # a specific run_time. - rpc :StartManualTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse - # Returns information about the particular transfer run. - rpc :GetTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun - # Deletes the specified transfer run. - rpc :DeleteTransferRun, ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, ::Google::Protobuf::Empty - # Returns information about running and completed transfer runs. - rpc :ListTransferRuns, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse - # Returns log messages for the transfer run. - rpc :ListTransferLogs, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse - # Returns true if valid credentials exist for the given data source and - # requesting user. - rpc :CheckValidCreds, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse - # Enroll data sources in a user project. This allows users to create transfer - # configurations for these data sources. They will also appear in the - # ListDataSources RPC and as such, will appear in the - # [BigQuery UI](https://console.cloud.google.com/bigquery), and the documents - # can be found in the public guide for - # [BigQuery Web UI](https://cloud.google.com/bigquery/bigquery-web-ui) and - # [Data Transfer - # Service](https://cloud.google.com/bigquery/docs/working-with-transfers). - rpc :EnrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, ::Google::Protobuf::Empty - # Unenroll data sources in a user project. This allows users to remove - # transfer configurations for these data sources. They will no longer appear - # in the ListDataSources RPC and will also no longer appear in the [BigQuery - # UI](https://console.cloud.google.com/bigquery). Data transfers - # configurations of unenrolled data sources will not be scheduled. - rpc :UnenrollDataSources, ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb deleted file mode 100644 index 6e1bfea6e14f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/lib/google/cloud/bigquery/datatransfer/v1/transfer_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/datatransfer/v1/transfer.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n4google/cloud/bigquery/datatransfer/v1/transfer.proto\x12%google.cloud.bigquery.datatransfer.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"0\n\x10\x45mailPreferences\x12\x1c\n\x14\x65nable_failure_email\x18\x01 \x01(\x08\"\x90\x01\n\x0fScheduleOptions\x12\x1f\n\x17\x64isable_auto_scheduling\x18\x03 \x01(\x08\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xa7\x02\n\x11ScheduleOptionsV2\x12W\n\x13time_based_schedule\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.TimeBasedScheduleH\x00\x12P\n\x0fmanual_schedule\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.datatransfer.v1.ManualScheduleH\x00\x12[\n\x15\x65vent_driven_schedule\x18\x03 \x01(\x0b\x32:.google.cloud.bigquery.datatransfer.v1.EventDrivenScheduleH\x00\x42\n\n\x08schedule\"\x83\x01\n\x11TimeBasedSchedule\x12\x10\n\x08schedule\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x10\n\x0eManualSchedule\"2\n\x13\x45ventDrivenSchedule\x12\x1b\n\x13pubsub_subscription\x18\x01 \x01(\t\"(\n\x08UserInfo\x12\x12\n\x05\x65mail\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_email\"\x9b\t\n\x0eTransferConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12 \n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tH\x00\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x16\n\x0e\x64\x61ta_source_id\x18\x05 \x01(\t\x12\'\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x10\n\x08schedule\x18\x07 \x01(\t\x12P\n\x10schedule_options\x18\x18 \x01(\x0b\x32\x36.google.cloud.bigquery.datatransfer.v1.ScheduleOptions\x12U\n\x13schedule_options_v2\x18\x1f \x01(\x0b\x32\x38.google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2\x12 \n\x18\x64\x61ta_refresh_window_days\x18\x0c \x01(\x05\x12\x10\n\x08\x64isabled\x18\r \x01(\x08\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\rnext_run_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x05state\x18\n \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferStateB\x03\xe0\x41\x03\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x1b\n\x0e\x64\x61taset_region\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12!\n\x19notification_pubsub_topic\x18\x0f \x01(\t\x12R\n\x11\x65mail_preferences\x18\x12 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferences\x12M\n\nowner_info\x18\x1b \x01(\x0b\x32/.google.cloud.bigquery.datatransfer.v1.UserInfoB\x03\xe0\x41\x03H\x01\x88\x01\x01\x12`\n\x18\x65ncryption_configuration\x18\x1c \x01(\x0b\x32>.google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration\x12&\n\x05\x65rror\x18 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03:\xb9\x01\xea\x41\xb5\x01\n2bigquerydatatransfer.googleapis.com/TransferConfig\x12\x34projects/{project}/transferConfigs/{transfer_config}\x12Iprojects/{project}/locations/{location}/transferConfigs/{transfer_config}B\r\n\x0b\x64\x65stinationB\r\n\x0b_owner_info\"M\n\x17\x45ncryptionConfiguration\x12\x32\n\x0ckms_key_name\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValue\"\xff\x06\n\x0bTransferRun\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x31\n\rschedule_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08run_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12(\n\x0c\x65rror_status\x18\x15 \x01(\x0b\x32\x12.google.rpc.Status\x12\x33\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_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,\n\x06params\x18\t \x01(\x0b\x32\x17.google.protobuf.StructB\x03\xe0\x41\x03\x12%\n\x16\x64\x65stination_dataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1b\n\x0e\x64\x61ta_source_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32\x34.google.cloud.bigquery.datatransfer.v1.TransferState\x12\x0f\n\x07user_id\x18\x0b \x01(\x03\x12\x15\n\x08schedule\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12&\n\x19notification_pubsub_topic\x18\x17 \x01(\tB\x03\xe0\x41\x03\x12W\n\x11\x65mail_preferences\x18\x19 \x01(\x0b\x32\x37.google.cloud.bigquery.datatransfer.v1.EmailPreferencesB\x03\xe0\x41\x03:\xc4\x01\xea\x41\xc0\x01\n\'bigquerydatatransfer.googleapis.com/Run\x12?projects/{project}/transferConfigs/{transfer_config}/runs/{run}\x12Tprojects/{project}/locations/{location}/transferConfigs/{transfer_config}/runs/{run}B\r\n\x0b\x64\x65stination\"\x8a\x02\n\x0fTransferMessage\x12\x30\n\x0cmessage_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x08severity\x18\x02 \x01(\x0e\x32\x46.google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity\x12\x14\n\x0cmessage_text\x18\x03 \x01(\t\"U\n\x0fMessageSeverity\x12 \n\x1cMESSAGE_SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03*K\n\x0cTransferType\x12\x1d\n\x19TRANSFER_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41TCH\x10\x01\x12\r\n\tSTREAMING\x10\x02\x1a\x02\x18\x01*s\n\rTransferState\x12\x1e\n\x1aTRANSFER_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x02\x12\x0b\n\x07RUNNING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\r\n\tCANCELLED\x10\x06\x42\x8f\x02\n)com.google.cloud.bigquery.datatransfer.v1B\rTransferProtoP\x01ZMcloud.google.com/go/bigquery/datatransfer/apiv1/datatransferpb;datatransferpb\xa2\x02\x05GCBDT\xaa\x02%Google.Cloud.BigQuery.DataTransfer.V1\xca\x02%Google\\Cloud\\BigQuery\\DataTransfer\\V1\xea\x02)Google::Cloud::Bigquery::DataTransfer::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module DataTransfer - module V1 - EmailPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EmailPreferences").msgclass - ScheduleOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptions").msgclass - ScheduleOptionsV2 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ScheduleOptionsV2").msgclass - TimeBasedSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TimeBasedSchedule").msgclass - ManualSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.ManualSchedule").msgclass - EventDrivenSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EventDrivenSchedule").msgclass - UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.UserInfo").msgclass - TransferConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferConfig").msgclass - EncryptionConfiguration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.EncryptionConfiguration").msgclass - TransferRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferRun").msgclass - TransferMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage").msgclass - TransferMessage::MessageSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferMessage.MessageSeverity").enummodule - TransferType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferType").enummodule - TransferState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.datatransfer.v1.TransferState").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md deleted file mode 100644 index 614f3cdea732..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Data Transfer Service 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-bigquery-data_transfer-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb deleted file mode 100644 index 8aee7c146a1f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/datatransfer.rb +++ /dev/null @@ -1,726 +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 Bigquery - module DataTransfer - module V1 - # A parameter used to define custom fields in a data source definition. - # @!attribute [rw] param_id - # @return [::String] - # Parameter identifier. - # @!attribute [rw] display_name - # @return [::String] - # Parameter display name in the user interface. - # @!attribute [rw] description - # @return [::String] - # Parameter description. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter::Type] - # Parameter type. - # @!attribute [rw] required - # @return [::Boolean] - # Is parameter required. - # @!attribute [rw] repeated - # @return [::Boolean] - # Deprecated. This field has no effect. - # @!attribute [rw] validation_regex - # @return [::String] - # Regular expression which can be used for parameter validation. - # @!attribute [rw] allowed_values - # @return [::Array<::String>] - # All possible values for the parameter. - # @!attribute [rw] min_value - # @return [::Google::Protobuf::DoubleValue] - # For integer and double values specifies minimum allowed value. - # @!attribute [rw] max_value - # @return [::Google::Protobuf::DoubleValue] - # For integer and double values specifies maximum allowed value. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] - # Deprecated. This field has no effect. - # @!attribute [rw] validation_description - # @return [::String] - # Description of the requirements for this field, in case the user input does - # not fulfill the regex pattern or min/max values. - # @!attribute [rw] validation_help_url - # @return [::String] - # URL to a help document to further explain the naming requirements. - # @!attribute [rw] immutable - # @return [::Boolean] - # Cannot be changed after initial creation. - # @!attribute [rw] recurse - # @return [::Boolean] - # Deprecated. This field has no effect. - # @!attribute [rw] deprecated - # @return [::Boolean] - # If true, it should not be used in new transfers, and it should not be - # visible to users. - class DataSourceParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Parameter type. - module Type - # Type unspecified. - TYPE_UNSPECIFIED = 0 - - # String parameter. - STRING = 1 - - # Integer parameter (64-bits). - # Will be serialized to json as string. - INTEGER = 2 - - # Double precision floating point parameter. - DOUBLE = 3 - - # Boolean parameter. - BOOLEAN = 4 - - # Deprecated. This field has no effect. - RECORD = 5 - - # Page ID for a Google+ Page. - PLUS_PAGE = 6 - - # List of strings parameter. - LIST = 7 - end - end - - # Defines the properties and custom parameters for a data source. - # @!attribute [r] name - # @return [::String] - # Output only. Data source resource name. - # @!attribute [rw] data_source_id - # @return [::String] - # Data source id. - # @!attribute [rw] display_name - # @return [::String] - # User friendly data source name. - # @!attribute [rw] description - # @return [::String] - # User friendly data source description string. - # @!attribute [rw] client_id - # @return [::String] - # Data source client id which should be used to receive refresh token. - # @!attribute [rw] scopes - # @return [::Array<::String>] - # Api auth scopes for which refresh token needs to be obtained. These are - # scopes needed by a data source to prepare data and ingest them into - # BigQuery, e.g., https://www.googleapis.com/auth/bigquery - # @!attribute [rw] transfer_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferType] - # Deprecated. This field has no effect. - # @!attribute [rw] supports_multiple_transfers - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Deprecated. This field has no effect. - # @!attribute [rw] update_deadline_seconds - # @return [::Integer] - # The number of seconds to wait for an update from the data source - # before the Data Transfer Service marks the transfer as FAILED. - # @!attribute [rw] default_schedule - # @return [::String] - # Default data transfer schedule. - # Examples of valid schedules include: - # `1st,3rd monday of month 15:30`, - # `every wed,fri of jan,jun 13:15`, and - # `first sunday of quarter 00:00`. - # @!attribute [rw] supports_custom_schedule - # @return [::Boolean] - # Specifies whether the data source supports a user defined schedule, or - # operates on the default schedule. - # When set to `true`, user can override default schedule. - # @!attribute [rw] parameters - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSourceParameter>] - # Data source parameters. - # @!attribute [rw] help_url - # @return [::String] - # Url for the help document for this data source. - # @!attribute [rw] authorization_type - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::AuthorizationType] - # Indicates the type of authorization. - # @!attribute [rw] data_refresh_type - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::DataSource::DataRefreshType] - # Specifies whether the data source supports automatic data refresh for the - # past few days, and how it's supported. - # For some data sources, data might not be complete until a few days later, - # so it's useful to refresh data automatically. - # @!attribute [rw] default_data_refresh_window_days - # @return [::Integer] - # Default data refresh window on days. - # Only meaningful when `data_refresh_type` = `SLIDING_WINDOW`. - # @!attribute [rw] manual_runs_disabled - # @return [::Boolean] - # Disables backfilling and manual run scheduling - # for the data source. - # @!attribute [rw] minimum_schedule_interval - # @return [::Google::Protobuf::Duration] - # The minimum interval for scheduler to schedule runs. - class DataSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of authorization needed for this data source. - module AuthorizationType - # Type unspecified. - AUTHORIZATION_TYPE_UNSPECIFIED = 0 - - # Use OAuth 2 authorization codes that can be exchanged - # for a refresh token on the backend. - AUTHORIZATION_CODE = 1 - - # Return an authorization code for a given Google+ page that can then be - # exchanged for a refresh token on the backend. - GOOGLE_PLUS_AUTHORIZATION_CODE = 2 - - # Use First Party OAuth. - FIRST_PARTY_OAUTH = 3 - end - - # Represents how the data source supports data auto refresh. - module DataRefreshType - # The data source won't support data auto refresh, which is default value. - DATA_REFRESH_TYPE_UNSPECIFIED = 0 - - # The data source supports data auto refresh, and runs will be scheduled - # for the past few days. Does not allow custom values to be set for each - # transfer config. - SLIDING_WINDOW = 1 - - # The data source supports data auto refresh, and runs will be scheduled - # for the past few days. Allows custom values to be set for each transfer - # config. - CUSTOM_SLIDING_WINDOW = 2 - end - end - - # A request to get data source info. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}` - class GetDataSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list supported data sources and their data transfer settings. - # @!attribute [rw] parent - # @return [::String] - # Required. The BigQuery project id for which data sources should be - # returned. Must be in the form: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListDataSourcesRequest` list results. For multiple-page - # results, `ListDataSourcesResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - class ListDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Returns list of supported data sources and their metadata. - # @!attribute [rw] data_sources - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::DataSource>] - # List of supported data sources and their transfer settings. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `ListDataSourcesRequest.page_token` - # to request the next page of list results. - class ListDataSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a data transfer configuration. If new credentials are - # needed for this transfer configuration, authorization info must be provided. - # If authorization info is provided, the transfer configuration will be - # associated with the user id corresponding to the authorization info. - # Otherwise, the transfer configuration will be associated with the calling - # user. - # - # When using a cross project service account for creating a transfer config, - # you must enable cross project service account usage. For more information, - # see [Disable attachment of service accounts to resources in other - # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). - # @!attribute [rw] parent - # @return [::String] - # Required. The BigQuery project id where the transfer configuration should - # be created. Must be in the format - # projects/\\{project_id}/locations/\\{location_id} or projects/\\{project_id}. If - # specified location and location of the destination bigquery dataset do not - # match - the request will fail. - # @!attribute [rw] transfer_config - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # Required. Data transfer configuration to create. - # @!attribute [rw] authorization_code - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @!attribute [rw] version_info - # @return [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # create the transfer config. - # @!attribute [rw] service_account_name - # @return [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - class CreateTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a transfer configuration. To update the user id of the - # transfer configuration, authorization info needs to be provided. - # - # When using a cross project service account for updating a transfer config, - # you must enable cross project service account usage. For more information, - # see [Disable attachment of service accounts to resources in other - # projects](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-service-accounts#disable_cross_project_service_accounts). - # @!attribute [rw] transfer_config - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig] - # Required. Data transfer configuration to create. - # @!attribute [rw] authorization_code - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: Authorization code was required when - # `transferConfig.dataSourceId` is 'youtube_channel' but it is no longer used - # in any data sources. Use `version_info` instead. - # - # Optional OAuth2 authorization code to use with this transfer configuration. - # This is required only if `transferConfig.dataSourceId` is 'youtube_channel' - # and new credentials are needed, as indicated by `CheckValidCreds`. In order - # to obtain authorization_code, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=authorization_code&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Required list of fields to be updated in this request. - # @!attribute [rw] version_info - # @return [::String] - # Optional version info. This parameter replaces `authorization_code` which - # is no longer used in any data sources. This is required only if - # `transferConfig.dataSourceId` is 'youtube_channel' *or* new credentials - # are needed, as indicated by `CheckValidCreds`. In order to obtain version - # info, make a request to the following URL: - #
-          #     https://bigquery.cloud.google.com/datatransfer/oauthz/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=version_info&client_id=client_id&scope=data_source_scopes
-          #     
- # * The client_id is the OAuth client_id of the data source as - # returned by ListDataSources method. - # * data_source_scopes are the scopes returned by ListDataSources - # method. - # - # Note that this should not be set when `service_account_name` is used to - # update the transfer config. - # @!attribute [rw] service_account_name - # @return [::String] - # Optional service account email. If this field is set, the transfer config - # will be created with this service account's credentials. It requires that - # the requesting user calling this API has permissions to act as this service - # account. - # - # Note that not all data sources support service account credentials when - # creating a transfer config. For the latest list of data sources, read about - # [using service - # accounts](https://cloud.google.com/bigquery-transfer/docs/use-service-accounts). - class UpdateTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get data transfer information. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - class GetTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete data transfer information. All associated transfer runs - # and log messages will be deleted as well. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` - class DeleteTransferConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get data transfer run information. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - class GetTransferRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete data transfer run information. - # @!attribute [rw] name - # @return [::String] - # Required. The field will contain name of the resource requested, for - # example: `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` - # or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - class DeleteTransferRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list data transfers configured for a BigQuery project. - # @!attribute [rw] parent - # @return [::String] - # Required. The BigQuery project id for which transfer configs - # should be returned: `projects/{project_id}` or - # `projects/{project_id}/locations/{location_id}` - # @!attribute [rw] data_source_ids - # @return [::Array<::String>] - # When specified, only configurations of requested data sources are returned. - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransfersRequest` list results. For multiple-page - # results, `ListTransfersResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - class ListTransferConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The returned list of pipelines in the project. - # @!attribute [r] transfer_configs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig>] - # Output only. The stored pipeline transfer configurations. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `ListTransferConfigsRequest.page_token` - # to request the next page of list results. - class ListTransferConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list data transfer runs. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of transfer configuration for which transfer runs should be - # retrieved. Format of transfer configuration resource name is: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @!attribute [rw] states - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferState>] - # When specified, only transfer runs with requested states are returned. - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferRunsRequest` list results. For multiple-page - # results, `ListTransferRunsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @!attribute [rw] run_attempt - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest::RunAttempt] - # Indicates how run attempts are to be pulled. - class ListTransferRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents which runs should be pulled. - module RunAttempt - # All runs should be returned. - RUN_ATTEMPT_UNSPECIFIED = 0 - - # Only latest run per day should be returned. - LATEST = 1 - end - end - - # The returned list of pipelines in the project. - # @!attribute [r] transfer_runs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # Output only. The stored pipeline transfer runs. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `ListTransferRunsRequest.page_token` - # to request the next page of list results. - class ListTransferRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get user facing log messages associated with data transfer run. - # @!attribute [rw] parent - # @return [::String] - # Required. Transfer run name in the form: - # `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}/runs/{run_id}` - # @!attribute [rw] page_token - # @return [::String] - # Pagination token, which can be used to request a specific page - # of `ListTransferLogsRequest` list results. For multiple-page - # results, `ListTransferLogsResponse` outputs - # a `next_page` token, which can be used as the - # `page_token` value to request the next page of list results. - # @!attribute [rw] page_size - # @return [::Integer] - # Page size. The default page size is the maximum value of 1000 results. - # @!attribute [rw] message_types - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity>] - # Message types to return. If not populated - INFO, WARNING and ERROR - # messages are returned. - class ListTransferLogsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The returned list transfer run messages. - # @!attribute [r] transfer_messages - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage>] - # Output only. The stored pipeline transfer messages. - # @!attribute [r] next_page_token - # @return [::String] - # Output only. The next-pagination token. For multiple-page list results, - # this token can be used as the - # `GetTransferRunLogRequest.page_token` - # to request the next page of list results. - class ListTransferLogsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to determine whether the user has valid credentials. This method - # is used to limit the number of OAuth popups in the user interface. The - # user id is inferred from the API call context. - # If the data source has the Google+ authorization type, this method - # returns false, as it cannot be determined whether the credentials are - # already valid merely based on the user id. - # @!attribute [rw] name - # @return [::String] - # Required. The data source in the form: - # `projects/{project_id}/dataSources/{data_source_id}` or - # `projects/{project_id}/locations/{location_id}/dataSources/{data_source_id}`. - class CheckValidCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response indicating whether the credentials exist and are valid. - # @!attribute [rw] has_valid_creds - # @return [::Boolean] - # If set to `true`, the credentials exist and are valid. - class CheckValidCredsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to schedule transfer runs for a time range. - # @!attribute [rw] parent - # @return [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Required. Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. - class ScheduleTransferRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to schedule transfer runs for a time range. - # @!attribute [rw] runs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # The transfer runs that were scheduled. - class ScheduleTransferRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to start manual transfer runs. - # @!attribute [rw] parent - # @return [::String] - # Required. Transfer configuration name in the form: - # `projects/{project_id}/transferConfigs/{config_id}` or - # `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}`. - # @!attribute [rw] requested_time_range - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange] - # A time_range start and end timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_time_range must be a past time and cannot include future time - # values. - # - # Note: The following fields are mutually exclusive: `requested_time_range`, `requested_run_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] requested_run_time - # @return [::Google::Protobuf::Timestamp] - # A run_time timestamp for historical data files or reports - # that are scheduled to be transferred by the scheduled transfer run. - # requested_run_time must be a past time and cannot include future time - # values. - # - # Note: The following fields are mutually exclusive: `requested_run_time`, `requested_time_range`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class StartManualTransferRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A specification for a time range, this will request transfer runs with - # run_time between start_time (inclusive) and end_time (exclusive). - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start time of the range of transfer runs. For example, - # `"2017-05-25T00:00:00+00:00"`. The start_time must be strictly less than - # the end_time. Creates transfer runs where run_time is in the range - # between start_time (inclusive) and end_time (exclusive). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End time of the range of transfer runs. For example, - # `"2017-05-30T00:00:00+00:00"`. The end_time must not be in the future. - # Creates transfer runs where run_time is in the range between start_time - # (inclusive) and end_time (exclusive). - class TimeRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A response to start manual transfer runs. - # @!attribute [rw] runs - # @return [::Array<::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun>] - # The transfer runs that were created. - class StartManualTransferRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to enroll a set of data sources so they are visible in the - # BigQuery UI's `Transfer` tab. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @!attribute [rw] data_source_ids - # @return [::Array<::String>] - # Data sources that are enrolled. It is required to provide at least one - # data source id. - class EnrollDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to unenroll a set of data sources so they are no longer visible in - # the BigQuery UI's `Transfer` tab. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the project resource in the form: - # `projects/{project_id}` - # @!attribute [rw] data_source_ids - # @return [::Array<::String>] - # Data sources that are unenrolled. It is required to provide at least one - # data source id. - class UnenrollDataSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb deleted file mode 100644 index f655c166e495..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/cloud/bigquery/datatransfer/v1/transfer.rb +++ /dev/null @@ -1,411 +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 Bigquery - module DataTransfer - module V1 - # Represents preferences for sending email notifications for transfer run - # events. - # @!attribute [rw] enable_failure_email - # @return [::Boolean] - # If true, email notifications will be sent on transfer run failures. - class EmailPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing the data transfer schedule. - # @!attribute [rw] disable_auto_scheduling - # @return [::Boolean] - # If true, automatic scheduling of data transfer runs for this configuration - # will be disabled. The runs can be started on ad-hoc basis using - # StartManualTransferRuns API. When automatic scheduling is disabled, the - # TransferConfig.schedule field will be ignored. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Specifies time to start scheduling transfer runs. The first run will be - # scheduled at or after the start time according to a recurrence pattern - # defined in the schedule string. The start time can be changed at any - # moment. The time when a data transfer can be triggered manually is not - # limited by this option. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Defines time to stop scheduling transfer runs. A transfer run cannot be - # scheduled at or after the end time. The end time can be changed at any - # moment. The time when a data transfer can be triggered manually is not - # limited by this option. - class ScheduleOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # V2 options customizing different types of data transfer schedule. - # This field supports existing time-based and manual transfer schedule. Also - # supports Event-Driven transfer schedule. ScheduleOptionsV2 cannot be used - # together with ScheduleOptions/Schedule. - # @!attribute [rw] time_based_schedule - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TimeBasedSchedule] - # Time based transfer schedule options. This is the default schedule - # option. - # - # Note: The following fields are mutually exclusive: `time_based_schedule`, `manual_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] manual_schedule - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ManualSchedule] - # Manual transfer schedule. If set, the transfer run will not be - # auto-scheduled by the system, unless the client invokes - # StartManualTransferRuns. This is equivalent to - # disable_auto_scheduling = true. - # - # Note: The following fields are mutually exclusive: `manual_schedule`, `time_based_schedule`, `event_driven_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] event_driven_schedule - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EventDrivenSchedule] - # Event driven transfer schedule options. If set, the transfer will be - # scheduled upon events arrial. - # - # Note: The following fields are mutually exclusive: `event_driven_schedule`, `time_based_schedule`, `manual_schedule`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ScheduleOptionsV2 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing the time based transfer schedule. - # Options are migrated from the original ScheduleOptions message. - # @!attribute [rw] schedule - # @return [::String] - # Data transfer schedule. - # If the data source does not support a custom schedule, this should be - # empty. If it is empty, the default value for the data source will be used. - # The specified times are in UTC. - # Examples of valid format: - # `1st,3rd monday of month 15:30`, - # `every wed,fri of jan,jun 13:15`, and - # `first sunday of quarter 00:00`. - # See more explanation about the format here: - # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - # - # NOTE: The minimum interval time between recurring transfers depends on the - # data source; refer to the documentation for your data source. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Specifies time to start scheduling transfer runs. The first run will be - # scheduled at or after the start time according to a recurrence pattern - # defined in the schedule string. The start time can be changed at any - # moment. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Defines time to stop scheduling transfer runs. A transfer run cannot be - # scheduled at or after the end time. The end time can be changed at any - # moment. - class TimeBasedSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing manual transfers schedule. - class ManualSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options customizing EventDriven transfers schedule. - # @!attribute [rw] pubsub_subscription - # @return [::String] - # Pub/Sub subscription name used to receive events. - # Only Google Cloud Storage data source support this option. - # Format: projects/\\{project}/subscriptions/\\{subscription} - class EventDrivenSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about a user. - # @!attribute [rw] email - # @return [::String] - # E-mail address of the user. - class UserInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a data transfer configuration. A transfer configuration - # contains all metadata needed to perform a data transfer. For example, - # `destination_dataset_id` specifies where data should be stored. - # When a new transfer configuration is created, the specified - # `destination_dataset_id` is created when needed and shared with the - # appropriate data source service account. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the transfer config. - # Transfer config names have the form either - # `projects/{project_id}/locations/{region}/transferConfigs/{config_id}` or - # `projects/{project_id}/transferConfigs/{config_id}`, - # where `config_id` is usually a UUID, even though it is not - # guaranteed or required. The name is ignored when creating a transfer - # config. - # @!attribute [rw] destination_dataset_id - # @return [::String] - # The BigQuery target dataset id. - # @!attribute [rw] display_name - # @return [::String] - # User specified display name for the data transfer. - # @!attribute [rw] data_source_id - # @return [::String] - # Data source ID. This cannot be changed once data transfer is created. The - # full list of available data source IDs can be returned through an API call: - # https://cloud.google.com/bigquery-transfer/docs/reference/datatransfer/rest/v1/projects.locations.dataSources/list - # @!attribute [rw] params - # @return [::Google::Protobuf::Struct] - # Parameters specific to each data source. For more information see the - # bq tab in the 'Setting up a data transfer' section for each data source. - # For example the parameters for Cloud Storage transfers are listed here: - # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - # @!attribute [rw] schedule - # @return [::String] - # Data transfer schedule. - # If the data source does not support a custom schedule, this should be - # empty. If it is empty, the default value for the data source will be used. - # The specified times are in UTC. - # Examples of valid format: - # `1st,3rd monday of month 15:30`, - # `every wed,fri of jan,jun 13:15`, and - # `first sunday of quarter 00:00`. - # See more explanation about the format here: - # https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format - # - # NOTE: The minimum interval time between recurring transfers depends on the - # data source; refer to the documentation for your data source. - # @!attribute [rw] schedule_options - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptions] - # Options customizing the data transfer schedule. - # @!attribute [rw] schedule_options_v2 - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleOptionsV2] - # Options customizing different types of data transfer schedule. - # This field replaces "schedule" and "schedule_options" fields. - # ScheduleOptionsV2 cannot be used together with ScheduleOptions/Schedule. - # @!attribute [rw] data_refresh_window_days - # @return [::Integer] - # The number of days to look back to automatically refresh the data. - # For example, if `data_refresh_window_days = 10`, then every day - # BigQuery reingests data for [today-10, today-1], rather than ingesting data - # for just [today-1]. - # Only valid if the data source supports the feature. Set the value to 0 - # to use the default value. - # @!attribute [rw] disabled - # @return [::Boolean] - # Is this config disabled. When set to true, no runs will be scheduled for - # this transfer config. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Data transfer modification time. Ignored by server on input. - # @!attribute [r] next_run_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Next time when data transfer will run. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] - # Output only. State of the most recently updated transfer run. - # @!attribute [rw] user_id - # @return [::Integer] - # Deprecated. Unique ID of the user on whose behalf transfer is done. - # @!attribute [r] dataset_region - # @return [::String] - # Output only. Region in which BigQuery dataset is located. - # @!attribute [rw] notification_pubsub_topic - # @return [::String] - # Pub/Sub topic where notifications will be sent after transfer runs - # associated with this transfer config finish. - # - # The format for specifying a pubsub topic is: - # `projects/{project_id}/topics/{topic_id}` - # @!attribute [rw] email_preferences - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] - # Email notifications will be sent according to these preferences - # to the email address of the user who owns this transfer config. - # @!attribute [r] owner_info - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::UserInfo] - # Output only. Information about the user whose credentials are used to - # transfer data. Populated only for `transferConfigs.get` requests. In case - # the user information is not available, this field will not be populated. - # @!attribute [rw] encryption_configuration - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EncryptionConfiguration] - # The encryption configuration part. Currently, it is only used for the - # optional KMS key name. The BigQuery service account of your project must be - # granted permissions to use the key. Read methods will return the key name - # applied in effect. Write methods will apply the key if it is present, or - # otherwise try to apply project default keys if it is absent. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. Error code with detailed information about reason of the - # latest config failure. - class TransferConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the encryption configuration for a transfer. - # @!attribute [rw] kms_key_name - # @return [::Google::Protobuf::StringValue] - # The name of the KMS key used for encrypting BigQuery data. - class EncryptionConfiguration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a data transfer run. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the transfer run. - # Transfer run names have the form - # `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`. - # The name is ignored when creating a transfer run. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # Minimum time after which a transfer run can be started. - # @!attribute [rw] run_time - # @return [::Google::Protobuf::Timestamp] - # For batch transfer runs, specifies the date and time of the data should be - # ingested. - # @!attribute [rw] error_status - # @return [::Google::Rpc::Status] - # Status of the transfer run. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when transfer run was started. - # Parameter ignored by server for input requests. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when transfer run ended. - # Parameter ignored by server for input requests. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last time the data transfer run state was updated. - # @!attribute [r] params - # @return [::Google::Protobuf::Struct] - # Output only. Parameters specific to each data source. For more information - # see the bq tab in the 'Setting up a data transfer' section for each data - # source. For example the parameters for Cloud Storage transfers are listed - # here: - # https://cloud.google.com/bigquery-transfer/docs/cloud-storage-transfer#bq - # @!attribute [r] destination_dataset_id - # @return [::String] - # Output only. The BigQuery target dataset id. - # @!attribute [r] data_source_id - # @return [::String] - # Output only. Data source id. - # @!attribute [rw] state - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferState] - # Data transfer run state. Ignored for input requests. - # @!attribute [rw] user_id - # @return [::Integer] - # Deprecated. Unique ID of the user on whose behalf transfer is done. - # @!attribute [r] schedule - # @return [::String] - # Output only. Describes the schedule of this transfer run if it was - # created as part of a regular schedule. For batch transfer runs that are - # scheduled manually, this is empty. - # NOTE: the system might choose to delay the schedule depending on the - # current load, so `schedule_time` doesn't always match this. - # @!attribute [r] notification_pubsub_topic - # @return [::String] - # Output only. Pub/Sub topic where a notification will be sent after this - # transfer run finishes. - # - # The format for specifying a pubsub topic is: - # `projects/{project_id}/topics/{topic_id}` - # @!attribute [r] email_preferences - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::EmailPreferences] - # Output only. Email notifications will be sent according to these - # preferences to the email address of the user who owns the transfer config - # this run was derived from. - class TransferRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a user facing message for a particular data transfer run. - # @!attribute [rw] message_time - # @return [::Google::Protobuf::Timestamp] - # Time when message was logged. - # @!attribute [rw] severity - # @return [::Google::Cloud::Bigquery::DataTransfer::V1::TransferMessage::MessageSeverity] - # Message severity. - # @!attribute [rw] message_text - # @return [::String] - # Message text. - class TransferMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents data transfer user facing message severity. - module MessageSeverity - # No severity specified. - MESSAGE_SEVERITY_UNSPECIFIED = 0 - - # Informational message. - INFO = 1 - - # Warning message. - WARNING = 2 - - # Error message. - ERROR = 3 - end - end - - # DEPRECATED. Represents data transfer type. - # @deprecated This enum is deprecated and may be removed in the next major version update. - module TransferType - # Invalid or Unknown transfer type placeholder. - TRANSFER_TYPE_UNSPECIFIED = 0 - - # Batch data transfer. - BATCH = 1 - - # Streaming data transfer. Streaming data source currently doesn't - # support multiple transfer configs per project. - STREAMING = 2 - end - - # Represents data transfer run state. - module TransferState - # State placeholder (0). - TRANSFER_STATE_UNSPECIFIED = 0 - - # Data transfer is scheduled and is waiting to be picked up by - # data transfer backend (2). - PENDING = 2 - - # Data transfer is in progress (3). - RUNNING = 3 - - # Data transfer completed successfully (4). - SUCCEEDED = 4 - - # Data transfer failed (5). - FAILED = 5 - - # Data transfer is cancelled (6). - CANCELLED = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +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 - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +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 - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/Gemfile deleted file mode 100644 index f317b2ca6a31..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1", path: "../" -else - gem "google-cloud-bigquery-data_transfer-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-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.rb deleted file mode 100644 index c280cada5a84..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/check_valid_creds.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 bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the check_valid_creds call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds. -# -def check_valid_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new - - # Call the check_valid_creds method. - result = client.check_valid_creds request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.rb deleted file mode 100644 index 8d85ed804920..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/create_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the create_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config. -# -def create_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new - - # Call the create_transfer_config method. - result = client.create_transfer_config request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.rb deleted file mode 100644 index 5b85f2a09133..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the delete_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config. -# -def delete_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new - - # Call the delete_transfer_config method. - result = client.delete_transfer_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.rb deleted file mode 100644 index 96cbd5325d48..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/delete_transfer_run.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 bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the delete_transfer_run call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run. -# -def delete_transfer_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new - - # Call the delete_transfer_run method. - result = client.delete_transfer_run request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.rb deleted file mode 100644 index 0aa1d48f390c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/enroll_data_sources.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 bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the enroll_data_sources call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources. -# -def enroll_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new - - # Call the enroll_data_sources method. - result = client.enroll_data_sources request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.rb deleted file mode 100644 index 0883819624a5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_data_source.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 bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the get_data_source call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source. -# -def get_data_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new - - # Call the get_data_source method. - result = client.get_data_source request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::DataSource. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.rb deleted file mode 100644 index 0a34e0c405ac..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the get_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config. -# -def get_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new - - # Call the get_transfer_config method. - result = client.get_transfer_config request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.rb deleted file mode 100644 index 76369885f83e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/get_transfer_run.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 bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the get_transfer_run call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run. -# -def get_transfer_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new - - # Call the get_transfer_run method. - result = client.get_transfer_run request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferRun. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.rb deleted file mode 100644 index 5d17514eec9d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_data_sources.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 bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_data_sources call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources. -# -def list_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.new - - # Call the list_data_sources method. - result = client.list_data_sources 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::Bigquery::DataTransfer::V1::DataSource. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.rb deleted file mode 100644 index 1d837326d842..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_configs.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 bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_transfer_configs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs. -# -def list_transfer_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new - - # Call the list_transfer_configs method. - result = client.list_transfer_configs 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::Bigquery::DataTransfer::V1::TransferConfig. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.rb deleted file mode 100644 index 5b6589ed7c49..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_logs.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 bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_transfer_logs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs. -# -def list_transfer_logs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new - - # Call the list_transfer_logs method. - result = client.list_transfer_logs 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::Bigquery::DataTransfer::V1::TransferMessage. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.rb deleted file mode 100644 index 7bdea24c0b01..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/list_transfer_runs.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 bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the list_transfer_runs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs. -# -def list_transfer_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new - - # Call the list_transfer_runs method. - result = client.list_transfer_runs 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::Bigquery::DataTransfer::V1::TransferRun. - p item - end -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.rb deleted file mode 100644 index 0f581bd7b3d2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/schedule_transfer_runs.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 bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the schedule_transfer_runs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs. -# -def schedule_transfer_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new - - # Call the schedule_transfer_runs method. - result = client.schedule_transfer_runs request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.rb deleted file mode 100644 index 5eae9585a6dc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/start_manual_transfer_runs.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 bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the start_manual_transfer_runs call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs. -# -def start_manual_transfer_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new - - # Call the start_manual_transfer_runs method. - result = client.start_manual_transfer_runs request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.rb deleted file mode 100644 index 0f13ef52ede7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/unenroll_data_sources.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 bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the unenroll_data_sources call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources. -# -def unenroll_data_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new - - # Call the unenroll_data_sources method. - result = client.unenroll_data_sources request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.rb deleted file mode 100644 index 78cd53878f8c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/data_transfer_service/update_transfer_config.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 bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] -require "google/cloud/bigquery/data_transfer/v1" - -## -# Snippet for the update_transfer_config call in the DataTransferService 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::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config. -# -def update_transfer_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new - - # Call the update_transfer_config method. - result = client.update_transfer_config request - - # The returned object is of type Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig. - p result -end -# [END bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json deleted file mode 100644 index c079afe66ffd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/snippets/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ /dev/null @@ -1,655 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-data_transfer-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.datatransfer.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetDataSource_sync", - "title": "Snippet for the get_data_source call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source.", - "file": "data_transfer_service/get_data_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_source", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_data_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::DataSource", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "GetDataSource", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetDataSource", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListDataSources_sync", - "title": "Snippet for the list_data_sources call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources.", - "file": "data_transfer_service/list_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_sources", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListDataSources", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListDataSources", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CreateTransferConfig_sync", - "title": "Snippet for the create_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config.", - "file": "data_transfer_service/create_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#create_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "CreateTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CreateTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UpdateTransferConfig_sync", - "title": "Snippet for the update_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config.", - "file": "data_transfer_service/update_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#update_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "UpdateTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UpdateTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferConfig_sync", - "title": "Snippet for the delete_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config.", - "file": "data_transfer_service/delete_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "DeleteTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferConfig_sync", - "title": "Snippet for the get_transfer_config call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config.", - "file": "data_transfer_service/get_transfer_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_transfer_config", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "GetTransferConfig", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferConfig", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferConfigs_sync", - "title": "Snippet for the list_transfer_configs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs.", - "file": "data_transfer_service/list_transfer_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transfer_configs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListTransferConfigs", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferConfigs", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ScheduleTransferRuns_sync", - "title": "Snippet for the schedule_transfer_runs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs.", - "file": "data_transfer_service/schedule_transfer_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "schedule_transfer_runs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#schedule_transfer_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ScheduleTransferRuns", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ScheduleTransferRuns", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_StartManualTransferRuns_sync", - "title": "Snippet for the start_manual_transfer_runs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs.", - "file": "data_transfer_service/start_manual_transfer_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_manual_transfer_runs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#start_manual_transfer_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "StartManualTransferRuns", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.StartManualTransferRuns", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_GetTransferRun_sync", - "title": "Snippet for the get_transfer_run call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run.", - "file": "data_transfer_service/get_transfer_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_transfer_run", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#get_transfer_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "GetTransferRun", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.GetTransferRun", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_DeleteTransferRun_sync", - "title": "Snippet for the delete_transfer_run call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run.", - "file": "data_transfer_service/delete_transfer_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_transfer_run", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#delete_transfer_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "DeleteTransferRun", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.DeleteTransferRun", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferRuns_sync", - "title": "Snippet for the list_transfer_runs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs.", - "file": "data_transfer_service/list_transfer_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transfer_runs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListTransferRuns", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferRuns", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_ListTransferLogs_sync", - "title": "Snippet for the list_transfer_logs call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs.", - "file": "data_transfer_service/list_transfer_logs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_transfer_logs", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#list_transfer_logs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "ListTransferLogs", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.ListTransferLogs", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_CheckValidCreds_sync", - "title": "Snippet for the check_valid_creds call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds.", - "file": "data_transfer_service/check_valid_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "check_valid_creds", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#check_valid_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "CheckValidCreds", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.CheckValidCreds", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync", - "title": "Snippet for the enroll_data_sources call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources.", - "file": "data_transfer_service/enroll_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "enroll_data_sources", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#enroll_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "EnrollDataSources", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.EnrollDataSources", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerydatatransfer_v1_generated_DataTransferService_UnenrollDataSources_sync", - "title": "Snippet for the unenroll_data_sources call in the DataTransferService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources.", - "file": "data_transfer_service/unenroll_data_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "unenroll_data_sources", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client#unenroll_data_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataTransferService::Client", - "full_name": "::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client" - }, - "method": { - "short_name": "UnenrollDataSources", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService.UnenrollDataSources", - "service": { - "short_name": "DataTransferService", - "full_name": "google.cloud.bigquery.datatransfer.v1.DataTransferService" - } - } - }, - "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-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb deleted file mode 100644 index 5d878393639f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_paths_test.rb +++ /dev/null @@ -1,112 +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/bigquery/data_transfer/v1/data_transfer_service" - -class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::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_data_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_source_path project: "value0", data_source: "value1" - assert_equal "projects/value0/dataSources/value1", path - - path = client.data_source_path project: "value0", location: "value1", data_source: "value2" - assert_equal "projects/value0/locations/value1/dataSources/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::Bigquery::DataTransfer::V1::DataTransferService::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_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_run_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.run_path project: "value0", transfer_config: "value1", run: "value2" - assert_equal "projects/value0/transferConfigs/value1/runs/value2", path - - path = client.run_path project: "value0", location: "value1", transfer_config: "value2", run: "value3" - assert_equal "projects/value0/locations/value1/transferConfigs/value2/runs/value3", path - end - end - - def test_transfer_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.transfer_config_path project: "value0", transfer_config: "value1" - assert_equal "projects/value0/transferConfigs/value1", path - - path = client.transfer_config_path project: "value0", location: "value1", transfer_config: "value2" - assert_equal "projects/value0/locations/value1/transferConfigs/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb deleted file mode 100644 index 8f85391bcb20..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_rest_test.rb +++ /dev/null @@ -1,988 +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/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service/rest" - - -class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_source_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_data_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_source_client_stub.call_count - end - end - end - - def test_list_data_sources - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.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_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_sources_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_count - end - end - end - - def test_create_transfer_config - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - transfer_config = {} - authorization_code = "hello world" - version_info = "hello world" - service_account_name = "hello world" - - create_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_create_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_transfer_config_client_stub.call_count - end - end - end - - def test_update_transfer_config - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - transfer_config = {} - authorization_code = "hello world" - update_mask = {} - version_info = "hello world" - service_account_name = "hello world" - - update_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_update_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_transfer_config_client_stub.call_count - end - end - end - - def test_delete_transfer_config - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_transfer_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_transfer_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_transfer_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_transfer_config_client_stub.call_count - end - end - end - - def test_get_transfer_config - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_transfer_config_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_transfer_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_transfer_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_transfer_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_transfer_config_client_stub.call_count - end - end - end - - def test_list_transfer_configs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_source_ids = ["hello world"] - page_token = "hello world" - page_size = 42 - - list_transfer_configs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transfer_configs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_transfer_configs parent: parent, data_source_ids: data_source_ids, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs({ parent: parent, data_source_ids: data_source_ids, 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_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs_client_stub.call_count - end - end - end - - def test_schedule_transfer_runs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - start_time = {} - end_time = {} - - schedule_transfer_runs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_schedule_transfer_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, schedule_transfer_runs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, schedule_transfer_runs_client_stub.call_count - end - end - end - - def test_start_manual_transfer_runs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - requested_time_range = {} - - start_manual_transfer_runs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_start_manual_transfer_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_manual_transfer_runs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_manual_transfer_runs_client_stub.call_count - end - end - end - - def test_get_transfer_run - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_transfer_run_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_get_transfer_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_transfer_run_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_transfer_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_transfer_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_transfer_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_transfer_run_client_stub.call_count - end - end - end - - def test_delete_transfer_run - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_transfer_run_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_delete_transfer_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_transfer_run_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_transfer_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_transfer_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_transfer_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_transfer_run_client_stub.call_count - end - end - end - - def test_list_transfer_runs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - states = [:TRANSFER_STATE_UNSPECIFIED] - page_token = "hello world" - page_size = 42 - run_attempt = :RUN_ATTEMPT_UNSPECIFIED - - list_transfer_runs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transfer_runs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_transfer_runs_client_stub.call_count - end - end - end - - def test_list_transfer_logs - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.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 - message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] - - list_transfer_logs_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_list_transfer_logs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_transfer_logs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_transfer_logs_client_stub.call_count - end - end - end - - def test_check_valid_creds - # Create test objects. - client_result = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - check_valid_creds_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_check_valid_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, check_valid_creds_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.check_valid_creds({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.check_valid_creds name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.check_valid_creds({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, check_valid_creds_client_stub.call_count - end - end - end - - def test_enroll_data_sources - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data_source_ids = ["hello world"] - - enroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_enroll_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enroll_data_sources_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.enroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enroll_data_sources_client_stub.call_count - end - end - end - - def test_unenroll_data_sources - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data_source_ids = ["hello world"] - - unenroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::Rest::ServiceStub.stub :transcode_unenroll_data_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, unenroll_data_sources_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.unenroll_data_sources name: name, data_source_ids: data_source_ids do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, unenroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::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::Bigquery::DataTransfer::V1::DataTransferService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb deleted file mode 100644 index 3ed397d654bc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/google/cloud/bigquery/data_transfer/v1/data_transfer_service_test.rb +++ /dev/null @@ -1,1103 +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/bigquery/datatransfer/v1/datatransfer_pb" -require "google/cloud/bigquery/data_transfer/v1/data_transfer_service" - -class ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_data_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::DataSource.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_data_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_source, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_source_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_source ::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_source({ 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_data_source(::Google::Cloud::Bigquery::DataTransfer::V1::GetDataSourceRequest.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_data_source_client_stub.call_rpc_count - end - end - - def test_list_data_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesResponse.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_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_sources, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest, 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_data_sources_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_sources({ 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_data_sources 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_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources({ 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_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::ListDataSourcesRequest.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_data_sources_client_stub.call_rpc_count - end - end - - def test_create_transfer_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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" - transfer_config = {} - authorization_code = "hello world" - version_info = "hello world" - service_account_name = "hello world" - - create_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] - assert_equal "hello world", request["authorization_code"] - assert_equal "hello world", request["version_info"] - assert_equal "hello world", request["service_account_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_transfer_config parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_transfer_config({ parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::CreateTransferConfigRequest.new(parent: parent, transfer_config: transfer_config, authorization_code: authorization_code, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_transfer_config_client_stub.call_rpc_count - end - end - - def test_update_transfer_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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. - transfer_config = {} - authorization_code = "hello world" - update_mask = {} - version_info = "hello world" - service_account_name = "hello world" - - update_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig), request["transfer_config"] - assert_equal "hello world", request["authorization_code"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal "hello world", request["version_info"] - assert_equal "hello world", request["service_account_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_transfer_config transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_transfer_config({ transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::UpdateTransferConfigRequest.new(transfer_config: transfer_config, authorization_code: authorization_code, update_mask: update_mask, version_info: version_info, service_account_name: service_account_name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_transfer_config_client_stub.call_rpc_count - end - end - - def test_delete_transfer_config - # 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_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_transfer_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_transfer_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_transfer_config({ 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_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferConfigRequest.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_transfer_config_client_stub.call_rpc_count - end - end - - def test_get_transfer_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferConfig.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_transfer_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_transfer_config, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_transfer_config_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_transfer_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_transfer_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_transfer_config ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_transfer_config({ 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_transfer_config(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferConfigRequest.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_transfer_config_client_stub.call_rpc_count - end - end - - def test_list_transfer_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsResponse.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" - data_source_ids = ["hello world"] - page_token = "hello world" - page_size = 42 - - list_transfer_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transfer_configs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["data_source_ids"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transfer_configs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_transfer_configs({ parent: parent, data_source_ids: data_source_ids, 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_transfer_configs parent: parent, data_source_ids: data_source_ids, 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_transfer_configs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs({ parent: parent, data_source_ids: data_source_ids, 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_transfer_configs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferConfigsRequest.new(parent: parent, data_source_ids: data_source_ids, 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_transfer_configs_client_stub.call_rpc_count - end - end - - def test_schedule_transfer_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsResponse.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" - start_time = {} - end_time = {} - - schedule_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :schedule_transfer_runs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, schedule_transfer_runs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.schedule_transfer_runs parent: parent, start_time: start_time, end_time: end_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.schedule_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.schedule_transfer_runs({ parent: parent, start_time: start_time, end_time: end_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.schedule_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ScheduleTransferRunsRequest.new(parent: parent, start_time: start_time, end_time: end_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, schedule_transfer_runs_client_stub.call_rpc_count - end - end - - def test_start_manual_transfer_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsResponse.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" - requested_time_range = {} - - start_manual_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_manual_transfer_runs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest::TimeRange), request["requested_time_range"] - assert_equal :requested_time_range, request.time - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_manual_transfer_runs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_manual_transfer_runs parent: parent, requested_time_range: requested_time_range do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_manual_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_manual_transfer_runs({ parent: parent, requested_time_range: requested_time_range }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_manual_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::StartManualTransferRunsRequest.new(parent: parent, requested_time_range: requested_time_range), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_manual_transfer_runs_client_stub.call_rpc_count - end - end - - def test_get_transfer_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::TransferRun.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_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_transfer_run, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_transfer_run_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_transfer_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_transfer_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_transfer_run({ 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_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::GetTransferRunRequest.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_transfer_run_client_stub.call_rpc_count - end - end - - def test_delete_transfer_run - # 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_transfer_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_transfer_run, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_transfer_run_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_transfer_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_transfer_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_transfer_run ::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_transfer_run({ 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_transfer_run(::Google::Cloud::Bigquery::DataTransfer::V1::DeleteTransferRunRequest.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_transfer_run_client_stub.call_rpc_count - end - end - - def test_list_transfer_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsResponse.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" - states = [:TRANSFER_STATE_UNSPECIFIED] - page_token = "hello world" - page_size = 42 - run_attempt = :RUN_ATTEMPT_UNSPECIFIED - - list_transfer_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transfer_runs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest, request - assert_equal "hello world", request["parent"] - assert_equal [:TRANSFER_STATE_UNSPECIFIED], request["states"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal :RUN_ATTEMPT_UNSPECIFIED, request["run_attempt"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transfer_runs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }) 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_transfer_runs parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt 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_transfer_runs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt) 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_transfer_runs({ parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt }, 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_transfer_runs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferRunsRequest.new(parent: parent, states: states, page_token: page_token, page_size: page_size, run_attempt: run_attempt), 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_transfer_runs_client_stub.call_rpc_count - end - end - - def test_list_transfer_logs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsResponse.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 - message_types = [:MESSAGE_SEVERITY_UNSPECIFIED] - - list_transfer_logs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_transfer_logs, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal [:MESSAGE_SEVERITY_UNSPECIFIED], request["message_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_transfer_logs_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }) 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_transfer_logs parent: parent, page_token: page_token, page_size: page_size, message_types: message_types 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_transfer_logs ::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types) 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_transfer_logs({ parent: parent, page_token: page_token, page_size: page_size, message_types: message_types }, 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_transfer_logs(::Google::Cloud::Bigquery::DataTransfer::V1::ListTransferLogsRequest.new(parent: parent, page_token: page_token, page_size: page_size, message_types: message_types), 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_transfer_logs_client_stub.call_rpc_count - end - end - - def test_check_valid_creds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsResponse.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" - - check_valid_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :check_valid_creds, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, check_valid_creds_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.check_valid_creds({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.check_valid_creds name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.check_valid_creds ::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.check_valid_creds({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.check_valid_creds(::Google::Cloud::Bigquery::DataTransfer::V1::CheckValidCredsRequest.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, check_valid_creds_client_stub.call_rpc_count - end - end - - def test_enroll_data_sources - # 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" - data_source_ids = ["hello world"] - - enroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enroll_data_sources, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["data_source_ids"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enroll_data_sources_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.enroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.enroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.enroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.enroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::EnrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, enroll_data_sources_client_stub.call_rpc_count - end - end - - def test_unenroll_data_sources - # 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" - data_source_ids = ["hello world"] - - unenroll_data_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :unenroll_data_sources, name - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["data_source_ids"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, unenroll_data_sources_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.unenroll_data_sources name: name, data_source_ids: data_source_ids do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.unenroll_data_sources ::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.unenroll_data_sources({ name: name, data_source_ids: data_source_ids }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.unenroll_data_sources(::Google::Cloud::Bigquery::DataTransfer::V1::UnenrollDataSourcesRequest.new(name: name, data_source_ids: data_source_ids), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, unenroll_data_sources_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::Bigquery::DataTransfer::V1::DataTransferService::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::Bigquery::DataTransfer::V1::DataTransferService::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::Bigquery::DataTransfer::V1::DataTransferService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::DataTransfer::V1::DataTransferService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-data_transfer-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.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-bigquery-migration-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json deleted file mode 100644 index 519979303a46..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "bigquerymigration.googleapis.com", - "api_shortname": "bigquerymigration", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest", - "distribution_name": "google-cloud-bigquery-migration-v2", - "is_cloud": true, - "language": "ruby", - "name": "bigquerymigration", - "name_pretty": "BigQuery Migration V2 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/migration-intro", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/migration-intro", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml deleted file mode 100644 index 57be07ac546b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-migration-v2.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-bigquery-migration-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.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-bigquery-migration-v2/.yardopts b/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts deleted file mode 100644 index e1a4dd51c1ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Migration V2 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-bigquery-migration-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md deleted file mode 100644 index 49431cec3789..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-migration-v2 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-bigquery-migration-v2 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/bigquery/migration/v2" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/migration/v2" - -::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-bigquery-migration-v2 -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/bigquery/migration/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-bigquery-migration-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md deleted file mode 100644 index 1b3d10929b14..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Migration V2 API - -The migration service, exposing apis for migration jobs operations, and agent management. - -The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Migration V2 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-migration](https://rubygems.org/gems/google-cloud-bigquery-migration). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-migration-v2 -``` - -## 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/bigquerymigration.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/migration/v2" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new -request = ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new # (request fields as keyword arguments...) -response = client.create_migration_workflow request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-migration-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/migration-intro) -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/bigquery/migration/v2" -require "logger" - -client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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-bigquery-migration`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-migration-v2`. -_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-bigquery-migration`. -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-bigquery-migration-v2`. - -### 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-bigquery-migration-v2/Rakefile b/owl-bot-staging/google-cloud-bigquery-migration-v2/Rakefile deleted file mode 100644 index 22b1470bce3b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/migration/v2/migration_service/credentials" - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-migration-v2" - header "google-cloud-bigquery-migration-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-migration-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2 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-bigquery-migration-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json deleted file mode 100644 index da3bd8bcce33..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.migration.v2", - "libraryPackage": "::Google::Cloud::Bigquery::Migration::V2", - "services": { - "MigrationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "create_migration_workflow" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "get_migration_workflow" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "list_migration_workflows" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "delete_migration_workflow" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "start_migration_workflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "get_migration_subtask" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "list_migration_subtasks" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec b/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec deleted file mode 100644 index 1050650c896d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/google-cloud-bigquery-migration-v2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/migration/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-migration-v2" - gem.version = Google::Cloud::Bigquery::Migration::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Migration Service is a comprehensive solution for migrating your data warehouse to BigQuery. Note that google-cloud-bigquery-migration-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-migration instead. See the readme for more details." - gem.summary = "The migration service, exposing apis for migration jobs operations, and agent management." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.rb deleted file mode 100644 index c91652afe47e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google-cloud-bigquery-migration-v2.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/bigquery/migration/v2" diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb deleted file mode 100644 index a9ad338b1127..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/migration/v2/migration_service" -require "google/cloud/bigquery/migration/v2/version" - -module Google - module Cloud - module Bigquery - module Migration - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/migration/v2" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/migration/v2" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module V2 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/bigquery/migration/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb deleted file mode 100644 index 3b3b88bfbf9f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_entities_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/migration_entities.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/migration/v2/migration_error_details_pb' -require 'google/cloud/bigquery/migration/v2/migration_metrics_pb' -require 'google/cloud/bigquery/migration/v2/translation_config_pb' -require 'google/cloud/bigquery/migration/v2/translation_details_pb' -require 'google/cloud/bigquery/migration/v2/translation_usability_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/error_details_pb' - - -descriptor_data = "\n;google/cloud/bigquery/migration/v2/migration_entities.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a@google/cloud/bigquery/migration/v2/migration_error_details.proto\x1a:google/cloud/bigquery/migration/v2/migration_metrics.proto\x1a;google/cloud/bigquery/migration/v2/translation_config.proto\x1agoogle/cloud/bigquery/migration/v2/translation_usability.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/rpc/error_details.proto\"\xf6\x04\n\x11MigrationWorkflow\x12\x17\n\x04name\x18\x01 \x01(\tB\t\xe0\x41\x03\xe0\x41\x05\xe0\x41\x08\x12\x14\n\x0c\x64isplay_name\x18\x06 \x01(\t\x12O\n\x05tasks\x18\x02 \x03(\x0b\x32@.google.cloud.bigquery.migration.v2.MigrationWorkflow.TasksEntry\x12O\n\x05state\x18\x03 \x01(\x0e\x32;.google.cloud.bigquery.migration.v2.MigrationWorkflow.StateB\x03\xe0\x41\x03\x12/\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x34\n\x10last_update_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a_\n\nTasksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12@\n\x05value\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.MigrationTask:\x02\x38\x01\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\n\n\x06PAUSED\x10\x03\x12\r\n\tCOMPLETED\x10\x04:u\xea\x41r\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\n\x06points\x18\x04 \x03(\x0b\x32).google.cloud.bigquery.migration.v2.PointB\x03\xe0\x41\x02\"\x8a\x01\n\x05Point\x12\x42\n\x08interval\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.TimeInterval\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.bigquery.migration.v2.TypedValue\"v\n\x0cTimeInterval\x12\x33\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x01\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\"\xaa\x01\n\nTypedValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x15\n\x0bint64_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x36\n\x12\x64istribution_value\x18\x05 \x01(\x0b\x32\x18.google.api.DistributionH\x00\x42\x07\n\x05valueB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationMetricsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TimeSeries = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeSeries").msgclass - Point = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Point").msgclass - TimeInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TimeInterval").msgclass - TypedValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TypedValue").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb deleted file mode 100644 index 2d48893a2487..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/migration/v2/version" - -require "google/cloud/bigquery/migration/v2/migration_service/credentials" -require "google/cloud/bigquery/migration/v2/migration_service/paths" -require "google/cloud/bigquery/migration/v2/migration_service/client" -require "google/cloud/bigquery/migration/v2/migration_service/rest" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - ## - # Service to handle EDW migrations. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/migration/v2/migration_service" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/migration/v2/migration_service/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module MigrationService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "migration_service", "helpers.rb" -require "google/cloud/bigquery/migration/v2/migration_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb deleted file mode 100644 index 9996d48313f8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/client.rb +++ /dev/null @@ -1,1101 +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/bigquery/migration/v2/migration_service_pb" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - ## - # Client for the MigrationService service. - # - # Service to handle EDW migrations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :migration_service_stub - - ## - # Configure the MigrationService Client class. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MigrationService clients - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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", "Bigquery", "Migration", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_migration_workflow.timeout = 60.0 - - default_config.rpcs.get_migration_workflow.timeout = 60.0 - default_config.rpcs.get_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_migration_workflows.timeout = 60.0 - default_config.rpcs.list_migration_workflows.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_migration_workflow.timeout = 60.0 - - default_config.rpcs.start_migration_workflow.timeout = 60.0 - default_config.rpcs.start_migration_workflow.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 MigrationService 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::Bigquery::Migration::V2::MigrationService::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 - @migration_service_stub.universe_domain - end - - ## - # Create a new MigrationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MigrationService 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/bigquery/migration/v2/migration_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 - - @migration_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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 - ) - - @migration_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @migration_service_stub.logger - end - - # Service calls - - ## - # Creates a migration workflow. - # - # @overload create_migration_workflow(request, options = nil) - # Pass arguments to `create_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflow(parent: nil, migration_workflow: nil) - # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] - # Required. The migration workflow to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - # - # # Call the create_migration_workflow method. - # result = client.create_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def create_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest - - # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :create_migration_workflow, 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 a previously created migration workflow. - # - # @overload get_migration_workflow(request, options = nil) - # Pass arguments to `get_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflow(name: nil, read_mask: nil) - # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - # - # # Call the get_migration_workflow method. - # result = client.get_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def get_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest - - # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :get_migration_workflow, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration workflow. - # - # @overload list_migration_workflows(request, options = nil) - # Pass arguments to `list_migration_workflows` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at - # least one keyword argument is 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 project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @param page_size [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @param page_token [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - # - # # Call the list_migration_workflows method. - # result = client.list_migration_workflows 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::Bigquery::Migration::V2::MigrationWorkflow. - # p item - # end - # - def list_migration_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest - - # Converts hash 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_migration_workflows.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::Bigquery::Migration::V2::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_migration_workflows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_migration_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :list_migration_workflows, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a migration workflow by name. - # - # @overload delete_migration_workflow(request, options = nil) - # Pass arguments to `delete_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflow(name: nil) - # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - # - # # Call the delete_migration_workflow method. - # result = client.delete_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest - - # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :delete_migration_workflow, 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 a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - # - # @overload start_migration_workflow(request, options = nil) - # Pass arguments to `start_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload start_migration_workflow(name: nil) - # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - # - # # Call the start_migration_workflow method. - # result = client.start_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def start_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest - - # Converts hash 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.start_migration_workflow.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::Bigquery::Migration::V2::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.start_migration_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :start_migration_workflow, 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 a previously created migration subtask. - # - # @overload get_migration_subtask(request, options = nil) - # Pass arguments to `get_migration_subtask` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_subtask(name: nil, read_mask: nil) - # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - # - # # Call the get_migration_subtask method. - # result = client.get_migration_subtask request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p result - # - def get_migration_subtask request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest - - # Converts hash 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_migration_subtask.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::Bigquery::Migration::V2::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_migration_subtask.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_migration_subtask.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :get_migration_subtask, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration subtasks. - # - # @overload list_migration_subtasks(request, options = nil) - # Pass arguments to `list_migration_subtasks` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at - # least one keyword argument is 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 migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @param page_size [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @param page_token [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - # - # # Call the list_migration_subtasks method. - # result = client.list_migration_subtasks 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::Bigquery::Migration::V2::MigrationSubtask. - # p item - # end - # - def list_migration_subtasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest - - # Converts hash 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_migration_subtasks.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::Bigquery::Migration::V2::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_migration_subtasks.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_migration_subtasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.call_rpc :list_migration_subtasks, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MigrationService API. - # - # This class represents the configuration for MigrationService, - # 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::Bigquery::Migration::V2::MigrationService::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 - # # create_migration_workflow to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.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::Bigquery::Migration::V2::MigrationService::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 = "bigquerymigration.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 MigrationService 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 `create_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_migration_workflow - ## - # RPC-specific configuration for `get_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_workflow - ## - # RPC-specific configuration for `list_migration_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_workflows - ## - # RPC-specific configuration for `delete_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_migration_workflow - ## - # RPC-specific configuration for `start_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :start_migration_workflow - ## - # RPC-specific configuration for `get_migration_subtask` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_subtask - ## - # RPC-specific configuration for `list_migration_subtasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_subtasks - - # @private - def initialize parent_rpcs = nil - create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow - @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config - get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow - @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config - list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows - @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config - delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow - @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config - start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow - @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config - get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask - @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config - list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks - @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb deleted file mode 100644 index db5d89803933..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/credentials.rb +++ /dev/null @@ -1,49 +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 Bigquery - module Migration - module V2 - module MigrationService - # Credentials for the MigrationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb deleted file mode 100644 index 21bfeb2669a0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/paths.rb +++ /dev/null @@ -1,92 +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 Bigquery - module Migration - module V2 - module MigrationService - # Path helper methods for the MigrationService API. - module Paths - ## - # 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 MigrationSubtask resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # @param subtask [String] - # - # @return [::String] - def migration_subtask_path project:, location:, workflow:, subtask: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workflow cannot contain /" if workflow.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workflows/#{workflow}/subtasks/#{subtask}" - end - - ## - # Create a fully-qualified MigrationWorkflow resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # - # @return [::String] - def migration_workflow_path project:, location:, workflow: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workflows/#{workflow}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.rb deleted file mode 100644 index d298ae4f0452..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/migration/v2/version" - -require "google/cloud/bigquery/migration/v2/migration_service/credentials" -require "google/cloud/bigquery/migration/v2/migration_service/paths" -require "google/cloud/bigquery/migration/v2/migration_service/rest/client" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - ## - # Service to handle EDW migrations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/migration/v2/migration_service/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module MigrationService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/migration/v2/migration_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb deleted file mode 100644 index c425938db5a5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/client.rb +++ /dev/null @@ -1,1009 +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/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - module Rest - ## - # REST client for the MigrationService service. - # - # Service to handle EDW migrations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerymigration.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :migration_service_stub - - ## - # Configure the MigrationService Client class. - # - # See {::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all MigrationService clients - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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", "Bigquery", "Migration", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_migration_workflow.timeout = 60.0 - - default_config.rpcs.get_migration_workflow.timeout = 60.0 - default_config.rpcs.get_migration_workflow.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_migration_workflows.timeout = 60.0 - default_config.rpcs.list_migration_workflows.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_migration_workflow.timeout = 60.0 - - default_config.rpcs.start_migration_workflow.timeout = 60.0 - default_config.rpcs.start_migration_workflow.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 MigrationService 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::Bigquery::Migration::V2::MigrationService::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 - @migration_service_stub.universe_domain - end - - ## - # Create a new MigrationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the MigrationService 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 - - @migration_service_stub = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @migration_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @migration_service_stub.logger - end - - # Service calls - - ## - # Creates a migration workflow. - # - # @overload create_migration_workflow(request, options = nil) - # Pass arguments to `create_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflow(parent: nil, migration_workflow: nil) - # Pass arguments to `create_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @param migration_workflow [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow, ::Hash] - # Required. The migration workflow to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - # - # # Call the create_migration_workflow method. - # result = client.create_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def create_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest - - # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.create_migration_workflow 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 a previously created migration workflow. - # - # @overload get_migration_workflow(request, options = nil) - # Pass arguments to `get_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflow(name: nil, read_mask: nil) - # Pass arguments to `get_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - # - # # Call the get_migration_workflow method. - # result = client.get_migration_workflow request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - # p result - # - def get_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest - - # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.get_migration_workflow request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration workflow. - # - # @overload list_migration_workflows(request, options = nil) - # Pass arguments to `list_migration_workflows` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflows(parent: nil, read_mask: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_migration_workflows` via keyword arguments. Note that at - # least one keyword argument is 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 project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be retrieved. - # @param page_size [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @param page_token [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - # - # # Call the list_migration_workflows method. - # result = client.list_migration_workflows 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::Bigquery::Migration::V2::MigrationWorkflow. - # p item - # end - # - def list_migration_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest - - # Converts hash 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_migration_workflows.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::Bigquery::Migration::V2::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_migration_workflows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_migration_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.list_migration_workflows request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_workflows, "migration_workflows", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a migration workflow by name. - # - # @overload delete_migration_workflow(request, options = nil) - # Pass arguments to `delete_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_workflow(name: nil) - # Pass arguments to `delete_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - # - # # Call the delete_migration_workflow method. - # result = client.delete_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest - - # Converts hash 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_migration_workflow.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::Bigquery::Migration::V2::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_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.delete_migration_workflow 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 a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - # - # @overload start_migration_workflow(request, options = nil) - # Pass arguments to `start_migration_workflow` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload start_migration_workflow(name: nil) - # Pass arguments to `start_migration_workflow` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - # - # # Call the start_migration_workflow method. - # result = client.start_migration_workflow request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def start_migration_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest - - # Converts hash 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.start_migration_workflow.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::Bigquery::Migration::V2::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.start_migration_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_migration_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.start_migration_workflow 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 a previously created migration subtask. - # - # @overload get_migration_subtask(request, options = nil) - # Pass arguments to `get_migration_subtask` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_subtask(name: nil, read_mask: nil) - # Pass arguments to `get_migration_subtask` via keyword arguments. Note that at - # least one keyword argument is 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 unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - # - # # Call the get_migration_subtask method. - # result = client.get_migration_subtask request - # - # # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - # p result - # - def get_migration_subtask request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest - - # Converts hash 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_migration_subtask.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::Bigquery::Migration::V2::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_migration_subtask.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_migration_subtask.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.get_migration_subtask request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously created migration subtasks. - # - # @overload list_migration_subtasks(request, options = nil) - # Pass arguments to `list_migration_subtasks` via a request object, either of type - # {::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_migration_subtasks(parent: nil, read_mask: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_migration_subtasks` via keyword arguments. Note that at - # least one keyword argument is 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 migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @param read_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to be retrieved. - # @param page_size [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @param page_token [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/migration/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - # - # # Call the list_migration_subtasks method. - # result = client.list_migration_subtasks 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::Bigquery::Migration::V2::MigrationSubtask. - # p item - # end - # - def list_migration_subtasks request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest - - # Converts hash 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_migration_subtasks.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::Bigquery::Migration::V2::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_migration_subtasks.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_migration_subtasks.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @migration_service_stub.list_migration_subtasks request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @migration_service_stub, :list_migration_subtasks, "migration_subtasks", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the MigrationService REST API. - # - # This class represents the configuration for MigrationService 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::Bigquery::Migration::V2::MigrationService::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 - # # create_migration_workflow to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_migration_workflow.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 = "bigquerymigration.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 MigrationService 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 `create_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_migration_workflow - ## - # RPC-specific configuration for `get_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_workflow - ## - # RPC-specific configuration for `list_migration_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_workflows - ## - # RPC-specific configuration for `delete_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_migration_workflow - ## - # RPC-specific configuration for `start_migration_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :start_migration_workflow - ## - # RPC-specific configuration for `get_migration_subtask` - # @return [::Gapic::Config::Method] - # - attr_reader :get_migration_subtask - ## - # RPC-specific configuration for `list_migration_subtasks` - # @return [::Gapic::Config::Method] - # - attr_reader :list_migration_subtasks - - # @private - def initialize parent_rpcs = nil - create_migration_workflow_config = parent_rpcs.create_migration_workflow if parent_rpcs.respond_to? :create_migration_workflow - @create_migration_workflow = ::Gapic::Config::Method.new create_migration_workflow_config - get_migration_workflow_config = parent_rpcs.get_migration_workflow if parent_rpcs.respond_to? :get_migration_workflow - @get_migration_workflow = ::Gapic::Config::Method.new get_migration_workflow_config - list_migration_workflows_config = parent_rpcs.list_migration_workflows if parent_rpcs.respond_to? :list_migration_workflows - @list_migration_workflows = ::Gapic::Config::Method.new list_migration_workflows_config - delete_migration_workflow_config = parent_rpcs.delete_migration_workflow if parent_rpcs.respond_to? :delete_migration_workflow - @delete_migration_workflow = ::Gapic::Config::Method.new delete_migration_workflow_config - start_migration_workflow_config = parent_rpcs.start_migration_workflow if parent_rpcs.respond_to? :start_migration_workflow - @start_migration_workflow = ::Gapic::Config::Method.new start_migration_workflow_config - get_migration_subtask_config = parent_rpcs.get_migration_subtask if parent_rpcs.respond_to? :get_migration_subtask - @get_migration_subtask = ::Gapic::Config::Method.new get_migration_subtask_config - list_migration_subtasks_config = parent_rpcs.list_migration_subtasks if parent_rpcs.respond_to? :list_migration_subtasks - @list_migration_subtasks = ::Gapic::Config::Method.new list_migration_subtasks_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb deleted file mode 100644 index 21756920f3bf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service/rest/service_stub.rb +++ /dev/null @@ -1,512 +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/bigquery/migration/v2/migration_service_pb" - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - module Rest - ## - # REST service stub for the MigrationService 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: false, - 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 create_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] - # 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::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # A result object deserialized from the server's reply - def create_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_migration_workflow_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_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] - # 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::Bigquery::Migration::V2::MigrationWorkflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # A result object deserialized from the server's reply - def get_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_workflow_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_migration_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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_migration_workflows REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] - # 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::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse] - # A result object deserialized from the server's reply - def list_migration_workflows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_workflows_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_migration_workflows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.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_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] - # 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_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_migration_workflow_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_migration_workflow", - 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 start_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] - # 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 start_migration_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_migration_workflow_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: "start_migration_workflow", - 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 get_migration_subtask REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] - # 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::Bigquery::Migration::V2::MigrationSubtask] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask] - # A result object deserialized from the server's reply - def get_migration_subtask request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_migration_subtask_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_migration_subtask", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.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_migration_subtasks REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] - # 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::Bigquery::Migration::V2::ListMigrationSubtasksResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse] - # A result object deserialized from the server's reply - def list_migration_subtasks request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_migration_subtasks_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_migration_subtasks", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.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_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest] - # 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_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/workflows", - body: "migration_workflow", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest] - # 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_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_migration_workflows REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest] - # 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_migration_workflows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/workflows", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest] - # 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_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_migration_workflow REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_start_migration_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_migration_subtask REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest] - # 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_migration_subtask_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/subtasks/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_migration_subtasks REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest] - # 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_migration_subtasks_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/subtasks", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb deleted file mode 100644 index 22bab24f5771..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/migration_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/bigquery/migration/v2/migration_entities_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n:google/cloud/bigquery/migration/v2/migration_service.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/bigquery/migration/v2/migration_entities.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xb3\x01\n\x1e\x43reateMigrationWorkflowRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12V\n\x12migration_workflow\x18\x02 \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflowB\x03\xe0\x41\x02\"\x96\x01\n\x1bGetMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb0\x01\n\x1dListMigrationWorkflowsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12-\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8d\x01\n\x1eListMigrationWorkflowsResponse\x12R\n\x13migration_workflows\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1e\x44\x65leteMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"i\n\x1dStartMigrationWorkflowRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\"\x99\x01\n\x1aGetMigrationSubtaskRequest\x12G\n\x04name\x18\x01 \x01(\tB9\xe0\x41\x02\xfa\x41\x33\n1bigquerymigration.googleapis.com/MigrationSubtask\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\xe4\x01\n\x1cListMigrationSubtasksRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2bigquerymigration.googleapis.com/MigrationWorkflow\x12\x32\n\tread_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\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\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x8a\x01\n\x1dListMigrationSubtasksResponse\x12P\n\x12migration_subtasks\x18\x01 \x03(\x0b\x32\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xcb\x0c\n\x10MigrationService\x12\xfb\x01\n\x17\x43reateMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"e\xda\x41\x19parent,migration_workflow\x82\xd3\xe4\x93\x02\x43\"-/v2/{parent=projects/*/locations/*}/workflows:\x12migration_workflow\x12\xcc\x01\n\x14GetMigrationWorkflow\x12?.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest\x1a\x35.google.cloud.bigquery.migration.v2.MigrationWorkflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/workflows/*}\x12\xdf\x01\n\x16ListMigrationWorkflows\x12\x41.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest\x1a\x42.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/workflows\x12\xb3\x01\n\x17\x44\x65leteMigrationWorkflow\x12\x42.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/workflows/*}\x12\xba\x01\n\x16StartMigrationWorkflow\x12\x41.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v2/{name=projects/*/locations/*/workflows/*}:start:\x01*\x12\xd4\x01\n\x13GetMigrationSubtask\x12>.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest\x1a\x34.google.cloud.bigquery.migration.v2.MigrationSubtask\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}\x12\xe7\x01\n\x15ListMigrationSubtasks\x12@.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest\x1a\x41.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v2/{parent=projects/*/locations/*/workflows/*}/subtasks\x1aT\xca\x41 bigquerymigration.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd1\x01\n&com.google.cloud.bigquery.migration.v2B\x15MigrationServiceProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - CreateMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest").msgclass - GetMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest").msgclass - ListMigrationWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest").msgclass - ListMigrationWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse").msgclass - DeleteMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest").msgclass - StartMigrationWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest").msgclass - GetMigrationSubtaskRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest").msgclass - ListMigrationSubtasksRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest").msgclass - ListMigrationSubtasksResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb deleted file mode 100644 index 3232f23f93d9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/migration_service_services_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/migration/v2/migration_service.proto for package 'google.cloud.bigquery.migration.v2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigquery/migration/v2/migration_service_pb' - -module Google - module Cloud - module Bigquery - module Migration - module V2 - module MigrationService - # Service to handle EDW migrations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.migration.v2.MigrationService' - - # Creates a migration workflow. - rpc :CreateMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow - # Gets a previously created migration workflow. - rpc :GetMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow - # Lists previously created migration workflow. - rpc :ListMigrationWorkflows, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse - # Deletes a migration workflow by name. - rpc :DeleteMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, ::Google::Protobuf::Empty - # Starts a previously created migration workflow. I.e., the state transitions - # from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - # An error will be signaled if the state is anything other than DRAFT or - # RUNNING. - rpc :StartMigrationWorkflow, ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, ::Google::Protobuf::Empty - # Gets a previously created migration subtask. - rpc :GetMigrationSubtask, ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask - # Lists previously created migration subtasks. - rpc :ListMigrationSubtasks, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb deleted file mode 100644 index 76d58e045e9e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/migration/v2/migration_service/rest" -require "google/cloud/bigquery/migration/v2/version" - -module Google - module Cloud - module Bigquery - module Migration - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/migration/v2/rest" - # client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new - # - module V2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb deleted file mode 100644 index 26de688def6d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_config_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n;google/cloud/bigquery/migration/v2/translation_config.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\"\xe0\x03\n\x18TranslationConfigDetails\x12\x19\n\x0fgcs_source_path\x18\x01 \x01(\tH\x00\x12\x19\n\x0fgcs_target_path\x18\x02 \x01(\tH\x01\x12V\n\x11name_mapping_list\x18\x05 \x01(\x0b\x32\x39.google.cloud.bigquery.migration.v2.ObjectNameMappingListH\x02\x12\x43\n\x0esource_dialect\x18\x03 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x43\n\x0etarget_dialect\x18\x04 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.Dialect\x12\x41\n\nsource_env\x18\x06 \x01(\x0b\x32-.google.cloud.bigquery.migration.v2.SourceEnv\x12\x16\n\x0erequest_source\x18\x08 \x01(\t\x12\x14\n\x0ctarget_types\x18\t \x03(\tB\x11\n\x0fsource_locationB\x11\n\x0ftarget_locationB\x15\n\x13output_name_mapping\"\xeb\n\n\x07\x44ialect\x12O\n\x10\x62igquery_dialect\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.BigQueryDialectH\x00\x12K\n\x0ehiveql_dialect\x18\x02 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.HiveQLDialectH\x00\x12O\n\x10redshift_dialect\x18\x03 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.RedshiftDialectH\x00\x12O\n\x10teradata_dialect\x18\x04 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.TeradataDialectH\x00\x12K\n\x0eoracle_dialect\x18\x05 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.OracleDialectH\x00\x12O\n\x10sparksql_dialect\x18\x06 \x01(\x0b\x32\x33.google.cloud.bigquery.migration.v2.SparkSQLDialectH\x00\x12Q\n\x11snowflake_dialect\x18\x07 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SnowflakeDialectH\x00\x12M\n\x0fnetezza_dialect\x18\x08 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NetezzaDialectH\x00\x12X\n\x15\x61zure_synapse_dialect\x18\t \x01(\x0b\x32\x37.google.cloud.bigquery.migration.v2.AzureSynapseDialectH\x00\x12M\n\x0fvertica_dialect\x18\n \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.VerticaDialectH\x00\x12R\n\x12sql_server_dialect\x18\x0b \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.SQLServerDialectH\x00\x12S\n\x12postgresql_dialect\x18\x0c \x01(\x0b\x32\x35.google.cloud.bigquery.migration.v2.PostgresqlDialectH\x00\x12K\n\x0epresto_dialect\x18\r \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.PrestoDialectH\x00\x12I\n\rmysql_dialect\x18\x0e \x01(\x0b\x32\x30.google.cloud.bigquery.migration.v2.MySQLDialectH\x00\x12\x45\n\x0b\x64\x62\x32_dialect\x18\x0f \x01(\x0b\x32..google.cloud.bigquery.migration.v2.DB2DialectH\x00\x12K\n\x0esqlite_dialect\x18\x10 \x01(\x0b\x32\x31.google.cloud.bigquery.migration.v2.SQLiteDialectH\x00\x12Q\n\x11greenplum_dialect\x18\x11 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.GreenplumDialectH\x00\x42\x0f\n\rdialect_value\"\x11\n\x0f\x42igQueryDialect\"\x0f\n\rHiveQLDialect\"\x11\n\x0fRedshiftDialect\"\x8a\x01\n\x0fTeradataDialect\x12\x46\n\x04mode\x18\x01 \x01(\x0e\x32\x38.google.cloud.bigquery.migration.v2.TeradataDialect.Mode\"/\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x07\n\x03SQL\x10\x01\x12\x08\n\x04\x42TEQ\x10\x02\"\x0f\n\rOracleDialect\"\x11\n\x0fSparkSQLDialect\"\x12\n\x10SnowflakeDialect\"\x10\n\x0eNetezzaDialect\"\x15\n\x13\x41zureSynapseDialect\"\x10\n\x0eVerticaDialect\"\x12\n\x10SQLServerDialect\"\x13\n\x11PostgresqlDialect\"\x0f\n\rPrestoDialect\"\x0e\n\x0cMySQLDialect\"\x0c\n\nDB2Dialect\"\x0f\n\rSQLiteDialect\"\x12\n\x10GreenplumDialect\"`\n\x15ObjectNameMappingList\x12G\n\x08name_map\x18\x01 \x03(\x0b\x32\x35.google.cloud.bigquery.migration.v2.ObjectNameMapping\"\x9d\x01\n\x11ObjectNameMapping\x12\x42\n\x06source\x18\x01 \x01(\x0b\x32\x32.google.cloud.bigquery.migration.v2.NameMappingKey\x12\x44\n\x06target\x18\x02 \x01(\x0b\x32\x34.google.cloud.bigquery.migration.v2.NameMappingValue\"\xab\x02\n\x0eNameMappingKey\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.migration.v2.NameMappingKey.Type\x12\x10\n\x08\x64\x61tabase\x18\x02 \x01(\t\x12\x0e\n\x06schema\x18\x03 \x01(\t\x12\x10\n\x08relation\x18\x04 \x01(\t\x12\x11\n\tattribute\x18\x05 \x01(\t\"\x8a\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44\x41TABASE\x10\x01\x12\n\n\x06SCHEMA\x10\x02\x12\x0c\n\x08RELATION\x10\x03\x12\r\n\tATTRIBUTE\x10\x04\x12\x12\n\x0eRELATION_ALIAS\x10\x05\x12\x13\n\x0f\x41TTRIBUTE_ALIAS\x10\x06\x12\x0c\n\x08\x46UNCTION\x10\x07\"Y\n\x10NameMappingValue\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x0e\n\x06schema\x18\x02 \x01(\t\x12\x10\n\x08relation\x18\x03 \x01(\t\x12\x11\n\tattribute\x18\x04 \x01(\t\"f\n\tSourceEnv\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd2\x01\n&com.google.cloud.bigquery.migration.v2B\x16TranslationConfigProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationConfigDetails").msgclass - Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Dialect").msgclass - BigQueryDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.BigQueryDialect").msgclass - HiveQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.HiveQLDialect").msgclass - RedshiftDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.RedshiftDialect").msgclass - TeradataDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect").msgclass - TeradataDialect::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TeradataDialect.Mode").enummodule - OracleDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.OracleDialect").msgclass - SparkSQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SparkSQLDialect").msgclass - SnowflakeDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SnowflakeDialect").msgclass - NetezzaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NetezzaDialect").msgclass - AzureSynapseDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.AzureSynapseDialect").msgclass - VerticaDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.VerticaDialect").msgclass - SQLServerDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLServerDialect").msgclass - PostgresqlDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PostgresqlDialect").msgclass - PrestoDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.PrestoDialect").msgclass - MySQLDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.MySQLDialect").msgclass - DB2Dialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.DB2Dialect").msgclass - SQLiteDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SQLiteDialect").msgclass - GreenplumDialect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GreenplumDialect").msgclass - ObjectNameMappingList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMappingList").msgclass - ObjectNameMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.ObjectNameMapping").msgclass - NameMappingKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey").msgclass - NameMappingKey::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingKey.Type").enummodule - NameMappingValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.NameMappingValue").msgclass - SourceEnv = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnv").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb deleted file mode 100644 index 2035126d366d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_details_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_details.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\n\x07literal\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.migration.v2.LiteralH\x00\x12\x15\n\x08\x65ncoding\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\x08\n\x06source\"#\n\nTargetSpec\x12\x15\n\rrelative_path\x18\x01 \x01(\t\"h\n\x07Literal\x12\x18\n\x0eliteral_string\x18\x02 \x01(\tH\x00\x12\x17\n\rliteral_bytes\x18\x03 \x01(\x0cH\x00\x12\x1a\n\rrelative_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x0e\n\x0cliteral_data\"n\n\x11SourceEnvironment\x12\x18\n\x10\x64\x65\x66\x61ult_database\x18\x01 \x01(\t\x12\x1a\n\x12schema_search_path\x18\x02 \x03(\t\x12#\n\x16metadata_store_dataset\x18\x03 \x01(\tB\x03\xe0\x41\x01\x42\xd3\x01\n&com.google.cloud.bigquery.migration.v2B\x17TranslationDetailsProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationDetails").msgclass - SourceTargetMapping = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceTargetMapping").msgclass - SourceSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceSpec").msgclass - TargetSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TargetSpec").msgclass - Literal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.Literal").msgclass - SourceEnvironment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.SourceEnvironment").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb deleted file mode 100644 index b371a88bb83b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_suggestion_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_suggestion.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n?google/cloud/bigquery/migration/v2/translation_suggestion.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x88\x02\n\x17TranslationReportRecord\x12V\n\x08severity\x18\x01 \x01(\x0e\x32\x44.google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity\x12\x13\n\x0bscript_line\x18\x02 \x01(\x05\x12\x15\n\rscript_column\x18\x03 \x01(\x05\x12\x10\n\x08\x63\x61tegory\x18\x04 \x01(\t\x12\x0f\n\x07message\x18\x05 \x01(\t\"F\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x42\xd6\x01\n&com.google.cloud.bigquery.migration.v2B\x1aTranslationSuggestionProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - TranslationReportRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord").msgclass - TranslationReportRecord::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.TranslationReportRecord.Severity").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb deleted file mode 100644 index 840017a9f86a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/translation_usability_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/migration/v2/translation_usability.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n>google/cloud/bigquery/migration/v2/translation_usability.proto\x12\"google.cloud.bigquery.migration.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf6\x01\n\x13GcsReportLogMessage\x12\x10\n\x08severity\x18\x01 \x01(\t\x12\x10\n\x08\x63\x61tegory\x18\x02 \x01(\t\x12\x11\n\tfile_path\x18\x03 \x01(\t\x12\x10\n\x08\x66ilename\x18\x04 \x01(\t\x12\x1a\n\x12source_script_line\x18\x05 \x01(\x05\x12\x1c\n\x14source_script_column\x18\x06 \x01(\x05\x12\x0f\n\x07message\x18\x07 \x01(\t\x12\x16\n\x0escript_context\x18\x08 \x01(\t\x12\x0e\n\x06\x61\x63tion\x18\t \x01(\t\x12\x0e\n\x06\x65\x66\x66\x65\x63t\x18\n \x01(\t\x12\x13\n\x0bobject_name\x18\x0b \x01(\tB\xd5\x01\n&com.google.cloud.bigquery.migration.v2B\x19TranslationUsabilityProtoP\x01ZDcloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb\xaa\x02\"Google.Cloud.BigQuery.Migration.V2\xca\x02\"Google\\Cloud\\BigQuery\\Migration\\V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Migration - module V2 - GcsReportLogMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.migration.v2.GcsReportLogMessage").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb deleted file mode 100644 index c33fa4b1c721..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/lib/google/cloud/bigquery/migration/v2/version.rb +++ /dev/null @@ -1,30 +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 Bigquery - module Migration - module V2 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md deleted file mode 100644 index 6a3802be6255..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Migration V2 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-bigquery-migration-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb deleted file mode 100644 index e4f870d5ad0d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/distribution.rb +++ /dev/null @@ -1,233 +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 - # `Distribution` contains summary statistics for a population of values. It - # optionally contains a histogram representing the distribution of those values - # across a set of buckets. - # - # The summary statistics are the count, mean, sum of the squared deviation from - # the mean, the minimum, and the maximum of the set of population of values. - # The histogram is based on a sequence of buckets and gives a count of values - # that fall into each bucket. The boundaries of the buckets are given either - # explicitly or by formulas for buckets of fixed or exponentially increasing - # widths. - # - # Although it is not forbidden, it is generally a bad idea to include - # non-finite values (infinities or NaNs) in the population of values, as this - # will render the `mean` and `sum_of_squared_deviation` fields meaningless. - # @!attribute [rw] count - # @return [::Integer] - # The number of values in the population. Must be non-negative. This value - # must equal the sum of the values in `bucket_counts` if a histogram is - # provided. - # @!attribute [rw] mean - # @return [::Float] - # The arithmetic mean of the values in the population. If `count` is zero - # then this field must be zero. - # @!attribute [rw] sum_of_squared_deviation - # @return [::Float] - # The sum of squared deviations from the mean of the values in the - # population. For values x_i this is: - # - # Sum[i=1..n]((x_i - mean)^2) - # - # Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition - # describes Welford's method for accumulating this sum in one pass. - # - # If `count` is zero then this field must be zero. - # @!attribute [rw] range - # @return [::Google::Api::Distribution::Range] - # If specified, contains the range of the population values. The field - # must not be present if the `count` is zero. - # @!attribute [rw] bucket_options - # @return [::Google::Api::Distribution::BucketOptions] - # Defines the histogram bucket boundaries. If the distribution does not - # contain a histogram, then omit this field. - # @!attribute [rw] bucket_counts - # @return [::Array<::Integer>] - # The number of values in each bucket of the histogram, as described in - # `bucket_options`. If the distribution does not have a histogram, then omit - # this field. If there is a histogram, then the sum of the values in - # `bucket_counts` must equal the value in the `count` field of the - # distribution. - # - # If present, `bucket_counts` should contain N values, where N is the number - # of buckets specified in `bucket_options`. If you supply fewer than N - # values, the remaining values are assumed to be 0. - # - # The order of the values in `bucket_counts` follows the bucket numbering - # schemes described for the three bucket types. The first value must be the - # count for the underflow bucket (number 0). The next N-2 values are the - # counts for the finite buckets (number 1 through N-2). The N'th value in - # `bucket_counts` is the count for the overflow bucket (number N-1). - # @!attribute [rw] exemplars - # @return [::Array<::Google::Api::Distribution::Exemplar>] - # Must be in increasing order of `value` field. - class Distribution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The range of the population values. - # @!attribute [rw] min - # @return [::Float] - # The minimum of the population values. - # @!attribute [rw] max - # @return [::Float] - # The maximum of the population values. - class Range - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BucketOptions` describes the bucket boundaries used to create a histogram - # for the distribution. The buckets can be in a linear sequence, an - # exponential sequence, or each bucket can be specified explicitly. - # `BucketOptions` does not include the number of values in each bucket. - # - # A bucket has an inclusive lower bound and exclusive upper bound for the - # values that are counted for that bucket. The upper bound of a bucket must - # be strictly greater than the lower bound. The sequence of N buckets for a - # distribution consists of an underflow bucket (number 0), zero or more - # finite buckets (number 1 through N - 2) and an overflow bucket (number N - - # 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the - # same as the upper bound of bucket i - 1. The buckets span the whole range - # of finite values: lower bound of the underflow bucket is -infinity and the - # upper bound of the overflow bucket is +infinity. The finite buckets are - # so-called because both bounds are finite. - # @!attribute [rw] linear_buckets - # @return [::Google::Api::Distribution::BucketOptions::Linear] - # The linear bucket. - # - # Note: The following fields are mutually exclusive: `linear_buckets`, `exponential_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] exponential_buckets - # @return [::Google::Api::Distribution::BucketOptions::Exponential] - # The exponential buckets. - # - # Note: The following fields are mutually exclusive: `exponential_buckets`, `linear_buckets`, `explicit_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explicit_buckets - # @return [::Google::Api::Distribution::BucketOptions::Explicit] - # The explicit buckets. - # - # Note: The following fields are mutually exclusive: `explicit_buckets`, `linear_buckets`, `exponential_buckets`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BucketOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies a linear sequence of buckets that all have the same width - # (except overflow and underflow). Each bucket represents a constant - # absolute uncertainty on the specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): offset + (width * i). - # - # Lower bound (1 <= i < N): offset + (width * (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] width - # @return [::Float] - # Must be greater than 0. - # @!attribute [rw] offset - # @return [::Float] - # Lower bound of the first bucket. - class Linear - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies an exponential sequence of buckets that have a width that is - # proportional to the value of the lower bound. Each bucket represents a - # constant relative uncertainty on a specific value in the bucket. - # - # There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the - # following boundaries: - # - # Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). - # - # Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). - # @!attribute [rw] num_finite_buckets - # @return [::Integer] - # Must be greater than 0. - # @!attribute [rw] growth_factor - # @return [::Float] - # Must be greater than 1. - # @!attribute [rw] scale - # @return [::Float] - # Must be greater than 0. - class Exponential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a set of buckets with arbitrary widths. - # - # There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following - # boundaries: - # - # Upper bound (0 <= i < N-1): bounds[i] - # Lower bound (1 <= i < N); bounds[i - 1] - # - # The `bounds` field must contain at least one element. If `bounds` has - # only one element, then there are no finite buckets, and that single - # element is the common boundary of the overflow and underflow buckets. - # @!attribute [rw] bounds - # @return [::Array<::Float>] - # The values must be monotonically increasing. - class Explicit - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Exemplars are example points that may be used to annotate aggregated - # distribution values. They are metadata that gives information about a - # particular value added to a Distribution bucket, such as a trace ID that - # was active when a value was added. They may contain further information, - # such as a example values and timestamps, origin, etc. - # @!attribute [rw] value - # @return [::Float] - # Value of the exemplar point. This value determines to which bucket the - # exemplar belongs. - # @!attribute [rw] timestamp - # @return [::Google::Protobuf::Timestamp] - # The observation (sampling) time of the above value. - # @!attribute [rw] attachments - # @return [::Array<::Google::Protobuf::Any>] - # Contextual information about the example value. Examples are: - # - # Trace: type.googleapis.com/google.monitoring.v3.SpanContext - # - # Literal string: type.googleapis.com/google.protobuf.StringValue - # - # Labels dropped during aggregation: - # type.googleapis.com/google.monitoring.v3.DroppedLabels - # - # There may be only a single attachment of any given message type in a - # single exemplar, and this is enforced by the system. - class Exemplar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/api/label.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb deleted file mode 100644 index 02d2f8d451f9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/label.rb +++ /dev/null @@ -1,49 +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 description of a label. - # @!attribute [rw] key - # @return [::String] - # The label key. - # @!attribute [rw] value_type - # @return [::Google::Api::LabelDescriptor::ValueType] - # The type of data that can be assigned to the label. - # @!attribute [rw] description - # @return [::String] - # A human-readable description for the label. - class LabelDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value types that can be used as label values. - module ValueType - # A variable-length string. This is the default. - STRING = 0 - - # Boolean; true or false. - BOOL = 1 - - # A 64-bit signed integer. - INT64 = 2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/api/metric.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb deleted file mode 100644 index 56510feeee0f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/metric.rb +++ /dev/null @@ -1,299 +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 - # Defines a metric type and its schema. Once a metric descriptor is created, - # deleting or altering it stops data collection and makes the metric type's - # existing data unusable. - # @!attribute [rw] name - # @return [::String] - # The resource name of the metric descriptor. - # @!attribute [rw] type - # @return [::String] - # The metric type, including its DNS name prefix. The type is not - # URL-encoded. All user-defined metric types have the DNS name - # `custom.googleapis.com` or `external.googleapis.com`. Metric types should - # use a natural hierarchical grouping. For example: - # - # "custom.googleapis.com/invoice/paid/amount" - # "external.googleapis.com/prometheus/up" - # "appengine.googleapis.com/http/server/response_latencies" - # @!attribute [rw] labels - # @return [::Array<::Google::Api::LabelDescriptor>] - # The set of labels that can be used to describe a specific - # instance of this metric type. For example, the - # `appengine.googleapis.com/http/server/response_latencies` metric - # type has a label for the HTTP response code, `response_code`, so - # you can look at latencies for successful responses or just - # for responses that failed. - # @!attribute [rw] metric_kind - # @return [::Google::Api::MetricDescriptor::MetricKind] - # Whether the metric records instantaneous values, changes to a value, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] value_type - # @return [::Google::Api::MetricDescriptor::ValueType] - # Whether the measurement is an integer, a floating-point number, etc. - # Some combinations of `metric_kind` and `value_type` might not be supported. - # @!attribute [rw] unit - # @return [::String] - # The units in which the metric value is reported. It is only applicable - # if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` - # defines the representation of the stored metric values. - # - # Different systems might scale the values to be more easily displayed (so a - # value of `0.02kBy` _might_ be displayed as `20By`, and a value of - # `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is - # `kBy`, then the value of the metric is always in thousands of bytes, no - # matter how it might be displayed. - # - # If you want a custom metric to record the exact number of CPU-seconds used - # by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is - # `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 - # CPU-seconds, then the value is written as `12005`. - # - # Alternatively, if you want a custom metric to record data in a more - # granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is - # `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), - # or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). - # - # The supported units are a subset of [The Unified Code for Units of - # Measure](https://unitsofmeasure.org/ucum.html) standard: - # - # **Basic units (UNIT)** - # - # * `bit` bit - # * `By` byte - # * `s` second - # * `min` minute - # * `h` hour - # * `d` day - # * `1` dimensionless - # - # **Prefixes (PREFIX)** - # - # * `k` kilo (10^3) - # * `M` mega (10^6) - # * `G` giga (10^9) - # * `T` tera (10^12) - # * `P` peta (10^15) - # * `E` exa (10^18) - # * `Z` zetta (10^21) - # * `Y` yotta (10^24) - # - # * `m` milli (10^-3) - # * `u` micro (10^-6) - # * `n` nano (10^-9) - # * `p` pico (10^-12) - # * `f` femto (10^-15) - # * `a` atto (10^-18) - # * `z` zepto (10^-21) - # * `y` yocto (10^-24) - # - # * `Ki` kibi (2^10) - # * `Mi` mebi (2^20) - # * `Gi` gibi (2^30) - # * `Ti` tebi (2^40) - # * `Pi` pebi (2^50) - # - # **Grammar** - # - # The grammar also includes these connectors: - # - # * `/` division or ratio (as an infix operator). For examples, - # `kBy/{email}` or `MiBy/10ms` (although you should almost never - # have `/s` in a metric `unit`; rates should always be computed at - # query time from the underlying cumulative or delta value). - # * `.` multiplication or composition (as an infix operator). For - # examples, `GBy.d` or `k{watt}.h`. - # - # The grammar for a unit is as follows: - # - # Expression = Component { "." Component } { "/" Component } ; - # - # Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] - # | Annotation - # | "1" - # ; - # - # Annotation = "{" NAME "}" ; - # - # Notes: - # - # * `Annotation` is just a comment if it follows a `UNIT`. If the annotation - # is used alone, then the unit is equivalent to `1`. For examples, - # `{request}/s == 1/s`, `By{transmitted}/s == By/s`. - # * `NAME` is a sequence of non-blank printable ASCII characters not - # containing `{` or `}`. - # * `1` represents a unitary [dimensionless - # unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such - # as in `1/s`. It is typically used when none of the basic units are - # appropriate. For example, "new users per day" can be represented as - # `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new - # users). Alternatively, "thousands of page views per day" would be - # represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric - # value of `5.3` would mean "5300 page views per day"). - # * `%` represents dimensionless value of 1/100, and annotates values giving - # a percentage (so the metric values are typically in the range of 0..100, - # and a metric value `3` means "3 percent"). - # * `10^2.%` indicates a metric contains a ratio, typically in the range - # 0..1, that will be multiplied by 100 and displayed as a percentage - # (so a metric value `0.03` means "3 percent"). - # @!attribute [rw] description - # @return [::String] - # A detailed description of the metric, which can be used in documentation. - # @!attribute [rw] display_name - # @return [::String] - # A concise name for the metric, which can be displayed in user interfaces. - # Use sentence case without an ending period, for example "Request count". - # This field is optional but it is recommended to be set for any metrics - # associated with user-visible concepts, such as Quota. - # @!attribute [rw] metadata - # @return [::Google::Api::MetricDescriptor::MetricDescriptorMetadata] - # Optional. Metadata which can be used to guide usage of the metric. - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Optional. The launch stage of the metric definition. - # @!attribute [rw] monitored_resource_types - # @return [::Array<::String>] - # Read-only. If present, then a [time - # series][google.monitoring.v3.TimeSeries], which is identified partially by - # a metric type and a - # [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that - # is associated with this metric type can only be associated with one of the - # monitored resource types listed here. - class MetricDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional annotations that can be used to guide the usage of a metric. - # @!attribute [rw] launch_stage - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Api::LaunchStage] - # Deprecated. Must use the - # {::Google::Api::MetricDescriptor#launch_stage MetricDescriptor.launch_stage} - # instead. - # @!attribute [rw] sample_period - # @return [::Google::Protobuf::Duration] - # The sampling period of metric data points. For metrics which are written - # periodically, consecutive data points are stored at this time interval, - # excluding data loss due to errors. Metrics with a higher granularity have - # a smaller sampling period. - # @!attribute [rw] ingest_delay - # @return [::Google::Protobuf::Duration] - # The delay of data points caused by ingestion. Data points older than this - # age are guaranteed to be ingested and available to be read, excluding - # data loss due to errors. - # @!attribute [rw] time_series_resource_hierarchy_level - # @return [::Array<::Google::Api::MetricDescriptor::MetricDescriptorMetadata::TimeSeriesResourceHierarchyLevel>] - # The scope of the timeseries data of the metric. - class MetricDescriptorMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The resource hierarchy level of the timeseries data of a metric. - module TimeSeriesResourceHierarchyLevel - # Do not use this default value. - TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0 - - # Scopes a metric to a project. - PROJECT = 1 - - # Scopes a metric to an organization. - ORGANIZATION = 2 - - # Scopes a metric to a folder. - FOLDER = 3 - end - end - - # The kind of measurement. It describes how the data is reported. - # For information on setting the start time and end time based on - # the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. - module MetricKind - # Do not use this default value. - METRIC_KIND_UNSPECIFIED = 0 - - # An instantaneous measurement of a value. - GAUGE = 1 - - # The change in a value during a time interval. - DELTA = 2 - - # A value accumulated over a time interval. Cumulative - # measurements in a time series should have the same start time - # and increasing end times, until an event resets the cumulative - # value to zero and sets a new start time for the following - # points. - CUMULATIVE = 3 - end - - # The value type of a metric. - module ValueType - # Do not use this default value. - VALUE_TYPE_UNSPECIFIED = 0 - - # The value is a boolean. - # This value type can be used only if the metric kind is `GAUGE`. - BOOL = 1 - - # The value is a signed 64-bit integer. - INT64 = 2 - - # The value is a double precision floating point number. - DOUBLE = 3 - - # The value is a text string. - # This value type can be used only if the metric kind is `GAUGE`. - STRING = 4 - - # The value is a {::Google::Api::Distribution `Distribution`}. - DISTRIBUTION = 5 - - # The value is money. - MONEY = 6 - end - end - - # A specific metric, identified by specifying values for all of the - # labels of a {::Google::Api::MetricDescriptor `MetricDescriptor`}. - # @!attribute [rw] type - # @return [::String] - # An existing metric type, see - # {::Google::Api::MetricDescriptor google.api.MetricDescriptor}. For example, - # `custom.googleapis.com/invoice/paid/amount`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # The set of label values that uniquely identify this metric. All - # labels listed in the `MetricDescriptor` must be assigned values. - class Metric - 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 - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb deleted file mode 100644 index c6820b25d3aa..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_entities.rb +++ /dev/null @@ -1,278 +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 Bigquery - module Migration - module V2 - # A migration workflow which specifies what needs to be done for an EDW - # migration. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. Identifier. The unique identifier for the migration - # workflow. The ID is server-generated. - # - # Example: `projects/123/locations/us/workflows/345` - # @!attribute [rw] display_name - # @return [::String] - # The display name of the workflow. This can be set to give a workflow - # a descriptive name. There is no guarantee or enforcement of uniqueness. - # @!attribute [rw] tasks - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Migration::V2::MigrationTask}] - # The tasks in a workflow in a named map. The name (i.e. key) has no - # meaning and is merely a convenient way to address a specific task - # in a workflow. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow::State] - # Output only. That status of the workflow. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time when the workflow was created. - # @!attribute [rw] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Time when the workflow was last updated. - class MigrationWorkflow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask] - class TasksEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible migration workflow states. - module State - # Workflow state is unspecified. - STATE_UNSPECIFIED = 0 - - # Workflow is in draft status, i.e. tasks are not yet eligible for - # execution. - DRAFT = 1 - - # Workflow is running (i.e. tasks are eligible for execution). - RUNNING = 2 - - # Workflow is paused. Tasks currently in progress may continue, but no - # further tasks will be scheduled. - PAUSED = 3 - - # Workflow is complete. There should not be any task in a non-terminal - # state, but if they are (e.g. forced termination), they will not be - # scheduled. - COMPLETED = 4 - end - end - - # A single task for a migration which has details about the configuration of - # the task. - # @!attribute [rw] translation_config_details - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationConfigDetails] - # Task configuration for CW Batch/Offline SQL Translation. - # - # Note: The following fields are mutually exclusive: `translation_config_details`, `translation_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] translation_details - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationDetails] - # Task details for unified SQL Translation. - # - # Note: The following fields are mutually exclusive: `translation_details`, `translation_config_details`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] id - # @return [::String] - # Output only. Immutable. The unique identifier for the migration task. The - # ID is server-generated. - # @!attribute [rw] type - # @return [::String] - # The type of the task. This must be one of the supported task types: - # Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - # Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - # Translation_Snowflake2BQ, Translation_Netezza2BQ, - # Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - # Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - # Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTask::State] - # Output only. The current state of the task. - # @!attribute [r] processing_error - # @return [::Google::Rpc::ErrorInfo] - # Output only. An explanation that may be populated when the task is in - # FAILED state. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time when the task was created. - # @!attribute [rw] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Time when the task was last updated. - # @!attribute [r] resource_error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] - # Output only. Provides details to errors and issues encountered while - # processing the task. Presence of error details does not mean that the task - # failed. - # @!attribute [rw] resource_error_count - # @return [::Integer] - # The number or resources with errors. Note: This is not the total - # number of errors as each resource can have more than one error. - # This is used to indicate truncation by having a `resource_error_count` - # that is higher than the size of `resource_error_details`. - # @!attribute [rw] metrics - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # The metrics for the task. - # @!attribute [r] task_result - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationTaskResult] - # Output only. The result of the task. - # @!attribute [rw] total_processing_error_count - # @return [::Integer] - # Count of all the processing errors in this task and its subtasks. - # @!attribute [rw] total_resource_error_count - # @return [::Integer] - # Count of all the resource errors in this task and its subtasks. - class MigrationTask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a migration task. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The task is waiting for orchestration. - PENDING = 1 - - # The task is assigned to an orchestrator. - ORCHESTRATING = 2 - - # The task is running, i.e. its subtasks are ready for execution. - RUNNING = 3 - - # Tha task is paused. Assigned subtasks can continue, but no new subtasks - # will be scheduled. - PAUSED = 4 - - # The task finished successfully. - SUCCEEDED = 5 - - # The task finished unsuccessfully. - FAILED = 6 - end - end - - # A subtask for a migration which carries details about the configuration of - # the subtask. The content of the details should not matter to the end user, - # but is a contract between the subtask creator and subtask worker. - # @!attribute [r] name - # @return [::String] - # Output only. Immutable. The resource name for the migration subtask. The ID - # is server-generated. - # - # Example: `projects/123/locations/us/workflows/345/subtasks/678` - # @!attribute [rw] task_id - # @return [::String] - # The unique ID of the task to which this subtask belongs. - # @!attribute [rw] type - # @return [::String] - # The type of the Subtask. The migration service does not check whether this - # is a known type. It is up to the task creator (i.e. orchestrator or worker) - # to ensure it only creates subtasks for which there are compatible workers - # polling for Subtasks. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask::State] - # Output only. The current state of the subtask. - # @!attribute [r] processing_error - # @return [::Google::Rpc::ErrorInfo] - # Output only. An explanation that may be populated when the task is in - # FAILED state. - # @!attribute [r] resource_error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ResourceErrorDetail>] - # Output only. Provides details to errors and issues encountered while - # processing the subtask. Presence of error details does not mean that the - # subtask failed. - # @!attribute [rw] resource_error_count - # @return [::Integer] - # The number or resources with errors. Note: This is not the total - # number of errors as each resource can have more than one error. - # This is used to indicate truncation by having a `resource_error_count` - # that is higher than the size of `resource_error_details`. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time when the subtask was created. - # @!attribute [rw] last_update_time - # @return [::Google::Protobuf::Timestamp] - # Time when the subtask was last updated. - # @!attribute [rw] metrics - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::TimeSeries>] - # The metrics for the subtask. - class MigrationSubtask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible states of a migration subtask. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The subtask is ready, i.e. it is ready for execution. - ACTIVE = 1 - - # The subtask is running, i.e. it is assigned to a worker for execution. - RUNNING = 2 - - # The subtask finished successfully. - SUCCEEDED = 3 - - # The subtask finished unsuccessfully. - FAILED = 4 - - # The subtask is paused, i.e., it will not be scheduled. If it was already - # assigned,it might still finish but no new lease renewals will be granted. - PAUSED = 5 - - # The subtask is pending a dependency. It will be scheduled once its - # dependencies are done. - PENDING_DEPENDENCY = 6 - end - end - - # The migration task result. - # @!attribute [rw] translation_task_result - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationTaskResult] - # Details specific to translation task types. - class MigrationTaskResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Translation specific result details from the migration task. - # @!attribute [rw] translated_literals - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Literal>] - # The list of the translated literals. - # @!attribute [rw] report_log_messages - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::GcsReportLogMessage>] - # The records from the aggregate CSV report for a migration workflow. - class TranslationTaskResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.rb deleted file mode 100644 index 29dfe6d0ee40..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_error_details.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! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # Provides details for errors and the corresponding resources. - # @!attribute [rw] resource_info - # @return [::Google::Rpc::ResourceInfo] - # Required. Information about the resource where the error is located. - # @!attribute [rw] error_details - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ErrorDetail>] - # Required. The error details for the resource. - # @!attribute [rw] error_count - # @return [::Integer] - # Required. How many errors there are in total for the resource. Truncation - # can be indicated by having an `error_count` that is higher than the size of - # `error_details`. - class ResourceErrorDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides details for errors, e.g. issues that where encountered when - # processing a subtask. - # @!attribute [rw] location - # @return [::Google::Cloud::Bigquery::Migration::V2::ErrorLocation] - # Optional. The exact location within the resource (if applicable). - # @!attribute [rw] error_info - # @return [::Google::Rpc::ErrorInfo] - # Required. Describes the cause of the error with structured detail. - class ErrorDetail - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds information about where the error is located. - # @!attribute [rw] line - # @return [::Integer] - # Optional. If applicable, denotes the line where the error occurred. A zero - # value means that there is no line information. - # @!attribute [rw] column - # @return [::Integer] - # Optional. If applicable, denotes the column where the error occurred. A - # zero value means that there is no columns information. - class ErrorLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb deleted file mode 100644 index 41e34dd60654..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_metrics.rb +++ /dev/null @@ -1,129 +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 Bigquery - module Migration - module V2 - # The metrics object for a SubTask. - # @!attribute [rw] metric - # @return [::String] - # Required. The name of the metric. - # - # If the metric is not known by the service yet, it will be auto-created. - # @!attribute [rw] value_type - # @return [::Google::Api::MetricDescriptor::ValueType] - # Required. The value type of the time series. - # @!attribute [rw] metric_kind - # @return [::Google::Api::MetricDescriptor::MetricKind] - # Optional. The metric kind of the time series. - # - # If present, it must be the same as the metric kind of the associated - # metric. If the associated metric's descriptor must be auto-created, then - # this field specifies the metric kind of the new descriptor and must be - # either `GAUGE` (the default) or `CUMULATIVE`. - # @!attribute [rw] points - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::Point>] - # Required. The data points of this time series. When listing time series, - # points are returned in reverse time order. - # - # When creating a time series, this field must contain exactly one point and - # the point's type must be the same as the value type of the associated - # metric. If the associated metric's descriptor must be auto-created, then - # the value type of the descriptor is determined by the point's type, which - # must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - class TimeSeries - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single data point in a time series. - # @!attribute [rw] interval - # @return [::Google::Cloud::Bigquery::Migration::V2::TimeInterval] - # The time interval to which the data point applies. For `GAUGE` metrics, - # the start time does not need to be supplied, but if it is supplied, it must - # equal the end time. For `DELTA` metrics, the start and end time should - # specify a non-zero interval, with subsequent points specifying contiguous - # and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - # time should specify a non-zero interval, with subsequent points specifying - # the same start time and increasing end times, until an event resets the - # cumulative value to zero and sets a new start time for the following - # points. - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Migration::V2::TypedValue] - # The value of the data point. - class Point - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A time interval extending just after a start time through an end time. - # If the start time is the same as the end time, then the interval - # represents a single point in time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. The beginning of the time interval. The default value - # for the start time is the end time. The start time must not be - # later than the end time. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. The end of the time interval. - class TimeInterval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single strongly-typed value. - # @!attribute [rw] bool_value - # @return [::Boolean] - # A Boolean value: `true` or `false`. - # - # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int64_value - # @return [::Integer] - # A 64-bit integer. Its range is approximately `+/-9.2x10^18`. - # - # Note: The following fields are mutually exclusive: `int64_value`, `bool_value`, `double_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_value - # @return [::Float] - # A 64-bit double-precision floating-point number. Its magnitude - # is approximately `+/-10^(+/-300)` and it has 16 significant digits of - # precision. - # - # Note: The following fields are mutually exclusive: `double_value`, `bool_value`, `int64_value`, `string_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # A variable-length string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `bool_value`, `int64_value`, `double_value`, `distribution_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] distribution_value - # @return [::Google::Api::Distribution] - # A distribution value. - # - # Note: The following fields are mutually exclusive: `distribution_value`, `bool_value`, `int64_value`, `double_value`, `string_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TypedValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb deleted file mode 100644 index d833be3e5b1d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/migration_service.rb +++ /dev/null @@ -1,166 +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 Bigquery - module Migration - module V2 - # Request to create a migration workflow resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project to which this migration workflow belongs. - # Example: `projects/foo/locations/bar` - # @!attribute [rw] migration_workflow - # @return [::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow] - # Required. The migration workflow to create. - class CreateMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be retrieved. - class GetMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list previously created migration workflows. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location of the migration workflows to list. - # Example: `projects/123/locations/us` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be retrieved. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of migration workflows to return. The service may return - # fewer than this number. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from previous `ListMigrationWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationWorkflows` - # must match the call that provided the page token. - class ListMigrationWorkflowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for a `ListMigrationWorkflows` call. - # @!attribute [rw] migration_workflows - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow>] - # The migration workflows for the specified project / location. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMigrationWorkflowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - class DeleteMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to start a previously created migration workflow. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration workflow. - # Example: `projects/123/locations/us/workflows/1234` - class StartMigrationWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a previously created migration subtasks. - # @!attribute [rw] name - # @return [::String] - # Required. The unique identifier for the migration subtask. - # Example: `projects/123/locations/us/workflows/1234/subtasks/543` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be retrieved. - class GetMigrationSubtaskRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list previously created migration subtasks. - # @!attribute [rw] parent - # @return [::String] - # Required. The migration task of the subtasks to list. - # Example: `projects/123/locations/us/workflows/1234` - # @!attribute [rw] read_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to be retrieved. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of migration tasks to return. The service may - # return fewer than this number. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from previous `ListMigrationSubtasks` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListMigrationSubtasks` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter to apply. This can be used to get the subtasks of a - # specific tasks in a workflow, e.g. `migration_task = "ab012"` where - # `"ab012"` is the task ID (not the name in the named map). - class ListMigrationSubtasksRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response object for a `ListMigrationSubtasks` call. - # @!attribute [rw] migration_subtasks - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask>] - # The migration subtasks for the specified task. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListMigrationSubtasksResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb deleted file mode 100644 index d0c7dde5e35b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_config.rb +++ /dev/null @@ -1,389 +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 Bigquery - module Migration - module V2 - # The translation config to capture necessary settings for a translation task - # and subtask. - # @!attribute [rw] gcs_source_path - # @return [::String] - # The Cloud Storage path for a directory of files to translate in a task. - # @!attribute [rw] gcs_target_path - # @return [::String] - # The Cloud Storage path to write back the corresponding input files to. - # @!attribute [rw] name_mapping_list - # @return [::Google::Cloud::Bigquery::Migration::V2::ObjectNameMappingList] - # The mapping of objects to their desired output names in list form. - # @!attribute [rw] source_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] - # The dialect of the input files. - # @!attribute [rw] target_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::Dialect] - # The target dialect for the engine to translate the input to. - # @!attribute [rw] source_env - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnv] - # The default source environment values for the translation. - # @!attribute [rw] request_source - # @return [::String] - # The indicator to show translation request initiator. - # @!attribute [rw] target_types - # @return [::Array<::String>] - # The types of output to generate, e.g. sql, metadata etc. If not specified, - # a default set of targets will be generated. Some additional target types - # may be slower to generate. See the documentation for the set of available - # target types. - class TranslationConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible dialect options for translation. - # @!attribute [rw] bigquery_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::BigQueryDialect] - # The BigQuery dialect - # - # Note: The following fields are mutually exclusive: `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hiveql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::HiveQLDialect] - # The HiveQL dialect - # - # Note: The following fields are mutually exclusive: `hiveql_dialect`, `bigquery_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] redshift_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::RedshiftDialect] - # The Redshift dialect - # - # Note: The following fields are mutually exclusive: `redshift_dialect`, `bigquery_dialect`, `hiveql_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] teradata_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect] - # The Teradata dialect - # - # Note: The following fields are mutually exclusive: `teradata_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oracle_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::OracleDialect] - # The Oracle dialect - # - # Note: The following fields are mutually exclusive: `oracle_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sparksql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SparkSQLDialect] - # The SparkSQL dialect - # - # Note: The following fields are mutually exclusive: `sparksql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] snowflake_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SnowflakeDialect] - # The Snowflake dialect - # - # Note: The following fields are mutually exclusive: `snowflake_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] netezza_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::NetezzaDialect] - # The Netezza dialect - # - # Note: The following fields are mutually exclusive: `netezza_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] azure_synapse_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::AzureSynapseDialect] - # The Azure Synapse dialect - # - # Note: The following fields are mutually exclusive: `azure_synapse_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vertica_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::VerticaDialect] - # The Vertica dialect - # - # Note: The following fields are mutually exclusive: `vertica_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sql_server_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SQLServerDialect] - # The SQL Server dialect - # - # Note: The following fields are mutually exclusive: `sql_server_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] postgresql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::PostgresqlDialect] - # The Postgresql dialect - # - # Note: The following fields are mutually exclusive: `postgresql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] presto_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::PrestoDialect] - # The Presto dialect - # - # Note: The following fields are mutually exclusive: `presto_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] mysql_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::MySQLDialect] - # The MySQL dialect - # - # Note: The following fields are mutually exclusive: `mysql_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `db2_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] db2_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::DB2Dialect] - # DB2 dialect - # - # Note: The following fields are mutually exclusive: `db2_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `sqlite_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sqlite_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::SQLiteDialect] - # SQLite dialect - # - # Note: The following fields are mutually exclusive: `sqlite_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `greenplum_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] greenplum_dialect - # @return [::Google::Cloud::Bigquery::Migration::V2::GreenplumDialect] - # Greenplum dialect - # - # Note: The following fields are mutually exclusive: `greenplum_dialect`, `bigquery_dialect`, `hiveql_dialect`, `redshift_dialect`, `teradata_dialect`, `oracle_dialect`, `sparksql_dialect`, `snowflake_dialect`, `netezza_dialect`, `azure_synapse_dialect`, `vertica_dialect`, `sql_server_dialect`, `postgresql_dialect`, `presto_dialect`, `mysql_dialect`, `db2_dialect`, `sqlite_dialect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Dialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for BigQuery. - class BigQueryDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for HiveQL. - class HiveQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Redshift. - class RedshiftDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Teradata. - # @!attribute [rw] mode - # @return [::Google::Cloud::Bigquery::Migration::V2::TeradataDialect::Mode] - # Which Teradata sub-dialect mode the user specifies. - class TeradataDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The sub-dialect options for Teradata. - module Mode - # Unspecified mode. - MODE_UNSPECIFIED = 0 - - # Teradata SQL mode. - SQL = 1 - - # BTEQ mode (which includes SQL). - BTEQ = 2 - end - end - - # The dialect definition for Oracle. - class OracleDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SparkSQL. - class SparkSQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Snowflake. - class SnowflakeDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Netezza. - class NetezzaDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Azure Synapse. - class AzureSynapseDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Vertica. - class VerticaDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SQL Server. - class SQLServerDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Postgresql. - class PostgresqlDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Presto. - class PrestoDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for MySQL. - class MySQLDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for DB2. - class DB2Dialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for SQLite. - class SQLiteDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The dialect definition for Greenplum. - class GreenplumDialect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a map of name mappings using a list of key:value proto messages of - # existing name to desired output name. - # @!attribute [rw] name_map - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::ObjectNameMapping>] - # The elements of the object name map. - class ObjectNameMappingList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a key-value pair of NameMappingKey to NameMappingValue to - # represent the mapping of SQL names from the input value to desired output. - # @!attribute [rw] source - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey] - # The name of the object in source that is being mapped. - # @!attribute [rw] target - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingValue] - # The desired target name of the object that is being mapped. - class ObjectNameMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The potential components of a full name mapping that will be mapped - # during translation in the source data warehouse. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Migration::V2::NameMappingKey::Type] - # The type of object that is being mapped. - # @!attribute [rw] database - # @return [::String] - # The database name (BigQuery project ID equivalent in the source data - # warehouse). - # @!attribute [rw] schema - # @return [::String] - # The schema name (BigQuery dataset equivalent in the source data warehouse). - # @!attribute [rw] relation - # @return [::String] - # The relation name (BigQuery table or view equivalent in the source data - # warehouse). - # @!attribute [rw] attribute - # @return [::String] - # The attribute name (BigQuery column equivalent in the source data - # warehouse). - class NameMappingKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the object that is being mapped. - module Type - # Unspecified name mapping type. - TYPE_UNSPECIFIED = 0 - - # The object being mapped is a database. - DATABASE = 1 - - # The object being mapped is a schema. - SCHEMA = 2 - - # The object being mapped is a relation. - RELATION = 3 - - # The object being mapped is an attribute. - ATTRIBUTE = 4 - - # The object being mapped is a relation alias. - RELATION_ALIAS = 5 - - # The object being mapped is a an attribute alias. - ATTRIBUTE_ALIAS = 6 - - # The object being mapped is a function. - FUNCTION = 7 - end - end - - # The potential components of a full name mapping that will be mapped - # during translation in the target data warehouse. - # @!attribute [rw] database - # @return [::String] - # The database name (BigQuery project ID equivalent in the target data - # warehouse). - # @!attribute [rw] schema - # @return [::String] - # The schema name (BigQuery dataset equivalent in the target data warehouse). - # @!attribute [rw] relation - # @return [::String] - # The relation name (BigQuery table or view equivalent in the target data - # warehouse). - # @!attribute [rw] attribute - # @return [::String] - # The attribute name (BigQuery column equivalent in the target data - # warehouse). - class NameMappingValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the default source environment values for the translation. - # @!attribute [rw] default_database - # @return [::String] - # The default database name to fully qualify SQL objects when their database - # name is missing. - # @!attribute [rw] schema_search_path - # @return [::Array<::String>] - # The schema search path. When SQL objects are missing schema name, - # translation engine will search through this list to find the value. - # @!attribute [rw] metadata_store_dataset - # @return [::String] - # Optional. Expects a valid BigQuery dataset ID that exists, e.g., - # project-123.metadata_store_123. If specified, translation will search and - # read the required schema information from a metadata store in this dataset. - # If metadata store doesn't exist, translation will parse the metadata file - # and upload the schema info to a temp table in the dataset to speed up - # future translation jobs. - class SourceEnv - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb deleted file mode 100644 index 46a35f58930e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_details.rb +++ /dev/null @@ -1,138 +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 Bigquery - module Migration - module V2 - # The translation details to capture the necessary settings for a translation - # job. - # @!attribute [rw] source_target_mapping - # @return [::Array<::Google::Cloud::Bigquery::Migration::V2::SourceTargetMapping>] - # The mapping from source to target SQL. - # @!attribute [rw] target_base_uri - # @return [::String] - # The base URI for all writes to persistent storage. - # @!attribute [rw] source_environment - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceEnvironment] - # The default source environment values for the translation. - # @!attribute [rw] target_return_literals - # @return [::Array<::String>] - # The list of literal targets that will be directly returned to the response. - # Each entry consists of the constructed path, EXCLUDING the base path. Not - # providing a target_base_uri will prevent writing to persistent storage. - # @!attribute [rw] target_types - # @return [::Array<::String>] - # The types of output to generate, e.g. sql, metadata, - # lineage_from_sql_scripts, etc. If not specified, a default set of - # targets will be generated. Some additional target types may be slower to - # generate. See the documentation for the set of available target types. - class TranslationDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents one mapping from a source SQL to a target SQL. - # @!attribute [rw] source_spec - # @return [::Google::Cloud::Bigquery::Migration::V2::SourceSpec] - # The source SQL or the path to it. - # @!attribute [rw] target_spec - # @return [::Google::Cloud::Bigquery::Migration::V2::TargetSpec] - # The target SQL or the path for it. - class SourceTargetMapping - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents one path to the location that holds source data. - # @!attribute [rw] base_uri - # @return [::String] - # The base URI for all files to be read in as sources for translation. - # - # Note: The following fields are mutually exclusive: `base_uri`, `literal`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] literal - # @return [::Google::Cloud::Bigquery::Migration::V2::Literal] - # Source literal. - # - # Note: The following fields are mutually exclusive: `literal`, `base_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] encoding - # @return [::String] - # Optional. The optional field to specify the encoding of the sql bytes. - class SourceSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents one path to the location that holds target data. - # @!attribute [rw] relative_path - # @return [::String] - # The relative path for the target data. Given source file - # `base_uri/input/sql`, the output would be - # `target_base_uri/sql/relative_path/input.sql`. - class TargetSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Literal data. - # @!attribute [rw] literal_string - # @return [::String] - # Literal string data. - # - # Note: The following fields are mutually exclusive: `literal_string`, `literal_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] literal_bytes - # @return [::String] - # Literal byte data. - # - # Note: The following fields are mutually exclusive: `literal_bytes`, `literal_string`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] relative_path - # @return [::String] - # Required. The identifier of the literal entry. - class Literal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the default source environment values for the translation. - # @!attribute [rw] default_database - # @return [::String] - # The default database name to fully qualify SQL objects when their database - # name is missing. - # @!attribute [rw] schema_search_path - # @return [::Array<::String>] - # The schema search path. When SQL objects are missing schema name, - # translation engine will search through this list to find the value. - # @!attribute [rw] metadata_store_dataset - # @return [::String] - # Optional. Expects a validQ BigQuery dataset ID that exists, e.g., - # project-123.metadata_store_123. If specified, translation will search and - # read the required schema information from a metadata store in this dataset. - # If metadata store doesn't exist, translation will parse the metadata file - # and upload the schema info to a temp table in the dataset to speed up - # future translation jobs. - class SourceEnvironment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb deleted file mode 100644 index ba08b1dfb393..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_suggestion.rb +++ /dev/null @@ -1,67 +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 Bigquery - module Migration - module V2 - # Details about a record. - # @!attribute [rw] severity - # @return [::Google::Cloud::Bigquery::Migration::V2::TranslationReportRecord::Severity] - # Severity of the translation record. - # @!attribute [rw] script_line - # @return [::Integer] - # Specifies the row from the source text where the error occurred (0 based). - # Example: 2 - # @!attribute [rw] script_column - # @return [::Integer] - # Specifies the column from the source texts where the error occurred. (0 - # based) example: 6 - # @!attribute [rw] category - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] message - # @return [::String] - # Detailed message of the record. - class TranslationReportRecord - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity type of the record. - module Severity - # SeverityType not specified. - SEVERITY_UNSPECIFIED = 0 - - # INFO type. - INFO = 1 - - # WARNING type. The translated query may still provide useful information - # if all the report records are WARNING. - WARNING = 2 - - # ERROR type. Translation failed. - ERROR = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.rb deleted file mode 100644 index 13d55b41ed54..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/cloud/bigquery/migration/v2/translation_usability.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! - - -module Google - module Cloud - module Bigquery - module Migration - module V2 - # A record in the aggregate CSV report for a migration workflow - # @!attribute [rw] severity - # @return [::String] - # Severity of the translation record. - # @!attribute [rw] category - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] file_path - # @return [::String] - # The file path in which the error occurred - # @!attribute [rw] filename - # @return [::String] - # The file name in which the error occurred - # @!attribute [rw] source_script_line - # @return [::Integer] - # Specifies the row from the source text where the error occurred (0 based, - # -1 for messages without line location). Example: 2 - # @!attribute [rw] source_script_column - # @return [::Integer] - # Specifies the column from the source texts where the error occurred. (0 - # based, -1 for messages without column location) example: 6 - # @!attribute [rw] message - # @return [::String] - # Detailed message of the record. - # @!attribute [rw] script_context - # @return [::String] - # The script context (obfuscated) in which the error occurred - # @!attribute [rw] action - # @return [::String] - # Category of the error/warning. Example: SyntaxError - # @!attribute [rw] effect - # @return [::String] - # Effect of the error/warning. Example: COMPATIBILITY - # @!attribute [rw] object_name - # @return [::String] - # Name of the affected object in the log message. - class GcsReportLogMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb deleted file mode 100644 index 877bfaef4149..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/proto_docs/google/rpc/error_details.rb +++ /dev/null @@ -1,420 +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 - # Describes the cause of the error with structured details. - # - # Example of an error when contacting the "pubsub.googleapis.com" API when it - # is not enabled: - # - # { "reason": "API_DISABLED" - # "domain": "googleapis.com" - # "metadata": { - # "resource": "projects/123", - # "service": "pubsub.googleapis.com" - # } - # } - # - # This response indicates that the pubsub.googleapis.com API is not enabled. - # - # Example of an error that is returned when attempting to create a Spanner - # instance in a region that is out of stock: - # - # { "reason": "STOCKOUT" - # "domain": "spanner.googleapis.com", - # "metadata": { - # "availableRegions": "us-central1,us-east2" - # } - # } - # @!attribute [rw] reason - # @return [::String] - # The reason of the error. This is a constant value that identifies the - # proximate cause of the error. Error reasons are unique within a particular - # domain of errors. This should be at most 63 characters and match a - # regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, which represents - # UPPER_SNAKE_CASE. - # @!attribute [rw] domain - # @return [::String] - # The logical grouping to which the "reason" belongs. The error domain - # is typically the registered service name of the tool or product that - # generates the error. Example: "pubsub.googleapis.com". If the error is - # generated by some common infrastructure, the error domain must be a - # globally unique value that identifies the infrastructure. For Google API - # infrastructure, the error domain is "googleapis.com". - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Additional structured details about this error. - # - # Keys must match a regular expression of `[a-z][a-zA-Z0-9-_]+` but should - # ideally be lowerCamelCase. Also, they must be limited to 64 characters in - # length. When identifying the current value of an exceeded limit, the units - # should be contained in the key, not the value. For example, rather than - # `{"instanceLimit": "100/request"}`, should be returned as, - # `{"instanceLimitPerRequest": "100"}`, if the client exceeds the number of - # instances that can be created in a single (batch) request. - class ErrorInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes when the clients can retry a failed request. Clients could ignore - # the recommendation here or retry when this information is missing from error - # responses. - # - # It's always recommended that clients should use exponential backoff when - # retrying. - # - # Clients should wait until `retry_delay` amount of time has passed since - # receiving the error response before retrying. If retrying requests also - # fail, clients should use an exponential backoff scheme to gradually increase - # the delay between retries based on `retry_delay`, until either a maximum - # number of retries have been reached or a maximum retry delay cap has been - # reached. - # @!attribute [rw] retry_delay - # @return [::Google::Protobuf::Duration] - # Clients should wait at least this long between retrying the same request. - class RetryInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes additional debugging info. - # @!attribute [rw] stack_entries - # @return [::Array<::String>] - # The stack trace entries indicating where the error occurred. - # @!attribute [rw] detail - # @return [::String] - # Additional debugging information provided by the server. - class DebugInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes how a quota check failed. - # - # For example if a daily limit was exceeded for the calling project, - # a service could respond with a QuotaFailure detail containing the project - # id and the description of the quota limit that was exceeded. If the - # calling project hasn't enabled the service in the developer console, then - # a service could respond with the project id and set `service_disabled` - # to true. - # - # Also see RetryInfo and Help types for other details about handling a - # quota failure. - # @!attribute [rw] violations - # @return [::Array<::Google::Rpc::QuotaFailure::Violation>] - # Describes all quota violations. - class QuotaFailure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single quota violation. For example, a - # daily quota or a custom quota that was exceeded. - # @!attribute [rw] subject - # @return [::String] - # The subject on which the quota check failed. - # For example, "clientip:" or "project:". - # @!attribute [rw] description - # @return [::String] - # A description of how the quota check failed. Clients can use this - # description to find more about the quota configuration in the service's - # public documentation, or find the relevant quota limit to adjust through - # developer console. - # - # For example: "Service disabled" or "Daily Limit for read operations - # exceeded". - # @!attribute [rw] api_service - # @return [::String] - # The API Service from which the `QuotaFailure.Violation` orginates. In - # some cases, Quota issues originate from an API Service other than the one - # that was called. In other words, a dependency of the called API Service - # could be the cause of the `QuotaFailure`, and this field would have the - # dependency API service name. - # - # For example, if the called API is Kubernetes Engine API - # (container.googleapis.com), and a quota violation occurs in the - # Kubernetes Engine API itself, this field would be - # "container.googleapis.com". On the other hand, if the quota violation - # occurs when the Kubernetes Engine API creates VMs in the Compute Engine - # API (compute.googleapis.com), this field would be - # "compute.googleapis.com". - # @!attribute [rw] quota_metric - # @return [::String] - # The metric of the violated quota. A quota metric is a named counter to - # measure usage, such as API requests or CPUs. When an activity occurs in a - # service, such as Virtual Machine allocation, one or more quota metrics - # may be affected. - # - # For example, "compute.googleapis.com/cpus_per_vm_family", - # "storage.googleapis.com/internet_egress_bandwidth". - # @!attribute [rw] quota_id - # @return [::String] - # The id of the violated quota. Also know as "limit name", this is the - # unique identifier of a quota in the context of an API service. - # - # For example, "CPUS-PER-VM-FAMILY-per-project-region". - # @!attribute [rw] quota_dimensions - # @return [::Google::Protobuf::Map{::String => ::String}] - # The dimensions of the violated quota. Every non-global quota is enforced - # on a set of dimensions. While quota metric defines what to count, the - # dimensions specify for what aspects the counter should be increased. - # - # For example, the quota "CPUs per region per VM family" enforces a limit - # on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions - # "region" and "vm_family". And if the violation occurred in region - # "us-central1" and for VM family "n1", the quota_dimensions would be, - # - # { - # "region": "us-central1", - # "vm_family": "n1", - # } - # - # When a quota is enforced globally, the quota_dimensions would always be - # empty. - # @!attribute [rw] quota_value - # @return [::Integer] - # The enforced quota value at the time of the `QuotaFailure`. - # - # For example, if the enforced quota value at the time of the - # `QuotaFailure` on the number of CPUs is "10", then the value of this - # field would reflect this quantity. - # @!attribute [rw] future_quota_value - # @return [::Integer] - # The new quota value being rolled out at the time of the violation. At the - # completion of the rollout, this value will be enforced in place of - # quota_value. If no rollout is in progress at the time of the violation, - # this field is not set. - # - # For example, if at the time of the violation a rollout is in progress - # changing the number of CPUs quota from 10 to 20, 20 would be the value of - # this field. - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class QuotaDimensionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Describes what preconditions have failed. - # - # For example, if an RPC failed because it required the Terms of Service to be - # acknowledged, it could list the terms of service violation in the - # PreconditionFailure message. - # @!attribute [rw] violations - # @return [::Array<::Google::Rpc::PreconditionFailure::Violation>] - # Describes all precondition violations. - class PreconditionFailure - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single precondition failure. - # @!attribute [rw] type - # @return [::String] - # The type of PreconditionFailure. We recommend using a service-specific - # enum type to define the supported precondition violation subjects. For - # example, "TOS" for "Terms of Service violation". - # @!attribute [rw] subject - # @return [::String] - # The subject, relative to the type, that failed. - # For example, "google.com/cloud" relative to the "TOS" type would indicate - # which terms of service is being referenced. - # @!attribute [rw] description - # @return [::String] - # A description of how the precondition failed. Developers can use this - # description to understand how to fix the failure. - # - # For example: "Terms of service not accepted". - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes violations in a client request. This error type focuses on the - # syntactic aspects of the request. - # @!attribute [rw] field_violations - # @return [::Array<::Google::Rpc::BadRequest::FieldViolation>] - # Describes all violations in a client request. - class BadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A message type used to describe a single bad request field. - # @!attribute [rw] field - # @return [::String] - # A path that leads to a field in the request body. The value will be a - # sequence of dot-separated identifiers that identify a protocol buffer - # field. - # - # Consider the following: - # - # message CreateContactRequest { - # message EmailAddress { - # enum Type { - # TYPE_UNSPECIFIED = 0; - # HOME = 1; - # WORK = 2; - # } - # - # optional string email = 1; - # repeated EmailType type = 2; - # } - # - # string full_name = 1; - # repeated EmailAddress email_addresses = 2; - # } - # - # In this example, in proto `field` could take one of the following values: - # - # * `full_name` for a violation in the `full_name` value - # * `email_addresses[1].email` for a violation in the `email` field of the - # first `email_addresses` message - # * `email_addresses[3].type[2]` for a violation in the second `type` - # value in the third `email_addresses` message. - # - # In JSON, the same values are represented as: - # - # * `fullName` for a violation in the `fullName` value - # * `emailAddresses[1].email` for a violation in the `email` field of the - # first `emailAddresses` message - # * `emailAddresses[3].type[2]` for a violation in the second `type` - # value in the third `emailAddresses` message. - # @!attribute [rw] description - # @return [::String] - # A description of why the request element is bad. - # @!attribute [rw] reason - # @return [::String] - # The reason of the field-level error. This is a constant value that - # identifies the proximate cause of the field-level error. It should - # uniquely identify the type of the FieldViolation within the scope of the - # google.rpc.ErrorInfo.domain. This should be at most 63 - # characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, - # which represents UPPER_SNAKE_CASE. - # @!attribute [rw] localized_message - # @return [::Google::Rpc::LocalizedMessage] - # Provides a localized error message for field-level errors that is safe to - # return to the API consumer. - class FieldViolation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains metadata about the request that clients can attach when filing a bug - # or providing other forms of feedback. - # @!attribute [rw] request_id - # @return [::String] - # An opaque string that should only be interpreted by the service generating - # it. For example, it can be used to identify requests in the service's logs. - # @!attribute [rw] serving_data - # @return [::String] - # Any data that was used to serve this request. For example, an encrypted - # stack trace that can be sent back to the service provider for debugging. - class RequestInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the resource that is being accessed. - # @!attribute [rw] resource_type - # @return [::String] - # A name for the type of resource being accessed, e.g. "sql table", - # "cloud storage bucket", "file", "Google calendar"; or the type URL - # of the resource: e.g. "type.googleapis.com/google.pubsub.v1.Topic". - # @!attribute [rw] resource_name - # @return [::String] - # The name of the resource being accessed. For example, a shared calendar - # name: "example.com_4fghdhgsrgh@group.calendar.google.com", if the current - # error is - # [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED]. - # @!attribute [rw] owner - # @return [::String] - # The owner of the resource (optional). - # For example, "user:" or "project:". - # @!attribute [rw] description - # @return [::String] - # Describes what error is encountered when accessing this resource. - # For example, updating a cloud project may require the `writer` permission - # on the developer console project. - class ResourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides links to documentation or for performing an out of band action. - # - # For example, if a quota check failed with an error indicating the calling - # project hasn't enabled the accessed service, this can contain a URL pointing - # directly to the right place in the developer console to flip the bit. - # @!attribute [rw] links - # @return [::Array<::Google::Rpc::Help::Link>] - # URL(s) pointing to additional information on handling the current error. - class Help - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a URL link. - # @!attribute [rw] description - # @return [::String] - # Describes what the link offers. - # @!attribute [rw] url - # @return [::String] - # The URL of the link. - class Link - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Provides a localized error message that is safe to return to the user - # which can be attached to an RPC error. - # @!attribute [rw] locale - # @return [::String] - # The locale used following the specification defined at - # https://www.rfc-editor.org/rfc/bcp/bcp47.txt. - # Examples are: "en-US", "fr-CH", "es-MX" - # @!attribute [rw] message - # @return [::String] - # The localized error message in the above locale. - class LocalizedMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/Gemfile deleted file mode 100644 index 4d1b3eac9aa1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/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-bigquery-migration-v2", path: "../" -else - gem "google-cloud-bigquery-migration-v2" -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-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.rb deleted file mode 100644 index eb3b21d627fc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/create_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the create_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow. -# -def create_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new - - # Call the create_migration_workflow method. - result = client.create_migration_workflow request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.rb deleted file mode 100644 index add86a0f96f7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/delete_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the delete_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow. -# -def delete_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new - - # Call the delete_migration_workflow method. - result = client.delete_migration_workflow request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.rb deleted file mode 100644 index 1e668aecb17b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_subtask.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 bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the get_migration_subtask call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask. -# -def get_migration_subtask - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new - - # Call the get_migration_subtask method. - result = client.get_migration_subtask request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationSubtask. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.rb deleted file mode 100644 index 835a5af7a227..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/get_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the get_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow. -# -def get_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new - - # Call the get_migration_workflow method. - result = client.get_migration_workflow request - - # The returned object is of type Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.rb deleted file mode 100644 index b526522af82b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_subtasks.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 bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the list_migration_subtasks call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks. -# -def list_migration_subtasks - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new - - # Call the list_migration_subtasks method. - result = client.list_migration_subtasks 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::Bigquery::Migration::V2::MigrationSubtask. - p item - end -end -# [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.rb deleted file mode 100644 index acc8872c9867..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/list_migration_workflows.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 bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the list_migration_workflows call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows. -# -def list_migration_workflows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new - - # Call the list_migration_workflows method. - result = client.list_migration_workflows 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::Bigquery::Migration::V2::MigrationWorkflow. - p item - end -end -# [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.rb deleted file mode 100644 index db1b4071ef4d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/migration_service/start_migration_workflow.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 bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] -require "google/cloud/bigquery/migration/v2" - -## -# Snippet for the start_migration_workflow call in the MigrationService 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::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow. -# -def start_migration_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new - - # Call the start_migration_workflow method. - result = client.start_migration_workflow request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json deleted file mode 100644 index a72510c3fe90..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/snippets/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-migration-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.migration.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_sync", - "title": "Snippet for the create_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow.", - "file": "migration_service/create_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#create_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "CreateMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_sync", - "title": "Snippet for the get_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow.", - "file": "migration_service/get_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "GetMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_sync", - "title": "Snippet for the list_migration_workflows call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows.", - "file": "migration_service/list_migration_workflows.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_migration_workflows", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_workflows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "ListMigrationWorkflows", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_sync", - "title": "Snippet for the delete_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow.", - "file": "migration_service/delete_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#delete_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "DeleteMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_sync", - "title": "Snippet for the start_migration_workflow call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow.", - "file": "migration_service/start_migration_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_migration_workflow", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#start_migration_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "StartMigrationWorkflow", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_sync", - "title": "Snippet for the get_migration_subtask call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask.", - "file": "migration_service/get_migration_subtask.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_migration_subtask", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#get_migration_subtask", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "GetMigrationSubtask", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_sync", - "title": "Snippet for the list_migration_subtasks call in the MigrationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks.", - "file": "migration_service/list_migration_subtasks.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_migration_subtasks", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client#list_migration_subtasks", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse", - "client": { - "short_name": "MigrationService::Client", - "full_name": "::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client" - }, - "method": { - "short_name": "ListMigrationSubtasks", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", - "service": { - "short_name": "MigrationService", - "full_name": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb deleted file mode 100644 index 930bdb76bea3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/bigquery/migration/v2/migration_service" - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_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::Bigquery::Migration::V2::MigrationService::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_migration_subtask_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.migration_subtask_path project: "value0", location: "value1", workflow: "value2", subtask: "value3" - assert_equal "projects/value0/locations/value1/workflows/value2/subtasks/value3", path - end - end - - def test_migration_workflow_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.migration_workflow_path project: "value0", location: "value1", workflow: "value2" - assert_equal "projects/value0/locations/value1/workflows/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb deleted file mode 100644 index 80f02da8615f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_rest_test.rb +++ /dev/null @@ -1,487 +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/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service/rest" - - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_create_migration_workflow - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - migration_workflow = {} - - create_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_create_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_migration_workflow_client_stub.call_count - end - end - end - - def test_get_migration_workflow - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_migration_workflow({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_migration_workflow name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_migration_workflow({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_migration_workflow_client_stub.call_count - end - end - end - - def test_list_migration_workflows - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - - list_migration_workflows_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_workflows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_migration_workflows_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_migration_workflows({ parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_migration_workflows parent: parent, read_mask: read_mask, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows({ parent: parent, read_mask: read_mask, 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_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows_client_stub.call_count - end - end - end - - def test_delete_migration_workflow - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_delete_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_migration_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_migration_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_migration_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_migration_workflow_client_stub.call_count - end - end - end - - def test_start_migration_workflow - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_migration_workflow_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_start_migration_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_migration_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_migration_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_migration_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_migration_workflow_client_stub.call_count - end - end - end - - def test_get_migration_subtask - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - read_mask = {} - - get_migration_subtask_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_get_migration_subtask_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_migration_subtask_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_migration_subtask({ name: name, read_mask: read_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_migration_subtask name: name, read_mask: read_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_migration_subtask({ name: name, read_mask: read_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_migration_subtask_client_stub.call_count - end - end - end - - def test_list_migration_subtasks - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - read_mask = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_migration_subtasks_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::Bigquery::Migration::V2::MigrationService::Rest::ServiceStub.stub :transcode_list_migration_subtasks_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_migration_subtasks_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks parent: parent, read_mask: read_mask, 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_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks_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::Bigquery::Migration::V2::MigrationService::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::Bigquery::Migration::V2::MigrationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb deleted file mode 100644 index 6e5729ddc0c6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/google/cloud/bigquery/migration/v2/migration_service_test.rb +++ /dev/null @@ -1,540 +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/bigquery/migration/v2/migration_service_pb" -require "google/cloud/bigquery/migration/v2/migration_service" - -class ::Google::Cloud::Bigquery::Migration::V2::MigrationService::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_create_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" - migration_workflow = {} - - create_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow), request["migration_workflow"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_migration_workflow parent: parent, migration_workflow: migration_workflow do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_migration_workflow({ parent: parent, migration_workflow: migration_workflow }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::CreateMigrationWorkflowRequest.new(parent: parent, migration_workflow: migration_workflow), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_migration_workflow_client_stub.call_rpc_count - end - end - - def test_get_migration_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationWorkflow.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" - read_mask = {} - - get_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_migration_workflow({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_migration_workflow name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_migration_workflow({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::GetMigrationWorkflowRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_migration_workflow_client_stub.call_rpc_count - end - end - - def test_list_migration_workflows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsResponse.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" - read_mask = {} - page_size = 42 - page_token = "hello world" - - list_migration_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_migration_workflows, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_migration_workflows_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_migration_workflows({ parent: parent, read_mask: read_mask, 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_migration_workflows parent: parent, read_mask: read_mask, 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_migration_workflows ::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows({ parent: parent, read_mask: read_mask, 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_migration_workflows(::Google::Cloud::Bigquery::Migration::V2::ListMigrationWorkflowsRequest.new(parent: parent, read_mask: read_mask, 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_migration_workflows_client_stub.call_rpc_count - end - end - - def test_delete_migration_workflow - # 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_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_migration_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_migration_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_migration_workflow({ 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_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::DeleteMigrationWorkflowRequest.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_migration_workflow_client_stub.call_rpc_count - end - end - - def test_start_migration_workflow - # 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" - - start_migration_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_migration_workflow, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_migration_workflow_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_migration_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_migration_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_migration_workflow ::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_migration_workflow({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_migration_workflow(::Google::Cloud::Bigquery::Migration::V2::StartMigrationWorkflowRequest.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, start_migration_workflow_client_stub.call_rpc_count - end - end - - def test_get_migration_subtask - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::MigrationSubtask.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" - read_mask = {} - - get_migration_subtask_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_migration_subtask, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_migration_subtask_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_migration_subtask({ name: name, read_mask: read_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_migration_subtask name: name, read_mask: read_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_migration_subtask ::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_migration_subtask({ name: name, read_mask: read_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_migration_subtask(::Google::Cloud::Bigquery::Migration::V2::GetMigrationSubtaskRequest.new(name: name, read_mask: read_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_migration_subtask_client_stub.call_rpc_count - end - end - - def test_list_migration_subtasks - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksResponse.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" - read_mask = {} - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_migration_subtasks_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_migration_subtasks, name - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["read_mask"] - 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_migration_subtasks_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks parent: parent, read_mask: read_mask, 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_migration_subtasks ::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks({ parent: parent, read_mask: read_mask, 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_migration_subtasks(::Google::Cloud::Bigquery::Migration::V2::ListMigrationSubtasksRequest.new(parent: parent, read_mask: read_mask, 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_migration_subtasks_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::Bigquery::Migration::V2::MigrationService::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::Bigquery::Migration::V2::MigrationService::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::Bigquery::Migration::V2::MigrationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Migration::V2::MigrationService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration-v2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json deleted file mode 100644 index a2ae9c6f27bd..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigqueryreservation.googleapis.com", - "api_shortname": "bigqueryreservation", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest", - "distribution_name": "google-cloud-bigquery-reservation-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigqueryreservation", - "name_pretty": "BigQuery Reservation V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/reference/reservations", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BIGQUERY_RESERVATION", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/reservations", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml deleted file mode 100644 index 9001cc0bde65..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-reservation-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-bigquery-reservation-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts deleted file mode 100644 index 9fa1700ac9d1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Reservation 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-bigquery-reservation-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md deleted file mode 100644 index 0b1eacbc181a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-reservation-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-bigquery-reservation-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/bigquery/reservation/v1" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/reservation/v1" - -::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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-bigquery-reservation-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/bigquery/reservation/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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-bigquery-reservation-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md deleted file mode 100644 index 38259ede0f03..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Reservation V1 API - -A service to modify your BigQuery reservations. - -The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Reservation V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-reservation](https://rubygems.org/gems/google-cloud-bigquery-reservation). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-reservation-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/bigqueryreservation.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/reservation/v1" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new -request = ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new # (request fields as keyword arguments...) -response = client.create_reservation request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-reservation-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/reservations) -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/bigquery/reservation/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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-bigquery-reservation`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-reservation-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-bigquery-reservation`. -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-bigquery-reservation-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-bigquery-reservation-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/Rakefile deleted file mode 100644 index 9f80b229812a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BIGQUERY_RESERVATION_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BIGQUERY_RESERVATION_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 BIGQUERY_RESERVATION_TEST_PROJECT=test123 BIGQUERY_RESERVATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BIGQUERY_RESERVATION_PROJECT"] = project - ENV["BIGQUERY_RESERVATION_TEST_PROJECT"] = project - ENV["BIGQUERY_RESERVATION_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-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-reservation-v1" - header "google-cloud-bigquery-reservation-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-reservation-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-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-bigquery-reservation-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json deleted file mode 100644 index effdec3d98a3..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/gapic_metadata.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.reservation.v1", - "libraryPackage": "::Google::Cloud::Bigquery::Reservation::V1", - "services": { - "ReservationService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client", - "rpcs": { - "CreateReservation": { - "methods": [ - "create_reservation" - ] - }, - "ListReservations": { - "methods": [ - "list_reservations" - ] - }, - "GetReservation": { - "methods": [ - "get_reservation" - ] - }, - "DeleteReservation": { - "methods": [ - "delete_reservation" - ] - }, - "UpdateReservation": { - "methods": [ - "update_reservation" - ] - }, - "FailoverReservation": { - "methods": [ - "failover_reservation" - ] - }, - "CreateCapacityCommitment": { - "methods": [ - "create_capacity_commitment" - ] - }, - "ListCapacityCommitments": { - "methods": [ - "list_capacity_commitments" - ] - }, - "GetCapacityCommitment": { - "methods": [ - "get_capacity_commitment" - ] - }, - "DeleteCapacityCommitment": { - "methods": [ - "delete_capacity_commitment" - ] - }, - "UpdateCapacityCommitment": { - "methods": [ - "update_capacity_commitment" - ] - }, - "SplitCapacityCommitment": { - "methods": [ - "split_capacity_commitment" - ] - }, - "MergeCapacityCommitments": { - "methods": [ - "merge_capacity_commitments" - ] - }, - "CreateAssignment": { - "methods": [ - "create_assignment" - ] - }, - "ListAssignments": { - "methods": [ - "list_assignments" - ] - }, - "DeleteAssignment": { - "methods": [ - "delete_assignment" - ] - }, - "SearchAssignments": { - "methods": [ - "search_assignments" - ] - }, - "SearchAllAssignments": { - "methods": [ - "search_all_assignments" - ] - }, - "MoveAssignment": { - "methods": [ - "move_assignment" - ] - }, - "UpdateAssignment": { - "methods": [ - "update_assignment" - ] - }, - "GetBiReservation": { - "methods": [ - "get_bi_reservation" - ] - }, - "UpdateBiReservation": { - "methods": [ - "update_bi_reservation" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "CreateReservationGroup": { - "methods": [ - "create_reservation_group" - ] - }, - "GetReservationGroup": { - "methods": [ - "get_reservation_group" - ] - }, - "DeleteReservationGroup": { - "methods": [ - "delete_reservation_group" - ] - }, - "ListReservationGroups": { - "methods": [ - "list_reservation_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec deleted file mode 100644 index fe569f8caaa4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/google-cloud-bigquery-reservation-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/reservation/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-reservation-v1" - gem.version = Google::Cloud::Bigquery::Reservation::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Reservation API provides the mechanisms by which enterprise users can provision and manage dedicated resources such as slots and BigQuery BI Engine memory allocations. Note that google-cloud-bigquery-reservation-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-reservation instead. See the readme for more details." - gem.summary = "A service to modify your BigQuery reservations." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-v1.rb deleted file mode 100644 index 2ad2aa32f13c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google-cloud-bigquery-reservation-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/bigquery/reservation/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb deleted file mode 100644 index 155fb2af6d91..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/reservation/v1/reservation_service" -require "google/cloud/bigquery/reservation/v1/version" - -module Google - module Cloud - module Bigquery - module Reservation - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/reservation/v1" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/bigquery/reservation/v1" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/reservation/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb deleted file mode 100644 index 79aaffc28b87..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_pb.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/reservation/v1/reservation.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/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n6google/cloud/bigquery/reservation/v1/reservation.proto\x12$google.cloud.bigquery.reservation.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xfc\x0c\n\x0bReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1a\n\rslot_capacity\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12\x1e\n\x11ignore_idle_slots\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12S\n\tautoscale\x18\x07 \x01(\x0b\x32;.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleB\x03\xe0\x41\x01\x12\x18\n\x0b\x63oncurrency\x18\x10 \x01(\x03\x42\x03\xe0\x41\x01\x12\x36\n\rcreation_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\"\n\x16multi_region_auxiliary\x18\x0e \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x11 \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x43\n\x10primary_location\x18\x12 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x12secondary_location\x18\x13 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!locations.googleapis.com/Location\x12L\n\x19original_primary_location\x18\x14 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!locations.googleapis.com/Location\x12\x1b\n\tmax_slots\x18\x15 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12X\n\x0cscaling_mode\x18\x16 \x01(\x0e\x32=.google.cloud.bigquery.reservation.v1.Reservation.ScalingModeB\x03\xe0\x41\x01\x12R\n\x06labels\x18\x17 \x03(\x0b\x32=.google.cloud.bigquery.reservation.v1.Reservation.LabelsEntryB\x03\xe0\x41\x01\x12\x1e\n\x11reservation_group\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x64\n\x12replication_status\x18\x18 \x01(\x0b\x32\x43.google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatusB\x03\xe0\x41\x03\x12V\n\x11scheduling_policy\x18\x1b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\x1a?\n\tAutoscale\x12\x1a\n\rcurrent_slots\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x16\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x1a\xf8\x01\n\x11ReplicationStatus\x12&\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x38\n\x0flast_error_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x15last_replication_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x18soft_failover_start_time\x18\x04 \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\"c\n\x0bScalingMode\x12\x1c\n\x18SCALING_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x41UTOSCALE_ONLY\x10\x01\x12\x13\n\x0fIDLE_SLOTS_ONLY\x10\x02\x12\r\n\tALL_SLOTS\x10\x03:w\xea\x41t\n.bigqueryreservation.googleapis.com/Reservation\x12\x42projects/{project}/locations/{location}/reservations/{reservation}B\x0c\n\n_max_slots\"l\n\x10SchedulingPolicy\x12\x1d\n\x0b\x63oncurrency\x18\x01 \x01(\x03\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1b\n\tmax_slots\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_concurrencyB\x0c\n\n_max_slots\"\xd5\x01\n\x10ReservationGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:\xad\x01\xea\x41\xa9\x01\n3bigqueryreservation.googleapis.com/ReservationGroup\x12Mprojects/{project}/locations/{location}/reservationGroups/{reservation_group}*\x11reservationGroups2\x10reservationGroup\"\xaa\x08\n\x12\x43\x61pacityCommitment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nslot_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x01\x12Z\n\x04plan\x18\x03 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12R\n\x05state\x18\x04 \x01(\x0e\x32>.google.cloud.bigquery.reservation.v1.CapacityCommitment.StateB\x03\xe0\x41\x03\x12>\n\x15\x63ommitment_start_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12<\n\x13\x63ommitment_end_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12/\n\x0e\x66\x61ilure_status\x18\x07 \x01(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x62\n\x0crenewal_plan\x18\x08 \x01(\x0e\x32G.google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlanB\x03\xe0\x41\x01\x12\"\n\x16multi_region_auxiliary\x18\n \x01(\x08\x42\x02\x18\x01\x12\x43\n\x07\x65\x64ition\x18\x0c \x01(\x0e\x32-.google.cloud.bigquery.reservation.v1.EditionB\x03\xe0\x41\x01\x12\x19\n\x0cis_flat_rate\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\"\xca\x01\n\x0e\x43ommitmentPlan\x12\x1f\n\x1b\x43OMMITMENT_PLAN_UNSPECIFIED\x10\x00\x12\x08\n\x04\x46LEX\x10\x03\x12\x16\n\x0e\x46LEX_FLAT_RATE\x10\x07\x1a\x02\x08\x01\x12\r\n\x05TRIAL\x10\x05\x1a\x02\x08\x01\x12\x0b\n\x07MONTHLY\x10\x02\x12\x19\n\x11MONTHLY_FLAT_RATE\x10\x08\x1a\x02\x08\x01\x12\n\n\x06\x41NNUAL\x10\x04\x12\x18\n\x10\x41NNUAL_FLAT_RATE\x10\t\x1a\x02\x08\x01\x12\x0e\n\nTHREE_YEAR\x10\n\x12\x08\n\x04NONE\x10\x06\"C\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03:\x8e\x01\xea\x41\x8a\x01\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12Qprojects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}\"\xc2\x01\n\x18\x43reateReservationRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x16\n\x0ereservation_id\x18\x02 \x01(\t\x12\x46\n\x0breservation\x18\x03 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\"\x88\x01\n\x17ListReservationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.bigqueryreservation.googleapis.com/Reservation\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"|\n\x18ListReservationsResponse\x12G\n\x0creservations\x18\x01 \x03(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x15GetReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"`\n\x18\x44\x65leteReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\"\x93\x01\n\x18UpdateReservationRequest\x12\x46\n\x0breservation\x18\x01 \x01(\x0b\x32\x31.google.cloud.bigquery.reservation.v1.Reservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb2\x01\n\x1a\x46\x61iloverReservationRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.bigqueryreservation.googleapis.com/Reservation\x12N\n\rfailover_mode\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.reservation.v1.FailoverModeB\x03\xe0\x41\x01\"\xe7\x01\n\x1d\x43reateReservationGroupRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12!\n\x14reservation_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x11reservation_group\x18\x03 \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroupB\x03\xe0\x41\x02\"g\n\x1aGetReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x92\x01\n\x1cListReservationGroupsRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33\x62igqueryreservation.googleapis.com/ReservationGroup\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x8c\x01\n\x1dListReservationGroupsResponse\x12R\n\x12reservation_groups\x18\x01 \x03(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x1d\x44\x65leteReservationGroupRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3bigqueryreservation.googleapis.com/ReservationGroup\"\x95\x02\n\x1f\x43reateCapacityCommitmentRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12U\n\x13\x63\x61pacity_commitment\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12,\n$enforce_single_admin_project_per_org\x18\x04 \x01(\x08\x12\x1e\n\x16\x63\x61pacity_commitment_id\x18\x05 \x01(\t\"\x96\x01\n\x1eListCapacityCommitmentsRequest\x12M\n\x06parent\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x92\x01\n\x1fListCapacityCommitmentsResponse\x12V\n\x14\x63\x61pacity_commitments\x18\x01 \x03(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"k\n\x1cGetCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\"}\n\x1f\x44\x65leteCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\r\n\x05\x66orce\x18\x03 \x01(\x08\"\xa9\x01\n\x1fUpdateCapacityCommitmentRequest\x12U\n\x13\x63\x61pacity_commitment\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x81\x01\n\x1eSplitCapacityCommitmentRequest\x12K\n\x04name\x18\x01 \x01(\tB=\xe0\x41\x02\xfa\x41\x37\n5bigqueryreservation.googleapis.com/CapacityCommitment\x12\x12\n\nslot_count\x18\x02 \x01(\x03\"\xb4\x01\n\x1fSplitCapacityCommitmentResponse\x12G\n\x05\x66irst\x18\x01 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\x12H\n\x06second\x18\x02 \x01(\x0b\x32\x38.google.cloud.bigquery.reservation.v1.CapacityCommitment\"\xb3\x01\n\x1fMergeCapacityCommitmentsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xfa\x41\x37\x12\x35\x62igqueryreservation.googleapis.com/CapacityCommitment\x12\x1f\n\x17\x63\x61pacity_commitment_ids\x18\x02 \x03(\t\x12#\n\x16\x63\x61pacity_commitment_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x06\n\nAssignment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x15\n\x08\x61ssignee\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12O\n\x08job_type\x18\x03 \x01(\x0e\x32\x38.google.cloud.bigquery.reservation.v1.Assignment.JobTypeB\x03\xe0\x41\x01\x12J\n\x05state\x18\x06 \x01(\x0e\x32\x36.google.cloud.bigquery.reservation.v1.Assignment.StateB\x03\xe0\x41\x03\x12(\n\x19\x65nable_gemini_in_bigquery\x18\n \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12V\n\x11scheduling_policy\x18\x0b \x01(\x0b\x32\x36.google.cloud.bigquery.reservation.v1.SchedulingPolicyB\x03\xe0\x41\x01\"\xdc\x01\n\x07JobType\x12\x18\n\x14JOB_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08PIPELINE\x10\x01\x12\t\n\x05QUERY\x10\x02\x12\x0f\n\x0bML_EXTERNAL\x10\x03\x12\x0e\n\nBACKGROUND\x10\x04\x12\x0e\n\nCONTINUOUS\x10\x06\x12\"\n\x1e\x42\x41\x43KGROUND_CHANGE_DATA_CAPTURE\x10\x07\x12$\n BACKGROUND_COLUMN_METADATA_INDEX\x10\x08\x12#\n\x1f\x42\x41\x43KGROUND_SEARCH_INDEX_REFRESH\x10\t\"7\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:\xa9\x01\xea\x41\xa5\x01\n-bigqueryreservation.googleapis.com/Assignment\x12[projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}*\x0b\x61ssignments2\nassignment\"\xbd\x01\n\x17\x43reateAssignmentRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x44\n\nassignment\x18\x02 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x15\n\rassignment_id\x18\x04 \x01(\t\"\x86\x01\n\x16ListAssignmentsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"y\n\x17ListAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"^\n\x17\x44\x65leteAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\"\x8b\x01\n\x18SearchAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"\x8e\x01\n\x1bSearchAllAssignmentsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"{\n\x19SearchAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"~\n\x1cSearchAllAssignmentsResponse\x12\x45\n\x0b\x61ssignments\x18\x01 \x03(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xbf\x01\n\x15MoveAssignmentRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-bigqueryreservation.googleapis.com/Assignment\x12J\n\x0e\x64\x65stination_id\x18\x03 \x01(\tB2\xfa\x41/\x12-bigqueryreservation.googleapis.com/Assignment\x12\x15\n\rassignment_id\x18\x05 \x01(\t\"\x90\x01\n\x17UpdateAssignmentRequest\x12\x44\n\nassignment\x18\x01 \x01(\x0b\x32\x30.google.cloud.bigquery.reservation.v1.Assignment\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"Y\n\x0eTableReference\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08table_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xae\x02\n\rBiReservation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04size\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12S\n\x10preferred_tables\x18\x05 \x03(\x0b\x32\x34.google.cloud.bigquery.reservation.v1.TableReferenceB\x03\xe0\x41\x01:l\xea\x41i\n0bigqueryreservation.googleapis.com/BiReservation\x12\x35projects/{project}/locations/{location}/biReservation\"a\n\x17GetBiReservationRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0bigqueryreservation.googleapis.com/BiReservation\"\x9a\x01\n\x1aUpdateBiReservationRequest\x12K\n\x0e\x62i_reservation\x18\x01 \x01(\x0b\x32\x33.google.cloud.bigquery.reservation.v1.BiReservation\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask*U\n\x07\x45\x64ition\x12\x17\n\x13\x45\x44ITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02\x12\x13\n\x0f\x45NTERPRISE_PLUS\x10\x03*A\n\x0c\x46\x61iloverMode\x12\x1d\n\x19\x46\x41ILOVER_MODE_UNSPECIFIED\x10\x00\x12\x08\n\x04SOFT\x10\x01\x12\x08\n\x04HARD\x10\x02\x32\xa3\x36\n\x12ReservationService\x12\xf1\x01\n\x11\x43reateReservation\x12>.google.cloud.bigquery.reservation.v1.CreateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"i\xda\x41!parent,reservation,reservation_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/reservations:\x0breservation\x12\xd4\x01\n\x10ListReservations\x12=.google.cloud.bigquery.reservation.v1.ListReservationsRequest\x1a>.google.cloud.bigquery.reservation.v1.ListReservationsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/reservations\x12\xc1\x01\n\x0eGetReservation\x12;.google.cloud.bigquery.reservation.v1.GetReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/reservations/*}\x12\xac\x01\n\x11\x44\x65leteReservation\x12>.google.cloud.bigquery.reservation.v1.DeleteReservationRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/reservations/*}\x12\xf3\x01\n\x11UpdateReservation\x12>.google.cloud.bigquery.reservation.v1.UpdateReservationRequest\x1a\x31.google.cloud.bigquery.reservation.v1.Reservation\"k\xda\x41\x17reservation,update_mask\x82\xd3\xe4\x93\x02K2/v1/{parent=projects/*/locations/*/reservations/*}/assignments:\nassignment\x12\xdf\x01\n\x0fListAssignments\x12<.google.cloud.bigquery.reservation.v1.ListAssignmentsRequest\x1a=.google.cloud.bigquery.reservation.v1.ListAssignmentsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/reservations/*}/assignments\x12\xb8\x01\n\x10\x44\x65leteAssignment\x12=.google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/reservations/*/assignments/*}\x12\xe5\x01\n\x11SearchAssignments\x12>.google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest\x1a?.google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse\"O\x88\x02\x01\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}:searchAssignments\x12\xee\x01\n\x14SearchAllAssignments\x12\x41.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest\x1a\x42.google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse\"O\xda\x41\x0cparent,query\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}:searchAllAssignments\x12\xe5\x01\n\x0eMoveAssignment\x12;.google.cloud.bigquery.reservation.v1.MoveAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"d\xda\x41\x13name,destination_id\x82\xd3\xe4\x93\x02H\"C/v1/{name=projects/*/locations/*/reservations/*/assignments/*}:move:\x01*\x12\xfb\x01\n\x10UpdateAssignment\x12=.google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest\x1a\x30.google.cloud.bigquery.reservation.v1.Assignment\"v\xda\x41\x16\x61ssignment,update_mask\x82\xd3\xe4\x93\x02W2I/v1/{assignment.name=projects/*/locations/*/reservations/*/assignments/*}:\nassignment\x12\xc6\x01\n\x10GetBiReservation\x12=.google.cloud.bigquery.reservation.v1.GetBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/biReservation}\x12\x81\x02\n\x13UpdateBiReservation\x12@.google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest\x1a\x33.google.cloud.bigquery.reservation.v1.BiReservation\"s\xda\x41\x1a\x62i_reservation,update_mask\x82\xd3\xe4\x93\x02P2>/v1/{bi_reservation.name=projects/*/locations/*/biReservation}:\x0e\x62i_reservation\x12\xf4\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xa8\x01\xda\x41\x08resource\x82\xd3\xe4\x93\x02\x96\x01\x12\x41/v1/{resource=projects/*/locations/*/reservations/*}:getIamPolicyZQ\x12O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:getIamPolicy\x12\x81\x02\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"\xb5\x01\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x9c\x01\"A/v1/{resource=projects/*/locations/*/reservations/*}:setIamPolicy:\x01*ZT\"O/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:setIamPolicy:\x01*\x12\x9b\x02\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"\xaf\x01\x82\xd3\xe4\x93\x02\xa8\x01\"G/v1/{resource=projects/*/locations/*/reservations/*}:testIamPermissions:\x01*ZZ\"U/v1/{resource=projects/*/locations/*/reservations/*/assignments/*}:testIamPermissions:\x01*\x12\xe7\x01\n\x16\x43reateReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"P\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/reservationGroups:\x11reservation_group\x12\xd5\x01\n\x13GetReservationGroup\x12@.google.cloud.bigquery.reservation.v1.GetReservationGroupRequest\x1a\x36.google.cloud.bigquery.reservation.v1.ReservationGroup\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xbb\x01\n\x16\x44\x65leteReservationGroup\x12\x43.google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/reservationGroups/*}\x12\xe8\x01\n\x15ListReservationGroups\x12\x42.google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest\x1a\x43.google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/reservationGroups\x1a\x7f\xca\x41\"bigqueryreservation.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platformB\xd8\x01\n(com.google.cloud.bigquery.reservation.v1B\x10ReservationProtoP\x01ZJcloud.google.com/go/bigquery/reservation/apiv1/reservationpb;reservationpb\xaa\x02$Google.Cloud.BigQuery.Reservation.V1\xca\x02$Google\\Cloud\\BigQuery\\Reservation\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - Reservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation").msgclass - Reservation::Autoscale = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.Autoscale").msgclass - Reservation::ReplicationStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ReplicationStatus").msgclass - Reservation::ScalingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Reservation.ScalingMode").enummodule - SchedulingPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SchedulingPolicy").msgclass - ReservationGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ReservationGroup").msgclass - CapacityCommitment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment").msgclass - CapacityCommitment::CommitmentPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.CommitmentPlan").enummodule - CapacityCommitment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CapacityCommitment.State").enummodule - CreateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationRequest").msgclass - ListReservationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsRequest").msgclass - ListReservationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationsResponse").msgclass - GetReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationRequest").msgclass - DeleteReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationRequest").msgclass - UpdateReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateReservationRequest").msgclass - FailoverReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverReservationRequest").msgclass - CreateReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateReservationGroupRequest").msgclass - GetReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetReservationGroupRequest").msgclass - ListReservationGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsRequest").msgclass - ListReservationGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListReservationGroupsResponse").msgclass - DeleteReservationGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteReservationGroupRequest").msgclass - CreateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateCapacityCommitmentRequest").msgclass - ListCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsRequest").msgclass - ListCapacityCommitmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListCapacityCommitmentsResponse").msgclass - GetCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetCapacityCommitmentRequest").msgclass - DeleteCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteCapacityCommitmentRequest").msgclass - UpdateCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateCapacityCommitmentRequest").msgclass - SplitCapacityCommitmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentRequest").msgclass - SplitCapacityCommitmentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SplitCapacityCommitmentResponse").msgclass - MergeCapacityCommitmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MergeCapacityCommitmentsRequest").msgclass - Assignment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment").msgclass - Assignment::JobType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.JobType").enummodule - Assignment::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Assignment.State").enummodule - CreateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.CreateAssignmentRequest").msgclass - ListAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsRequest").msgclass - ListAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.ListAssignmentsResponse").msgclass - DeleteAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.DeleteAssignmentRequest").msgclass - SearchAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsRequest").msgclass - SearchAllAssignmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsRequest").msgclass - SearchAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAssignmentsResponse").msgclass - SearchAllAssignmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.SearchAllAssignmentsResponse").msgclass - MoveAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.MoveAssignmentRequest").msgclass - UpdateAssignmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateAssignmentRequest").msgclass - TableReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.TableReference").msgclass - BiReservation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.BiReservation").msgclass - GetBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.GetBiReservationRequest").msgclass - UpdateBiReservationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.UpdateBiReservationRequest").msgclass - Edition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.Edition").enummodule - FailoverMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.reservation.v1.FailoverMode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.rb deleted file mode 100644 index 2f3df98d3356..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/reservation/v1/version" - -require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" -require "google/cloud/bigquery/reservation/v1/reservation_service/paths" -require "google/cloud/bigquery/reservation/v1/reservation_service/client" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - ## - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/reservation/v1/reservation_service" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module ReservationService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "reservation_service", "helpers.rb" -require "google/cloud/bigquery/reservation/v1/reservation_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb deleted file mode 100644 index 720a35605537..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/client.rb +++ /dev/null @@ -1,3514 +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/bigquery/reservation/v1/reservation_pb" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - ## - # Client for the ReservationService service. - # - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reservation_service_stub - - ## - # Configure the ReservationService Client class. - # - # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReservationService clients - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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", "Bigquery", "Reservation", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_reservation.timeout = 300.0 - - default_config.rpcs.list_reservations.timeout = 300.0 - default_config.rpcs.list_reservations.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_reservation.timeout = 300.0 - default_config.rpcs.get_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_reservation.timeout = 300.0 - default_config.rpcs.delete_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_reservation.timeout = 300.0 - - default_config.rpcs.failover_reservation.timeout = 300.0 - - default_config.rpcs.create_capacity_commitment.timeout = 300.0 - - default_config.rpcs.list_capacity_commitments.timeout = 300.0 - default_config.rpcs.list_capacity_commitments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_capacity_commitment.timeout = 300.0 - default_config.rpcs.get_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_capacity_commitment.timeout = 300.0 - default_config.rpcs.delete_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_capacity_commitment.timeout = 300.0 - - default_config.rpcs.split_capacity_commitment.timeout = 300.0 - - default_config.rpcs.merge_capacity_commitments.timeout = 300.0 - - default_config.rpcs.create_assignment.timeout = 300.0 - - default_config.rpcs.list_assignments.timeout = 300.0 - default_config.rpcs.list_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_assignment.timeout = 300.0 - default_config.rpcs.delete_assignment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_assignments.timeout = 300.0 - default_config.rpcs.search_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.move_assignment.timeout = 300.0 - - default_config.rpcs.get_bi_reservation.timeout = 300.0 - default_config.rpcs.get_bi_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_bi_reservation.timeout = 300.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReservationService 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::Bigquery::Reservation::V1::ReservationService::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 - @reservation_service_stub.universe_domain - end - - ## - # Create a new ReservationService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReservationService 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/bigquery/reservation/v1/reservation_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 - - @reservation_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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 - ) - - @reservation_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reservation_service_stub.logger - end - - # Service calls - - ## - # Creates a new reservation resource. - # - # @overload create_reservation(request, options = nil) - # Pass arguments to `create_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(parent: nil, reservation_id: nil, reservation: nil) - # Pass arguments to `create_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_id [::String] - # The reservation ID. It must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Definition of the new reservation to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new - # - # # Call the create_reservation method. - # result = client.create_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def create_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservations for the project in the specified location. - # - # @overload list_reservations(request, options = nil) - # Pass arguments to `list_reservations` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservations` via keyword arguments. Note that at - # least one keyword argument is 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 resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new - # - # # Call the list_reservations method. - # result = client.list_reservations 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::Bigquery::Reservation::V1::Reservation. - # p item - # end - # - def list_reservations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest - - # Converts hash 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_reservations.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::Bigquery::Reservation::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_reservations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reservations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_reservations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservations, 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 information about the reservation. - # - # @overload get_reservation(request, options = nil) - # Pass arguments to `get_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(name: nil) - # Pass arguments to `get_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new - # - # # Call the get_reservation method. - # result = client.get_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def get_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation(request, options = nil) - # Pass arguments to `delete_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(name: nil) - # Pass arguments to `delete_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new - # - # # Call the delete_reservation method. - # result = client.delete_reservation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_reservation, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing reservation resource. - # - # @overload update_reservation(request, options = nil) - # Pass arguments to `update_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(reservation: nil, update_mask: nil) - # Pass arguments to `update_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Content of the reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new - # - # # Call the update_reservation method. - # result = client.update_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def update_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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.reservation&.name - header_params["reservation.name"] = request.reservation.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_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_reservation, 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 - - ## - # Fail over a reservation to the secondary location. The operation should be - # done in the current secondary location, which will be promoted to the - # new primary location for the reservation. - # Attempting to failover a reservation in the current primary location will - # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload failover_reservation(request, options = nil) - # Pass arguments to `failover_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload failover_reservation(name: nil, failover_mode: nil) - # Pass arguments to `failover_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the reservation to failover. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] - # Optional. A parameter that determines how writes that are pending - # replication are handled after a failover is initiated. If not specified, - # HARD failover mode is used by default. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new - # - # # Call the failover_reservation method. - # result = client.failover_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def failover_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest - - # Converts hash 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.failover_reservation.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::Bigquery::Reservation::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.failover_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.failover_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :failover_reservation, 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 capacity commitment resource. - # - # @overload create_capacity_commitment(request, options = nil) - # Pass arguments to `create_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) - # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to create. - # @param enforce_single_admin_project_per_org [::Boolean] - # If true, fail the request if another project in the organization has a - # capacity commitment. - # @param capacity_commitment_id [::String] - # The optional capacity commitment ID. Capacity commitment name will be - # generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # NOTE: this ID won't be kept if the capacity commitment is split or merged. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new - # - # # Call the create_capacity_commitment method. - # result = client.create_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def create_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the capacity commitments for the admin project. - # - # @overload list_capacity_commitments(request, options = nil) - # Pass arguments to `list_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new - # - # # Call the list_capacity_commitments method. - # result = client.list_capacity_commitments 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::Bigquery::Reservation::V1::CapacityCommitment. - # p item - # end - # - def list_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest - - # Converts hash 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_capacity_commitments.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::Bigquery::Reservation::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_capacity_commitments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_capacity_commitments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, 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 information about the capacity commitment. - # - # @overload get_capacity_commitment(request, options = nil) - # Pass arguments to `get_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil) - # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the capacity commitment to retrieve. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new - # - # # Call the get_capacity_commitment method. - # result = client.get_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def get_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a capacity commitment. Attempting to delete capacity commitment - # before its commitment_end_time will fail with the error code - # `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload delete_capacity_commitment(request, options = nil) - # Pass arguments to `delete_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil, force: nil) - # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the capacity commitment to delete. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @param force [::Boolean] - # Can be used to force delete commitments even if assignments exist. Deleting - # commitments with assignments may cause queries to fail if they no longer - # have access to slots. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new - # - # # Call the delete_capacity_commitment method. - # result = client.delete_capacity_commitment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_capacity_commitment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing capacity commitment. - # - # Only `plan` and `renewal_plan` fields can be updated. - # - # Plan can only be changed to a plan of a longer commitment period. - # Attempting to change to a plan with shorter commitment period will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload update_capacity_commitment(request, options = nil) - # Pass arguments to `update_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(capacity_commitment: nil, update_mask: nil) - # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new - # - # # Call the update_capacity_commitment method. - # result = client.update_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def update_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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.capacity_commitment&.name - header_params["capacity_commitment.name"] = request.capacity_commitment.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_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_capacity_commitment, 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 - - ## - # Splits capacity commitment to two commitments of the same plan and - # `commitment_end_time`. - # - # A common use case is to enable downgrading commitments. - # - # For example, in order to downgrade from 10000 slots to 8000, you might - # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, - # you delete the first one after the commitment end time passes. - # - # @overload split_capacity_commitment(request, options = nil) - # Pass arguments to `split_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload split_capacity_commitment(name: nil, slot_count: nil) - # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name e.g.,: - # `projects/myproject/locations/US/capacityCommitments/123` - # @param slot_count [::Integer] - # Number of slots in the capacity commitment after the split. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new - # - # # Call the split_capacity_commitment method. - # result = client.split_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. - # p result - # - def split_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest - - # Converts hash 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.split_capacity_commitment.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::Bigquery::Reservation::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.split_capacity_commitment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.split_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :split_capacity_commitment, 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 - - ## - # Merges capacity commitments of the same plan into a single commitment. - # - # The resulting capacity commitment has the greater commitment_end_time - # out of the to-be-merged capacity commitments. - # - # Attempting to merge capacity commitments of different plan will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload merge_capacity_commitments(request, options = nil) - # Pass arguments to `merge_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) - # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is 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] - # Parent resource that identifies admin project and location e.g., - # `projects/myproject/locations/us` - # @param capacity_commitment_ids [::Array<::String>] - # Ids of capacity commitments to merge. - # These capacity commitments must exist under admin project and location - # specified in the parent. - # ID is the last portion of capacity commitment name e.g., 'abc' for - # projects/myproject/locations/US/capacityCommitments/abc - # @param capacity_commitment_id [::String] - # Optional. The optional resulting capacity commitment ID. Capacity - # commitment name will be generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new - # - # # Call the merge_capacity_commitments method. - # result = client.merge_capacity_commitments request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def merge_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest - - # Converts hash 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.merge_capacity_commitments.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::Bigquery::Reservation::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.merge_capacity_commitments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :merge_capacity_commitments, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an assignment object which allows the given project to submit jobs - # of a certain type using slots from the specified reservation. - # - # Currently a - # resource (project, folder, organization) can only have one assignment per - # each (job_type, location) combination, and that reservation will be used - # for all jobs of the matching type. - # - # Different assignments can be created on different levels of the - # projects, folders or organization hierarchy. During query execution, - # the assignment is looked up at the project, folder and organization levels - # in that order. The first assignment found is applied to the query. - # - # When creating assignments, it does not matter if other assignments exist at - # higher levels. - # - # Example: - # - # * The organization `organizationA` contains two projects, `project1` - # and `project2`. - # * Assignments for all three entities (`organizationA`, `project1`, and - # `project2`) could all be created and mapped to the same or different - # reservations. - # - # "None" assignments represent an absence of the assignment. Projects - # assigned to None use on-demand pricing. To create a "None" assignment, use - # "none" as a reservation_id in the parent. Example parent: - # `projects/myproject/locations/US/reservations/none`. - # - # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have - # 'bigquery.admin' permissions on the project using the reservation - # and the project that owns this reservation. - # - # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment - # does not match location of the reservation. - # - # @overload create_assignment(request, options = nil) - # Pass arguments to `create_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignment(parent: nil, assignment: nil, assignment_id: nil) - # Pass arguments to `create_assignment` via keyword arguments. Note that at - # least one keyword argument is 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 resource name of the assignment - # E.g. `projects/myproject/locations/US/reservations/team1-prod` - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Assignment resource to create. - # @param assignment_id [::String] - # The optional assignment ID. Assignment name will be generated automatically - # if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # Max length is 64 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new - # - # # Call the create_assignment method. - # result = client.create_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def create_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest - - # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_assignment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists assignments. - # - # Only explicitly created assignments will be returned. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, ListAssignments will just return the above two assignments - # for reservation `res1`, and no expansion/merge will happen. - # - # The wildcard "-" can be used for - # reservations in the request. In that case all assignments belongs to the - # specified project and location will be listed. - # - # **Note** "-" cannot be used for projects nor locations. - # - # @overload list_assignments(request, options = nil) - # Pass arguments to `list_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_assignments` via keyword arguments. Note that at - # least one keyword argument is 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 resource name e.g.: - # - # `projects/myproject/locations/US/reservations/team1-prod` - # - # Or: - # - # `projects/myproject/locations/US/reservations/-` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new - # - # # Call the list_assignments method. - # result = client.list_assignments 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::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def list_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest - - # Converts hash 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_assignments.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::Bigquery::Reservation::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_assignments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_assignments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_assignments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a assignment. No expansion will happen. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, deletion of the `` assignment won't - # affect the other assignment ``. After said deletion, - # queries from `project1` will still use `res1` while queries from - # `project2` will switch to use on-demand mode. - # - # @overload delete_assignment(request, options = nil) - # Pass arguments to `delete_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignment(name: nil) - # Pass arguments to `delete_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new - # - # # Call the delete_assignment method. - # result = client.delete_assignment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest - - # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_assignment, 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 - - ## - # Deprecated: Looks up assignments for a specified resource for a particular - # region. If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # **Note** "-" cannot be used for projects - # nor locations. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload search_assignments(request, options = nil) - # Pass arguments to `search_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the admin project(containing project and - # location), e.g.: - # `projects/myproject/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new - # - # # Call the search_assignments method. - # result = client.search_assignments 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::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest - - # Converts hash 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.search_assignments.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::Bigquery::Reservation::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.search_assignments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :search_assignments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_assignments, 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 - - ## - # Looks up assignments for a specified resource for a particular region. - # If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # @overload search_all_assignments(request, options = nil) - # Pass arguments to `search_all_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_all_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name with location (project name could be the - # wildcard '-'), e.g.: - # `projects/-/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new - # - # # Call the search_all_assignments method. - # result = client.search_all_assignments 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::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_all_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest - - # Converts hash 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.search_all_assignments.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::Bigquery::Reservation::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.search_all_assignments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_all_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :search_all_assignments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, 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 - - ## - # Moves an assignment under a new reservation. - # - # This differs from removing an existing assignment and recreating a new one - # by providing a transactional change that ensures an assignee always has an - # associated reservation. - # - # @overload move_assignment(request, options = nil) - # Pass arguments to `move_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) - # Pass arguments to `move_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the assignment, - # e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @param destination_id [::String] - # The new reservation ID, e.g.: - # `projects/myotherproject/locations/US/reservations/team2-prod` - # @param assignment_id [::String] - # The optional assignment ID. A new assignment name is generated if this - # field is empty. - # - # This field can contain only lowercase alphanumeric characters or dashes. - # Max length is 64 characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new - # - # # Call the move_assignment method. - # result = client.move_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def move_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest - - # Converts hash 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.move_assignment.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::Bigquery::Reservation::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.move_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.move_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :move_assignment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing assignment. - # - # Only the `priority` field can be updated. - # - # @overload update_assignment(request, options = nil) - # Pass arguments to `update_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignment(assignment: nil, update_mask: nil) - # Pass arguments to `update_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Content of the assignment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new - # - # # Call the update_assignment method. - # result = client.update_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def update_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest - - # Converts hash 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_assignment.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::Bigquery::Reservation::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.assignment&.name - header_params["assignment.name"] = request.assignment.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_assignment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_assignment, 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 - - ## - # Retrieves a BI reservation. - # - # @overload get_bi_reservation(request, options = nil) - # Pass arguments to `get_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_bi_reservation(name: nil) - # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested reservation, for example: - # `projects/{project_id}/locations/{location_id}/biReservation` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new - # - # # Call the get_bi_reservation method. - # result = client.get_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def get_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest - - # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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_bi_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_bi_reservation, 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 BI reservation. - # - # Only fields specified in the `field_mask` are updated. - # - # A singleton BI reservation always exists with default size 0. - # In order to reserve BI capacity it needs to be updated to an amount - # greater than 0. In order to release BI capacity reservation size - # must be set to 0. - # - # @overload update_bi_reservation(request, options = nil) - # Pass arguments to `update_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_bi_reservation(bi_reservation: nil, update_mask: nil) - # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] - # A reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A list of fields to be updated in this request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new - # - # # Call the update_bi_reservation method. - # result = client.update_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def update_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest - - # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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.bi_reservation&.name - header_params["bi_reservation.name"] = request.bi_reservation.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_bi_reservation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :update_bi_reservation, 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 the access control policy for a resource. - # May return: - # - # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - # permission to view it. - # * An empty policy if the resource exists but doesn't have a set policy. - # - # Supported resources are: - # - Reservations - # - ReservationAssignments - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.getIamPolicy` to get policies on - # reservations. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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.resource - header_params["resource"] = request.resource - 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_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets an access control policy for a resource. Replaces any existing - # policy. - # - # Supported resources are: - # - Reservations - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.setIamPolicy` to set policies on - # reservations. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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.resource - header_params["resource"] = request.resource - 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.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets your permissions on a resource. Returns an empty set of permissions if - # the resource doesn't exist. - # - # Supported resources are: - # - Reservations - # - # No Google IAM permissions are required to call this method. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Bigquery::Reservation::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.resource - header_params["resource"] = request.resource - 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.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :test_iam_permissions, 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 reservation group. - # - # @overload create_reservation_group(request, options = nil) - # Pass arguments to `create_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) - # Pass arguments to `create_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_group_id [::String] - # Required. The reservation group ID. It must only contain lower case - # alphanumeric characters or dashes. It must start with a letter and must not - # end with a dash. Its maximum length is 64 characters. - # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] - # Required. New Reservation Group to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new - # - # # Call the create_reservation_group method. - # result = client.create_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def create_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest - - # Converts hash 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_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :create_reservation_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the reservation group. - # - # @overload get_reservation_group(request, options = nil) - # Pass arguments to `get_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_group(name: nil) - # Pass arguments to `get_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new - # - # # Call the get_reservation_group method. - # result = client.get_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def get_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest - - # Converts hash 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_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :get_reservation_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation_group(request, options = nil) - # Pass arguments to `delete_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_group(name: nil) - # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new - # - # # Call the delete_reservation_group method. - # result = client.delete_reservation_group request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest - - # Converts hash 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_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :delete_reservation_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservation groups for the project in the specified location. - # - # @overload list_reservation_groups(request, options = nil) - # Pass arguments to `list_reservation_groups` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new - # - # # Call the list_reservation_groups method. - # result = client.list_reservation_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p item - # end - # - def list_reservation_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest - - # Converts hash 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_reservation_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reservation_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.call_rpc :list_reservation_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ReservationService API. - # - # This class represents the configuration for ReservationService, - # 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::Bigquery::Reservation::V1::ReservationService::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 - # # create_reservation to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.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::Bigquery::Reservation::V1::ReservationService::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 = "bigqueryreservation.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 ReservationService 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 `create_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation - ## - # RPC-specific configuration for `list_reservations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservations - ## - # RPC-specific configuration for `get_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation - ## - # RPC-specific configuration for `delete_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation - ## - # RPC-specific configuration for `update_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reservation - ## - # RPC-specific configuration for `failover_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :failover_reservation - ## - # RPC-specific configuration for `create_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_capacity_commitment - ## - # RPC-specific configuration for `list_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_capacity_commitments - ## - # RPC-specific configuration for `get_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_capacity_commitment - ## - # RPC-specific configuration for `delete_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_capacity_commitment - ## - # RPC-specific configuration for `update_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_capacity_commitment - ## - # RPC-specific configuration for `split_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :split_capacity_commitment - ## - # RPC-specific configuration for `merge_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :merge_capacity_commitments - ## - # RPC-specific configuration for `create_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_assignment - ## - # RPC-specific configuration for `list_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assignments - ## - # RPC-specific configuration for `delete_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_assignment - ## - # RPC-specific configuration for `search_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_assignments - ## - # RPC-specific configuration for `search_all_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_assignments - ## - # RPC-specific configuration for `move_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :move_assignment - ## - # RPC-specific configuration for `update_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_assignment - ## - # RPC-specific configuration for `get_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_bi_reservation - ## - # RPC-specific configuration for `update_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_bi_reservation - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation_group - ## - # RPC-specific configuration for `get_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation_group - ## - # RPC-specific configuration for `delete_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation_group - ## - # RPC-specific configuration for `list_reservation_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservation_groups - - # @private - def initialize parent_rpcs = nil - create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation - @create_reservation = ::Gapic::Config::Method.new create_reservation_config - list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations - @list_reservations = ::Gapic::Config::Method.new list_reservations_config - get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation - @get_reservation = ::Gapic::Config::Method.new get_reservation_config - delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation - @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config - update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation - @update_reservation = ::Gapic::Config::Method.new update_reservation_config - failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation - @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config - create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment - @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config - list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments - @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config - get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment - @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config - delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment - @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config - update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment - @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config - split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment - @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config - merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments - @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config - create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment - @create_assignment = ::Gapic::Config::Method.new create_assignment_config - list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments - @list_assignments = ::Gapic::Config::Method.new list_assignments_config - delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment - @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config - search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments - @search_assignments = ::Gapic::Config::Method.new search_assignments_config - search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments - @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config - move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment - @move_assignment = ::Gapic::Config::Method.new move_assignment_config - update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment - @update_assignment = ::Gapic::Config::Method.new update_assignment_config - get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation - @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config - update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation - @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group - @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config - get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group - @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config - delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group - @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config - list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups - @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.rb deleted file mode 100644 index a7158a1de8b0..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - # Credentials for the ReservationService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BIGQUERY_RESERVATION_CREDENTIALS", - "BIGQUERY_RESERVATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGQUERY_RESERVATION_CREDENTIALS_JSON", - "BIGQUERY_RESERVATION_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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb deleted file mode 100644 index 24dc5bcf219f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/paths.rb +++ /dev/null @@ -1,147 +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 Bigquery - module Reservation - module V1 - module ReservationService - # Path helper methods for the ReservationService API. - module Paths - ## - # Create a fully-qualified Assignment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reservations/{reservation}/assignments/{assignment}` - # - # @param project [String] - # @param location [String] - # @param reservation [String] - # @param assignment [String] - # - # @return [::String] - def assignment_path project:, location:, reservation:, assignment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "reservation cannot contain /" if reservation.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reservations/#{reservation}/assignments/#{assignment}" - end - - ## - # Create a fully-qualified BiReservation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/biReservation` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def bi_reservation_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/biReservation" - end - - ## - # Create a fully-qualified CapacityCommitment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/capacityCommitments/{capacity_commitment}` - # - # @param project [String] - # @param location [String] - # @param capacity_commitment [String] - # - # @return [::String] - def capacity_commitment_path project:, location:, capacity_commitment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/capacityCommitments/#{capacity_commitment}" - 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 Reservation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reservations/{reservation}` - # - # @param project [String] - # @param location [String] - # @param reservation [String] - # - # @return [::String] - def reservation_path project:, location:, reservation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reservations/#{reservation}" - end - - ## - # Create a fully-qualified ReservationGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/reservationGroups/{reservation_group}` - # - # @param project [String] - # @param location [String] - # @param reservation_group [String] - # - # @return [::String] - def reservation_group_path project:, location:, reservation_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/reservationGroups/#{reservation_group}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb deleted file mode 100644 index 41e991c06c3e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest.rb +++ /dev/null @@ -1,68 +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/bigquery/reservation/v1/version" - -require "google/cloud/bigquery/reservation/v1/reservation_service/credentials" -require "google/cloud/bigquery/reservation/v1/reservation_service/paths" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest/client" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - ## - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module ReservationService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb deleted file mode 100644 index c9a1182a3f66..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/client.rb +++ /dev/null @@ -1,3266 +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/bigquery/reservation/v1/reservation_pb" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - module Rest - ## - # REST client for the ReservationService service. - # - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigqueryreservation.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reservation_service_stub - - ## - # Configure the ReservationService Client class. - # - # See {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReservationService clients - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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", "Bigquery", "Reservation", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_reservation.timeout = 300.0 - - default_config.rpcs.list_reservations.timeout = 300.0 - default_config.rpcs.list_reservations.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_reservation.timeout = 300.0 - default_config.rpcs.get_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_reservation.timeout = 300.0 - default_config.rpcs.delete_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_reservation.timeout = 300.0 - - default_config.rpcs.failover_reservation.timeout = 300.0 - - default_config.rpcs.create_capacity_commitment.timeout = 300.0 - - default_config.rpcs.list_capacity_commitments.timeout = 300.0 - default_config.rpcs.list_capacity_commitments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_capacity_commitment.timeout = 300.0 - default_config.rpcs.get_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_capacity_commitment.timeout = 300.0 - default_config.rpcs.delete_capacity_commitment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_capacity_commitment.timeout = 300.0 - - default_config.rpcs.split_capacity_commitment.timeout = 300.0 - - default_config.rpcs.merge_capacity_commitments.timeout = 300.0 - - default_config.rpcs.create_assignment.timeout = 300.0 - - default_config.rpcs.list_assignments.timeout = 300.0 - default_config.rpcs.list_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_assignment.timeout = 300.0 - default_config.rpcs.delete_assignment.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_assignments.timeout = 300.0 - default_config.rpcs.search_assignments.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.move_assignment.timeout = 300.0 - - default_config.rpcs.get_bi_reservation.timeout = 300.0 - default_config.rpcs.get_bi_reservation.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_bi_reservation.timeout = 300.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReservationService 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::Bigquery::Reservation::V1::ReservationService::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 - @reservation_service_stub.universe_domain - end - - ## - # Create a new ReservationService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReservationService 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 - - @reservation_service_stub = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @reservation_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reservation_service_stub.logger - end - - # Service calls - - ## - # Creates a new reservation resource. - # - # @overload create_reservation(request, options = nil) - # Pass arguments to `create_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(parent: nil, reservation_id: nil, reservation: nil) - # Pass arguments to `create_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_id [::String] - # The reservation ID. It must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Definition of the new reservation to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new - # - # # Call the create_reservation method. - # result = client.create_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def create_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservations for the project in the specified location. - # - # @overload list_reservations(request, options = nil) - # Pass arguments to `list_reservations` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservations` via keyword arguments. Note that at - # least one keyword argument is 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 resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new - # - # # Call the list_reservations method. - # result = client.list_reservations 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::Bigquery::Reservation::V1::Reservation. - # p item - # end - # - def list_reservations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest - - # Converts hash 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_reservations.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::Bigquery::Reservation::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_reservations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reservations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_reservations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservations, "reservations", 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 information about the reservation. - # - # @overload get_reservation(request, options = nil) - # Pass arguments to `get_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(name: nil) - # Pass arguments to `get_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new - # - # # Call the get_reservation method. - # result = client.get_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def get_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation(request, options = nil) - # Pass arguments to `delete_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(name: nil) - # Pass arguments to `delete_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new - # - # # Call the delete_reservation method. - # result = client.delete_reservation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_reservation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing reservation resource. - # - # @overload update_reservation(request, options = nil) - # Pass arguments to `update_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation(reservation: nil, update_mask: nil) - # Pass arguments to `update_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param reservation [::Google::Cloud::Bigquery::Reservation::V1::Reservation, ::Hash] - # Content of the reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new - # - # # Call the update_reservation method. - # result = client.update_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def update_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest - - # Converts hash 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_reservation.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::Bigquery::Reservation::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_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_reservation 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 - - ## - # Fail over a reservation to the secondary location. The operation should be - # done in the current secondary location, which will be promoted to the - # new primary location for the reservation. - # Attempting to failover a reservation in the current primary location will - # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload failover_reservation(request, options = nil) - # Pass arguments to `failover_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload failover_reservation(name: nil, failover_mode: nil) - # Pass arguments to `failover_reservation` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the reservation to failover. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @param failover_mode [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] - # Optional. A parameter that determines how writes that are pending - # replication are handled after a failover is initiated. If not specified, - # HARD failover mode is used by default. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new - # - # # Call the failover_reservation method. - # result = client.failover_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - # p result - # - def failover_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest - - # Converts hash 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.failover_reservation.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::Bigquery::Reservation::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.failover_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.failover_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.failover_reservation 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 capacity commitment resource. - # - # @overload create_capacity_commitment(request, options = nil) - # Pass arguments to `create_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(parent: nil, capacity_commitment: nil, enforce_single_admin_project_per_org: nil, capacity_commitment_id: nil) - # Pass arguments to `create_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to create. - # @param enforce_single_admin_project_per_org [::Boolean] - # If true, fail the request if another project in the organization has a - # capacity commitment. - # @param capacity_commitment_id [::String] - # The optional capacity commitment ID. Capacity commitment name will be - # generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # NOTE: this ID won't be kept if the capacity commitment is split or merged. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new - # - # # Call the create_capacity_commitment method. - # result = client.create_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def create_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the capacity commitments for the admin project. - # - # @overload list_capacity_commitments(request, options = nil) - # Pass arguments to `list_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new - # - # # Call the list_capacity_commitments method. - # result = client.list_capacity_commitments 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::Bigquery::Reservation::V1::CapacityCommitment. - # p item - # end - # - def list_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest - - # Converts hash 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_capacity_commitments.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::Bigquery::Reservation::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_capacity_commitments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_capacity_commitments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_capacity_commitments, "capacity_commitments", 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 information about the capacity commitment. - # - # @overload get_capacity_commitment(request, options = nil) - # Pass arguments to `get_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil) - # Pass arguments to `get_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the capacity commitment to retrieve. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new - # - # # Call the get_capacity_commitment method. - # result = client.get_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def get_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a capacity commitment. Attempting to delete capacity commitment - # before its commitment_end_time will fail with the error code - # `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload delete_capacity_commitment(request, options = nil) - # Pass arguments to `delete_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(name: nil, force: nil) - # Pass arguments to `delete_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is 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. Resource name of the capacity commitment to delete. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @param force [::Boolean] - # Can be used to force delete commitments even if assignments exist. Deleting - # commitments with assignments may cause queries to fail if they no longer - # have access to slots. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new - # - # # Call the delete_capacity_commitment method. - # result = client.delete_capacity_commitment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_capacity_commitment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing capacity commitment. - # - # Only `plan` and `renewal_plan` fields can be updated. - # - # Plan can only be changed to a plan of a longer commitment period. - # Attempting to change to a plan with shorter commitment period will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload update_capacity_commitment(request, options = nil) - # Pass arguments to `update_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_capacity_commitment(capacity_commitment: nil, update_mask: nil) - # Pass arguments to `update_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param capacity_commitment [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment, ::Hash] - # Content of the capacity commitment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new - # - # # Call the update_capacity_commitment method. - # result = client.update_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def update_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest - - # Converts hash 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_capacity_commitment.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::Bigquery::Reservation::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_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_capacity_commitment 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 - - ## - # Splits capacity commitment to two commitments of the same plan and - # `commitment_end_time`. - # - # A common use case is to enable downgrading commitments. - # - # For example, in order to downgrade from 10000 slots to 8000, you might - # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, - # you delete the first one after the commitment end time passes. - # - # @overload split_capacity_commitment(request, options = nil) - # Pass arguments to `split_capacity_commitment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload split_capacity_commitment(name: nil, slot_count: nil) - # Pass arguments to `split_capacity_commitment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name e.g.,: - # `projects/myproject/locations/US/capacityCommitments/123` - # @param slot_count [::Integer] - # Number of slots in the capacity commitment after the split. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new - # - # # Call the split_capacity_commitment method. - # result = client.split_capacity_commitment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. - # p result - # - def split_capacity_commitment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest - - # Converts hash 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.split_capacity_commitment.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::Bigquery::Reservation::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.split_capacity_commitment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.split_capacity_commitment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.split_capacity_commitment 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 - - ## - # Merges capacity commitments of the same plan into a single commitment. - # - # The resulting capacity commitment has the greater commitment_end_time - # out of the to-be-merged capacity commitments. - # - # Attempting to merge capacity commitments of different plan will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - # - # @overload merge_capacity_commitments(request, options = nil) - # Pass arguments to `merge_capacity_commitments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload merge_capacity_commitments(parent: nil, capacity_commitment_ids: nil, capacity_commitment_id: nil) - # Pass arguments to `merge_capacity_commitments` via keyword arguments. Note that at - # least one keyword argument is 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] - # Parent resource that identifies admin project and location e.g., - # `projects/myproject/locations/us` - # @param capacity_commitment_ids [::Array<::String>] - # Ids of capacity commitments to merge. - # These capacity commitments must exist under admin project and location - # specified in the parent. - # ID is the last portion of capacity commitment name e.g., 'abc' for - # projects/myproject/locations/US/capacityCommitments/abc - # @param capacity_commitment_id [::String] - # Optional. The optional resulting capacity commitment ID. Capacity - # commitment name will be generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new - # - # # Call the merge_capacity_commitments method. - # result = client.merge_capacity_commitments request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - # p result - # - def merge_capacity_commitments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest - - # Converts hash 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.merge_capacity_commitments.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::Bigquery::Reservation::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.merge_capacity_commitments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.merge_capacity_commitments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.merge_capacity_commitments request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an assignment object which allows the given project to submit jobs - # of a certain type using slots from the specified reservation. - # - # Currently a - # resource (project, folder, organization) can only have one assignment per - # each (job_type, location) combination, and that reservation will be used - # for all jobs of the matching type. - # - # Different assignments can be created on different levels of the - # projects, folders or organization hierarchy. During query execution, - # the assignment is looked up at the project, folder and organization levels - # in that order. The first assignment found is applied to the query. - # - # When creating assignments, it does not matter if other assignments exist at - # higher levels. - # - # Example: - # - # * The organization `organizationA` contains two projects, `project1` - # and `project2`. - # * Assignments for all three entities (`organizationA`, `project1`, and - # `project2`) could all be created and mapped to the same or different - # reservations. - # - # "None" assignments represent an absence of the assignment. Projects - # assigned to None use on-demand pricing. To create a "None" assignment, use - # "none" as a reservation_id in the parent. Example parent: - # `projects/myproject/locations/US/reservations/none`. - # - # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have - # 'bigquery.admin' permissions on the project using the reservation - # and the project that owns this reservation. - # - # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment - # does not match location of the reservation. - # - # @overload create_assignment(request, options = nil) - # Pass arguments to `create_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignment(parent: nil, assignment: nil, assignment_id: nil) - # Pass arguments to `create_assignment` via keyword arguments. Note that at - # least one keyword argument is 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 resource name of the assignment - # E.g. `projects/myproject/locations/US/reservations/team1-prod` - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Assignment resource to create. - # @param assignment_id [::String] - # The optional assignment ID. Assignment name will be generated automatically - # if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # Max length is 64 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new - # - # # Call the create_assignment method. - # result = client.create_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def create_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest - - # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_assignment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists assignments. - # - # Only explicitly created assignments will be returned. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, ListAssignments will just return the above two assignments - # for reservation `res1`, and no expansion/merge will happen. - # - # The wildcard "-" can be used for - # reservations in the request. In that case all assignments belongs to the - # specified project and location will be listed. - # - # **Note** "-" cannot be used for projects nor locations. - # - # @overload list_assignments(request, options = nil) - # Pass arguments to `list_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_assignments` via keyword arguments. Note that at - # least one keyword argument is 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 resource name e.g.: - # - # `projects/myproject/locations/US/reservations/team1-prod` - # - # Or: - # - # `projects/myproject/locations/US/reservations/-` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new - # - # # Call the list_assignments method. - # result = client.list_assignments 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::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def list_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest - - # Converts hash 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_assignments.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::Bigquery::Reservation::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_assignments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_assignments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_assignments, "assignments", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a assignment. No expansion will happen. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, deletion of the `` assignment won't - # affect the other assignment ``. After said deletion, - # queries from `project1` will still use `res1` while queries from - # `project2` will switch to use on-demand mode. - # - # @overload delete_assignment(request, options = nil) - # Pass arguments to `delete_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignment(name: nil) - # Pass arguments to `delete_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource, e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new - # - # # Call the delete_assignment method. - # result = client.delete_assignment request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest - - # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_assignment 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 - - ## - # Deprecated: Looks up assignments for a specified resource for a particular - # region. If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # **Note** "-" cannot be used for projects - # nor locations. - # - # @overload search_assignments(request, options = nil) - # Pass arguments to `search_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the admin project(containing project and - # location), e.g.: - # `projects/myproject/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new - # - # # Call the search_assignments method. - # result = client.search_assignments 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::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest - - # Converts hash 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.search_assignments.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::Bigquery::Reservation::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.search_assignments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.search_assignments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_assignments, "assignments", 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 - - ## - # Looks up assignments for a specified resource for a particular region. - # If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # @overload search_all_assignments(request, options = nil) - # Pass arguments to `search_all_assignments` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload search_all_assignments(parent: nil, query: nil, page_size: nil, page_token: nil) - # Pass arguments to `search_all_assignments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name with location (project name could be the - # wildcard '-'), e.g.: - # `projects/-/locations/US`. - # @param query [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new - # - # # Call the search_all_assignments method. - # result = client.search_all_assignments 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::Bigquery::Reservation::V1::Assignment. - # p item - # end - # - def search_all_assignments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest - - # Converts hash 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.search_all_assignments.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::Bigquery::Reservation::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.search_all_assignments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_all_assignments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.search_all_assignments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :search_all_assignments, "assignments", 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 - - ## - # Moves an assignment under a new reservation. - # - # This differs from removing an existing assignment and recreating a new one - # by providing a transactional change that ensures an assignee always has an - # associated reservation. - # - # @overload move_assignment(request, options = nil) - # Pass arguments to `move_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload move_assignment(name: nil, destination_id: nil, assignment_id: nil) - # Pass arguments to `move_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the assignment, - # e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @param destination_id [::String] - # The new reservation ID, e.g.: - # `projects/myotherproject/locations/US/reservations/team2-prod` - # @param assignment_id [::String] - # The optional assignment ID. A new assignment name is generated if this - # field is empty. - # - # This field can contain only lowercase alphanumeric characters or dashes. - # Max length is 64 characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new - # - # # Call the move_assignment method. - # result = client.move_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def move_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest - - # Converts hash 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.move_assignment.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::Bigquery::Reservation::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.move_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.move_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.move_assignment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing assignment. - # - # Only the `priority` field can be updated. - # - # @overload update_assignment(request, options = nil) - # Pass arguments to `update_assignment` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_assignment(assignment: nil, update_mask: nil) - # Pass arguments to `update_assignment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param assignment [::Google::Cloud::Bigquery::Reservation::V1::Assignment, ::Hash] - # Content of the assignment to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Standard field mask for the set of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new - # - # # Call the update_assignment method. - # result = client.update_assignment request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - # p result - # - def update_assignment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest - - # Converts hash 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_assignment.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::Bigquery::Reservation::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_assignment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_assignment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_assignment 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 - - ## - # Retrieves a BI reservation. - # - # @overload get_bi_reservation(request, options = nil) - # Pass arguments to `get_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_bi_reservation(name: nil) - # Pass arguments to `get_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested reservation, for example: - # `projects/{project_id}/locations/{location_id}/biReservation` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new - # - # # Call the get_bi_reservation method. - # result = client.get_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def get_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest - - # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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_bi_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_bi_reservation 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 BI reservation. - # - # Only fields specified in the `field_mask` are updated. - # - # A singleton BI reservation always exists with default size 0. - # In order to reserve BI capacity it needs to be updated to an amount - # greater than 0. In order to release BI capacity reservation size - # must be set to 0. - # - # @overload update_bi_reservation(request, options = nil) - # Pass arguments to `update_bi_reservation` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_bi_reservation(bi_reservation: nil, update_mask: nil) - # Pass arguments to `update_bi_reservation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param bi_reservation [::Google::Cloud::Bigquery::Reservation::V1::BiReservation, ::Hash] - # A reservation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A list of fields to be updated in this request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new - # - # # Call the update_bi_reservation method. - # result = client.update_bi_reservation request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - # p result - # - def update_bi_reservation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest - - # Converts hash 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_bi_reservation.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::Bigquery::Reservation::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_bi_reservation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_bi_reservation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.update_bi_reservation 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 the access control policy for a resource. - # May return: - # - # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - # permission to view it. - # * An empty policy if the resource exists but doesn't have a set policy. - # - # Supported resources are: - # - Reservations - # - ReservationAssignments - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.getIamPolicy` to get policies on - # reservations. - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets an access control policy for a resource. Replaces any existing - # policy. - # - # Supported resources are: - # - Reservations - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.setIamPolicy` to set policies on - # reservations. - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets your permissions on a resource. Returns an empty set of permissions if - # the resource doesn't exist. - # - # Supported resources are: - # - Reservations - # - # No Google IAM permissions are required to call this method. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Bigquery::Reservation::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.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.test_iam_permissions 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 reservation group. - # - # @overload create_reservation_group(request, options = nil) - # Pass arguments to `create_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_group(parent: nil, reservation_group_id: nil, reservation_group: nil) - # Pass arguments to `create_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @param reservation_group_id [::String] - # Required. The reservation group ID. It must only contain lower case - # alphanumeric characters or dashes. It must start with a letter and must not - # end with a dash. Its maximum length is 64 characters. - # @param reservation_group [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup, ::Hash] - # Required. New Reservation Group to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new - # - # # Call the create_reservation_group method. - # result = client.create_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def create_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest - - # Converts hash 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_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.create_reservation_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns information about the reservation group. - # - # @overload get_reservation_group(request, options = nil) - # Pass arguments to `get_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_group(name: nil) - # Pass arguments to `get_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new - # - # # Call the get_reservation_group method. - # result = client.get_reservation_group request - # - # # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p result - # - def get_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest - - # Converts hash 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_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.get_reservation_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - # - # @overload delete_reservation_group(request, options = nil) - # Pass arguments to `delete_reservation_group` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_group(name: nil) - # Pass arguments to `delete_reservation_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new - # - # # Call the delete_reservation_group method. - # result = client.delete_reservation_group request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_reservation_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest - - # Converts hash 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_reservation_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_reservation_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.delete_reservation_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all the reservation groups for the project in the specified location. - # - # @overload list_reservation_groups(request, options = nil) - # Pass arguments to `list_reservation_groups` via a request object, either of type - # {::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reservation_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_reservation_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @param page_size [::Integer] - # The maximum number of items to return per page. - # @param page_token [::String] - # The next_page_token value returned from a previous List request, if any. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/reservation/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new - # - # # Call the list_reservation_groups method. - # result = client.list_reservation_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - # p item - # end - # - def list_reservation_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest - - # Converts hash 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_reservation_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Bigquery::Reservation::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_reservation_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reservation_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reservation_service_stub.list_reservation_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reservation_service_stub, :list_reservation_groups, "reservation_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the ReservationService REST API. - # - # This class represents the configuration for ReservationService 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::Bigquery::Reservation::V1::ReservationService::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 - # # create_reservation to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_reservation.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 = "bigqueryreservation.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 ReservationService 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 `create_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation - ## - # RPC-specific configuration for `list_reservations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservations - ## - # RPC-specific configuration for `get_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation - ## - # RPC-specific configuration for `delete_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation - ## - # RPC-specific configuration for `update_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reservation - ## - # RPC-specific configuration for `failover_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :failover_reservation - ## - # RPC-specific configuration for `create_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_capacity_commitment - ## - # RPC-specific configuration for `list_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_capacity_commitments - ## - # RPC-specific configuration for `get_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_capacity_commitment - ## - # RPC-specific configuration for `delete_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_capacity_commitment - ## - # RPC-specific configuration for `update_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_capacity_commitment - ## - # RPC-specific configuration for `split_capacity_commitment` - # @return [::Gapic::Config::Method] - # - attr_reader :split_capacity_commitment - ## - # RPC-specific configuration for `merge_capacity_commitments` - # @return [::Gapic::Config::Method] - # - attr_reader :merge_capacity_commitments - ## - # RPC-specific configuration for `create_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_assignment - ## - # RPC-specific configuration for `list_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_assignments - ## - # RPC-specific configuration for `delete_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_assignment - ## - # RPC-specific configuration for `search_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_assignments - ## - # RPC-specific configuration for `search_all_assignments` - # @return [::Gapic::Config::Method] - # - attr_reader :search_all_assignments - ## - # RPC-specific configuration for `move_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :move_assignment - ## - # RPC-specific configuration for `update_assignment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_assignment - ## - # RPC-specific configuration for `get_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_bi_reservation - ## - # RPC-specific configuration for `update_bi_reservation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_bi_reservation - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `create_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reservation_group - ## - # RPC-specific configuration for `get_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reservation_group - ## - # RPC-specific configuration for `delete_reservation_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_reservation_group - ## - # RPC-specific configuration for `list_reservation_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reservation_groups - - # @private - def initialize parent_rpcs = nil - create_reservation_config = parent_rpcs.create_reservation if parent_rpcs.respond_to? :create_reservation - @create_reservation = ::Gapic::Config::Method.new create_reservation_config - list_reservations_config = parent_rpcs.list_reservations if parent_rpcs.respond_to? :list_reservations - @list_reservations = ::Gapic::Config::Method.new list_reservations_config - get_reservation_config = parent_rpcs.get_reservation if parent_rpcs.respond_to? :get_reservation - @get_reservation = ::Gapic::Config::Method.new get_reservation_config - delete_reservation_config = parent_rpcs.delete_reservation if parent_rpcs.respond_to? :delete_reservation - @delete_reservation = ::Gapic::Config::Method.new delete_reservation_config - update_reservation_config = parent_rpcs.update_reservation if parent_rpcs.respond_to? :update_reservation - @update_reservation = ::Gapic::Config::Method.new update_reservation_config - failover_reservation_config = parent_rpcs.failover_reservation if parent_rpcs.respond_to? :failover_reservation - @failover_reservation = ::Gapic::Config::Method.new failover_reservation_config - create_capacity_commitment_config = parent_rpcs.create_capacity_commitment if parent_rpcs.respond_to? :create_capacity_commitment - @create_capacity_commitment = ::Gapic::Config::Method.new create_capacity_commitment_config - list_capacity_commitments_config = parent_rpcs.list_capacity_commitments if parent_rpcs.respond_to? :list_capacity_commitments - @list_capacity_commitments = ::Gapic::Config::Method.new list_capacity_commitments_config - get_capacity_commitment_config = parent_rpcs.get_capacity_commitment if parent_rpcs.respond_to? :get_capacity_commitment - @get_capacity_commitment = ::Gapic::Config::Method.new get_capacity_commitment_config - delete_capacity_commitment_config = parent_rpcs.delete_capacity_commitment if parent_rpcs.respond_to? :delete_capacity_commitment - @delete_capacity_commitment = ::Gapic::Config::Method.new delete_capacity_commitment_config - update_capacity_commitment_config = parent_rpcs.update_capacity_commitment if parent_rpcs.respond_to? :update_capacity_commitment - @update_capacity_commitment = ::Gapic::Config::Method.new update_capacity_commitment_config - split_capacity_commitment_config = parent_rpcs.split_capacity_commitment if parent_rpcs.respond_to? :split_capacity_commitment - @split_capacity_commitment = ::Gapic::Config::Method.new split_capacity_commitment_config - merge_capacity_commitments_config = parent_rpcs.merge_capacity_commitments if parent_rpcs.respond_to? :merge_capacity_commitments - @merge_capacity_commitments = ::Gapic::Config::Method.new merge_capacity_commitments_config - create_assignment_config = parent_rpcs.create_assignment if parent_rpcs.respond_to? :create_assignment - @create_assignment = ::Gapic::Config::Method.new create_assignment_config - list_assignments_config = parent_rpcs.list_assignments if parent_rpcs.respond_to? :list_assignments - @list_assignments = ::Gapic::Config::Method.new list_assignments_config - delete_assignment_config = parent_rpcs.delete_assignment if parent_rpcs.respond_to? :delete_assignment - @delete_assignment = ::Gapic::Config::Method.new delete_assignment_config - search_assignments_config = parent_rpcs.search_assignments if parent_rpcs.respond_to? :search_assignments - @search_assignments = ::Gapic::Config::Method.new search_assignments_config - search_all_assignments_config = parent_rpcs.search_all_assignments if parent_rpcs.respond_to? :search_all_assignments - @search_all_assignments = ::Gapic::Config::Method.new search_all_assignments_config - move_assignment_config = parent_rpcs.move_assignment if parent_rpcs.respond_to? :move_assignment - @move_assignment = ::Gapic::Config::Method.new move_assignment_config - update_assignment_config = parent_rpcs.update_assignment if parent_rpcs.respond_to? :update_assignment - @update_assignment = ::Gapic::Config::Method.new update_assignment_config - get_bi_reservation_config = parent_rpcs.get_bi_reservation if parent_rpcs.respond_to? :get_bi_reservation - @get_bi_reservation = ::Gapic::Config::Method.new get_bi_reservation_config - update_bi_reservation_config = parent_rpcs.update_bi_reservation if parent_rpcs.respond_to? :update_bi_reservation - @update_bi_reservation = ::Gapic::Config::Method.new update_bi_reservation_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - create_reservation_group_config = parent_rpcs.create_reservation_group if parent_rpcs.respond_to? :create_reservation_group - @create_reservation_group = ::Gapic::Config::Method.new create_reservation_group_config - get_reservation_group_config = parent_rpcs.get_reservation_group if parent_rpcs.respond_to? :get_reservation_group - @get_reservation_group = ::Gapic::Config::Method.new get_reservation_group_config - delete_reservation_group_config = parent_rpcs.delete_reservation_group if parent_rpcs.respond_to? :delete_reservation_group - @delete_reservation_group = ::Gapic::Config::Method.new delete_reservation_group_config - list_reservation_groups_config = parent_rpcs.list_reservation_groups if parent_rpcs.respond_to? :list_reservation_groups - @list_reservation_groups = ::Gapic::Config::Method.new list_reservation_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb deleted file mode 100644 index 546513e1180a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_service/rest/service_stub.rb +++ /dev/null @@ -1,1889 +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/bigquery/reservation/v1/reservation_pb" - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - module Rest - ## - # REST service stub for the ReservationService 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 create_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] - # 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::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def create_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_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_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_reservations REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] - # 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::Bigquery::Reservation::V1::ListReservationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse] - # A result object deserialized from the server's reply - def list_reservations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reservations_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_reservations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.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_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] - # 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::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def get_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_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_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] - # 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_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_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_reservation", - 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 update_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] - # 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::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def update_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_reservation_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_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the failover_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] - # 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::Bigquery::Reservation::V1::Reservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # A result object deserialized from the server's reply - def failover_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_failover_reservation_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: "failover_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] - # 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::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def create_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_capacity_commitment_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_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] - # 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::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse] - # A result object deserialized from the server's reply - def list_capacity_commitments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_capacity_commitments_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_capacity_commitments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.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_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] - # 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::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def get_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_capacity_commitment_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_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] - # 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_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_capacity_commitment_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_capacity_commitment", - 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 update_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] - # 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::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def update_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_capacity_commitment_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_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the split_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] - # 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::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse] - # A result object deserialized from the server's reply - def split_capacity_commitment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_split_capacity_commitment_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: "split_capacity_commitment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the merge_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] - # 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::Bigquery::Reservation::V1::CapacityCommitment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # A result object deserialized from the server's reply - def merge_capacity_commitments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_merge_capacity_commitments_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: "merge_capacity_commitments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] - # 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::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # A result object deserialized from the server's reply - def create_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_assignment_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_assignment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] - # 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::Bigquery::Reservation::V1::ListAssignmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse] - # A result object deserialized from the server's reply - def list_assignments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_assignments_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_assignments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.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_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] - # 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_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_assignment_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_assignment", - 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 search_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] - # 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::Bigquery::Reservation::V1::SearchAssignmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse] - # A result object deserialized from the server's reply - def search_assignments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_assignments_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: "search_assignments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the search_all_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] - # 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::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse] - # A result object deserialized from the server's reply - def search_all_assignments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_all_assignments_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: "search_all_assignments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the move_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] - # 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::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # A result object deserialized from the server's reply - def move_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_move_assignment_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: "move_assignment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] - # 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::Bigquery::Reservation::V1::Assignment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # A result object deserialized from the server's reply - def update_assignment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_assignment_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_assignment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] - # 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::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # A result object deserialized from the server's reply - def get_bi_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_bi_reservation_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_bi_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] - # 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::Bigquery::Reservation::V1::BiReservation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # A result object deserialized from the server's reply - def update_bi_reservation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_bi_reservation_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_bi_reservation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # 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::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # 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::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # 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::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.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_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] - # 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::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # A result object deserialized from the server's reply - def create_reservation_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reservation_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_reservation_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] - # 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::Bigquery::Reservation::V1::ReservationGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # A result object deserialized from the server's reply - def get_reservation_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reservation_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_reservation_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] - # 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_reservation_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_reservation_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_reservation_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_reservation_groups REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] - # 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::Bigquery::Reservation::V1::ListReservationGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse] - # A result object deserialized from the server's reply - def list_reservation_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reservation_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_reservation_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.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_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest] - # 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_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/reservations", - body: "reservation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reservations REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest] - # 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_reservations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/reservations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest] - # 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_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest] - # 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_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest] - # 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_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{reservation.name}", - body: "reservation", - matches: [ - ["reservation.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the failover_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_failover_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:failoverReservation", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest] - # 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_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/capacityCommitments", - body: "capacity_commitment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest] - # 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_capacity_commitments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/capacityCommitments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest] - # 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_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest] - # 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_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest] - # 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_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{capacity_commitment.name}", - body: "capacity_commitment", - matches: [ - ["capacity_commitment.name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the split_capacity_commitment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_split_capacity_commitment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:split", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/capacityCommitments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the merge_capacity_commitments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_merge_capacity_commitments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/capacityCommitments:merge", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest] - # 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_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/assignments", - body: "assignment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest] - # 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_assignments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/assignments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest] - # 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_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_assignments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:searchAssignments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_all_assignments REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_search_all_assignments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:searchAllAssignments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the move_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_move_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:move", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_assignment REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest] - # 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_assignment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{assignment.name}", - body: "assignment", - matches: [ - ["assignment.name", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest] - # 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_bi_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_bi_reservation REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest] - # 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_bi_reservation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{bi_reservation.name}", - body: "bi_reservation", - matches: [ - ["bi_reservation.name", %r{^projects/[^/]+/locations/[^/]+/biReservation/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # 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_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/reservations/[^/]+/assignments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest] - # 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_reservation_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/reservationGroups", - body: "reservation_group", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest] - # 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_reservation_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_reservation_group REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest] - # 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_reservation_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/reservationGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reservation_groups REST call - # - # @param request_pb [::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest] - # 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_reservation_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/reservationGroups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb deleted file mode 100644 index 4f6d5bcb42f4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/reservation_services_pb.rb +++ /dev/null @@ -1,297 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/reservation/v1/reservation.proto for package 'google.cloud.bigquery.reservation.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigquery/reservation/v1/reservation_pb' - -module Google - module Cloud - module Bigquery - module Reservation - module V1 - module ReservationService - # This API allows users to manage their BigQuery reservations. - # - # A reservation provides computational resource guarantees, in the form of - # [slots](https://cloud.google.com/bigquery/docs/slots), to users. A slot is a - # unit of computational power in BigQuery, and serves as the basic unit of - # parallelism. In a scan of a multi-partitioned table, a single slot operates - # on a single partition of the table. A reservation resource exists as a child - # resource of the admin project and location, e.g.: - # `projects/myproject/locations/US/reservations/reservationName`. - # - # A capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. A capacity - # commitment resource exists as a child resource of the admin project and - # location, e.g.: - # `projects/myproject/locations/US/capacityCommitments/id`. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.reservation.v1.ReservationService' - - # Creates a new reservation resource. - rpc :CreateReservation, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Lists all the reservations for the project in the specified location. - rpc :ListReservations, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse - # Returns information about the reservation. - rpc :GetReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - rpc :DeleteReservation, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, ::Google::Protobuf::Empty - # Updates an existing reservation resource. - rpc :UpdateReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Fail over a reservation to the secondary location. The operation should be - # done in the current secondary location, which will be promoted to the - # new primary location for the reservation. - # Attempting to failover a reservation in the current primary location will - # fail with the error code `google.rpc.Code.FAILED_PRECONDITION`. - rpc :FailoverReservation, ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::Reservation - # Creates a new capacity commitment resource. - rpc :CreateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Lists all the capacity commitments for the admin project. - rpc :ListCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse - # Returns information about the capacity commitment. - rpc :GetCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Deletes a capacity commitment. Attempting to delete capacity commitment - # before its commitment_end_time will fail with the error code - # `google.rpc.Code.FAILED_PRECONDITION`. - rpc :DeleteCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, ::Google::Protobuf::Empty - # Updates an existing capacity commitment. - # - # Only `plan` and `renewal_plan` fields can be updated. - # - # Plan can only be changed to a plan of a longer commitment period. - # Attempting to change to a plan with shorter commitment period will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - rpc :UpdateCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Splits capacity commitment to two commitments of the same plan and - # `commitment_end_time`. - # - # A common use case is to enable downgrading commitments. - # - # For example, in order to downgrade from 10000 slots to 8000, you might - # split a 10000 capacity commitment into commitments of 2000 and 8000. Then, - # you delete the first one after the commitment end time passes. - rpc :SplitCapacityCommitment, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse - # Merges capacity commitments of the same plan into a single commitment. - # - # The resulting capacity commitment has the greater commitment_end_time - # out of the to-be-merged capacity commitments. - # - # Attempting to merge capacity commitments of different plan will fail - # with the error code `google.rpc.Code.FAILED_PRECONDITION`. - rpc :MergeCapacityCommitments, ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment - # Creates an assignment object which allows the given project to submit jobs - # of a certain type using slots from the specified reservation. - # - # Currently a - # resource (project, folder, organization) can only have one assignment per - # each (job_type, location) combination, and that reservation will be used - # for all jobs of the matching type. - # - # Different assignments can be created on different levels of the - # projects, folders or organization hierarchy. During query execution, - # the assignment is looked up at the project, folder and organization levels - # in that order. The first assignment found is applied to the query. - # - # When creating assignments, it does not matter if other assignments exist at - # higher levels. - # - # Example: - # - # * The organization `organizationA` contains two projects, `project1` - # and `project2`. - # * Assignments for all three entities (`organizationA`, `project1`, and - # `project2`) could all be created and mapped to the same or different - # reservations. - # - # "None" assignments represent an absence of the assignment. Projects - # assigned to None use on-demand pricing. To create a "None" assignment, use - # "none" as a reservation_id in the parent. Example parent: - # `projects/myproject/locations/US/reservations/none`. - # - # Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have - # 'bigquery.admin' permissions on the project using the reservation - # and the project that owns this reservation. - # - # Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment - # does not match location of the reservation. - rpc :CreateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment - # Lists assignments. - # - # Only explicitly created assignments will be returned. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, ListAssignments will just return the above two assignments - # for reservation `res1`, and no expansion/merge will happen. - # - # The wildcard "-" can be used for - # reservations in the request. In that case all assignments belongs to the - # specified project and location will be listed. - # - # **Note** "-" cannot be used for projects nor locations. - rpc :ListAssignments, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse - # Deletes a assignment. No expansion will happen. - # - # Example: - # - # * Organization `organizationA` contains two projects, `project1` and - # `project2`. - # * Reservation `res1` exists and was created previously. - # * CreateAssignment was used previously to define the following - # associations between entities and reservations: `` - # and `` - # - # In this example, deletion of the `` assignment won't - # affect the other assignment ``. After said deletion, - # queries from `project1` will still use `res1` while queries from - # `project2` will switch to use on-demand mode. - rpc :DeleteAssignment, ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, ::Google::Protobuf::Empty - # Deprecated: Looks up assignments for a specified resource for a particular - # region. If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - # - # **Note** "-" cannot be used for projects - # nor locations. - rpc :SearchAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse - # Looks up assignments for a specified resource for a particular region. - # If the request is about a project: - # - # 1. Assignments created on the project will be returned if they exist. - # 2. Otherwise assignments created on the closest ancestor will be - # returned. - # 3. Assignments for different JobTypes will all be returned. - # - # The same logic applies if the request is about a folder. - # - # If the request is about an organization, then assignments created on the - # organization will be returned (organization doesn't have ancestors). - # - # Comparing to ListAssignments, there are some behavior - # differences: - # - # 1. permission on the assignee will be verified in this API. - # 2. Hierarchy lookup (project->folder->organization) happens in this API. - # 3. Parent here is `projects/*/locations/*`, instead of - # `projects/*/locations/*reservations/*`. - rpc :SearchAllAssignments, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse - # Moves an assignment under a new reservation. - # - # This differs from removing an existing assignment and recreating a new one - # by providing a transactional change that ensures an assignee always has an - # associated reservation. - rpc :MoveAssignment, ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment - # Updates an existing assignment. - # - # Only the `priority` field can be updated. - rpc :UpdateAssignment, ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, ::Google::Cloud::Bigquery::Reservation::V1::Assignment - # Retrieves a BI reservation. - rpc :GetBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation - # Updates a BI reservation. - # - # Only fields specified in the `field_mask` are updated. - # - # A singleton BI reservation always exists with default size 0. - # In order to reserve BI capacity it needs to be updated to an amount - # greater than 0. In order to release BI capacity reservation size - # must be set to 0. - rpc :UpdateBiReservation, ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, ::Google::Cloud::Bigquery::Reservation::V1::BiReservation - # Gets the access control policy for a resource. - # May return: - # - # * A`NOT_FOUND` error if the resource doesn't exist or you don't have the - # permission to view it. - # * An empty policy if the resource exists but doesn't have a set policy. - # - # Supported resources are: - # - Reservations - # - ReservationAssignments - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.getIamPolicy` to get policies on - # reservations. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets an access control policy for a resource. Replaces any existing - # policy. - # - # Supported resources are: - # - Reservations - # - # To call this method, you must have the following Google IAM permissions: - # - # - `bigqueryreservation.reservations.setIamPolicy` to set policies on - # reservations. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets your permissions on a resource. Returns an empty set of permissions if - # the resource doesn't exist. - # - # Supported resources are: - # - Reservations - # - # No Google IAM permissions are required to call this method. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Creates a new reservation group. - rpc :CreateReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup - # Returns information about the reservation group. - rpc :GetReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup - # Deletes a reservation. - # Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has - # assignments. - rpc :DeleteReservationGroup, ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, ::Google::Protobuf::Empty - # Lists all the reservation groups for the project in the specified location. - rpc :ListReservationGroups, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb deleted file mode 100644 index bb32a525c996..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/reservation/v1/reservation_service/rest" -require "google/cloud/bigquery/reservation/v1/version" - -module Google - module Cloud - module Bigquery - module Reservation - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/bigquery/reservation/v1/rest" - # client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb deleted file mode 100644 index be5b8808b160..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/lib/google/cloud/bigquery/reservation/v1/version.rb +++ /dev/null @@ -1,30 +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 Bigquery - module Reservation - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md deleted file mode 100644 index dcf8e9f79d59..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Reservation 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-bigquery-reservation-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb deleted file mode 100644 index f2fa903c333e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/cloud/bigquery/reservation/v1/reservation.rb +++ /dev/null @@ -1,1190 +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 Bigquery - module Reservation - module V1 - # A reservation is a mechanism used to guarantee slots to users. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the reservation, e.g., - # `projects/*/locations/*/reservations/team1-prod`. - # The reservation_id must only contain lower case alphanumeric characters or - # dashes. It must start with a letter and must not end with a dash. Its - # maximum length is 64 characters. - # @!attribute [rw] slot_capacity - # @return [::Integer] - # Optional. Baseline slots available to this reservation. A slot is a unit of - # computational power in BigQuery, and serves as the unit of parallelism. - # - # Queries using this reservation might use more slots during runtime if - # ignore_idle_slots is set to false, or autoscaling is enabled. - # - # The total slot_capacity of the reservation and its siblings - # may exceed the total slot_count of capacity commitments. In that case, the - # exceeding slots will be charged with the autoscale SKU. You can increase - # the number of baseline slots in a reservation every few minutes. If you - # want to decrease your baseline slots, you are limited to once an hour if - # you have recently changed your baseline slot capacity and your baseline - # slots exceed your committed slots. Otherwise, you can decrease your - # baseline slots every few minutes. - # @!attribute [rw] ignore_idle_slots - # @return [::Boolean] - # Optional. If false, any query or pipeline job using this reservation will - # use idle slots from other reservations within the same admin project. If - # true, a query or pipeline job using this reservation will execute with the - # slot capacity specified in the slot_capacity field at most. - # @!attribute [rw] autoscale - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::Autoscale] - # Optional. The configuration parameters for the auto scaling feature. - # @!attribute [rw] concurrency - # @return [::Integer] - # Optional. Job concurrency target which sets a soft upper bound on the - # number of jobs that can run concurrently in this reservation. This is a - # soft target due to asynchronous nature of the system and various - # optimizations for small queries. Default value is 0 which means that - # concurrency target will be automatically computed by the system. NOTE: this - # field is exposed as target job concurrency in the Information Schema, DDL - # and BigQuery CLI. - # @!attribute [r] creation_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation time of the reservation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the reservation. - # @!attribute [rw] multi_region_auxiliary - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Applicable only for reservations located within one of the BigQuery - # multi-regions (US or EU). - # - # If set to true, this reservation is placed in the organization's - # secondary region which is designated for disaster recovery purposes. - # If false, this reservation is placed in the organization's default region. - # - # NOTE: this is a preview feature. Project must be allow-listed in order to - # set this field. - # @!attribute [rw] edition - # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] - # Optional. Edition of the reservation. - # @!attribute [r] primary_location - # @return [::String] - # Output only. The current location of the reservation's primary replica. - # This field is only set for reservations using the managed disaster recovery - # feature. - # @!attribute [rw] secondary_location - # @return [::String] - # Optional. The current location of the reservation's secondary replica. This - # field is only set for reservations using the managed disaster recovery - # feature. Users can set this in create reservation calls - # to create a failover reservation or in update reservation calls to convert - # a non-failover reservation to a failover reservation(or vice versa). - # @!attribute [r] original_primary_location - # @return [::String] - # Output only. The location where the reservation was originally created. - # This is set only during the failover reservation's creation. All billing - # charges for the failover reservation will be applied to this location. - # @!attribute [rw] max_slots - # @return [::Integer] - # Optional. The overall max slots for the reservation, covering slot_capacity - # (baseline), idle slots (if ignore_idle_slots is false) and scaled slots. - # If present, the reservation won't use more than the specified number of - # slots, even if there is demand and supply (from idle slots). - # NOTE: capping a reservation's idle slot usage is best effort and its - # usage may exceed the max_slots value. However, in terms of - # autoscale.current_slots (which accounts for the additional added slots), it - # will never exceed the max_slots - baseline. - # - # - # This field must be set together with the scaling_mode enum value, - # otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - # - # If the max_slots and scaling_mode are set, the autoscale or - # autoscale.max_slots field must be unset. Otherwise the request will be - # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. However, the - # autoscale field may still be in the output. The autopscale.max_slots will - # always show as 0 and the autoscaler.current_slots will represent the - # current slots from autoscaler excluding idle slots. - # For example, if the max_slots is 1000 and scaling_mode is AUTOSCALE_ONLY, - # then in the output, the autoscaler.max_slots will be 0 and the - # autoscaler.current_slots may be any value between 0 and 1000. - # - # If the max_slots is 1000, scaling_mode is ALL_SLOTS, the baseline is 100 - # and idle slots usage is 200, then in the output, the autoscaler.max_slots - # will be 0 and the autoscaler.current_slots will not be higher than 700. - # - # If the max_slots is 1000, scaling_mode is IDLE_SLOTS_ONLY, then in the - # output, the autoscaler field will be null. - # - # If the max_slots and scaling_mode are set, then the ignore_idle_slots field - # must be aligned with the scaling_mode enum value.(See details in - # ScalingMode comments). Otherwise the request will be rejected with - # error code `google.rpc.Code.INVALID_ARGUMENT`. - # - # Please note, the max_slots is for user to manage the part of slots greater - # than the baseline. Therefore, we don't allow users to set max_slots smaller - # or equal to the baseline as it will not be meaningful. If the field is - # present and slot_capacity>=max_slots, requests will be rejected with error - # code `google.rpc.Code.INVALID_ARGUMENT`. - # - # Please note that if max_slots is set to 0, we will treat it as unset. - # Customers can set max_slots to 0 and set scaling_mode to - # SCALING_MODE_UNSPECIFIED to disable the max_slots feature. - # @!attribute [rw] scaling_mode - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ScalingMode] - # Optional. The scaling mode for the reservation. - # If the field is present but max_slots is not present, requests will be - # rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. The labels associated with this reservation. You can use these - # to organize and group your reservations. - # You can set this property when you create or update a reservation. - # @!attribute [rw] reservation_group - # @return [::String] - # Optional. The reservation group that this reservation belongs to. - # You can set this property when you create or update a reservation. - # Reservations do not need to belong to a reservation group. - # Format: - # projects/\\{project}/locations/\\{location}/reservationGroups/\\{reservation_group} - # or just \\{reservation_group} - # @!attribute [r] replication_status - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation::ReplicationStatus] - # Output only. The Disaster Recovery(DR) replication status of the - # reservation. This is only available for the primary replicas of DR/failover - # reservations and provides information about the both the staleness of the - # secondary and the last error encountered while trying to replicate changes - # from the primary to the secondary. If this field is blank, it means that - # the reservation is either not a DR reservation or the reservation is a DR - # secondary or that any replication operations on the reservation have - # succeeded. - # @!attribute [rw] scheduling_policy - # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] - # Optional. The scheduling policy to use for jobs and queries running under - # this reservation. The scheduling policy controls how the reservation's - # resources are distributed. - # - # This feature is not yet generally available. - class Reservation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Auto scaling settings. - # @!attribute [r] current_slots - # @return [::Integer] - # Output only. The slot capacity added to this reservation when autoscale - # happens. Will be between [0, max_slots]. Note: after users reduce - # max_slots, it may take a while before it can be propagated, so - # current_slots may stay in the original value and could be larger than - # max_slots for that brief period (less than one minute) - # @!attribute [rw] max_slots - # @return [::Integer] - # Optional. Number of slots to be scaled when needed. - class Autoscale - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Disaster Recovery(DR) replication status of the reservation. - # @!attribute [r] error - # @return [::Google::Rpc::Status] - # Output only. The last error encountered while trying to replicate changes - # from the primary to the secondary. This field is only available if the - # replication has not succeeded since. - # @!attribute [r] last_error_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the last error was encountered while - # trying to replicate changes from the primary to the secondary. This field - # is only available if the replication has not succeeded since. - # @!attribute [r] last_replication_time - # @return [::Google::Protobuf::Timestamp] - # Output only. A timestamp corresponding to the last change on the primary - # that was successfully replicated to the secondary. - # @!attribute [r] soft_failover_start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which a soft failover for the reservation and - # its associated datasets was initiated. After this field is set, all - # subsequent changes to the reservation will be rejected unless a hard - # failover overrides this operation. This field will be cleared once the - # failover is complete. - class ReplicationStatus - 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 - - # The scaling mode for the reservation. This enum determines how the - # reservation scales up and down. - module ScalingMode - # Default value of ScalingMode. - SCALING_MODE_UNSPECIFIED = 0 - - # The reservation will scale up only using slots from autoscaling. It will - # not use any idle slots even if there may be some available. The upper - # limit that autoscaling can scale up to will be max_slots - baseline. - # For example, if max_slots is 1000, baseline is 200 and customer sets - # ScalingMode to AUTOSCALE_ONLY, then autoscalerg will scale up to 800 - # slots and no idle slots will be used. - # - # Please note, in this mode, the ignore_idle_slots field must be set to - # true. Otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - AUTOSCALE_ONLY = 1 - - # The reservation will scale up using only idle slots contributed by - # other reservations or from unassigned commitments. If no idle slots are - # available it will not scale up further. If the idle slots which it is - # using are reclaimed by the contributing reservation(s) it may be forced - # to scale down. The max idle slots the reservation can be max_slots - - # baseline capacity. For example, if max_slots is 1000, baseline is 200 and - # customer sets ScalingMode to IDLE_SLOTS_ONLY, - # 1. if there are 1000 idle slots available in other reservations, the - # reservation will scale up to 1000 slots with 200 baseline and 800 idle - # slots. - # 2. if there are 500 idle slots available in other reservations, the - # reservation will scale up to 700 slots with 200 baseline and 300 idle - # slots. - # Please note, in this mode, the reservation might not be able to scale up - # to max_slots. - # - # Please note, in this mode, the ignore_idle_slots field must be set to - # false. Otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - IDLE_SLOTS_ONLY = 2 - - # The reservation will scale up using all slots available to it. It will - # use idle slots contributed by other reservations or from unassigned - # commitments first. If no idle slots are available it will scale up using - # autoscaling. For example, if max_slots is 1000, baseline is 200 and - # customer sets ScalingMode to ALL_SLOTS, - # 1. if there are 800 idle slots available in other reservations, the - # reservation will scale up to 1000 slots with 200 baseline and 800 idle - # slots. - # 2. if there are 500 idle slots available in other reservations, the - # reservation will scale up to 1000 slots with 200 baseline, 500 idle - # slots and 300 autoscaling slots. - # 3. if there are no idle slots available in other reservations, it will - # scale up to 1000 slots with 200 baseline and 800 autoscaling slots. - # - # Please note, in this mode, the ignore_idle_slots field must be set to - # false. Otherwise the request will be rejected with error code - # `google.rpc.Code.INVALID_ARGUMENT`. - ALL_SLOTS = 3 - end - end - - # The scheduling policy controls how a reservation's resources are distributed. - # @!attribute [rw] concurrency - # @return [::Integer] - # Optional. If present and > 0, the reservation will attempt to limit the - # concurrency of jobs running for any particular project within it to the - # given value. - # - # This feature is not yet generally available. - # @!attribute [rw] max_slots - # @return [::Integer] - # Optional. If present and > 0, the reservation will attempt to limit the - # slot consumption of queries running for any particular project within it to - # the given value. - # - # This feature is not yet generally available. - class SchedulingPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reservation group is a container for reservations. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the reservation group, e.g., - # `projects/*/locations/*/reservationGroups/team1-prod`. - # The reservation_group_id must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end with a - # dash. Its maximum length is 64 characters. - class ReservationGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Capacity commitment is a way to purchase compute capacity for BigQuery jobs - # (in the form of slots) with some committed period of usage. Annual - # commitments renew by default. Commitments can be removed after their - # commitment end time passes. - # - # In order to remove annual commitment, its plan needs to be changed - # to monthly or flex first. - # - # A capacity commitment resource exists as a child resource of the admin - # project. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the capacity commitment, e.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # The commitment_id must only contain lower case alphanumeric characters or - # dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @!attribute [rw] slot_count - # @return [::Integer] - # Optional. Number of slots in this commitment. - # @!attribute [rw] plan - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] - # Optional. Capacity commitment commitment plan. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::State] - # Output only. State of the commitment. - # @!attribute [r] commitment_start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start of the current commitment period. It is applicable - # only for ACTIVE capacity commitments. Note after the commitment is renewed, - # commitment_start_time won't be changed. It refers to the start time of the - # original commitment. - # @!attribute [r] commitment_end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The end of the current commitment period. It is applicable - # only for ACTIVE capacity commitments. Note after renewal, - # commitment_end_time is the time the renewed commitment expires. So itwould - # be at a time after commitment_start_time + committed period, because we - # don't change commitment_start_time , - # @!attribute [r] failure_status - # @return [::Google::Rpc::Status] - # Output only. For FAILED commitment plan, provides the reason of failure. - # @!attribute [rw] renewal_plan - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment::CommitmentPlan] - # Optional. The plan this capacity commitment is converted to after - # commitment_end_time passes. Once the plan is changed, committed period is - # extended according to commitment plan. Only applicable for ANNUAL and TRIAL - # commitments. - # @!attribute [rw] multi_region_auxiliary - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Applicable only for commitments located within one of the BigQuery - # multi-regions (US or EU). - # - # If set to true, this commitment is placed in the organization's - # secondary region which is designated for disaster recovery purposes. - # If false, this commitment is placed in the organization's default region. - # - # NOTE: this is a preview feature. Project must be allow-listed in order to - # set this field. - # @!attribute [rw] edition - # @return [::Google::Cloud::Bigquery::Reservation::V1::Edition] - # Optional. Edition of the capacity commitment. - # @!attribute [r] is_flat_rate - # @return [::Boolean] - # Output only. If true, the commitment is a flat-rate commitment, otherwise, - # it's an edition commitment. - class CapacityCommitment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Commitment plan defines the current committed period. Capacity commitment - # cannot be deleted during it's committed period. - module CommitmentPlan - # Invalid plan value. Requests with this value will be rejected with - # error code `google.rpc.Code.INVALID_ARGUMENT`. - COMMITMENT_PLAN_UNSPECIFIED = 0 - - # Flex commitments have committed period of 1 minute after becoming ACTIVE. - # After that, they are not in a committed period anymore and can be removed - # any time. - FLEX = 3 - - # Same as FLEX, should only be used if flat-rate commitments are still - # available. - FLEX_FLAT_RATE = 7 - - # Trial commitments have a committed period of 182 days after becoming - # ACTIVE. After that, they are converted to a new commitment based on the - # `renewal_plan`. Default `renewal_plan` for Trial commitment is Flex so - # that it can be deleted right after committed period ends. - TRIAL = 5 - - # Monthly commitments have a committed period of 30 days after becoming - # ACTIVE. After that, they are not in a committed period anymore and can be - # removed any time. - MONTHLY = 2 - - # Same as MONTHLY, should only be used if flat-rate commitments are still - # available. - MONTHLY_FLAT_RATE = 8 - - # Annual commitments have a committed period of 365 days after becoming - # ACTIVE. After that they are converted to a new commitment based on the - # renewal_plan. - ANNUAL = 4 - - # Same as ANNUAL, should only be used if flat-rate commitments are still - # available. - ANNUAL_FLAT_RATE = 9 - - # 3-year commitments have a committed period of 1095(3 * 365) days after - # becoming ACTIVE. After that they are converted to a new commitment based - # on the renewal_plan. - THREE_YEAR = 10 - - # Should only be used for `renewal_plan` and is only meaningful if - # edition is specified to values other than EDITION_UNSPECIFIED. Otherwise - # CreateCapacityCommitmentRequest or UpdateCapacityCommitmentRequest will - # be rejected with error code `google.rpc.Code.INVALID_ARGUMENT`. If the - # renewal_plan is NONE, capacity commitment will be removed at the end of - # its commitment period. - NONE = 6 - end - - # Capacity commitment can either become ACTIVE right away or transition - # from PENDING to ACTIVE or FAILED. - module State - # Invalid state value. - STATE_UNSPECIFIED = 0 - - # Capacity commitment is pending provisioning. Pending capacity commitment - # does not contribute to the project's slot_capacity. - PENDING = 1 - - # Once slots are provisioned, capacity commitment becomes active. - # slot_count is added to the project's slot_capacity. - ACTIVE = 2 - - # Capacity commitment is failed to be activated by the backend. - FAILED = 3 - end - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation ReservationService.CreateReservation}. - # @!attribute [rw] parent - # @return [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] reservation_id - # @return [::String] - # The reservation ID. It must only contain lower case alphanumeric - # characters or dashes. It must start with a letter and must not end - # with a dash. Its maximum length is 64 characters. - # @!attribute [rw] reservation - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # Definition of the new reservation to create. - class CreateReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListReservationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations ReservationService.ListReservations}. - # @!attribute [rw] reservations - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Reservation>] - # List of reservations visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListReservationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation ReservationService.GetReservation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - class GetReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation ReservationService.DeleteReservation}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation to retrieve. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - class DeleteReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation ReservationService.UpdateReservation}. - # @!attribute [rw] reservation - # @return [::Google::Cloud::Bigquery::Reservation::V1::Reservation] - # Content of the reservation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for ReservationService.FailoverReservation. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation to failover. E.g., - # `projects/myproject/locations/US/reservations/team1-prod` - # @!attribute [rw] failover_mode - # @return [::Google::Cloud::Bigquery::Reservation::V1::FailoverMode] - # Optional. A parameter that determines how writes that are pending - # replication are handled after a failover is initiated. If not specified, - # HARD failover mode is used by default. - class FailoverReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group ReservationService.CreateReservationGroup}. - # @!attribute [rw] parent - # @return [::String] - # Required. Project, location. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] reservation_group_id - # @return [::String] - # Required. The reservation group ID. It must only contain lower case - # alphanumeric characters or dashes. It must start with a letter and must not - # end with a dash. Its maximum length is 64 characters. - # @!attribute [rw] reservation_group - # @return [::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup] - # Required. New Reservation Group to create. - class CreateReservationGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group ReservationService.GetReservationGroup}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - class GetReservationGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name containing project and location, e.g.: - # `projects/myproject/locations/US` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListReservationGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups ReservationService.ListReservationGroups}. - # @!attribute [rw] reservation_groups - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup>] - # List of reservations visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListReservationGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group ReservationService.DeleteReservationGroup}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the reservation group to retrieve. E.g., - # `projects/myproject/locations/US/reservationGroups/team1-prod` - class DeleteReservationGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment ReservationService.CreateCapacityCommitment}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] capacity_commitment - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # Content of the capacity commitment to create. - # @!attribute [rw] enforce_single_admin_project_per_org - # @return [::Boolean] - # If true, fail the request if another project in the organization has a - # capacity commitment. - # @!attribute [rw] capacity_commitment_id - # @return [::String] - # The optional capacity commitment ID. Capacity commitment name will be - # generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - # NOTE: this ID won't be kept if the capacity commitment is split or merged. - class CreateCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. - # @!attribute [rw] parent - # @return [::String] - # Required. Resource name of the parent reservation. E.g., - # `projects/myproject/locations/US` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListCapacityCommitmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments ReservationService.ListCapacityCommitments}. - # @!attribute [rw] capacity_commitments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment>] - # List of capacity commitments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListCapacityCommitmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment ReservationService.GetCapacityCommitment}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the capacity commitment to retrieve. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - class GetCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment ReservationService.DeleteCapacityCommitment}. - # @!attribute [rw] name - # @return [::String] - # Required. Resource name of the capacity commitment to delete. E.g., - # `projects/myproject/locations/US/capacityCommitments/123` - # @!attribute [rw] force - # @return [::Boolean] - # Can be used to force delete commitments even if assignments exist. Deleting - # commitments with assignments may cause queries to fail if they no longer - # have access to slots. - class DeleteCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment ReservationService.UpdateCapacityCommitment}. - # @!attribute [rw] capacity_commitment - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # Content of the capacity commitment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name e.g.,: - # `projects/myproject/locations/US/capacityCommitments/123` - # @!attribute [rw] slot_count - # @return [::Integer] - # Number of slots in the capacity commitment after the split. - class SplitCapacityCommitmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment ReservationService.SplitCapacityCommitment}. - # @!attribute [rw] first - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # First capacity commitment, result of a split. - # @!attribute [rw] second - # @return [::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment] - # Second capacity commitment, result of a split. - class SplitCapacityCommitmentResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments ReservationService.MergeCapacityCommitments}. - # @!attribute [rw] parent - # @return [::String] - # Parent resource that identifies admin project and location e.g., - # `projects/myproject/locations/us` - # @!attribute [rw] capacity_commitment_ids - # @return [::Array<::String>] - # Ids of capacity commitments to merge. - # These capacity commitments must exist under admin project and location - # specified in the parent. - # ID is the last portion of capacity commitment name e.g., 'abc' for - # projects/myproject/locations/US/capacityCommitments/abc - # @!attribute [rw] capacity_commitment_id - # @return [::String] - # Optional. The optional resulting capacity commitment ID. Capacity - # commitment name will be generated automatically if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # The first and last character cannot be a dash. Max length is 64 characters. - class MergeCapacityCommitmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An assignment allows a project to submit jobs - # of a certain type using slots from the specified reservation. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the resource. E.g.: - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123`. - # The assignment_id must only contain lower case alphanumeric characters or - # dashes and the max length is 64 characters. - # @!attribute [rw] assignee - # @return [::String] - # Optional. The resource which will use the reservation. E.g. - # `projects/myproject`, `folders/123`, or `organizations/456`. - # @!attribute [rw] job_type - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::JobType] - # Optional. Which type of jobs will use the reservation. - # @!attribute [r] state - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment::State] - # Output only. State of the assignment. - # @!attribute [rw] enable_gemini_in_bigquery - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Optional. Deprecated: "Gemini in BigQuery" is now available by - # default for all BigQuery editions and should not be explicitly set. - # Controls if "Gemini in BigQuery" - # (https://cloud.google.com/gemini/docs/bigquery/overview) features should be - # enabled for this reservation assignment. - # @!attribute [rw] scheduling_policy - # @return [::Google::Cloud::Bigquery::Reservation::V1::SchedulingPolicy] - # Optional. The scheduling policy to use for jobs and queries of this - # assignee when running under the associated reservation. The scheduling - # policy controls how the reservation's resources are distributed. This - # overrides the default scheduling policy specified on the reservation. - # - # This feature is not yet generally available. - class Assignment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of job, which could be specified when using the reservation. - module JobType - # Invalid type. Requests with this value will be rejected with - # error code `google.rpc.Code.INVALID_ARGUMENT`. - JOB_TYPE_UNSPECIFIED = 0 - - # Pipeline (load/export) jobs from the project will use the reservation. - PIPELINE = 1 - - # Query jobs from the project will use the reservation. - QUERY = 2 - - # BigQuery ML jobs that use services external to BigQuery for model - # training. These jobs will not utilize idle slots from other reservations. - ML_EXTERNAL = 3 - - # Background jobs that BigQuery runs for the customers in the background. - BACKGROUND = 4 - - # Continuous SQL jobs will use this reservation. Reservations with - # continuous assignments cannot be mixed with non-continuous assignments. - CONTINUOUS = 6 - - # Finer granularity background jobs for capturing changes in a source - # database and streaming them into BigQuery. Reservations with this job - # type take priority over a default BACKGROUND reservation assignment (if - # it exists). - BACKGROUND_CHANGE_DATA_CAPTURE = 7 - - # Finer granularity background jobs for refreshing cached metadata for - # BigQuery tables. Reservations with this job type take priority over a - # default BACKGROUND reservation assignment (if it exists). - BACKGROUND_COLUMN_METADATA_INDEX = 8 - - # Finer granularity background jobs for refreshing search indexes upon - # BigQuery table columns. Reservations with this job type - # take priority over a default BACKGROUND reservation assignment (if it - # exists). - BACKGROUND_SEARCH_INDEX_REFRESH = 9 - end - - # Assignment will remain in PENDING state if no active capacity commitment is - # present. It will become ACTIVE when some capacity commitment becomes - # active. - module State - # Invalid state value. - STATE_UNSPECIFIED = 0 - - # Queries from assignee will be executed as on-demand, if related - # assignment is pending. - PENDING = 1 - - # Assignment is ready. - ACTIVE = 2 - end - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment ReservationService.CreateAssignment}. - # Note: "bigquery.reservationAssignments.create" permission is required on the - # related assignee. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name of the assignment - # E.g. `projects/myproject/locations/US/reservations/team1-prod` - # @!attribute [rw] assignment - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # Assignment resource to create. - # @!attribute [rw] assignment_id - # @return [::String] - # The optional assignment ID. Assignment name will be generated automatically - # if this field is empty. - # This field must only contain lower case alphanumeric characters or dashes. - # Max length is 64 characters. - class CreateAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name e.g.: - # - # `projects/myproject/locations/US/reservations/team1-prod` - # - # Or: - # - # `projects/myproject/locations/US/reservations/-` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class ListAssignmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments ReservationService.ListAssignments}. - # @!attribute [rw] assignments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # List of assignments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class ListAssignmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment ReservationService.DeleteAssignment}. - # Note: "bigquery.reservationAssignments.delete" permission is required on the - # related assignee. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource, e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - class DeleteAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. - # Note: "bigquery.reservationAssignments.search" permission is required on the - # related assignee. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the admin project(containing project and - # location), e.g.: - # `projects/myproject/locations/US`. - # @!attribute [rw] query - # @return [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class SearchAssignmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. - # Note: "bigquery.reservationAssignments.search" permission is required on the - # related assignee. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name with location (project name could be the - # wildcard '-'), e.g.: - # `projects/-/locations/US`. - # @!attribute [rw] query - # @return [::String] - # Please specify resource name as assignee in the query. - # - # Examples: - # - # * `assignee=projects/myproject` - # * `assignee=folders/123` - # * `assignee=organizations/456` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return per page. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value returned from a previous List request, if any. - class SearchAllAssignmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments ReservationService.SearchAssignments}. - # @!attribute [rw] assignments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # List of assignments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class SearchAssignmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments ReservationService.SearchAllAssignments}. - # @!attribute [rw] assignments - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::Assignment>] - # List of assignments visible to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to retrieve the next page of results, or empty if there are no - # more results in the list. - class SearchAllAssignmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment ReservationService.MoveAssignment}. - # - # **Note**: "bigquery.reservationAssignments.create" permission is required on - # the destination_id. - # - # **Note**: "bigquery.reservationAssignments.create" and - # "bigquery.reservationAssignments.delete" permission are required on the - # related assignee. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the assignment, - # e.g. - # `projects/myproject/locations/US/reservations/team1-prod/assignments/123` - # @!attribute [rw] destination_id - # @return [::String] - # The new reservation ID, e.g.: - # `projects/myotherproject/locations/US/reservations/team2-prod` - # @!attribute [rw] assignment_id - # @return [::String] - # The optional assignment ID. A new assignment name is generated if this - # field is empty. - # - # This field can contain only lowercase alphanumeric characters or dashes. - # Max length is 64 characters. - class MoveAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment ReservationService.UpdateAssignment}. - # @!attribute [rw] assignment - # @return [::Google::Cloud::Bigquery::Reservation::V1::Assignment] - # Content of the assignment to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Standard field mask for the set of fields to be updated. - class UpdateAssignmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fully qualified reference to BigQuery table. - # Internally stored as google.cloud.bi.v1.BqTableReference. - # @!attribute [rw] project_id - # @return [::String] - # Optional. The assigned project ID of the project. - # @!attribute [rw] dataset_id - # @return [::String] - # Optional. The ID of the dataset in the above project. - # @!attribute [rw] table_id - # @return [::String] - # Optional. The ID of the table in the above dataset. - class TableReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a BI Reservation. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the singleton BI reservation. - # Reservation names have the form - # `projects/{project_id}/locations/{location_id}/biReservation`. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a reservation. - # @!attribute [rw] size - # @return [::Integer] - # Optional. Size of a reservation, in bytes. - # @!attribute [rw] preferred_tables - # @return [::Array<::Google::Cloud::Bigquery::Reservation::V1::TableReference>] - # Optional. Preferred tables to use BI capacity for. - class BiReservation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a singleton BI reservation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested reservation, for example: - # `projects/{project_id}/locations/{location_id}/biReservation` - class GetBiReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a BI reservation. - # @!attribute [rw] bi_reservation - # @return [::Google::Cloud::Bigquery::Reservation::V1::BiReservation] - # A reservation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # A list of fields to be updated in this request. - class UpdateBiReservationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of editions. - # Different features and behaviors are provided to different editions - # Capacity commitments and reservations are linked to editions. - module Edition - # Default value, which will be treated as ENTERPRISE. - EDITION_UNSPECIFIED = 0 - - # Standard edition. - STANDARD = 1 - - # Enterprise edition. - ENTERPRISE = 2 - - # Enterprise Plus edition. - ENTERPRISE_PLUS = 3 - end - - # The failover mode when a user initiates a failover on a reservation - # determines how writes that are pending replication are handled after the - # failover is initiated. - module FailoverMode - # Invalid value. - FAILOVER_MODE_UNSPECIFIED = 0 - - # When customers initiate a soft failover, BigQuery will wait until all - # committed writes are replicated to the secondary. This mode requires both - # regions to be available for the failover to succeed and prevents data loss. - SOFT = 1 - - # When customers initiate a hard failover, BigQuery will not wait until all - # committed writes are replicated to the secondary. There can be data loss - # for hard failover. - HARD = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +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 Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +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 Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/Gemfile deleted file mode 100644 index d0e18bc92cd2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-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-bigquery-reservation-v1", path: "../" -else - gem "google-cloud-bigquery-reservation-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-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.rb deleted file mode 100644 index 521034bd4bbb..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_assignment.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 bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_assignment. -# -def create_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new - - # Call the create_assignment method. - result = client.create_assignment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.rb deleted file mode 100644 index 009f27435599..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment. -# -def create_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new - - # Call the create_capacity_commitment method. - result = client.create_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.rb deleted file mode 100644 index 085d3fc69e50..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation.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 bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_reservation. -# -def create_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new - - # Call the create_reservation method. - result = client.create_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb deleted file mode 100644 index bce27da2456d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/create_reservation_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the create_reservation_group call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group. -# -def create_reservation_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new - - # Call the create_reservation_group method. - result = client.create_reservation_group request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.rb deleted file mode 100644 index bcd9a3be93fc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_assignment.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 bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment. -# -def delete_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new - - # Call the delete_assignment method. - result = client.delete_assignment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.rb deleted file mode 100644 index b0c78a4fd165..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment. -# -def delete_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new - - # Call the delete_capacity_commitment method. - result = client.delete_capacity_commitment request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.rb deleted file mode 100644 index d8bac2d9baf1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation.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 bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation. -# -def delete_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new - - # Call the delete_reservation method. - result = client.delete_reservation request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb deleted file mode 100644 index fe6838172e60..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/delete_reservation_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the delete_reservation_group call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group. -# -def delete_reservation_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new - - # Call the delete_reservation_group method. - result = client.delete_reservation_group request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.rb deleted file mode 100644 index 80443f502d44..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/failover_reservation.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 bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the failover_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation. -# -def failover_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new - - # Call the failover_reservation method. - result = client.failover_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.rb deleted file mode 100644 index 2b549c493903..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_bi_reservation.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 bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_bi_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation. -# -def get_bi_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new - - # Call the get_bi_reservation method. - result = client.get_bi_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.rb deleted file mode 100644 index bf907ad51799..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment. -# -def get_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new - - # Call the get_capacity_commitment method. - result = client.get_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb deleted file mode 100644 index e3861739e77e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_iam_policy call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.rb deleted file mode 100644 index accd2421609b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation.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 bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_reservation. -# -def get_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new - - # Call the get_reservation method. - result = client.get_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb deleted file mode 100644 index 0c3d3ef808b9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/get_reservation_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the get_reservation_group call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group. -# -def get_reservation_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new - - # Call the get_reservation_group method. - result = client.get_reservation_group request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.rb deleted file mode 100644 index f1f669f1ff95..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_assignments.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 bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_assignments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_assignments. -# -def list_assignments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.new - - # Call the list_assignments method. - result = client.list_assignments 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::Bigquery::Reservation::V1::Assignment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.rb deleted file mode 100644 index bcfb6bd8ea92..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_capacity_commitments.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 bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_capacity_commitments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments. -# -def list_capacity_commitments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.new - - # Call the list_capacity_commitments method. - result = client.list_capacity_commitments 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::Bigquery::Reservation::V1::CapacityCommitment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb deleted file mode 100644 index f06ea8557380..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservation_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_reservation_groups call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups. -# -def list_reservation_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.new - - # Call the list_reservation_groups method. - result = client.list_reservation_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.rb deleted file mode 100644 index a33941e64425..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/list_reservations.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 bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the list_reservations call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#list_reservations. -# -def list_reservations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.new - - # Call the list_reservations method. - result = client.list_reservations 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::Bigquery::Reservation::V1::Reservation. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_ListReservations_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.rb deleted file mode 100644 index e613421e5c07..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/merge_capacity_commitments.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 bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the merge_capacity_commitments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments. -# -def merge_capacity_commitments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new - - # Call the merge_capacity_commitments method. - result = client.merge_capacity_commitments request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.rb deleted file mode 100644 index bfde018b1dbe..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/move_assignment.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 bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the move_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#move_assignment. -# -def move_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new - - # Call the move_assignment method. - result = client.move_assignment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.rb deleted file mode 100644 index b44239d089c1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_all_assignments.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 bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the search_all_assignments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments. -# -def search_all_assignments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new - - # Call the search_all_assignments method. - result = client.search_all_assignments 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::Bigquery::Reservation::V1::Assignment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.rb deleted file mode 100644 index de534b544c70..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/search_assignments.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 bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the search_assignments call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#search_assignments. -# -def search_assignments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new - - # Call the search_assignments method. - result = client.search_assignments 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::Bigquery::Reservation::V1::Assignment. - p item - end -end -# [END bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb deleted file mode 100644 index 87068c26b062..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the set_iam_policy call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.rb deleted file mode 100644 index d162341ed27b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/split_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the split_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment. -# -def split_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new - - # Call the split_capacity_commitment method. - result = client.split_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.rb deleted file mode 100644 index a178dceda953..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/test_iam_permissions.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 bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the test_iam_permissions call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.rb deleted file mode 100644 index 6f60f2e93e93..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_assignment.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 bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_assignment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_assignment. -# -def update_assignment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new - - # Call the update_assignment method. - result = client.update_assignment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Assignment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.rb deleted file mode 100644 index c3b37b5568d5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_bi_reservation.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 bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_bi_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation. -# -def update_bi_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new - - # Call the update_bi_reservation method. - result = client.update_bi_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::BiReservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.rb deleted file mode 100644 index 47aea627cc66..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_capacity_commitment.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 bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_capacity_commitment call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment. -# -def update_capacity_commitment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new - - # Call the update_capacity_commitment method. - result = client.update_capacity_commitment request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.rb deleted file mode 100644 index a607011a6c50..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/reservation_service/update_reservation.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 bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] -require "google/cloud/bigquery/reservation/v1" - -## -# Snippet for the update_reservation call in the ReservationService 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::Bigquery::Reservation::V1::ReservationService::Client#update_reservation. -# -def update_reservation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new - - # Call the update_reservation method. - result = client.update_reservation request - - # The returned object is of type Google::Cloud::Bigquery::Reservation::V1::Reservation. - p result -end -# [END bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json b/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json deleted file mode 100644 index 9c975b868826..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/snippets/snippet_metadata_google.cloud.bigquery.reservation.v1.json +++ /dev/null @@ -1,1175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-reservation-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.reservation.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservation_sync", - "title": "Snippet for the create_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation.", - "file": "reservation_service/create_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservations_sync", - "title": "Snippet for the list_reservations call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations.", - "file": "reservation_service/list_reservations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reservations", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListReservations", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservations", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservation_sync", - "title": "Snippet for the get_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation.", - "file": "reservation_service/get_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservation_sync", - "title": "Snippet for the delete_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation.", - "file": "reservation_service/delete_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateReservation_sync", - "title": "Snippet for the update_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation.", - "file": "reservation_service/update_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_FailoverReservation_sync", - "title": "Snippet for the failover_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation.", - "file": "reservation_service/failover_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "failover_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#failover_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Reservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "FailoverReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.FailoverReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateCapacityCommitment_sync", - "title": "Snippet for the create_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment.", - "file": "reservation_service/create_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListCapacityCommitments_sync", - "title": "Snippet for the list_capacity_commitments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments.", - "file": "reservation_service/list_capacity_commitments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_capacity_commitments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_capacity_commitments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListCapacityCommitments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListCapacityCommitments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetCapacityCommitment_sync", - "title": "Snippet for the get_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment.", - "file": "reservation_service/get_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteCapacityCommitment_sync", - "title": "Snippet for the delete_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment.", - "file": "reservation_service/delete_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateCapacityCommitment_sync", - "title": "Snippet for the update_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment.", - "file": "reservation_service/update_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SplitCapacityCommitment_sync", - "title": "Snippet for the split_capacity_commitment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment.", - "file": "reservation_service/split_capacity_commitment.rb", - "language": "RUBY", - "client_method": { - "short_name": "split_capacity_commitment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#split_capacity_commitment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SplitCapacityCommitment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SplitCapacityCommitment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_MergeCapacityCommitments_sync", - "title": "Snippet for the merge_capacity_commitments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments.", - "file": "reservation_service/merge_capacity_commitments.rb", - "language": "RUBY", - "client_method": { - "short_name": "merge_capacity_commitments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#merge_capacity_commitments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "MergeCapacityCommitments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MergeCapacityCommitments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateAssignment_sync", - "title": "Snippet for the create_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment.", - "file": "reservation_service/create_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListAssignments_sync", - "title": "Snippet for the list_assignments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments.", - "file": "reservation_service/list_assignments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_assignments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_assignments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListAssignments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListAssignments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteAssignment_sync", - "title": "Snippet for the delete_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment.", - "file": "reservation_service/delete_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAssignments_sync", - "title": "Snippet for the search_assignments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments.", - "file": "reservation_service/search_assignments.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_assignments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_assignments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SearchAssignments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAssignments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SearchAllAssignments_sync", - "title": "Snippet for the search_all_assignments call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments.", - "file": "reservation_service/search_all_assignments.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_all_assignments", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#search_all_assignments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SearchAllAssignments", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SearchAllAssignments", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_MoveAssignment_sync", - "title": "Snippet for the move_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment.", - "file": "reservation_service/move_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "move_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#move_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "MoveAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.MoveAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateAssignment_sync", - "title": "Snippet for the update_assignment call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment.", - "file": "reservation_service/update_assignment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_assignment", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_assignment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::Assignment", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateAssignment", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateAssignment", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetBiReservation_sync", - "title": "Snippet for the get_bi_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation.", - "file": "reservation_service/get_bi_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_bi_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_bi_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetBiReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetBiReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_UpdateBiReservation_sync", - "title": "Snippet for the update_bi_reservation call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation.", - "file": "reservation_service/update_bi_reservation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_bi_reservation", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#update_bi_reservation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::BiReservation", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "UpdateBiReservation", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.UpdateBiReservation", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy.", - "file": "reservation_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetIamPolicy", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy.", - "file": "reservation_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.SetIamPolicy", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions.", - "file": "reservation_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.TestIamPermissions", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_CreateReservationGroup_sync", - "title": "Snippet for the create_reservation_group call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group.", - "file": "reservation_service/create_reservation_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reservation_group", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#create_reservation_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "CreateReservationGroup", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.CreateReservationGroup", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_GetReservationGroup_sync", - "title": "Snippet for the get_reservation_group call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group.", - "file": "reservation_service/get_reservation_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reservation_group", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#get_reservation_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "GetReservationGroup", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.GetReservationGroup", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_DeleteReservationGroup_sync", - "title": "Snippet for the delete_reservation_group call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group.", - "file": "reservation_service/delete_reservation_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_reservation_group", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#delete_reservation_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "DeleteReservationGroup", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.DeleteReservationGroup", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigqueryreservation_v1_generated_ReservationService_ListReservationGroups_sync", - "title": "Snippet for the list_reservation_groups call in the ReservationService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups.", - "file": "reservation_service/list_reservation_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reservation_groups", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client#list_reservation_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse", - "client": { - "short_name": "ReservationService::Client", - "full_name": "::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client" - }, - "method": { - "short_name": "ListReservationGroups", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService.ListReservationGroups", - "service": { - "short_name": "ReservationService", - "full_name": "google.cloud.bigquery.reservation.v1.ReservationService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb deleted file mode 100644 index f56e3454b155..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_paths_test.rb +++ /dev/null @@ -1,115 +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/bigquery/reservation/v1/reservation_service" - -class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_assignment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.assignment_path project: "value0", location: "value1", reservation: "value2", assignment: "value3" - assert_equal "projects/value0/locations/value1/reservations/value2/assignments/value3", path - end - end - - def test_bi_reservation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.bi_reservation_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/biReservation", path - end - end - - def test_capacity_commitment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.capacity_commitment_path project: "value0", location: "value1", capacity_commitment: "value2" - assert_equal "projects/value0/locations/value1/capacityCommitments/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::Bigquery::Reservation::V1::ReservationService::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_reservation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reservation_path project: "value0", location: "value1", reservation: "value2" - assert_equal "projects/value0/locations/value1/reservations/value2", path - end - end - - def test_reservation_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reservation_group_path project: "value0", location: "value1", reservation_group: "value2" - assert_equal "projects/value0/locations/value1/reservationGroups/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb deleted file mode 100644 index 21f817016c51..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_rest_test.rb +++ /dev/null @@ -1,1703 +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/bigquery/reservation/v1/reservation_pb" -require "google/cloud/bigquery/reservation/v1/reservation_service/rest" - - -class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_create_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reservation_id = "hello world" - reservation = {} - - create_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reservation_client_stub.call_count - end - end - end - - def test_list_reservations - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.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_reservations_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reservations_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_reservations({ 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_reservations 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_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations({ 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_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations_client_stub.call_count - end - end - end - - def test_get_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_reservation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_reservation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_reservation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reservation_client_stub.call_count - end - end - end - - def test_delete_reservation - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_reservation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_reservation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_reservation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_reservation_client_stub.call_count - end - end - end - - def test_update_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - reservation = {} - update_mask = {} - - update_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_reservation({ reservation: reservation, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_reservation reservation: reservation, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_reservation({ reservation: reservation, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_reservation_client_stub.call_count - end - end - end - - def test_failover_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - failover_mode = :FAILOVER_MODE_UNSPECIFIED - - failover_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_failover_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, failover_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.failover_reservation({ name: name, failover_mode: failover_mode }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.failover_reservation name: name, failover_mode: failover_mode do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.failover_reservation({ name: name, failover_mode: failover_mode }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, failover_reservation_client_stub.call_count - end - end - end - - def test_create_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - capacity_commitment = {} - enforce_single_admin_project_per_org = true - capacity_commitment_id = "hello world" - - create_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_capacity_commitment_client_stub.call_count - end - end - end - - def test_list_capacity_commitments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.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_capacity_commitments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_capacity_commitments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_capacity_commitments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_capacity_commitments({ 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_capacity_commitments 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_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments({ 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_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments_client_stub.call_count - end - end - end - - def test_get_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_capacity_commitment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_capacity_commitment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_capacity_commitment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_capacity_commitment_client_stub.call_count - end - end - end - - def test_delete_capacity_commitment - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_capacity_commitment({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_capacity_commitment name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_capacity_commitment({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_capacity_commitment_client_stub.call_count - end - end - end - - def test_update_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - capacity_commitment = {} - update_mask = {} - - update_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_capacity_commitment_client_stub.call_count - end - end - end - - def test_split_capacity_commitment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - slot_count = 42 - - split_capacity_commitment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_split_capacity_commitment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, split_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.split_capacity_commitment({ name: name, slot_count: slot_count }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.split_capacity_commitment name: name, slot_count: slot_count do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.split_capacity_commitment({ name: name, slot_count: slot_count }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, split_capacity_commitment_client_stub.call_count - end - end - end - - def test_merge_capacity_commitments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - capacity_commitment_ids = ["hello world"] - capacity_commitment_id = "hello world" - - merge_capacity_commitments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_merge_capacity_commitments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, merge_capacity_commitments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, merge_capacity_commitments_client_stub.call_count - end - end - end - - def test_create_assignment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - assignment = {} - assignment_id = "hello world" - - create_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_assignment_client_stub.call_count - end - end - end - - def test_list_assignments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.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_assignments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_assignments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_assignments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_assignments({ 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_assignments 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_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments({ 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_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments_client_stub.call_count - end - end - end - - def test_delete_assignment - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_assignment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_assignment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_assignment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_assignment_client_stub.call_count - end - end - end - - def test_search_assignments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_assignments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_assignments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_assignments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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.search_assignments({ parent: parent, query: query, 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.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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, search_assignments_client_stub.call_count - end - end - end - - def test_search_all_assignments - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_all_assignments_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_search_all_assignments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_all_assignments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_all_assignments({ parent: parent, query: query, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_all_assignments parent: parent, query: query, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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.search_all_assignments({ parent: parent, query: query, 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.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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, search_all_assignments_client_stub.call_count - end - end - end - - def test_move_assignment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - destination_id = "hello world" - assignment_id = "hello world" - - move_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_move_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, move_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, move_assignment_client_stub.call_count - end - end - end - - def test_update_assignment - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - assignment = {} - update_mask = {} - - update_assignment_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_assignment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_assignment({ assignment: assignment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_assignment assignment: assignment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_assignment({ assignment: assignment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_assignment_client_stub.call_count - end - end - end - - def test_get_bi_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_bi_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_bi_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_bi_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_bi_reservation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_bi_reservation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_bi_reservation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_bi_reservation_client_stub.call_count - end - end - end - - def test_update_bi_reservation - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - bi_reservation = {} - update_mask = {} - - update_bi_reservation_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_update_bi_reservation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_bi_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_bi_reservation_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_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::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_create_reservation_group - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reservation_group_id = "hello world" - reservation_group = {} - - create_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_create_reservation_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reservation_group_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reservation_group_client_stub.call_count - end - end - end - - def test_get_reservation_group - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_get_reservation_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reservation_group_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_reservation_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_reservation_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_reservation_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reservation_group_client_stub.call_count - end - end - end - - def test_delete_reservation_group - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_reservation_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_delete_reservation_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_reservation_group_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_reservation_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_reservation_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_reservation_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_reservation_group_client_stub.call_count - end - end - end - - def test_list_reservation_groups - # Create test objects. - client_result = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.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_reservation_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::ServiceStub.stub :transcode_list_reservation_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reservation_groups_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb deleted file mode 100644 index 89c81559cdec..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/google/cloud/bigquery/reservation/v1/reservation_service_test.rb +++ /dev/null @@ -1,1892 +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/bigquery/reservation/v1/reservation_pb" -require "google/cloud/bigquery/reservation/v1/reservation_service" - -class ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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_create_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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" - reservation_id = "hello world" - reservation = {} - - create_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["reservation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_reservation parent: parent, reservation_id: reservation_id, reservation: reservation do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_reservation ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_reservation({ parent: parent, reservation_id: reservation_id, reservation: reservation }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_reservation(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationRequest.new(parent: parent, reservation_id: reservation_id, reservation: reservation), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reservation_client_stub.call_rpc_count - end - end - - def test_list_reservations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsResponse.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_reservations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reservations, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest, 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_reservations_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_reservations({ 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_reservations 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_reservations ::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations({ 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_reservations(::Google::Cloud::Bigquery::Reservation::V1::ListReservationsRequest.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_reservations_client_stub.call_rpc_count - end - end - - def test_get_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_reservation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_reservation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_reservation({ 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_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetReservationRequest.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_reservation_client_stub.call_rpc_count - end - end - - def test_delete_reservation - # 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_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_reservation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_reservation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_reservation ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_reservation({ 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_reservation(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationRequest.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_reservation_client_stub.call_rpc_count - end - end - - def test_update_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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. - reservation = {} - update_mask = {} - - update_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Reservation), request["reservation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_reservation({ reservation: reservation, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_reservation reservation: reservation, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_reservation({ reservation: reservation, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateReservationRequest.new(reservation: reservation, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_reservation_client_stub.call_rpc_count - end - end - - def test_failover_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Reservation.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" - failover_mode = :FAILOVER_MODE_UNSPECIFIED - - failover_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :failover_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest, request - assert_equal "hello world", request["name"] - assert_equal :FAILOVER_MODE_UNSPECIFIED, request["failover_mode"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, failover_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.failover_reservation({ name: name, failover_mode: failover_mode }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.failover_reservation name: name, failover_mode: failover_mode do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.failover_reservation ::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.failover_reservation({ name: name, failover_mode: failover_mode }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.failover_reservation(::Google::Cloud::Bigquery::Reservation::V1::FailoverReservationRequest.new(name: name, failover_mode: failover_mode), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, failover_reservation_client_stub.call_rpc_count - end - end - - def test_create_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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" - capacity_commitment = {} - enforce_single_admin_project_per_org = true - capacity_commitment_id = "hello world" - - create_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] - assert_equal true, request["enforce_single_admin_project_per_org"] - assert_equal "hello world", request["capacity_commitment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_capacity_commitment parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_capacity_commitment({ parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::CreateCapacityCommitmentRequest.new(parent: parent, capacity_commitment: capacity_commitment, enforce_single_admin_project_per_org: enforce_single_admin_project_per_org, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_list_capacity_commitments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsResponse.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_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_capacity_commitments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest, 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_capacity_commitments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_capacity_commitments({ 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_capacity_commitments 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_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments({ 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_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::ListCapacityCommitmentsRequest.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_capacity_commitments_client_stub.call_rpc_count - end - end - - def test_get_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_capacity_commitment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_capacity_commitment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_capacity_commitment({ 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_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::GetCapacityCommitmentRequest.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_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_delete_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_capacity_commitment({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_capacity_commitment name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_capacity_commitment({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::DeleteCapacityCommitmentRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_update_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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. - capacity_commitment = {} - update_mask = {} - - update_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment), request["capacity_commitment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_capacity_commitment capacity_commitment: capacity_commitment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_capacity_commitment({ capacity_commitment: capacity_commitment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::UpdateCapacityCommitmentRequest.new(capacity_commitment: capacity_commitment, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_split_capacity_commitment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentResponse.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" - slot_count = 42 - - split_capacity_commitment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :split_capacity_commitment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["slot_count"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, split_capacity_commitment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.split_capacity_commitment({ name: name, slot_count: slot_count }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.split_capacity_commitment name: name, slot_count: slot_count do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.split_capacity_commitment ::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.split_capacity_commitment({ name: name, slot_count: slot_count }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.split_capacity_commitment(::Google::Cloud::Bigquery::Reservation::V1::SplitCapacityCommitmentRequest.new(name: name, slot_count: slot_count), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, split_capacity_commitment_client_stub.call_rpc_count - end - end - - def test_merge_capacity_commitments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::CapacityCommitment.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" - capacity_commitment_ids = ["hello world"] - capacity_commitment_id = "hello world" - - merge_capacity_commitments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :merge_capacity_commitments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["capacity_commitment_ids"] - assert_equal "hello world", request["capacity_commitment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, merge_capacity_commitments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.merge_capacity_commitments parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.merge_capacity_commitments ::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.merge_capacity_commitments({ parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.merge_capacity_commitments(::Google::Cloud::Bigquery::Reservation::V1::MergeCapacityCommitmentsRequest.new(parent: parent, capacity_commitment_ids: capacity_commitment_ids, capacity_commitment_id: capacity_commitment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, merge_capacity_commitments_client_stub.call_rpc_count - end - end - - def test_create_assignment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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" - assignment = {} - assignment_id = "hello world" - - create_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] - assert_equal "hello world", request["assignment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_assignment parent: parent, assignment: assignment, assignment_id: assignment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_assignment ::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_assignment({ parent: parent, assignment: assignment, assignment_id: assignment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_assignment(::Google::Cloud::Bigquery::Reservation::V1::CreateAssignmentRequest.new(parent: parent, assignment: assignment, assignment_id: assignment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_assignment_client_stub.call_rpc_count - end - end - - def test_list_assignments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsResponse.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_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_assignments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest, 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_assignments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_assignments({ 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_assignments 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_assignments ::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments({ 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_assignments(::Google::Cloud::Bigquery::Reservation::V1::ListAssignmentsRequest.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_assignments_client_stub.call_rpc_count - end - end - - def test_delete_assignment - # 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_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_assignment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_assignment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_assignment ::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_assignment({ 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_assignment(::Google::Cloud::Bigquery::Reservation::V1::DeleteAssignmentRequest.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_assignment_client_stub.call_rpc_count - end - end - - def test_search_assignments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsResponse.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" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_assignments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_assignments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_assignments({ parent: parent, query: query, 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.search_assignments parent: parent, query: query, 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.search_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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.search_assignments({ parent: parent, query: query, 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.search_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAssignmentsRequest.new(parent: parent, query: query, 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, search_assignments_client_stub.call_rpc_count - end - end - - def test_search_all_assignments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsResponse.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" - query = "hello world" - page_size = 42 - page_token = "hello world" - - search_all_assignments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_all_assignments, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["query"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_all_assignments_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_all_assignments({ parent: parent, query: query, 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.search_all_assignments parent: parent, query: query, 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.search_all_assignments ::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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.search_all_assignments({ parent: parent, query: query, 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.search_all_assignments(::Google::Cloud::Bigquery::Reservation::V1::SearchAllAssignmentsRequest.new(parent: parent, query: query, 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, search_all_assignments_client_stub.call_rpc_count - end - end - - def test_move_assignment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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" - destination_id = "hello world" - assignment_id = "hello world" - - move_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :move_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["destination_id"] - assert_equal "hello world", request["assignment_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, move_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.move_assignment name: name, destination_id: destination_id, assignment_id: assignment_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.move_assignment ::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.move_assignment({ name: name, destination_id: destination_id, assignment_id: assignment_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.move_assignment(::Google::Cloud::Bigquery::Reservation::V1::MoveAssignmentRequest.new(name: name, destination_id: destination_id, assignment_id: assignment_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, move_assignment_client_stub.call_rpc_count - end - end - - def test_update_assignment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::Assignment.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. - assignment = {} - update_mask = {} - - update_assignment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_assignment, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::Assignment), request["assignment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_assignment_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_assignment({ assignment: assignment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_assignment assignment: assignment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_assignment ::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_assignment({ assignment: assignment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_assignment(::Google::Cloud::Bigquery::Reservation::V1::UpdateAssignmentRequest.new(assignment: assignment, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_assignment_client_stub.call_rpc_count - end - end - - def test_get_bi_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_bi_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_bi_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_bi_reservation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_bi_reservation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_bi_reservation({ 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_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::GetBiReservationRequest.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_bi_reservation_client_stub.call_rpc_count - end - end - - def test_update_bi_reservation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::BiReservation.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. - bi_reservation = {} - update_mask = {} - - update_bi_reservation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_bi_reservation, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::BiReservation), request["bi_reservation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_bi_reservation_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_bi_reservation bi_reservation: bi_reservation, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_bi_reservation ::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_bi_reservation({ bi_reservation: bi_reservation, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_bi_reservation(::Google::Cloud::Bigquery::Reservation::V1::UpdateBiReservationRequest.new(bi_reservation: bi_reservation, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_bi_reservation_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_create_reservation_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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" - reservation_group_id = "hello world" - reservation_group = {} - - create_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reservation_group, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["reservation_group_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup), request["reservation_group"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reservation_group_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_reservation_group parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_reservation_group({ parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::CreateReservationGroupRequest.new(parent: parent, reservation_group_id: reservation_group_id, reservation_group: reservation_group), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reservation_group_client_stub.call_rpc_count - end - end - - def test_get_reservation_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ReservationGroup.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_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reservation_group, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reservation_group_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_reservation_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_reservation_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_reservation_group({ 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_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::GetReservationGroupRequest.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_reservation_group_client_stub.call_rpc_count - end - end - - def test_delete_reservation_group - # 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_reservation_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_reservation_group, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_reservation_group_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_reservation_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_reservation_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_reservation_group ::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_reservation_group({ 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_reservation_group(::Google::Cloud::Bigquery::Reservation::V1::DeleteReservationGroupRequest.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_reservation_group_client_stub.call_rpc_count - end - end - - def test_list_reservation_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsResponse.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_reservation_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reservation_groups, name - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest, 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_reservation_groups_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_reservation_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_reservation_groups ::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_reservation_groups(::Google::Cloud::Bigquery::Reservation::V1::ListReservationGroupsRequest.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_reservation_groups_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::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::Bigquery::Reservation::V1::ReservationService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Reservation::V1::ReservationService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-reservation-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore b/owl-bot-staging/google-cloud-bigquery-storage-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json deleted file mode 100644 index 8cb93992c598..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigquerystorage.googleapis.com", - "api_shortname": "bigquerystorage", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest", - "distribution_name": "google-cloud-bigquery-storage-v1", - "is_cloud": true, - "language": "ruby", - "name": "bigquerystorage", - "name_pretty": "BigQuery Storage V1 API", - "product_documentation": "https://cloud.google.com/bigquery/docs/reference/storage", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BIGQUERY_STORAGE", - "ruby-cloud-product-url": "https://cloud.google.com/bigquery/docs/reference/storage", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml b/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml deleted file mode 100644 index bb0c68b12d1c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigquery-storage-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-bigquery-storage-v1.rb" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/.yardopts b/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts deleted file mode 100644 index 1a833c85dd93..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="BigQuery Storage 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-bigquery-storage-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md deleted file mode 100644 index 8f8f40a73a32..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigquery-storage-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-bigquery-storage-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/bigquery/storage/v1" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigquery/storage/v1" - -::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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-bigquery-storage-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/bigquery/storage/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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-bigquery-storage-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md deleted file mode 100644 index a4e83ff627c2..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the BigQuery Storage V1 API - -API Client library for the BigQuery Storage V1 API - -The BigQuery Storage API provides fast access to BigQuery managed storage. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the BigQuery Storage V1 API. Most users should consider using -the main client gem, -[google-cloud-bigquery-storage](https://rubygems.org/gems/google-cloud-bigquery-storage). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigquery-storage-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/bigquerystorage.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigquery/storage/v1" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new -request = ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new # (request fields as keyword arguments...) -response = client.create_read_session request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigquery-storage-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigquery/docs/reference/storage) -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/bigquery/storage/v1" -require "logger" - -client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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-bigquery-storage`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigquery-storage-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-bigquery-storage`. -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-bigquery-storage-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-bigquery-storage-v1/Rakefile b/owl-bot-staging/google-cloud-bigquery-storage-v1/Rakefile deleted file mode 100644 index 6b7aba3e8219..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BIGQUERY_STORAGE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BIGQUERY_STORAGE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BIGQUERY_STORAGE_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 BIGQUERY_STORAGE_TEST_PROJECT=test123 BIGQUERY_STORAGE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigquery/storage/v1/big_query_read/credentials" - ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BIGQUERY_STORAGE_PROJECT"] = project - ENV["BIGQUERY_STORAGE_TEST_PROJECT"] = project - ENV["BIGQUERY_STORAGE_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-bigquery-storage-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-bigquery-storage-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-bigquery-storage-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-bigquery-storage-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigquery-storage-v1" - header "google-cloud-bigquery-storage-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigquery-storage-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigquery-storage-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-bigquery-storage-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-bigquery-storage-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-bigquery-storage-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json deleted file mode 100644 index 0de72ac153d4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/gapic_metadata.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.bigquery.storage.v1", - "libraryPackage": "::Google::Cloud::Bigquery::Storage::V1", - "services": { - "BigQueryRead": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client", - "rpcs": { - "CreateReadSession": { - "methods": [ - "create_read_session" - ] - }, - "ReadRows": { - "methods": [ - "read_rows" - ] - }, - "SplitReadStream": { - "methods": [ - "split_read_stream" - ] - } - } - } - } - }, - "BigQueryWrite": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client", - "rpcs": { - "CreateWriteStream": { - "methods": [ - "create_write_stream" - ] - }, - "AppendRows": { - "methods": [ - "append_rows" - ] - }, - "GetWriteStream": { - "methods": [ - "get_write_stream" - ] - }, - "FinalizeWriteStream": { - "methods": [ - "finalize_write_stream" - ] - }, - "BatchCommitWriteStreams": { - "methods": [ - "batch_commit_write_streams" - ] - }, - "FlushRows": { - "methods": [ - "flush_rows" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec b/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec deleted file mode 100644 index 176e51102b6d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/google-cloud-bigquery-storage-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigquery/storage/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigquery-storage-v1" - gem.version = Google::Cloud::Bigquery::Storage::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The BigQuery Storage API provides fast access to BigQuery managed storage. Note that google-cloud-bigquery-storage-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigquery-storage instead. See the readme for more details." - gem.summary = "API Client library for the BigQuery Storage 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-v1.rb deleted file mode 100644 index 78e6f6aa0b72..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google-cloud-bigquery-storage-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/bigquery/storage/v1" diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb deleted file mode 100644 index 7275f890346f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigquery/storage/v1/big_query_read" -require "google/cloud/bigquery/storage/v1/big_query_write" -require "google/cloud/bigquery/storage/v1/version" - -module Google - module Cloud - module Bigquery - module Storage - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigquery/storage/v1" - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/bigquery/storage/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb deleted file mode 100644 index edcabf45ec84..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/annotations_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/annotations.proto - -require 'google/protobuf' - -require 'google/protobuf/descriptor_pb' - - -descriptor_data = "\n2google/cloud/bigquery/storage/v1/annotations.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto:9\n\x0b\x63olumn_name\x12\x1d.google.protobuf.FieldOptions\x18\xb5\xc3\xf7\xd8\x01 \x01(\t\x88\x01\x01\x42\xc0\x01\n$com.google.cloud.bigquery.storage.v1B\x10\x41nnotationsProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb deleted file mode 100644 index 049c42b43216..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/arrow_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/arrow.proto - -require 'google/protobuf' - - -descriptor_data = "\n,google/cloud/bigquery/storage/v1/arrow.proto\x12 google.cloud.bigquery.storage.v1\"(\n\x0b\x41rrowSchema\x12\x19\n\x11serialized_schema\x18\x01 \x01(\x0c\"J\n\x10\x41rrowRecordBatch\x12\x1f\n\x17serialized_record_batch\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xec\x03\n\x19\x41rrowSerializationOptions\x12h\n\x12\x62uffer_compression\x18\x02 \x01(\x0e\x32L.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec\x12v\n\x19picos_timestamp_precision\x18\x03 \x01(\x0e\x32S.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision\"H\n\x10\x43ompressionCodec\x12\x1b\n\x17\x43OMPRESSION_UNSPECIFIED\x10\x00\x12\r\n\tLZ4_FRAME\x10\x01\x12\x08\n\x04ZSTD\x10\x02\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nArrowProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ArrowSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSchema").msgclass - ArrowRecordBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowRecordBatch").msgclass - ArrowSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions").msgclass - ArrowSerializationOptions::CompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec").enummodule - ArrowSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb deleted file mode 100644 index bc982922603b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/avro_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/avro.proto - -require 'google/protobuf' - - -descriptor_data = "\n+google/cloud/bigquery/storage/v1/avro.proto\x12 google.cloud.bigquery.storage.v1\"\x1c\n\nAvroSchema\x12\x0e\n\x06schema\x18\x01 \x01(\t\"A\n\x08\x41vroRows\x12\x1e\n\x16serialized_binary_rows\x18\x01 \x01(\x0c\x12\x15\n\trow_count\x18\x02 \x01(\x03\x42\x02\x18\x01\"\xdd\x02\n\x18\x41vroSerializationOptions\x12%\n\x1d\x65nable_display_name_attribute\x18\x01 \x01(\x08\x12u\n\x19picos_timestamp_precision\x18\x02 \x01(\x0e\x32R.google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision\"\xa2\x01\n\x17PicosTimestampPrecision\x12)\n%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1e\n\x1aTIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1d\n\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1d\n\x19TIMESTAMP_PRECISION_PICOS\x10\x03\x42\xb9\x01\n$com.google.cloud.bigquery.storage.v1B\tAvroProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - AvroSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSchema").msgclass - AvroRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroRows").msgclass - AvroSerializationOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions").msgclass - AvroSerializationOptions::PicosTimestampPrecision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb deleted file mode 100644 index a3ea0d4c2ac9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/storage/v1/version" - -require "google/cloud/bigquery/storage/v1/big_query_read/credentials" -require "google/cloud/bigquery/storage/v1/big_query_read/paths" -require "google/cloud/bigquery/storage/v1/big_query_read/client" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ## - # BigQuery Read API. - # - # The Read API can be used to read data from BigQuery. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/storage/v1/big_query_read" - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - module BigQueryRead - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "big_query_read", "helpers.rb" -require "google/cloud/bigquery/storage/v1/big_query_read/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb deleted file mode 100644 index be9b5072efaf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/client.rb +++ /dev/null @@ -1,750 +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/bigquery/storage/v1/storage_pb" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryRead - ## - # Client for the BigQueryRead service. - # - # BigQuery Read API. - # - # The Read API can be used to read data from BigQuery. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :big_query_read_stub - - ## - # Configure the BigQueryRead Client class. - # - # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BigQueryRead clients - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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", "Bigquery", "Storage", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_read_session.timeout = 600.0 - default_config.rpcs.create_read_session.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.read_rows.timeout = 86_400.0 - default_config.rpcs.read_rows.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.split_read_stream.timeout = 600.0 - default_config.rpcs.split_read_stream.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::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 - @big_query_read_stub.universe_domain - end - - ## - # Create a new BigQueryRead client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BigQueryRead 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/bigquery/storage/v1/storage_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 - - @big_query_read_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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 - ) - - @big_query_read_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @big_query_read_stub.logger - end - - # Service calls - - ## - # Creates a new read session. A read session divides the contents of a - # BigQuery table into one or more streams, which can then be used to read - # data from the table. The read session also specifies properties of the - # data to be read, such as a list of columns or a push-down filter describing - # the rows to be returned. - # - # A particular row can be read by at most one stream. When the caller has - # reached the end of each stream in the session, then all the data in the - # table has been read. - # - # Data is assigned to each stream such that roughly the same number of - # rows can be read from each stream. Because the server-side unit for - # assigning data is collections of rows, the API does not guarantee that - # each stream will return the same number or rows. Additionally, the - # limits are enforced based on the number of pre-filtered rows, so some - # filters can lead to lopsided assignments. - # - # Read sessions automatically expire 6 hours after they are created and do - # not require manual clean-up by the caller. - # - # @overload create_read_session(request, options = nil) - # Pass arguments to `create_read_session` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_read_session(parent: nil, read_session: nil, max_stream_count: nil, preferred_min_stream_count: nil) - # Pass arguments to `create_read_session` via keyword arguments. Note that at - # least one keyword argument is 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 request project that owns the session, in the form of - # `projects/{project_id}`. - # @param read_session [::Google::Cloud::Bigquery::Storage::V1::ReadSession, ::Hash] - # Required. Session to be created. - # @param max_stream_count [::Integer] - # Max initial number of streams. If unset or zero, the server will - # provide a value of streams so as to produce reasonable throughput. Must be - # non-negative. The number of streams may be lower than the requested number, - # depending on the amount parallelism that is reasonable for the table. - # There is a default system max limit of 1,000. - # - # This must be greater than or equal to preferred_min_stream_count. - # Typically, clients should either leave this unset to let the system to - # determine an upper bound OR set this a size for the maximum "units of work" - # it can gracefully handle. - # @param preferred_min_stream_count [::Integer] - # The minimum preferred stream count. This parameter can be used to inform - # the service that there is a desired lower bound on the number of streams. - # This is typically a target parallelism of the client (e.g. a Spark - # cluster with N-workers would set this to a low multiple of N to ensure - # good cluster utilization). - # - # The system will make a best effort to provide at least this number of - # streams, but in some cases might provide less. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::ReadSession] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new - # - # # Call the create_read_session method. - # result = client.create_read_session request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. - # p result - # - def create_read_session request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest - - # Converts hash 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_read_session.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::Bigquery::Storage::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.read_session&.table - header_params["read_session.table"] = request.read_session.table - 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_read_session.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_read_session.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_read_stub.call_rpc :create_read_session, 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 - - ## - # Reads rows from the stream in the format prescribed by the ReadSession. - # Each response contains one or more table rows, up to a maximum of 128 MB - # per response; read requests which attempt to read individual rows larger - # than 128 MB will fail. - # - # Each request also returns a set of stream statistics reflecting the current - # state of the stream. - # - # @overload read_rows(request, options = nil) - # Pass arguments to `read_rows` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload read_rows(read_stream: nil, offset: nil) - # Pass arguments to `read_rows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param read_stream [::String] - # Required. Stream to read rows from. - # @param offset [::Integer] - # The offset requested must be less than the last row read from Read. - # Requesting a larger offset is undefined. If not specified, start reading - # from offset zero. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new - # - # # Call the read_rows method to start streaming. - # output = client.read_rows request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse - # output.each do |current_response| - # p current_response - # end - # - def read_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest - - # Converts hash 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.read_rows.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::Bigquery::Storage::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.read_stream - header_params["read_stream"] = request.read_stream - 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.read_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.read_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_read_stub.call_rpc :read_rows, 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 - - ## - # Splits a given `ReadStream` into two `ReadStream` objects. These - # `ReadStream` objects are referred to as the primary and the residual - # streams of the split. The original `ReadStream` can still be read from in - # the same manner as before. Both of the returned `ReadStream` objects can - # also be read from, and the rows returned by both child streams will be - # the same as the rows read from the original stream. - # - # Moreover, the two child streams will be allocated back-to-back in the - # original `ReadStream`. Concretely, it is guaranteed that for streams - # original, primary, and residual, that original[0-j] = primary[0-j] and - # original[j-n] = residual[0-m] once the streams have been read to - # completion. - # - # @overload split_read_stream(request, options = nil) - # Pass arguments to `split_read_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload split_read_stream(name: nil, fraction: nil) - # Pass arguments to `split_read_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the stream to split. - # @param fraction [::Float] - # A value in the range (0.0, 1.0) that specifies the fractional point at - # which the original stream should be split. The actual split point is - # evaluated on pre-filtered rows, so if a filter is provided, then there is - # no guarantee that the division of the rows between the new child streams - # will be proportional to this fractional value. Additionally, because the - # server-side unit for assigning data is collections of rows, this fraction - # will always map to a data storage boundary on the server side. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new - # - # # Call the split_read_stream method. - # result = client.split_read_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. - # p result - # - def split_read_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest - - # Converts hash 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.split_read_stream.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::Bigquery::Storage::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.split_read_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.split_read_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_read_stub.call_rpc :split_read_stream, 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 BigQueryRead API. - # - # This class represents the configuration for BigQueryRead, - # 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::Bigquery::Storage::V1::BigQueryRead::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 - # # create_read_session to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_read_session.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_read_session.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::Bigquery::Storage::V1::BigQueryRead::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 = "bigquerystorage.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 BigQueryRead 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 `create_read_session` - # @return [::Gapic::Config::Method] - # - attr_reader :create_read_session - ## - # RPC-specific configuration for `read_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :read_rows - ## - # RPC-specific configuration for `split_read_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :split_read_stream - - # @private - def initialize parent_rpcs = nil - create_read_session_config = parent_rpcs.create_read_session if parent_rpcs.respond_to? :create_read_session - @create_read_session = ::Gapic::Config::Method.new create_read_session_config - read_rows_config = parent_rpcs.read_rows if parent_rpcs.respond_to? :read_rows - @read_rows = ::Gapic::Config::Method.new read_rows_config - split_read_stream_config = parent_rpcs.split_read_stream if parent_rpcs.respond_to? :split_read_stream - @split_read_stream = ::Gapic::Config::Method.new split_read_stream_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.rb deleted file mode 100644 index 4011779342be..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryRead - # Credentials for the BigQueryRead API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BIGQUERY_STORAGE_CREDENTIALS", - "BIGQUERY_STORAGE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGQUERY_STORAGE_CREDENTIALS_JSON", - "BIGQUERY_STORAGE_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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb deleted file mode 100644 index 6d1133365b75..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_read/paths.rb +++ /dev/null @@ -1,108 +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 Bigquery - module Storage - module V1 - module BigQueryRead - # Path helper methods for the BigQueryRead API. - module Paths - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified ReadSession resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sessions/{session}` - # - # @param project [String] - # @param location [String] - # @param session [String] - # - # @return [::String] - def read_session_path project:, location:, session: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sessions/#{session}" - end - - ## - # Create a fully-qualified ReadStream resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sessions/{session}/streams/{stream}` - # - # @param project [String] - # @param location [String] - # @param session [String] - # @param stream [String] - # - # @return [::String] - def read_stream_path project:, location:, session:, stream: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "session cannot contain /" if session.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sessions/#{session}/streams/#{stream}" - end - - ## - # Create a fully-qualified Table resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # - # @return [::String] - def table_path project:, dataset:, table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb deleted file mode 100644 index aeb7c756898f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/bigquery/storage/v1/version" - -require "google/cloud/bigquery/storage/v1/big_query_write/credentials" -require "google/cloud/bigquery/storage/v1/big_query_write/paths" -require "google/cloud/bigquery/storage/v1/big_query_write/client" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ## - # BigQuery Write API. - # - # The Write API can be used to write data to BigQuery. - # - # For supplementary information about the Write API, see: - # https://cloud.google.com/bigquery/docs/write-api - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigquery/storage/v1/big_query_write" - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - module BigQueryWrite - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "big_query_write", "helpers.rb" -require "google/cloud/bigquery/storage/v1/big_query_write/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb deleted file mode 100644 index 3f27679805b4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/client.rb +++ /dev/null @@ -1,1026 +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/bigquery/storage/v1/storage_pb" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryWrite - ## - # Client for the BigQueryWrite service. - # - # BigQuery Write API. - # - # The Write API can be used to write data to BigQuery. - # - # For supplementary information about the Write API, see: - # https://cloud.google.com/bigquery/docs/write-api - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigquerystorage.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :big_query_write_stub - - ## - # Configure the BigQueryWrite Client class. - # - # See {::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BigQueryWrite clients - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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", "Bigquery", "Storage", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_write_stream.timeout = 1200.0 - default_config.rpcs.create_write_stream.retry_policy = { - initial_delay: 10.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.append_rows.timeout = 86_400.0 - default_config.rpcs.append_rows.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_write_stream.timeout = 600.0 - default_config.rpcs.get_write_stream.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.finalize_write_stream.timeout = 600.0 - default_config.rpcs.finalize_write_stream.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.batch_commit_write_streams.timeout = 600.0 - default_config.rpcs.batch_commit_write_streams.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config.rpcs.flush_rows.timeout = 600.0 - default_config.rpcs.flush_rows.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14, 8] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::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 - @big_query_write_stub.universe_domain - end - - ## - # Create a new BigQueryWrite client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BigQueryWrite 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/bigquery/storage/v1/storage_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 - - @big_query_write_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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 - ) - - @big_query_write_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @big_query_write_stub.logger - end - - # Service calls - - ## - # Creates a write stream to the given table. - # Additionally, every table has a special stream named '_default' - # to which data can be written. This stream doesn't need to be created using - # CreateWriteStream. It is a stream that can be used simultaneously by any - # number of clients. Data written to this stream is considered committed as - # soon as an acknowledgement is received. - # - # @overload create_write_stream(request, options = nil) - # Pass arguments to `create_write_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_write_stream(parent: nil, write_stream: nil) - # Pass arguments to `create_write_stream` via keyword arguments. Note that at - # least one keyword argument is 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. Reference to the table to which the stream belongs, in the format - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @param write_stream [::Google::Cloud::Bigquery::Storage::V1::WriteStream, ::Hash] - # Required. Stream to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new - # - # # Call the create_write_stream method. - # result = client.create_write_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - # p result - # - def create_write_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest - - # Converts hash 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_write_stream.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::Bigquery::Storage::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_write_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_write_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :create_write_stream, 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 - - ## - # Appends data to the given stream. - # - # If `offset` is specified, the `offset` is checked against the end of - # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an - # attempt is made to append to an offset beyond the current end of the stream - # or `ALREADY_EXISTS` if user provides an `offset` that has already been - # written to. User can retry with adjusted offset within the same RPC - # connection. If `offset` is not specified, append happens at the end of the - # stream. - # - # The response contains an optional offset at which the append - # happened. No offset information will be returned for appends to a - # default stream. - # - # Responses are received in the same order in which requests are sent. - # There will be one response for each successful inserted request. Responses - # may optionally embed error information if the originating AppendRequest was - # not successfully processed. - # - # The specifics of when successfully appended data is made visible to the - # table are governed by the type of stream: - # - # * For COMMITTED streams (which includes the default stream), data is - # visible immediately upon successful append. - # - # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` - # rpc which advances a cursor to a newer offset in the stream. - # - # * For PENDING streams, data is not made visible until the stream itself is - # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly - # committed via the `BatchCommitWriteStreams` rpc. - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, ::Hash>] - # An enumerable of {::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the append_rows method to start streaming. - # output = client.append_rows input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - # input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse - # output.each do |current_response| - # p current_response - # end - # - def append_rows request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest - end - - # Converts hash 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.append_rows.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::Bigquery::Storage::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.append_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.append_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :append_rows, 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 information about a write stream. - # - # @overload get_write_stream(request, options = nil) - # Pass arguments to `get_write_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_write_stream(name: nil, view: nil) - # Pass arguments to `get_write_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the stream to get, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # @param view [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] - # Indicates whether to get full or partial view of the WriteStream. If - # not set, view returned will be basic. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new - # - # # Call the get_write_stream method. - # result = client.get_write_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - # p result - # - def get_write_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest - - # Converts hash 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_write_stream.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::Bigquery::Storage::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_write_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_write_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :get_write_stream, 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 - - ## - # Finalize a write stream so that no new data can be appended to the - # stream. Finalize is not supported on the '_default' stream. - # - # @overload finalize_write_stream(request, options = nil) - # Pass arguments to `finalize_write_stream` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload finalize_write_stream(name: nil) - # Pass arguments to `finalize_write_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the stream to finalize, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new - # - # # Call the finalize_write_stream method. - # result = client.finalize_write_stream request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. - # p result - # - def finalize_write_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest - - # Converts hash 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.finalize_write_stream.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::Bigquery::Storage::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.finalize_write_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.finalize_write_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :finalize_write_stream, 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 - - ## - # Atomically commits a group of `PENDING` streams that belong to the same - # `parent` table. - # - # Streams must be finalized before commit and cannot be committed multiple - # times. Once a stream is committed, data in the stream becomes available - # for read operations. - # - # @overload batch_commit_write_streams(request, options = nil) - # Pass arguments to `batch_commit_write_streams` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_commit_write_streams(parent: nil, write_streams: nil) - # Pass arguments to `batch_commit_write_streams` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent table that all the streams should belong to, in the form - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @param write_streams [::Array<::String>] - # Required. The group of streams that will be committed atomically. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new - # - # # Call the batch_commit_write_streams method. - # result = client.batch_commit_write_streams request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. - # p result - # - def batch_commit_write_streams request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest - - # Converts hash 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.batch_commit_write_streams.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::Bigquery::Storage::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.batch_commit_write_streams.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_commit_write_streams.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :batch_commit_write_streams, 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 - - ## - # Flushes rows to a BUFFERED stream. - # - # If users are appending rows to BUFFERED stream, flush operation is - # required in order for the rows to become available for reading. A - # Flush operation flushes up to any previously flushed offset in a BUFFERED - # stream, to the offset specified in the request. - # - # Flush is not supported on the _default stream, since it is not BUFFERED. - # - # @overload flush_rows(request, options = nil) - # Pass arguments to `flush_rows` via a request object, either of type - # {::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload flush_rows(write_stream: nil, offset: nil) - # Pass arguments to `flush_rows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param write_stream [::String] - # Required. The stream that is the target of the flush operation. - # @param offset [::Google::Protobuf::Int64Value, ::Hash] - # Ending offset of the flush operation. Rows before this offset(including - # this offset) will be flushed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigquery/storage/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new - # - # # Call the flush_rows method. - # result = client.flush_rows request - # - # # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. - # p result - # - def flush_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest - - # Converts hash 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.flush_rows.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::Bigquery::Storage::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.write_stream - header_params["write_stream"] = request.write_stream - 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.flush_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.flush_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @big_query_write_stub.call_rpc :flush_rows, 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 BigQueryWrite API. - # - # This class represents the configuration for BigQueryWrite, - # 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::Bigquery::Storage::V1::BigQueryWrite::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 - # # create_write_stream to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_write_stream.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_write_stream.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::Bigquery::Storage::V1::BigQueryWrite::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 = "bigquerystorage.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 BigQueryWrite 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 `create_write_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :create_write_stream - ## - # RPC-specific configuration for `append_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :append_rows - ## - # RPC-specific configuration for `get_write_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :get_write_stream - ## - # RPC-specific configuration for `finalize_write_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :finalize_write_stream - ## - # RPC-specific configuration for `batch_commit_write_streams` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_commit_write_streams - ## - # RPC-specific configuration for `flush_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :flush_rows - - # @private - def initialize parent_rpcs = nil - create_write_stream_config = parent_rpcs.create_write_stream if parent_rpcs.respond_to? :create_write_stream - @create_write_stream = ::Gapic::Config::Method.new create_write_stream_config - append_rows_config = parent_rpcs.append_rows if parent_rpcs.respond_to? :append_rows - @append_rows = ::Gapic::Config::Method.new append_rows_config - get_write_stream_config = parent_rpcs.get_write_stream if parent_rpcs.respond_to? :get_write_stream - @get_write_stream = ::Gapic::Config::Method.new get_write_stream_config - finalize_write_stream_config = parent_rpcs.finalize_write_stream if parent_rpcs.respond_to? :finalize_write_stream - @finalize_write_stream = ::Gapic::Config::Method.new finalize_write_stream_config - batch_commit_write_streams_config = parent_rpcs.batch_commit_write_streams if parent_rpcs.respond_to? :batch_commit_write_streams - @batch_commit_write_streams = ::Gapic::Config::Method.new batch_commit_write_streams_config - flush_rows_config = parent_rpcs.flush_rows if parent_rpcs.respond_to? :flush_rows - @flush_rows = ::Gapic::Config::Method.new flush_rows_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb deleted file mode 100644 index 882a98244bb7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/credentials.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryWrite - # Credentials for the BigQueryWrite API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/bigquery.insertdata", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BIGQUERY_STORAGE_CREDENTIALS", - "BIGQUERY_STORAGE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGQUERY_STORAGE_CREDENTIALS_JSON", - "BIGQUERY_STORAGE_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 -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb deleted file mode 100644 index e907c52fd001..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/big_query_write/paths.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryWrite - # Path helper methods for the BigQueryWrite API. - module Paths - ## - # Create a fully-qualified Table resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # - # @return [::String] - def table_path project:, dataset:, table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}" - end - - ## - # Create a fully-qualified WriteStream resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}` - # - # @param project [String] - # @param dataset [String] - # @param table [String] - # @param stream [String] - # - # @return [::String] - def write_stream_path project:, dataset:, table:, stream: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "dataset cannot contain /" if dataset.to_s.include? "/" - raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" - - "projects/#{project}/datasets/#{dataset}/tables/#{table}/streams/#{stream}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb deleted file mode 100644 index 6d9356041918..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/protobuf_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/protobuf.proto - -require 'google/protobuf' - -require 'google/protobuf/descriptor_pb' - - -descriptor_data = "\n/google/cloud/bigquery/storage/v1/protobuf.proto\x12 google.cloud.bigquery.storage.v1\x1a google/protobuf/descriptor.proto\"I\n\x0bProtoSchema\x12:\n\x10proto_descriptor\x18\x01 \x01(\x0b\x32 .google.protobuf.DescriptorProto\"$\n\tProtoRows\x12\x17\n\x0fserialized_rows\x18\x01 \x03(\x0c\x42\xbd\x01\n$com.google.cloud.bigquery.storage.v1B\rProtoBufProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ProtoSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoSchema").msgclass - ProtoRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ProtoRows").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb deleted file mode 100644 index 4dbee16c83bc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/storage.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/bigquery/storage/v1/arrow_pb' -require 'google/cloud/bigquery/storage/v1/avro_pb' -require 'google/cloud/bigquery/storage/v1/protobuf_pb' -require 'google/cloud/bigquery/storage/v1/stream_pb' -require 'google/cloud/bigquery/storage/v1/table_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.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/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a/google/cloud/bigquery/storage/v1/protobuf.proto\x1a-google/cloud/bigquery/storage/v1/stream.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xe7\x01\n\x18\x43reateReadSessionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12H\n\x0cread_session\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xe0\x41\x02\x12\x18\n\x10max_stream_count\x18\x03 \x01(\x05\x12\"\n\x1apreferred_min_stream_count\x18\x04 \x01(\x05\"i\n\x0fReadRowsRequest\x12\x46\n\x0bread_stream\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x0e\n\x06offset\x18\x02 \x01(\x03\")\n\rThrottleState\x12\x18\n\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\n\x0bStreamStats\x12H\n\x08progress\x18\x02 \x01(\x0b\x32\x36.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1a>\n\x08Progress\x12\x19\n\x11\x61t_response_start\x18\x01 \x01(\x01\x12\x17\n\x0f\x61t_response_end\x18\x02 \x01(\x01\"\xac\x04\n\x10ReadRowsResponse\x12?\n\tavro_rows\x18\x03 \x01(\x0b\x32*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\n\x12\x61rrow_record_batch\x18\x04 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\n\trow_count\x18\x06 \x01(\x03\x12<\n\x05stats\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.StreamStats\x12G\n\x0ethrottle_state\x18\x05 \x01(\x0b\x32/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\n\x0b\x61vro_schema\x18\x07 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x01\x12J\n\x0c\x61rrow_schema\x18\x08 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x01\x12(\n\x16uncompressed_byte_size\x18\t \x01(\x03\x42\x03\xe0\x41\x01H\x02\x88\x01\x01\x42\x06\n\x04rowsB\x08\n\x06schemaB\x19\n\x17_uncompressed_byte_size\"k\n\x16SplitReadStreamRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)bigquerystorage.googleapis.com/ReadStream\x12\x10\n\x08\x66raction\x18\x02 \x01(\x01\"\xa7\x01\n\x17SplitReadStreamResponse\x12\x44\n\x0eprimary_stream\x18\x01 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\x12\x46\n\x10remainder_stream\x18\x02 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStream\"\x9b\x01\n\x18\x43reateWriteStreamRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12H\n\x0cwrite_stream\x18\x02 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xe0\x41\x02\"\xf8\x08\n\x11\x41ppendRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\x12S\n\nproto_rows\x18\x04 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\n\narrow_rows\x18\x05 \x01(\x0b\x32=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\n\x08trace_id\x18\x06 \x01(\t\x12{\n\x1dmissing_value_interpretations\x18\x07 \x03(\x0b\x32T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\n$default_missing_value_interpretation\x18\x08 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xe0\x41\x01\x1a\x93\x01\n\tArrowData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\n\x04rows\x18\x02 \x01(\x0b\x32\x32.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1a\x8c\x01\n\tProtoData\x12\x44\n\rwriter_schema\x18\x01 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ProtoSchema\x12\x39\n\x04rows\x18\x02 \x01(\x0b\x32+.google.cloud.bigquery.storage.v1.ProtoRows\x1a\x92\x01\n MissingValueInterpretationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12]\n\x05value\x18\x02 \x01(\x0e\x32N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x02\x38\x01\"m\n\x1aMissingValueInterpretation\x12,\n(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0e\n\nNULL_VALUE\x10\x01\x12\x11\n\rDEFAULT_VALUE\x10\x02\x42\x06\n\x04rows\"\xfb\x02\n\x12\x41ppendRowsResponse\x12Z\n\rappend_result\x18\x01 \x01(\x0b\x32\x41.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusH\x00\x12\x45\n\x0eupdated_schema\x18\x03 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchema\x12>\n\nrow_errors\x18\x04 \x03(\x0b\x32*.google.cloud.bigquery.storage.v1.RowError\x12\x14\n\x0cwrite_stream\x18\x05 \x01(\t\x1a;\n\x0c\x41ppendResult\x12+\n\x06offset\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\n\n\x08response\"\x9a\x01\n\x15GetWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12?\n\x04view\x18\x03 \x01(\x0e\x32\x31.google.cloud.bigquery.storage.v1.WriteStreamView\"s\n\x1e\x42\x61tchCommitWriteStreamsRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12\x1a\n\rwrite_streams\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\x99\x01\n\x1f\x42\x61tchCommitWriteStreamsResponse\x12/\n\x0b\x63ommit_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x45\n\rstream_errors\x18\x02 \x03(\x0b\x32..google.cloud.bigquery.storage.v1.StorageError\"^\n\x1a\x46inalizeWriteStreamRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\"0\n\x1b\x46inalizeWriteStreamResponse\x12\x11\n\trow_count\x18\x01 \x01(\x03\"\x89\x01\n\x10\x46lushRowsRequest\x12H\n\x0cwrite_stream\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*bigquerystorage.googleapis.com/WriteStream\x12+\n\x06offset\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.Int64Value\"#\n\x11\x46lushRowsResponse\x12\x0e\n\x06offset\x18\x01 \x01(\x03\"\xa4\x04\n\x0cStorageError\x12M\n\x04\x63ode\x18\x01 \x01(\x0e\x32?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0e\n\x06\x65ntity\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\x9d\x03\n\x10StorageErrorCode\x12\"\n\x1eSTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fTABLE_NOT_FOUND\x10\x01\x12\x1c\n\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\n\x10STREAM_NOT_FOUND\x10\x03\x12\x17\n\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\n\x14INVALID_STREAM_STATE\x10\x05\x12\x14\n\x10STREAM_FINALIZED\x10\x06\x12 \n\x1cSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\n\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\n\x13OFFSET_OUT_OF_RANGE\x10\t\x12\x15\n\x11\x43MEK_NOT_PROVIDED\x10\n\x12\x19\n\x15INVALID_CMEK_PROVIDED\x10\x0b\x12\x19\n\x15\x43MEK_ENCRYPTION_ERROR\x10\x0c\x12\x15\n\x11KMS_SERVICE_ERROR\x10\r\x12\x19\n\x15KMS_PERMISSION_DENIED\x10\x0e\"\xb3\x01\n\x08RowError\x12\r\n\x05index\x18\x01 \x01(\x03\x12\x45\n\x04\x63ode\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0f\n\x07message\x18\x03 \x01(\t\"@\n\x0cRowErrorCode\x12\x1e\n\x1aROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IELDS_ERROR\x10\x01\x32\x92\x06\n\x0c\x42igQueryRead\x12\xe9\x01\n\x11\x43reateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1a-.google.cloud.bigquery.storage.v1.ReadSession\"i\xda\x41$parent,read_session,max_stream_count\x82\xd3\xe4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xcf\x01\n\x08ReadRows\x12\x31.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1a\x32.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xda\x41\x12read_stream,offset\x82\xd3\xe4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xc6\x01\n\x0fSplitReadStream\x12\x38.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1a\x39.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1a{\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41Whttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xbc\x0b\n\rBigQueryWrite\x12\xd7\x01\n\x11\x43reateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"W\xda\x41\x13parent,write_stream\x82\xd3\xe4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0cwrite_stream\x12\xd2\x01\n\nAppendRows\x12\x33.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1a\x34.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x01\x30\x01\x12\xbf\x01\n\x0eGetWriteStream\x12\x37.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1a-.google.cloud.bigquery.storage.v1.WriteStream\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xd9\x01\n\x13\x46inalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1a=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xdc\x01\n\x17\x42\x61tchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1a\x41.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xcb\x01\n\tFlushRows\x12\x32.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1a\x33.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xda\x41\x0cwrite_stream\x82\xd3\xe4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1a\xb0\x01\xca\x41\x1e\x62igquerystorage.googleapis.com\xd2\x41\x8b\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\n$com.google.cloud.bigquery.storage.v1B\x0cStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xea\x41U\n\x1d\x62igquery.googleapis.com/Table\x12\x34projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - CreateReadSessionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateReadSessionRequest").msgclass - ReadRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsRequest").msgclass - ThrottleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ThrottleState").msgclass - StreamStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats").msgclass - StreamStats::Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StreamStats.Progress").msgclass - ReadRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadRowsResponse").msgclass - SplitReadStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamRequest").msgclass - SplitReadStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.SplitReadStreamResponse").msgclass - CreateWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.CreateWriteStreamRequest").msgclass - AppendRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest").msgclass - AppendRowsRequest::ArrowData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData").msgclass - AppendRowsRequest::ProtoData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData").msgclass - AppendRowsRequest::MissingValueInterpretation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation").enummodule - AppendRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse").msgclass - AppendRowsResponse::AppendResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult").msgclass - GetWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.GetWriteStreamRequest").msgclass - BatchCommitWriteStreamsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest").msgclass - BatchCommitWriteStreamsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse").msgclass - FinalizeWriteStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest").msgclass - FinalizeWriteStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse").msgclass - FlushRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsRequest").msgclass - FlushRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.FlushRowsResponse").msgclass - StorageError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError").msgclass - StorageError::StorageErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode").enummodule - RowError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError").msgclass - RowError::RowErrorCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.RowError.RowErrorCode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb deleted file mode 100644 index 5fdee674034c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/storage_services_pb.rb +++ /dev/null @@ -1,167 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/bigquery/storage/v1/storage.proto for package 'google.cloud.bigquery.storage.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigquery/storage/v1/storage_pb' - -module Google - module Cloud - module Bigquery - module Storage - module V1 - module BigQueryRead - # BigQuery Read API. - # - # The Read API can be used to read data from BigQuery. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryRead' - - # Creates a new read session. A read session divides the contents of a - # BigQuery table into one or more streams, which can then be used to read - # data from the table. The read session also specifies properties of the - # data to be read, such as a list of columns or a push-down filter describing - # the rows to be returned. - # - # A particular row can be read by at most one stream. When the caller has - # reached the end of each stream in the session, then all the data in the - # table has been read. - # - # Data is assigned to each stream such that roughly the same number of - # rows can be read from each stream. Because the server-side unit for - # assigning data is collections of rows, the API does not guarantee that - # each stream will return the same number or rows. Additionally, the - # limits are enforced based on the number of pre-filtered rows, so some - # filters can lead to lopsided assignments. - # - # Read sessions automatically expire 6 hours after they are created and do - # not require manual clean-up by the caller. - rpc :CreateReadSession, ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, ::Google::Cloud::Bigquery::Storage::V1::ReadSession - # Reads rows from the stream in the format prescribed by the ReadSession. - # Each response contains one or more table rows, up to a maximum of 128 MB - # per response; read requests which attempt to read individual rows larger - # than 128 MB will fail. - # - # Each request also returns a set of stream statistics reflecting the current - # state of the stream. - rpc :ReadRows, ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, stream(::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse) - # Splits a given `ReadStream` into two `ReadStream` objects. These - # `ReadStream` objects are referred to as the primary and the residual - # streams of the split. The original `ReadStream` can still be read from in - # the same manner as before. Both of the returned `ReadStream` objects can - # also be read from, and the rows returned by both child streams will be - # the same as the rows read from the original stream. - # - # Moreover, the two child streams will be allocated back-to-back in the - # original `ReadStream`. Concretely, it is guaranteed that for streams - # original, primary, and residual, that original[0-j] = primary[0-j] and - # original[j-n] = residual[0-m] once the streams have been read to - # completion. - rpc :SplitReadStream, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse - end - - Stub = Service.rpc_stub_class - end - module BigQueryWrite - # BigQuery Write API. - # - # The Write API can be used to write data to BigQuery. - # - # For supplementary information about the Write API, see: - # https://cloud.google.com/bigquery/docs/write-api - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.bigquery.storage.v1.BigQueryWrite' - - # Creates a write stream to the given table. - # Additionally, every table has a special stream named '_default' - # to which data can be written. This stream doesn't need to be created using - # CreateWriteStream. It is a stream that can be used simultaneously by any - # number of clients. Data written to this stream is considered committed as - # soon as an acknowledgement is received. - rpc :CreateWriteStream, ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream - # Appends data to the given stream. - # - # If `offset` is specified, the `offset` is checked against the end of - # stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an - # attempt is made to append to an offset beyond the current end of the stream - # or `ALREADY_EXISTS` if user provides an `offset` that has already been - # written to. User can retry with adjusted offset within the same RPC - # connection. If `offset` is not specified, append happens at the end of the - # stream. - # - # The response contains an optional offset at which the append - # happened. No offset information will be returned for appends to a - # default stream. - # - # Responses are received in the same order in which requests are sent. - # There will be one response for each successful inserted request. Responses - # may optionally embed error information if the originating AppendRequest was - # not successfully processed. - # - # The specifics of when successfully appended data is made visible to the - # table are governed by the type of stream: - # - # * For COMMITTED streams (which includes the default stream), data is - # visible immediately upon successful append. - # - # * For BUFFERED streams, data is made visible via a subsequent `FlushRows` - # rpc which advances a cursor to a newer offset in the stream. - # - # * For PENDING streams, data is not made visible until the stream itself is - # finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly - # committed via the `BatchCommitWriteStreams` rpc. - rpc :AppendRows, stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest), stream(::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse) - # Gets information about a write stream. - rpc :GetWriteStream, ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::WriteStream - # Finalize a write stream so that no new data can be appended to the - # stream. Finalize is not supported on the '_default' stream. - rpc :FinalizeWriteStream, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse - # Atomically commits a group of `PENDING` streams that belong to the same - # `parent` table. - # - # Streams must be finalized before commit and cannot be committed multiple - # times. Once a stream is committed, data in the stream becomes available - # for read operations. - rpc :BatchCommitWriteStreams, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse - # Flushes rows to a BUFFERED stream. - # - # If users are appending rows to BUFFERED stream, flush operation is - # required in order for the rows to become available for reading. A - # Flush operation flushes up to any previously flushed offset in a BUFFERED - # stream, to the offset specified in the request. - # - # Flush is not supported on the _default stream, since it is not BUFFERED. - rpc :FlushRows, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb deleted file mode 100644 index ab4d8b662d0b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/stream_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/stream.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/bigquery/storage/v1/arrow_pb' -require 'google/cloud/bigquery/storage/v1/avro_pb' -require 'google/cloud/bigquery/storage/v1/table_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/bigquery/storage/v1/stream.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/bigquery/storage/v1/arrow.proto\x1a+google/cloud/bigquery/storage/v1/avro.proto\x1a,google/cloud/bigquery/storage/v1/table.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc3\x0c\n\x0bReadSession\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x0b\x64\x61ta_format\x18\x03 \x01(\x0e\x32,.google.cloud.bigquery.storage.v1.DataFormatB\x03\xe0\x41\x05\x12H\n\x0b\x61vro_schema\x18\x04 \x01(\x0b\x32,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xe0\x41\x03H\x00\x12J\n\x0c\x61rrow_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xe0\x41\x03H\x00\x12\x34\n\x05table\x18\x06 \x01(\tB%\xe0\x41\x05\xfa\x41\x1f\n\x1d\x62igquery.googleapis.com/Table\x12Z\n\x0ftable_modifiers\x18\x07 \x01(\x0b\x32<.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersB\x03\xe0\x41\x01\x12Y\n\x0cread_options\x18\x08 \x01(\x0b\x32>.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsB\x03\xe0\x41\x01\x12\x42\n\x07streams\x18\n \x03(\x0b\x32,.google.cloud.bigquery.storage.v1.ReadStreamB\x03\xe0\x41\x03\x12*\n\x1d\x65stimated_total_bytes_scanned\x18\x0c \x01(\x03\x42\x03\xe0\x41\x03\x12/\n\"estimated_total_physical_file_size\x18\x0f \x01(\x03\x42\x03\xe0\x41\x03\x12 \n\x13\x65stimated_row_count\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\x12\x15\n\x08trace_id\x18\r \x01(\tB\x03\xe0\x41\x01\x1a\x43\n\x0eTableModifiers\x12\x31\n\rsnapshot_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x89\x05\n\x10TableReadOptions\x12\x17\n\x0fselected_fields\x18\x01 \x03(\t\x12\x17\n\x0frow_restriction\x18\x02 \x01(\t\x12g\n\x1b\x61rrow_serialization_options\x18\x03 \x01(\x0b\x32;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xe0\x41\x01H\x00\x12\x65\n\x1a\x61vro_serialization_options\x18\x04 \x01(\x0b\x32:.google.cloud.bigquery.storage.v1.AvroSerializationOptionsB\x03\xe0\x41\x01H\x00\x12#\n\x11sample_percentage\x18\x05 \x01(\x01\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x12\x85\x01\n\x1aresponse_compression_codec\x18\x06 \x01(\x0e\x32W.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodecB\x03\xe0\x41\x01H\x02\x88\x01\x01\"j\n\x18ResponseCompressionCodec\x12*\n&RESPONSE_COMPRESSION_CODEC_UNSPECIFIED\x10\x00\x12\"\n\x1eRESPONSE_COMPRESSION_CODEC_LZ4\x10\x02\x42%\n#output_format_serialization_optionsB\x14\n\x12_sample_percentageB\x1d\n\x1b_response_compression_codec:k\xea\x41h\n*bigquerystorage.googleapis.com/ReadSession\x12:projects/{project}/locations/{location}/sessions/{session}B\x08\n\x06schema\"\x9c\x01\n\nReadStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03:{\xea\x41x\n)bigquerystorage.googleapis.com/ReadStream\x12Kprojects/{project}/locations/{location}/sessions/{session}/streams/{stream}\"\xfb\x04\n\x0bWriteStream\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x04type\x18\x02 \x01(\x0e\x32\x32.google.cloud.bigquery.storage.v1.WriteStream.TypeB\x03\xe0\x41\x05\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x63ommit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12H\n\x0ctable_schema\x18\x05 \x01(\x0b\x32-.google.cloud.bigquery.storage.v1.TableSchemaB\x03\xe0\x41\x03\x12P\n\nwrite_mode\x18\x07 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.WriteStream.WriteModeB\x03\xe0\x41\x05\x12\x15\n\x08location\x18\x08 \x01(\tB\x03\xe0\x41\x03\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCOMMITTED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\x0c\n\x08\x42UFFERED\x10\x03\"3\n\tWriteMode\x12\x1a\n\x16WRITE_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06INSERT\x10\x01:v\xea\x41s\n*bigquerystorage.googleapis.com/WriteStream\x12\x45projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}*>\n\nDataFormat\x12\x1b\n\x17\x44\x41TA_FORMAT_UNSPECIFIED\x10\x00\x12\x08\n\x04\x41VRO\x10\x01\x12\t\n\x05\x41RROW\x10\x02*I\n\x0fWriteStreamView\x12!\n\x1dWRITE_STREAM_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x42\xbb\x01\n$com.google.cloud.bigquery.storage.v1B\x0bStreamProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - ReadSession = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession").msgclass - ReadSession::TableModifiers = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableModifiers").msgclass - ReadSession::TableReadOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions").msgclass - ReadSession::TableReadOptions::ResponseCompressionCodec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec").enummodule - ReadStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.ReadStream").msgclass - WriteStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream").msgclass - WriteStream::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.Type").enummodule - WriteStream::WriteMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStream.WriteMode").enummodule - DataFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.DataFormat").enummodule - WriteStreamView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.WriteStreamView").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb deleted file mode 100644 index 2550b8886063..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/table_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/bigquery/storage/v1/table.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n,google/cloud/bigquery/storage/v1/table.proto\x12 google.cloud.bigquery.storage.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/protobuf/wrappers.proto\"Q\n\x0bTableSchema\x12\x42\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchema\"\xbc\x07\n\x10TableFieldSchema\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12J\n\x04type\x18\x02 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\x12J\n\x04mode\x18\x03 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.ModeB\x03\xe0\x41\x01\x12G\n\x06\x66ields\x18\x04 \x03(\x0b\x32\x32.google.cloud.bigquery.storage.v1.TableFieldSchemaB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nmax_length\x18\x07 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tprecision\x18\x08 \x01(\x03\x42\x03\xe0\x41\x01\x12\x12\n\x05scale\x18\t \x01(\x03\x42\x03\xe0\x41\x01\x12%\n\x18\x64\x65\x66\x61ult_value_expression\x18\n \x01(\tB\x03\xe0\x41\x01\x12=\n\x13timestamp_precision\x18\x1b \x01(\x0b\x32\x1b.google.protobuf.Int64ValueB\x03\xe0\x41\x01\x12\x64\n\x12range_element_type\x18\x0b \x01(\x0b\x32\x43.google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementTypeB\x03\xe0\x41\x01\x1a^\n\x10\x46ieldElementType\x12J\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xe0\x41\x02\"\xe0\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06STRING\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRUCT\x10\x04\x12\t\n\x05\x42YTES\x10\x05\x12\x08\n\x04\x42OOL\x10\x06\x12\r\n\tTIMESTAMP\x10\x07\x12\x08\n\x04\x44\x41TE\x10\x08\x12\x08\n\x04TIME\x10\t\x12\x0c\n\x08\x44\x41TETIME\x10\n\x12\r\n\tGEOGRAPHY\x10\x0b\x12\x0b\n\x07NUMERIC\x10\x0c\x12\x0e\n\nBIGNUMERIC\x10\r\x12\x0c\n\x08INTERVAL\x10\x0e\x12\x08\n\x04JSON\x10\x0f\x12\t\n\x05RANGE\x10\x10\"F\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08NULLABLE\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0c\n\x08REPEATED\x10\x03\x42\xba\x01\n$com.google.cloud.bigquery.storage.v1B\nTableProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xaa\x02 Google.Cloud.BigQuery.Storage.V1\xca\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigquery - module Storage - module V1 - TableSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableSchema").msgclass - TableFieldSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema").msgclass - TableFieldSchema::FieldElementType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType").msgclass - TableFieldSchema::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Type").enummodule - TableFieldSchema::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.bigquery.storage.v1.TableFieldSchema.Mode").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb deleted file mode 100644 index 6f9c0d00974c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/lib/google/cloud/bigquery/storage/v1/version.rb +++ /dev/null @@ -1,30 +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 Bigquery - module Storage - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md deleted file mode 100644 index 3d8a2a34b334..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# BigQuery Storage 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-bigquery-storage-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb deleted file mode 100644 index a3dc9a444a1f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/arrow.rb +++ /dev/null @@ -1,103 +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 Bigquery - module Storage - module V1 - # Arrow schema as specified in - # https://arrow.apache.org/docs/python/api/datatypes.html - # and serialized to bytes using IPC: - # https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc - # - # See code samples on how this message can be deserialized. - # @!attribute [rw] serialized_schema - # @return [::String] - # IPC serialized Arrow schema. - class ArrowSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Arrow RecordBatch. - # @!attribute [rw] serialized_record_batch - # @return [::String] - # IPC-serialized Arrow RecordBatch. - # @!attribute [rw] row_count - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # [Deprecated] The count of rows in `serialized_record_batch`. - # Please use the format-independent ReadRowsResponse.row_count instead. - class ArrowRecordBatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains options specific to Arrow Serialization. - # @!attribute [rw] buffer_compression - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::CompressionCodec] - # The compression codec to use for Arrow buffers in serialized record - # batches. - # @!attribute [rw] picos_timestamp_precision - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions::PicosTimestampPrecision] - # Optional. Set timestamp precision option. If not set, the default precision - # is microseconds. - class ArrowSerializationOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Compression codec's supported by Arrow. - module CompressionCodec - # If unspecified no compression will be used. - COMPRESSION_UNSPECIFIED = 0 - - # LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) - LZ4_FRAME = 1 - - # Zstandard compression. - ZSTD = 2 - end - - # The precision of the timestamp value in the Avro message. This precision - # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. - module PicosTimestampPrecision - # Unspecified timestamp precision. The default precision is microseconds. - PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 - - # Timestamp values returned by Read API will be truncated to microsecond - # level precision. The value will be encoded as Arrow TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_MICROS = 1 - - # Timestamp values returned by Read API will be truncated to nanosecond - # level precision. The value will be encoded as Arrow TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_NANOS = 2 - - # Read API will return full precision picosecond value. The value will be - # encoded as a string which conforms to ISO 8601 format. - TIMESTAMP_PRECISION_PICOS = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb deleted file mode 100644 index 8d583439b10a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/avro.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # Avro schema. - # @!attribute [rw] schema - # @return [::String] - # Json serialized schema, as described at - # https://avro.apache.org/docs/1.8.1/spec.html. - class AvroSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Avro rows. - # @!attribute [rw] serialized_binary_rows - # @return [::String] - # Binary serialized rows in a block. - # @!attribute [rw] row_count - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # [Deprecated] The count of rows in the returning block. - # Please use the format-independent ReadRowsResponse.row_count instead. - class AvroRows - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains options specific to Avro Serialization. - # @!attribute [rw] enable_display_name_attribute - # @return [::Boolean] - # Enable displayName attribute in Avro schema. - # - # The Avro specification requires field names to be alphanumeric. By - # default, in cases when column names do not conform to these requirements - # (e.g. non-ascii unicode codepoints) and Avro is requested as an output - # format, the CreateReadSession call will fail. - # - # Setting this field to true, populates avro field names with a placeholder - # value and populates a "displayName" attribute for every avro field with the - # original column name. - # @!attribute [rw] picos_timestamp_precision - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions::PicosTimestampPrecision] - # Optional. Set timestamp precision option. If not set, the default precision - # is microseconds. - class AvroSerializationOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The precision of the timestamp value in the Avro message. This precision - # will **only** be applied to the column(s) with the `TIMESTAMP_PICOS` type. - module PicosTimestampPrecision - # Unspecified timestamp precision. The default precision is microseconds. - PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0 - - # Timestamp values returned by Read API will be truncated to microsecond - # level precision. The value will be encoded as Avro TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_MICROS = 1 - - # Timestamp values returned by Read API will be truncated to nanosecond - # level precision. The value will be encoded as Avro TIMESTAMP type in a - # 64 bit integer. - TIMESTAMP_PRECISION_NANOS = 2 - - # Read API will return full precision picosecond value. The value will be - # encoded as a string which conforms to ISO 8601 format. - TIMESTAMP_PRECISION_PICOS = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb deleted file mode 100644 index eb0828eb038c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/protobuf.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigquery - module Storage - module V1 - # ProtoSchema describes the schema of the serialized protocol buffer data rows. - # @!attribute [rw] proto_descriptor - # @return [::Google::Protobuf::DescriptorProto] - # Descriptor for input message. The provided descriptor must be self - # contained, such that data rows sent can be fully decoded using only the - # single descriptor. For data rows that are compositions of multiple - # independent messages, this means the descriptor may need to be transformed - # to only use nested types: - # https://developers.google.com/protocol-buffers/docs/proto#nested - # - # For additional information for how proto types and values map onto BigQuery - # see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - class ProtoSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] serialized_rows - # @return [::Array<::String>] - # A sequence of rows serialized as a Protocol Buffer. - # - # See https://developers.google.com/protocol-buffers/docs/overview for more - # information on deserializing this field. - class ProtoRows - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb deleted file mode 100644 index 8b6b4f65fa0c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/storage.rb +++ /dev/null @@ -1,618 +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 Bigquery - module Storage - module V1 - # Request message for `CreateReadSession`. - # @!attribute [rw] parent - # @return [::String] - # Required. The request project that owns the session, in the form of - # `projects/{project_id}`. - # @!attribute [rw] read_session - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession] - # Required. Session to be created. - # @!attribute [rw] max_stream_count - # @return [::Integer] - # Max initial number of streams. If unset or zero, the server will - # provide a value of streams so as to produce reasonable throughput. Must be - # non-negative. The number of streams may be lower than the requested number, - # depending on the amount parallelism that is reasonable for the table. - # There is a default system max limit of 1,000. - # - # This must be greater than or equal to preferred_min_stream_count. - # Typically, clients should either leave this unset to let the system to - # determine an upper bound OR set this a size for the maximum "units of work" - # it can gracefully handle. - # @!attribute [rw] preferred_min_stream_count - # @return [::Integer] - # The minimum preferred stream count. This parameter can be used to inform - # the service that there is a desired lower bound on the number of streams. - # This is typically a target parallelism of the client (e.g. a Spark - # cluster with N-workers would set this to a low multiple of N to ensure - # good cluster utilization). - # - # The system will make a best effort to provide at least this number of - # streams, but in some cases might provide less. - class CreateReadSessionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ReadRows`. - # @!attribute [rw] read_stream - # @return [::String] - # Required. Stream to read rows from. - # @!attribute [rw] offset - # @return [::Integer] - # The offset requested must be less than the last row read from Read. - # Requesting a larger offset is undefined. If not specified, start reading - # from offset zero. - class ReadRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information on if the current connection is being throttled. - # @!attribute [rw] throttle_percent - # @return [::Integer] - # How much this connection is being throttled. Zero means no throttling, - # 100 means fully throttled. - class ThrottleState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Estimated stream statistics for a given read Stream. - # @!attribute [rw] progress - # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats::Progress] - # Represents the progress of the current stream. - class StreamStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] at_response_start - # @return [::Float] - # The fraction of rows assigned to the stream that have been processed by - # the server so far, not including the rows in the current response - # message. - # - # This value, along with `at_response_end`, can be used to interpolate - # the progress made as the rows in the message are being processed using - # the following formula: `at_response_start + (at_response_end - - # at_response_start) * rows_processed_from_response / rows_in_response`. - # - # Note that if a filter is provided, the `at_response_end` value of the - # previous response may not necessarily be equal to the - # `at_response_start` value of the current response. - # @!attribute [rw] at_response_end - # @return [::Float] - # Similar to `at_response_start`, except that this value includes the - # rows in the current response. - class Progress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response from calling `ReadRows` may include row data, progress and - # throttling information. - # @!attribute [rw] avro_rows - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroRows] - # Serialized row data in AVRO format. - # - # Note: The following fields are mutually exclusive: `avro_rows`, `arrow_record_batch`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] arrow_record_batch - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] - # Serialized row data in Arrow RecordBatch format. - # - # Note: The following fields are mutually exclusive: `arrow_record_batch`, `avro_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row_count - # @return [::Integer] - # Number of serialized rows in the rows block. - # @!attribute [rw] stats - # @return [::Google::Cloud::Bigquery::Storage::V1::StreamStats] - # Statistics for the stream. - # @!attribute [rw] throttle_state - # @return [::Google::Cloud::Bigquery::Storage::V1::ThrottleState] - # Throttling state. If unset, the latest response still describes - # the current throttling status. - # @!attribute [r] avro_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] - # Output only. Avro schema. - # - # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] arrow_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] - # Output only. Arrow schema. - # - # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] uncompressed_byte_size - # @return [::Integer] - # Optional. If the row data in this ReadRowsResponse is compressed, then - # uncompressed byte size is the original size of the uncompressed row data. - # If it is set to a value greater than 0, then decompress into a buffer of - # size uncompressed_byte_size using the compression codec that was requested - # during session creation time and which is specified in - # TableReadOptions.response_compression_codec in ReadSession. - # This value is not set if no response_compression_codec was not requested - # and it is -1 if the requested compression would not have reduced the size - # of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - # behavior described here https://github.com/apache/arrow/issues/15102 where - # the uncompressed length may be set to -1 to indicate that the data that - # follows is not compressed, which can be useful for cases where compression - # does not yield appreciable savings. When uncompressed_byte_size is not - # greater than 0, the client should skip decompression. - class ReadRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `SplitReadStream`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the stream to split. - # @!attribute [rw] fraction - # @return [::Float] - # A value in the range (0.0, 1.0) that specifies the fractional point at - # which the original stream should be split. The actual split point is - # evaluated on pre-filtered rows, so if a filter is provided, then there is - # no guarantee that the division of the rows between the new child streams - # will be proportional to this fractional value. Additionally, because the - # server-side unit for assigning data is collections of rows, this fraction - # will always map to a data storage boundary on the server side. - class SplitReadStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `SplitReadStream`. - # @!attribute [rw] primary_stream - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] - # Primary stream, which contains the beginning portion of - # |original_stream|. An empty value indicates that the original stream can no - # longer be split. - # @!attribute [rw] remainder_stream - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadStream] - # Remainder stream, which contains the tail of |original_stream|. An empty - # value indicates that the original stream can no longer be split. - class SplitReadStreamResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `CreateWriteStream`. - # @!attribute [rw] parent - # @return [::String] - # Required. Reference to the table to which the stream belongs, in the format - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @!attribute [rw] write_stream - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream] - # Required. Stream to be created. - class CreateWriteStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `AppendRows`. - # - # Because AppendRows is a bidirectional streaming RPC, certain parts of the - # AppendRowsRequest need only be specified for the first request before - # switching table destinations. You can also switch table destinations within - # the same connection for the default stream. - # - # The size of a single AppendRowsRequest must be less than 10 MB in size. - # Requests larger than this return an error, typically `INVALID_ARGUMENT`. - # @!attribute [rw] write_stream - # @return [::String] - # Required. The write_stream identifies the append operation. It must be - # provided in the following scenarios: - # - # * In the first request to an AppendRows connection. - # - # * In all subsequent requests to an AppendRows connection, if you use the - # same connection to write to multiple tables or change the input schema for - # default streams. - # - # For explicitly created write streams, the format is: - # - # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - # - # For the special default stream, the format is: - # - # * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - # - # An example of a possible sequence of requests with write_stream fields - # within a single connection: - # - # * r1: \\{write_stream: stream_name_1} - # - # * r2: \\{write_stream: /*omit*/} - # - # * r3: \\{write_stream: /*omit*/} - # - # * r4: \\{write_stream: stream_name_2} - # - # * r5: \\{write_stream: stream_name_2} - # - # The destination changed in request_4, so the write_stream field must be - # populated in all subsequent requests in this stream. - # @!attribute [rw] offset - # @return [::Google::Protobuf::Int64Value] - # If present, the write is only performed if the next append offset is same - # as the provided value. If not present, the write is performed at the - # current end of stream. Specifying a value for this field is not allowed - # when calling AppendRows for the '_default' stream. - # @!attribute [rw] proto_rows - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData] - # Rows in proto format. - # - # Note: The following fields are mutually exclusive: `proto_rows`, `arrow_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] arrow_rows - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ArrowData] - # Rows in arrow format. - # - # Note: The following fields are mutually exclusive: `arrow_rows`, `proto_rows`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] trace_id - # @return [::String] - # Id set by client to annotate its identity. Only initial request setting is - # respected. - # @!attribute [rw] missing_value_interpretations - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation}] - # A map to indicate how to interpret missing value for some fields. Missing - # values are fields present in user schema but missing in rows. The key is - # the field name. The value is the interpretation of missing values for the - # field. - # - # For example, a map \\{'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - # missing values in field foo are interpreted as NULL, all missing values in - # field bar are interpreted as the default value of field bar in table - # schema. - # - # If a field is not in this map and has missing values, the missing values - # in this field are interpreted as NULL. - # - # This field only applies to the current request, it won't affect other - # requests on the connection. - # - # Currently, field name can only be top-level column name, can't be a struct - # field path like 'foo.bar'. - # @!attribute [rw] default_missing_value_interpretation - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] - # Optional. Default missing value interpretation for all columns in the - # table. When a value is specified on an `AppendRowsRequest`, it is applied - # to all requests from that point forward, until a subsequent - # `AppendRowsRequest` sets it to a different value. - # `missing_value_interpretation` can override - # `default_missing_value_interpretation`. For example, if you want to write - # `NULL` instead of using default values for some columns, you can set - # `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - # time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - class AppendRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Arrow schema and data. - # @!attribute [rw] writer_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] - # Optional. Arrow Schema used to serialize the data. - # @!attribute [rw] rows - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowRecordBatch] - # Required. Serialized row data in Arrow format. - class ArrowData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ProtoData contains the data rows and schema when constructing append - # requests. - # @!attribute [rw] writer_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoSchema] - # Optional. The protocol buffer schema used to serialize the data. Provide - # this value whenever: - # - # * You send the first request of an RPC connection. - # - # * You change the input schema. - # - # * You specify a new destination table. - # @!attribute [rw] rows - # @return [::Google::Cloud::Bigquery::Storage::V1::ProtoRows] - # Required. Serialized row data in protobuf message format. - # Currently, the backend expects the serialized rows to adhere to - # proto2 semantics when appending rows, particularly with respect to - # how default values are encoded. - class ProtoData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::MissingValueInterpretation] - class MissingValueInterpretationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An enum to indicate how to interpret missing values of fields that are - # present in user schema but missing in rows. A missing value can represent a - # NULL or a column default value defined in BigQuery table schema. - module MissingValueInterpretation - # Invalid missing value interpretation. Requests with this value will be - # rejected. - MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0 - - # Missing value is interpreted as NULL. - NULL_VALUE = 1 - - # Missing value is interpreted as column default value if declared in the - # table schema, NULL otherwise. - DEFAULT_VALUE = 2 - end - end - - # Response message for `AppendRows`. - # @!attribute [rw] append_result - # @return [::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse::AppendResult] - # Result if the append is successful. - # - # Note: The following fields are mutually exclusive: `append_result`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # Error returned when problems were encountered. If present, - # it indicates rows were not accepted into the system. - # Users can retry or continue with other append requests within the - # same connection. - # - # Additional information about error signalling: - # - # ALREADY_EXISTS: Happens when an append specified an offset, and the - # backend already has received data at this offset. Typically encountered - # in retry scenarios, and can be ignored. - # - # OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - # the current end of the stream. - # - # INVALID_ARGUMENT: Indicates a malformed request or data. - # - # ABORTED: Request processing is aborted because of prior failures. The - # request can be retried if previous failure is addressed. - # - # INTERNAL: Indicates server side error(s) that can be retried. - # - # Note: The following fields are mutually exclusive: `error`, `append_result`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] updated_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] - # If backend detects a schema update, pass it to user so that user can - # use it to input new type of message. It will be empty when no schema - # updates have occurred. - # @!attribute [rw] row_errors - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::RowError>] - # If a request failed due to corrupted rows, no rows in the batch will be - # appended. The API will return row level error info, so that the caller can - # remove the bad rows and retry the request. - # @!attribute [rw] write_stream - # @return [::String] - # The target of the append operation. Matches the write_stream in the - # corresponding request. - class AppendRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # AppendResult is returned for successful append requests. - # @!attribute [rw] offset - # @return [::Google::Protobuf::Int64Value] - # The row offset at which the last append occurred. The offset will not be - # set if appending using default streams. - class AppendResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for `GetWriteStreamRequest`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the stream to get, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # @!attribute [rw] view - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStreamView] - # Indicates whether to get full or partial view of the WriteStream. If - # not set, view returned will be basic. - class GetWriteStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `BatchCommitWriteStreams`. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent table that all the streams should belong to, in the form - # of `projects/{project}/datasets/{dataset}/tables/{table}`. - # @!attribute [rw] write_streams - # @return [::Array<::String>] - # Required. The group of streams that will be committed atomically. - class BatchCommitWriteStreamsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `BatchCommitWriteStreams`. - # @!attribute [rw] commit_time - # @return [::Google::Protobuf::Timestamp] - # The time at which streams were committed in microseconds granularity. - # This field will only exist when there are no stream errors. - # **Note** if this field is not set, it means the commit was not successful. - # @!attribute [rw] stream_errors - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::StorageError>] - # Stream level error if commit failed. Only streams with error will be in - # the list. - # If empty, there is no error and all streams are committed successfully. - # If non empty, certain streams have errors and ZERO stream is committed due - # to atomicity guarantee. - class BatchCommitWriteStreamsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for invoking `FinalizeWriteStream`. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the stream to finalize, in the form of - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - class FinalizeWriteStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `FinalizeWriteStream`. - # @!attribute [rw] row_count - # @return [::Integer] - # Number of rows in the finalized stream. - class FinalizeWriteStreamResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `FlushRows`. - # @!attribute [rw] write_stream - # @return [::String] - # Required. The stream that is the target of the flush operation. - # @!attribute [rw] offset - # @return [::Google::Protobuf::Int64Value] - # Ending offset of the flush operation. Rows before this offset(including - # this offset) will be flushed. - class FlushRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Respond message for `FlushRows`. - # @!attribute [rw] offset - # @return [::Integer] - # The rows before this offset (including this offset) are flushed. - class FlushRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Structured custom BigQuery Storage error message. The error can be attached - # as error details in the returned rpc Status. In particular, the use of error - # codes allows more structured error handling, and reduces the need to evaluate - # unstructured error text strings. - # @!attribute [rw] code - # @return [::Google::Cloud::Bigquery::Storage::V1::StorageError::StorageErrorCode] - # BigQuery Storage specific error code. - # @!attribute [rw] entity - # @return [::String] - # Name of the failed entity. - # @!attribute [rw] error_message - # @return [::String] - # Message that describes the error. - class StorageError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error code for `StorageError`. - module StorageErrorCode - # Default error. - STORAGE_ERROR_CODE_UNSPECIFIED = 0 - - # Table is not found in the system. - TABLE_NOT_FOUND = 1 - - # Stream is already committed. - STREAM_ALREADY_COMMITTED = 2 - - # Stream is not found. - STREAM_NOT_FOUND = 3 - - # Invalid Stream type. - # For example, you try to commit a stream that is not pending. - INVALID_STREAM_TYPE = 4 - - # Invalid Stream state. - # For example, you try to commit a stream that is not finalized or is - # garbaged. - INVALID_STREAM_STATE = 5 - - # Stream is finalized. - STREAM_FINALIZED = 6 - - # There is a schema mismatch and it is caused by user schema has extra - # field than bigquery schema. - SCHEMA_MISMATCH_EXTRA_FIELDS = 7 - - # Offset already exists. - OFFSET_ALREADY_EXISTS = 8 - - # Offset out of range. - OFFSET_OUT_OF_RANGE = 9 - - # Customer-managed encryption key (CMEK) not provided for CMEK-enabled - # data. - CMEK_NOT_PROVIDED = 10 - - # Customer-managed encryption key (CMEK) was incorrectly provided. - INVALID_CMEK_PROVIDED = 11 - - # There is an encryption error while using customer-managed encryption key. - CMEK_ENCRYPTION_ERROR = 12 - - # Key Management Service (KMS) service returned an error, which can be - # retried. - KMS_SERVICE_ERROR = 13 - - # Permission denied while using customer-managed encryption key. - KMS_PERMISSION_DENIED = 14 - end - end - - # The message that presents row level error info in a request. - # @!attribute [rw] index - # @return [::Integer] - # Index of the malformed row in the request. - # @!attribute [rw] code - # @return [::Google::Cloud::Bigquery::Storage::V1::RowError::RowErrorCode] - # Structured error reason for a row error. - # @!attribute [rw] message - # @return [::String] - # Description of the issue encountered when processing the row. - class RowError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error code for `RowError`. - module RowErrorCode - # Default error. - ROW_ERROR_CODE_UNSPECIFIED = 0 - - # One or more fields in the row has errors. - FIELDS_ERROR = 1 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb deleted file mode 100644 index a9d8230c0a6c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/stream.rb +++ /dev/null @@ -1,321 +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 Bigquery - module Storage - module V1 - # Information about the ReadSession. - # @!attribute [r] name - # @return [::String] - # Output only. Unique identifier for the session, in the form - # `projects/{project_id}/locations/{location}/sessions/{session_id}`. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which the session becomes invalid. After this time, - # subsequent requests to read this Session will return errors. The - # expire_time is automatically assigned and currently cannot be specified or - # updated. - # @!attribute [rw] data_format - # @return [::Google::Cloud::Bigquery::Storage::V1::DataFormat] - # Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - # supported. - # @!attribute [r] avro_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSchema] - # Output only. Avro schema. - # - # Note: The following fields are mutually exclusive: `avro_schema`, `arrow_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] arrow_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSchema] - # Output only. Arrow schema. - # - # Note: The following fields are mutually exclusive: `arrow_schema`, `avro_schema`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] table - # @return [::String] - # Immutable. Table that this ReadSession is reading from, in the form - # `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - # @!attribute [rw] table_modifiers - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableModifiers] - # Optional. Any modifiers which are applied when reading from the specified - # table. - # @!attribute [rw] read_options - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions] - # Optional. Read options for this session (e.g. column selection, filters). - # @!attribute [r] streams - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::ReadStream>] - # Output only. A list of streams created with the session. - # - # At least one stream is created with the session. In the future, larger - # request_stream_count values *may* result in this list being unpopulated, - # in that case, the user will need to use a List method to get the streams - # instead, which is not yet available. - # @!attribute [r] estimated_total_bytes_scanned - # @return [::Integer] - # Output only. An estimate on the number of bytes this session will scan when - # all streams are completely consumed. This estimate is based on - # metadata from the table which might be incomplete or stale. - # @!attribute [r] estimated_total_physical_file_size - # @return [::Integer] - # Output only. A pre-projected estimate of the total physical size of files - # (in bytes) that this session will scan when all streams are consumed. This - # estimate is independent of the selected columns and can be based on - # incomplete or stale metadata from the table. This field is only set for - # BigLake tables. - # @!attribute [r] estimated_row_count - # @return [::Integer] - # Output only. An estimate on the number of rows present in this session's - # streams. This estimate is based on metadata from the table which might be - # incomplete or stale. - # @!attribute [rw] trace_id - # @return [::String] - # Optional. ID set by client to annotate a session identity. This does not - # need to be strictly unique, but instead the same ID should be used to group - # logically connected sessions (e.g. All using the same ID for all sessions - # needed to complete a Spark SQL query is reasonable). - # - # Maximum length is 256 bytes. - class ReadSession - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional attributes when reading a table. - # @!attribute [rw] snapshot_time - # @return [::Google::Protobuf::Timestamp] - # The snapshot time of the table. If not set, interpreted as now. - class TableModifiers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options dictating how we read a table. - # @!attribute [rw] selected_fields - # @return [::Array<::String>] - # Optional. The names of the fields in the table to be returned. If no - # field names are specified, then all fields in the table are returned. - # - # Nested fields -- the child elements of a STRUCT field -- can be selected - # individually using their fully-qualified names, and will be returned as - # record fields containing only the selected nested fields. If a STRUCT - # field is specified in the selected fields list, all of the child elements - # will be returned. - # - # As an example, consider a table with the following schema: - # - # { - # "name": "struct_field", - # "type": "RECORD", - # "mode": "NULLABLE", - # "fields": [ - # { - # "name": "string_field1", - # "type": "STRING", - # . "mode": "NULLABLE" - # }, - # { - # "name": "string_field2", - # "type": "STRING", - # "mode": "NULLABLE" - # } - # ] - # } - # - # Specifying "struct_field" in the selected fields list will result in a - # read session schema with the following logical structure: - # - # struct_field { - # string_field1 - # string_field2 - # } - # - # Specifying "struct_field.string_field1" in the selected fields list will - # result in a read session schema with the following logical structure: - # - # struct_field { - # string_field1 - # } - # - # The order of the fields in the read session schema is derived from the - # table schema and does not correspond to the order in which the fields are - # specified in this list. - # @!attribute [rw] row_restriction - # @return [::String] - # SQL text filtering statement, similar to a WHERE clause in a query. - # Aggregates are not supported. - # - # Examples: "int_field > 5" - # "date_field = CAST('2014-9-27' as DATE)" - # "nullable_field is not NULL" - # "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - # "numeric_field BETWEEN 1.0 AND 5.0" - # - # Restricted to a maximum length for 1 MB. - # @!attribute [rw] arrow_serialization_options - # @return [::Google::Cloud::Bigquery::Storage::V1::ArrowSerializationOptions] - # Optional. Options specific to the Apache Arrow output format. - # - # Note: The following fields are mutually exclusive: `arrow_serialization_options`, `avro_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] avro_serialization_options - # @return [::Google::Cloud::Bigquery::Storage::V1::AvroSerializationOptions] - # Optional. Options specific to the Apache Avro output format - # - # Note: The following fields are mutually exclusive: `avro_serialization_options`, `arrow_serialization_options`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sample_percentage - # @return [::Float] - # Optional. Specifies a table sampling percentage. Specifically, the query - # planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - # sampling percentage is applied at the data block granularity. It will - # randomly choose for each data block whether to read the rows in that data - # block. For more details, see - # https://cloud.google.com/bigquery/docs/table-sampling) - # @!attribute [rw] response_compression_codec - # @return [::Google::Cloud::Bigquery::Storage::V1::ReadSession::TableReadOptions::ResponseCompressionCodec] - # Optional. Set response_compression_codec when creating a read session to - # enable application-level compression of ReadRows responses. - class TableReadOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies which compression codec to attempt on the entire serialized - # response payload (either Arrow record batch or Avro rows). This is - # not to be confused with the Apache Arrow native compression codecs - # specified in ArrowSerializationOptions. For performance reasons, when - # creating a read session requesting Arrow responses, setting both native - # Arrow compression and application-level response compression will not be - # allowed - choose, at most, one kind of compression. - module ResponseCompressionCodec - # Default is no compression. - RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0 - - # Use raw LZ4 compression. - RESPONSE_COMPRESSION_CODEC_LZ4 = 2 - end - end - end - - # Information about a single stream that gets data out of the storage system. - # Most of the information about `ReadStream` instances is aggregated, making - # `ReadStream` lightweight. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the stream, in the form - # `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - class ReadStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about a single stream that gets data inside the storage system. - # @!attribute [r] name - # @return [::String] - # Output only. Name of the stream, in the form - # `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::Type] - # Immutable. Type of the stream. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Create time of the stream. For the _default stream, this is - # the creation_time of the table. - # @!attribute [r] commit_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Commit time of the stream. - # If a stream is of `COMMITTED` type, then it will have a commit_time same as - # `create_time`. If the stream is of `PENDING` type, empty commit_time - # means it is not committed. - # @!attribute [r] table_schema - # @return [::Google::Cloud::Bigquery::Storage::V1::TableSchema] - # Output only. The schema of the destination table. It is only returned in - # `CreateWriteStream` response. Caller should generate data that's - # compatible with this schema to send in initial `AppendRowsRequest`. - # The table schema could go out of date during the life time of the stream. - # @!attribute [rw] write_mode - # @return [::Google::Cloud::Bigquery::Storage::V1::WriteStream::WriteMode] - # Immutable. Mode of the stream. - # @!attribute [r] location - # @return [::String] - # Output only. The geographic location where the stream's dataset resides. - # See https://cloud.google.com/bigquery/docs/locations for supported - # locations. - class WriteStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type enum of the stream. - module Type - # Unknown type. - TYPE_UNSPECIFIED = 0 - - # Data will commit automatically and appear as soon as the write is - # acknowledged. - COMMITTED = 1 - - # Data is invisible until the stream is committed. - PENDING = 2 - - # Data is only visible up to the offset to which it was flushed. - BUFFERED = 3 - end - - # Mode enum of the stream. - module WriteMode - # Unknown type. - WRITE_MODE_UNSPECIFIED = 0 - - # Insert new records into the table. - # It is the default value if customers do not specify it. - INSERT = 1 - end - end - - # Data format for input or output data. - module DataFormat - # Data format is unspecified. - DATA_FORMAT_UNSPECIFIED = 0 - - # Avro is a standard open source row based file format. - # See https://avro.apache.org/ for more details. - AVRO = 1 - - # Arrow is a standard open source column-based message format. - # See https://arrow.apache.org/ for more details. - ARROW = 2 - end - - # WriteStreamView is a view enum that controls what details about a write - # stream should be returned. - module WriteStreamView - # The default / unset value. - WRITE_STREAM_VIEW_UNSPECIFIED = 0 - - # The BASIC projection returns basic metadata about a write stream. The - # basic view does not include schema information. This is the default view - # returned by GetWriteStream. - BASIC = 1 - - # The FULL projection returns all available write stream metadata, including - # the schema. CreateWriteStream returns the full projection of write stream - # metadata. - FULL = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb deleted file mode 100644 index a014f79dc9d7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/cloud/bigquery/storage/v1/table.rb +++ /dev/null @@ -1,208 +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 Bigquery - module Storage - module V1 - # Schema of a table. This schema is a subset of - # google.cloud.bigquery.v2.TableSchema containing information necessary to - # generate valid message to write to BigQuery. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] - # Describes the fields in a table. - class TableSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # TableFieldSchema defines a single field/column within a table schema. - # @!attribute [rw] name - # @return [::String] - # Required. The field name. The name must contain only letters (a-z, A-Z), - # numbers (0-9), or underscores (_), and must start with a letter or - # underscore. The maximum length is 128 characters. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] - # Required. The field data type. - # @!attribute [rw] mode - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Mode] - # Optional. The field mode. The default value is NULLABLE. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema>] - # Optional. Describes the nested schema fields if the type property is set to - # STRUCT. - # @!attribute [rw] description - # @return [::String] - # Optional. The field description. The maximum length is 1,024 characters. - # @!attribute [rw] max_length - # @return [::Integer] - # Optional. Maximum length of values of this field for STRINGS or BYTES. - # - # If max_length is not specified, no maximum length constraint is imposed - # on this field. - # - # If type = "STRING", then max_length represents the maximum UTF-8 - # length of strings in this field. - # - # If type = "BYTES", then max_length represents the maximum number of - # bytes in this field. - # - # It is invalid to set this field if type is not "STRING" or "BYTES". - # @!attribute [rw] precision - # @return [::Integer] - # Optional. Precision (maximum number of total digits in base 10) and scale - # (maximum number of digits in the fractional part in base 10) constraints - # for values of this field for NUMERIC or BIGNUMERIC. - # - # It is invalid to set precision or scale if type is not "NUMERIC" or - # "BIGNUMERIC". - # - # If precision and scale are not specified, no value range constraint is - # imposed on this field insofar as values are permitted by the type. - # - # Values of this NUMERIC or BIGNUMERIC field must be in this range when: - # - # * Precision (P) and scale (S) are specified: - # [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - # * Precision (P) is specified but not scale (and thus scale is - # interpreted to be equal to zero): - # [-10^P + 1, 10^P - 1]. - # - # Acceptable values for precision and scale if both are specified: - # - # * If type = "NUMERIC": - # 1 <= precision - scale <= 29 and 0 <= scale <= 9. - # * If type = "BIGNUMERIC": - # 1 <= precision - scale <= 38 and 0 <= scale <= 38. - # - # Acceptable values for precision if only precision is specified but not - # scale (and thus scale is interpreted to be equal to zero): - # - # * If type = "NUMERIC": 1 <= precision <= 29. - # * If type = "BIGNUMERIC": 1 <= precision <= 38. - # - # If scale is specified but not precision, then it is invalid. - # @!attribute [rw] scale - # @return [::Integer] - # Optional. See documentation for precision. - # @!attribute [rw] default_value_expression - # @return [::String] - # Optional. A SQL expression to specify the [default value] - # (https://cloud.google.com/bigquery/docs/default-values) for this field. - # @!attribute [rw] timestamp_precision - # @return [::Google::Protobuf::Int64Value] - # Optional. Precision (maximum number of total digits in base 10) for seconds - # of TIMESTAMP type. - # - # Possible values include: - # - # * 6 (Default, for TIMESTAMP type with microsecond precision) - # * 12 (For TIMESTAMP type with picosecond precision) - # @!attribute [rw] range_element_type - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::FieldElementType] - # Optional. The subtype of the RANGE, if the type of this field is RANGE. If - # the type is RANGE, this field is required. Possible values for the field - # element type of a RANGE include: - # * DATE - # * DATETIME - # * TIMESTAMP - class TableFieldSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the type of a field element. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigquery::Storage::V1::TableFieldSchema::Type] - # Required. The type of a field element. - class FieldElementType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module Type - # Illegal value - TYPE_UNSPECIFIED = 0 - - # 64K, UTF8 - STRING = 1 - - # 64-bit signed - INT64 = 2 - - # 64-bit IEEE floating point - DOUBLE = 3 - - # Aggregate type - STRUCT = 4 - - # 64K, Binary - BYTES = 5 - - # 2-valued - BOOL = 6 - - # 64-bit signed usec since UTC epoch - TIMESTAMP = 7 - - # Civil date - Year, Month, Day - DATE = 8 - - # Civil time - Hour, Minute, Second, Microseconds - TIME = 9 - - # Combination of civil date and civil time - DATETIME = 10 - - # Geography object - GEOGRAPHY = 11 - - # Numeric value - NUMERIC = 12 - - # BigNumeric value - BIGNUMERIC = 13 - - # Interval - INTERVAL = 14 - - # JSON, String - JSON = 15 - - # RANGE - RANGE = 16 - end - - module Mode - # Illegal value - MODE_UNSPECIFIED = 0 - - NULLABLE = 1 - - REQUIRED = 2 - - REPEATED = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +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 - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/Gemfile deleted file mode 100644 index 3ec30152a26d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-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-bigquery-storage-v1", path: "../" -else - gem "google-cloud-bigquery-storage-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-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.rb deleted file mode 100644 index 97d4edfc8251..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/create_read_session.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 bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the create_read_session call in the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session. -# -def create_read_session - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new - - # Call the create_read_session method. - result = client.create_read_session request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::ReadSession. - p result -end -# [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb deleted file mode 100644 index a10ecf50c1c7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/read_rows.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the read_rows call in the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::Client#read_rows. -# -def read_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new - - # Call the read_rows method to start streaming. - output = client.read_rows request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse - output.each do |current_response| - p current_response - end -end -# [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.rb deleted file mode 100644 index f0a8033cec49..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_read/split_read_stream.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 bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the split_read_stream call in the BigQueryRead 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::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream. -# -def split_read_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new - - # Call the split_read_stream method. - result = client.split_read_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb deleted file mode 100644 index 291fbc8d14ad..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/append_rows.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the append_rows call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows. -# -def append_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the append_rows method to start streaming. - output = client.append_rows input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - input << Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse - output.each do |current_response| - p current_response - end -end -# [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.rb deleted file mode 100644 index c7e6925c2f99..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/batch_commit_write_streams.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 bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the batch_commit_write_streams call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams. -# -def batch_commit_write_streams - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new - - # Call the batch_commit_write_streams method. - result = client.batch_commit_write_streams request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.rb deleted file mode 100644 index ad3883cf57b1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/create_write_stream.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 bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the create_write_stream call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream. -# -def create_write_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new - - # Call the create_write_stream method. - result = client.create_write_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.rb deleted file mode 100644 index a8f857e48124..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/finalize_write_stream.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 bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the finalize_write_stream call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream. -# -def finalize_write_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new - - # Call the finalize_write_stream method. - result = client.finalize_write_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.rb deleted file mode 100644 index 47533a19a759..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/flush_rows.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 bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the flush_rows call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows. -# -def flush_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new - - # Call the flush_rows method. - result = client.flush_rows request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.rb deleted file mode 100644 index a30ea12d7684..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/big_query_write/get_write_stream.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 bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] -require "google/cloud/bigquery/storage/v1" - -## -# Snippet for the get_write_stream call in the BigQueryWrite 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::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream. -# -def get_write_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new - - # Call the get_write_stream method. - result = client.get_write_stream request - - # The returned object is of type Google::Cloud::Bigquery::Storage::V1::WriteStream. - p result -end -# [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json b/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json deleted file mode 100644 index b6c6f418de1d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/snippets/snippet_metadata_google.cloud.bigquery.storage.v1.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigquery-storage-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.bigquery.storage.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync", - "title": "Snippet for the create_read_session call in the BigQueryRead service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session.", - "file": "big_query_read/create_read_session.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_read_session", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#create_read_session", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadSession", - "client": { - "short_name": "BigQueryRead::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" - }, - "method": { - "short_name": "CreateReadSession", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.CreateReadSession", - "service": { - "short_name": "BigQueryRead", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync", - "title": "Snippet for the read_rows call in the BigQueryRead service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows.", - "file": "big_query_read/read_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "read_rows", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#read_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse", - "client": { - "short_name": "BigQueryRead::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" - }, - "method": { - "short_name": "ReadRows", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.ReadRows", - "service": { - "short_name": "BigQueryRead", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync", - "title": "Snippet for the split_read_stream call in the BigQueryRead service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream.", - "file": "big_query_read/split_read_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "split_read_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client#split_read_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse", - "client": { - "short_name": "BigQueryRead::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client" - }, - "method": { - "short_name": "SplitReadStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead.SplitReadStream", - "service": { - "short_name": "BigQueryRead", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryRead" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync", - "title": "Snippet for the create_write_stream call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream.", - "file": "big_query_write/create_write_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_write_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#create_write_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "CreateWriteStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.CreateWriteStream", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync", - "title": "Snippet for the append_rows call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows.", - "file": "big_query_write/append_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "append_rows", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#append_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "AppendRows", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.AppendRows", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync", - "title": "Snippet for the get_write_stream call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream.", - "file": "big_query_write/get_write_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_write_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#get_write_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::WriteStream", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "GetWriteStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.GetWriteStream", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync", - "title": "Snippet for the finalize_write_stream call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream.", - "file": "big_query_write/finalize_write_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "finalize_write_stream", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#finalize_write_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "FinalizeWriteStream", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FinalizeWriteStream", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync", - "title": "Snippet for the batch_commit_write_streams call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams.", - "file": "big_query_write/batch_commit_write_streams.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_commit_write_streams", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#batch_commit_write_streams", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "BatchCommitWriteStreams", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.BatchCommitWriteStreams", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync", - "title": "Snippet for the flush_rows call in the BigQueryWrite service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows.", - "file": "big_query_write/flush_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "flush_rows", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client#flush_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse", - "client": { - "short_name": "BigQueryWrite::Client", - "full_name": "::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client" - }, - "method": { - "short_name": "FlushRows", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite.FlushRows", - "service": { - "short_name": "BigQueryWrite", - "full_name": "google.cloud.bigquery.storage.v1.BigQueryWrite" - } - } - }, - "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-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb deleted file mode 100644 index 87827e1ac024..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_paths_test.rb +++ /dev/null @@ -1,91 +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/bigquery/storage/v1/big_query_read" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_read_session_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.read_session_path project: "value0", location: "value1", session: "value2" - assert_equal "projects/value0/locations/value1/sessions/value2", path - end - end - - def test_read_stream_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.read_stream_path project: "value0", location: "value1", session: "value2", stream: "value3" - assert_equal "projects/value0/locations/value1/sessions/value2/streams/value3", path - end - end - - def test_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_path project: "value0", dataset: "value1", table: "value2" - assert_equal "projects/value0/datasets/value1/tables/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb deleted file mode 100644 index 72e2c0ad909b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_read_test.rb +++ /dev/null @@ -1,303 +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/bigquery/storage/v1/storage_pb" -require "google/cloud/bigquery/storage/v1/big_query_read" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::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_create_read_session - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadSession.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" - read_session = {} - max_stream_count = 42 - preferred_min_stream_count = 42 - - create_read_session_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_read_session, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::ReadSession), request["read_session"] - assert_equal 42, request["max_stream_count"] - assert_equal 42, request["preferred_min_stream_count"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_read_session_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_read_session parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_read_session ::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_read_session({ parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_read_session(::Google::Cloud::Bigquery::Storage::V1::CreateReadSessionRequest.new(parent: parent, read_session: read_session, max_stream_count: max_stream_count, preferred_min_stream_count: preferred_min_stream_count), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_read_session_client_stub.call_rpc_count - end - end - - def test_read_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse.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 server streaming method. - read_stream = "hello world" - offset = 42 - - read_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :read_rows, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest, request - assert_equal "hello world", request["read_stream"] - assert_equal 42, request["offset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, read_rows_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.read_rows({ read_stream: read_stream, offset: offset }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.read_rows read_stream: read_stream, offset: offset do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.read_rows ::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.read_rows({ read_stream: read_stream, offset: offset }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.read_rows(::Google::Cloud::Bigquery::Storage::V1::ReadRowsRequest.new(read_stream: read_stream, offset: offset), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, read_rows_client_stub.call_rpc_count - end - end - - def test_split_read_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamResponse.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" - fraction = 3.5 - - split_read_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :split_read_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest, request - assert_equal "hello world", request["name"] - assert_equal 3.5, request["fraction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, split_read_stream_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.split_read_stream({ name: name, fraction: fraction }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.split_read_stream name: name, fraction: fraction do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.split_read_stream ::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.split_read_stream({ name: name, fraction: fraction }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.split_read_stream(::Google::Cloud::Bigquery::Storage::V1::SplitReadStreamRequest.new(name: name, fraction: fraction), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, split_read_stream_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::Bigquery::Storage::V1::BigQueryRead::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::Bigquery::Storage::V1::BigQueryRead::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::Bigquery::Storage::V1::BigQueryRead::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryRead::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb deleted file mode 100644 index aeeebb7c4e2d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_paths_test.rb +++ /dev/null @@ -1,67 +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/bigquery/storage/v1/big_query_write" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_path project: "value0", dataset: "value1", table: "value2" - assert_equal "projects/value0/datasets/value1/tables/value2", path - end - end - - def test_write_stream_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.write_stream_path project: "value0", dataset: "value1", table: "value2", stream: "value3" - assert_equal "projects/value0/datasets/value1/tables/value2/streams/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb deleted file mode 100644 index 2bcf14410d85..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/google/cloud/bigquery/storage/v1/big_query_write_test.rb +++ /dev/null @@ -1,501 +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/bigquery/storage/v1/storage_pb" -require "google/cloud/bigquery/storage/v1/big_query_write" - -class ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::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_create_write_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.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" - write_stream = {} - - create_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_write_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::WriteStream), request["write_stream"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_write_stream_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_write_stream({ parent: parent, write_stream: write_stream }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_write_stream parent: parent, write_stream: write_stream do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_write_stream ::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_write_stream({ parent: parent, write_stream: write_stream }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_write_stream(::Google::Cloud::Bigquery::Storage::V1::CreateWriteStreamRequest.new(parent: parent, write_stream: write_stream), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_write_stream_client_stub.call_rpc_count - end - end - - def test_append_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse.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 bidi streaming method. - write_stream = "hello world" - offset = {} - proto_rows = {} - trace_id = "hello world" - missing_value_interpretations = {} - default_missing_value_interpretation = :MISSING_VALUE_INTERPRETATION_UNSPECIFIED - - append_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :append_rows, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, append_rows_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation - enum_input = [request_hash, request_proto].to_enum - client.append_rows enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation - stream_input = Gapic::StreamInput.new - client.append_rows stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation - enum_input = [request_hash, request_proto].to_enum - client.append_rows enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation } - request_proto = ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest.new write_stream: write_stream, offset: offset, proto_rows: proto_rows, trace_id: trace_id, missing_value_interpretations: missing_value_interpretations, default_missing_value_interpretation: default_missing_value_interpretation - stream_input = Gapic::StreamInput.new - client.append_rows stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, append_rows_client_stub.call_rpc_count - append_rows_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest, r - assert_equal "hello world", r["write_stream"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), r["offset"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigquery::Storage::V1::AppendRowsRequest::ProtoData), r["proto_rows"] - assert_equal :proto_rows, r.rows - assert_equal "hello world", r["trace_id"] - assert_equal({}, r["missing_value_interpretations"].to_h) - assert_equal :MISSING_VALUE_INTERPRETATION_UNSPECIFIED, r["default_missing_value_interpretation"] - end - end - end - end - - def test_get_write_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::WriteStream.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :WRITE_STREAM_VIEW_UNSPECIFIED - - get_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_write_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest, request - assert_equal "hello world", request["name"] - assert_equal :WRITE_STREAM_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_write_stream_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_write_stream({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_write_stream name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_write_stream ::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_write_stream({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_write_stream(::Google::Cloud::Bigquery::Storage::V1::GetWriteStreamRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_write_stream_client_stub.call_rpc_count - end - end - - def test_finalize_write_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamResponse.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" - - finalize_write_stream_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :finalize_write_stream, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, finalize_write_stream_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.finalize_write_stream({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.finalize_write_stream name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.finalize_write_stream ::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.finalize_write_stream({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.finalize_write_stream(::Google::Cloud::Bigquery::Storage::V1::FinalizeWriteStreamRequest.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, finalize_write_stream_client_stub.call_rpc_count - end - end - - def test_batch_commit_write_streams - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsResponse.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" - write_streams = ["hello world"] - - batch_commit_write_streams_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_commit_write_streams, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest, request - assert_equal "hello world", request["parent"] - assert_equal ["hello world"], request["write_streams"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_commit_write_streams_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_commit_write_streams({ parent: parent, write_streams: write_streams }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_commit_write_streams parent: parent, write_streams: write_streams do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_commit_write_streams ::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_commit_write_streams({ parent: parent, write_streams: write_streams }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_commit_write_streams(::Google::Cloud::Bigquery::Storage::V1::BatchCommitWriteStreamsRequest.new(parent: parent, write_streams: write_streams), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_commit_write_streams_client_stub.call_rpc_count - end - end - - def test_flush_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigquery::Storage::V1::FlushRowsResponse.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. - write_stream = "hello world" - offset = {} - - flush_rows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :flush_rows, name - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest, request - assert_equal "hello world", request["write_stream"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Int64Value), request["offset"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, flush_rows_client_stub do - # Create client - client = ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.flush_rows({ write_stream: write_stream, offset: offset }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.flush_rows write_stream: write_stream, offset: offset do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.flush_rows ::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.flush_rows({ write_stream: write_stream, offset: offset }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.flush_rows(::Google::Cloud::Bigquery::Storage::V1::FlushRowsRequest.new(write_stream: write_stream, offset: offset), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, flush_rows_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::Bigquery::Storage::V1::BigQueryWrite::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::Bigquery::Storage::V1::BigQueryWrite::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::Bigquery::Storage::V1::BigQueryWrite::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigquery::Storage::V1::BigQueryWrite::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb b/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-storage-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/.gitignore b/owl-bot-staging/google-cloud-bigtable-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/.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-bigtable-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-bigtable-v2/.repo-metadata.json deleted file mode 100644 index 67418624d820..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "bigtable.googleapis.com", - "api_shortname": "bigtable", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-bigtable-v2/latest", - "distribution_name": "google-cloud-bigtable-v2", - "is_cloud": true, - "language": "ruby", - "name": "bigtable", - "name_pretty": "Cloud Bigtable V2 API", - "product_documentation": "https://cloud.google.com/bigtable", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Bigtable is a fully managed, scalable NoSQL database service for large analytical and operational workloads. Note that google-cloud-bigtable-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigtable instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BIGTABLE", - "ruby-cloud-product-url": "https://cloud.google.com/bigtable", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml b/owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml deleted file mode 100644 index c6789d42c34e..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-bigtable-v2.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-bigtable-v2.rb" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/.toys.rb b/owl-bot-staging/google-cloud-bigtable-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/.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-bigtable-v2/.yardopts b/owl-bot-staging/google-cloud-bigtable-v2/.yardopts deleted file mode 100644 index 93d06e2682af..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Bigtable V2 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-bigtable-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-bigtable-v2/AUTHENTICATION.md deleted file mode 100644 index 2deb52845e7f..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-bigtable-v2 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-bigtable-v2 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/bigtable/v2" - -client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/bigtable/v2" - -::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Bigtable::V2::Bigtable::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-bigtable-v2 -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/bigtable/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Bigtable::V2::Bigtable::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-bigtable-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-bigtable-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-bigtable-v2/Gemfile b/owl-bot-staging/google-cloud-bigtable-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/LICENSE.md b/owl-bot-staging/google-cloud-bigtable-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/README.md b/owl-bot-staging/google-cloud-bigtable-v2/README.md deleted file mode 100644 index 534ab3ad36cb..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Bigtable V2 API - -API for reading and writing the contents of Bigtable tables associated with a Google Cloud project. - -Cloud Bigtable is a fully managed, scalable NoSQL database service for large analytical and operational workloads. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Bigtable V2 API. Most users should consider using -the main client gem, -[google-cloud-bigtable](https://rubygems.org/gems/google-cloud-bigtable). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-bigtable-v2 -``` - -## 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/bigtable.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/bigtable/v2" - -client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new -request = ::Google::Cloud::Bigtable::V2::ReadRowsRequest.new # (request fields as keyword arguments...) -response = client.read_rows request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-bigtable-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/bigtable) -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/bigtable/v2" -require "logger" - -client = ::Google::Cloud::Bigtable::V2::Bigtable::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-bigtable`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-bigtable-v2`. -_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-bigtable`. -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-bigtable-v2`. - -### 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-bigtable-v2/Rakefile b/owl-bot-staging/google-cloud-bigtable-v2/Rakefile deleted file mode 100644 index 58adcace76f6..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BIGTABLE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BIGTABLE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BIGTABLE_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 BIGTABLE_TEST_PROJECT=test123 BIGTABLE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/bigtable/v2/bigtable/credentials" - ::Google::Cloud::Bigtable::V2::Bigtable::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BIGTABLE_PROJECT"] = project - ENV["BIGTABLE_TEST_PROJECT"] = project - ENV["BIGTABLE_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-bigtable-v2 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-bigtable-v2 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-bigtable-v2 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-bigtable-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-bigtable-v2" - header "google-cloud-bigtable-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-bigtable-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-bigtable-v2 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-bigtable-v2 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-bigtable-v2 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-bigtable-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigtable-v2/gapic_metadata.json deleted file mode 100644 index a72e2b5f2bcd..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.bigtable.v2", - "libraryPackage": "::Google::Cloud::Bigtable::V2", - "services": { - "Bigtable": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Bigtable::V2::Bigtable::Client", - "rpcs": { - "ReadRows": { - "methods": [ - "read_rows" - ] - }, - "SampleRowKeys": { - "methods": [ - "sample_row_keys" - ] - }, - "MutateRow": { - "methods": [ - "mutate_row" - ] - }, - "MutateRows": { - "methods": [ - "mutate_rows" - ] - }, - "CheckAndMutateRow": { - "methods": [ - "check_and_mutate_row" - ] - }, - "PingAndWarm": { - "methods": [ - "ping_and_warm" - ] - }, - "ReadModifyWriteRow": { - "methods": [ - "read_modify_write_row" - ] - }, - "GenerateInitialChangeStreamPartitions": { - "methods": [ - "generate_initial_change_stream_partitions" - ] - }, - "ReadChangeStream": { - "methods": [ - "read_change_stream" - ] - }, - "PrepareQuery": { - "methods": [ - "prepare_query" - ] - }, - "ExecuteQuery": { - "methods": [ - "execute_query" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec b/owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec deleted file mode 100644 index 33e81bd31fe0..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/google-cloud-bigtable-v2.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/bigtable/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-bigtable-v2" - gem.version = Google::Cloud::Bigtable::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Bigtable is a fully managed, scalable NoSQL database service for large analytical and operational workloads. Note that google-cloud-bigtable-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-bigtable instead. See the readme for more details." - gem.summary = "API for reading and writing the contents of Bigtable tables associated with a Google Cloud project." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.rb deleted file mode 100644 index 4f16a2e6aaab..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google-cloud-bigtable-v2.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/bigtable/v2" diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb deleted file mode 100644 index f42bd06554dd..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/bigtable/v2/bigtable.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/api/routing_pb' -require 'google/bigtable/v2/data_pb' -require 'google/bigtable/v2/request_stats_pb' -require 'google/bigtable/v2/types_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n!google/bigtable/v2/bigtable.proto\x12\x12google.bigtable.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a\x1dgoogle/bigtable/v2/data.proto\x1a&google/bigtable/v2/request_stats.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xcc\x04\n\x0fReadRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x0b \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x05 \x01(\t\x12(\n\x04rows\x18\x02 \x01(\x0b\x32\x1a.google.bigtable.v2.RowSet\x12-\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x12\n\nrows_limit\x18\x04 \x01(\x03\x12P\n\x12request_stats_view\x18\x06 \x01(\x0e\x32\x34.google.bigtable.v2.ReadRowsRequest.RequestStatsView\x12\x10\n\x08reversed\x18\x07 \x01(\x08\"f\n\x10RequestStatsView\x12\"\n\x1eREQUEST_STATS_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12REQUEST_STATS_NONE\x10\x01\x12\x16\n\x12REQUEST_STATS_FULL\x10\x02\"\xb1\x03\n\x10ReadRowsResponse\x12>\n\x06\x63hunks\x18\x01 \x03(\x0b\x32..google.bigtable.v2.ReadRowsResponse.CellChunk\x12\x1c\n\x14last_scanned_row_key\x18\x02 \x01(\x0c\x12\x37\n\rrequest_stats\x18\x03 \x01(\x0b\x32 .google.bigtable.v2.RequestStats\x1a\x85\x02\n\tCellChunk\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x31\n\x0b\x66\x61mily_name\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12.\n\tqualifier\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x12\x18\n\x10timestamp_micros\x18\x04 \x01(\x03\x12\x0e\n\x06labels\x18\x05 \x03(\t\x12\r\n\x05value\x18\x06 \x01(\x0c\x12\x12\n\nvalue_size\x18\x07 \x01(\x05\x12\x13\n\treset_row\x18\x08 \x01(\x08H\x00\x12\x14\n\ncommit_row\x18\t \x01(\x08H\x00\x42\x0c\n\nrow_status\"\x98\x02\n\x14SampleRowKeysRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x04 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12U\n\x16materialized_view_name\x18\x05 \x01(\tB5\xe0\x41\x01\xfa\x41/\n-bigtableadmin.googleapis.com/MaterializedView\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\">\n\x15SampleRowKeysResponse\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x14\n\x0coffset_bytes\x18\x02 \x01(\x03\"\xbf\x02\n\x10MutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x34\n\tmutations\x18\x03 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x08 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\x13\n\x11MutateRowResponse\"\x88\x03\n\x11MutateRowsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x05 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x03 \x01(\t\x12\x41\n\x07\x65ntries\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.MutateRowsRequest.EntryB\x03\xe0\x41\x02\x1a\x84\x01\n\x05\x45ntry\x12\x0f\n\x07row_key\x18\x01 \x01(\x0c\x12\x34\n\tmutations\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.MutationB\x03\xe0\x41\x02\x12\x34\n\x0bidempotency\x18\x03 \x01(\x0b\x32\x1f.google.bigtable.v2.Idempotency\"\xe4\x01\n\x12MutateRowsResponse\x12=\n\x07\x65ntries\x18\x01 \x03(\x0b\x32,.google.bigtable.v2.MutateRowsResponse.Entry\x12?\n\x0frate_limit_info\x18\x03 \x01(\x0b\x32!.google.bigtable.v2.RateLimitInfoH\x00\x88\x01\x01\x1a:\n\x05\x45ntry\x12\r\n\x05index\x18\x01 \x01(\x03\x12\"\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x12\n\x10_rate_limit_info\"J\n\rRateLimitInfo\x12)\n\x06period\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06\x66\x61\x63tor\x18\x02 \x01(\x01\"\x81\x03\n\x18\x43heckAndMutateRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\t \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x07 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12\x37\n\x10predicate_filter\x18\x06 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x34\n\x0etrue_mutations\x18\x04 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\x12\x35\n\x0f\x66\x61lse_mutations\x18\x05 \x03(\x0b\x32\x1c.google.bigtable.v2.Mutation\"6\n\x19\x43heckAndMutateRowResponse\x12\x19\n\x11predicate_matched\x18\x01 \x01(\x08\"i\n\x12PingAndWarmRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"\x15\n\x13PingAndWarmResponse\"\x99\x02\n\x19ReadModifyWriteRowRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12Q\n\x14\x61uthorized_view_name\x18\x06 \x01(\tB3\xe0\x41\x01\xfa\x41-\n+bigtableadmin.googleapis.com/AuthorizedView\x12\x16\n\x0e\x61pp_profile_id\x18\x04 \x01(\t\x12\x14\n\x07row_key\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\x12;\n\x05rules\x18\x03 \x03(\x0b\x32\'.google.bigtable.v2.ReadModifyWriteRuleB\x03\xe0\x41\x02\"B\n\x1aReadModifyWriteRowResponse\x12$\n\x03row\x18\x01 \x01(\x0b\x32\x17.google.bigtable.v2.Row\"\x86\x01\n,GenerateInitialChangeStreamPartitionsRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\"g\n-GenerateInitialChangeStreamPartitionsResponse\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\"\x9b\x03\n\x17ReadChangeStreamRequest\x12>\n\ntable_name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"bigtableadmin.googleapis.com/Table\x12\x16\n\x0e\x61pp_profile_id\x18\x02 \x01(\t\x12\x36\n\tpartition\x18\x03 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\x30\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12K\n\x13\x63ontinuation_tokens\x18\x06 \x01(\x0b\x32,.google.bigtable.v2.StreamContinuationTokensH\x00\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x12heartbeat_duration\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\n\nstart_from\"\xa9\n\n\x18ReadChangeStreamResponse\x12N\n\x0b\x64\x61ta_change\x18\x01 \x01(\x0b\x32\x37.google.bigtable.v2.ReadChangeStreamResponse.DataChangeH\x00\x12K\n\theartbeat\x18\x02 \x01(\x0b\x32\x36.google.bigtable.v2.ReadChangeStreamResponse.HeartbeatH\x00\x12P\n\x0c\x63lose_stream\x18\x03 \x01(\x0b\x32\x38.google.bigtable.v2.ReadChangeStreamResponse.CloseStreamH\x00\x1a\xf4\x01\n\rMutationChunk\x12X\n\nchunk_info\x18\x01 \x01(\x0b\x32\x44.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo\x12.\n\x08mutation\x18\x02 \x01(\x0b\x32\x1c.google.bigtable.v2.Mutation\x1aY\n\tChunkInfo\x12\x1a\n\x12\x63hunked_value_size\x18\x01 \x01(\x05\x12\x1c\n\x14\x63hunked_value_offset\x18\x02 \x01(\x05\x12\x12\n\nlast_chunk\x18\x03 \x01(\x08\x1a\xc6\x03\n\nDataChange\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type\x12\x19\n\x11source_cluster_id\x18\x02 \x01(\t\x12\x0f\n\x07row_key\x18\x03 \x01(\x0c\x12\x34\n\x10\x63ommit_timestamp\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ntiebreaker\x18\x05 \x01(\x05\x12J\n\x06\x63hunks\x18\x06 \x03(\x0b\x32:.google.bigtable.v2.ReadChangeStreamResponse.MutationChunk\x12\x0c\n\x04\x64one\x18\x08 \x01(\x08\x12\r\n\x05token\x18\t \x01(\t\x12;\n\x17\x65stimated_low_watermark\x18\n \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"P\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04USER\x10\x01\x12\x16\n\x12GARBAGE_COLLECTION\x10\x02\x12\x10\n\x0c\x43ONTINUATION\x10\x03\x1a\x91\x01\n\tHeartbeat\x12G\n\x12\x63ontinuation_token\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x17\x65stimated_low_watermark\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\xb8\x01\n\x0b\x43loseStream\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12H\n\x13\x63ontinuation_tokens\x18\x02 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\x12;\n\x0enew_partitions\x18\x03 \x03(\x0b\x32#.google.bigtable.v2.StreamPartitionB\x0f\n\rstream_record\"\xa1\x03\n\x13\x45xecuteQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x05query\x18\x03 \x01(\tB\x05\x18\x01\xe0\x41\x02\x12\x16\n\x0eprepared_query\x18\t \x01(\x0c\x12;\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatB\x02\x18\x01H\x00\x12\x19\n\x0cresume_token\x18\x08 \x01(\x0c\x42\x03\xe0\x41\x01\x12H\n\x06params\x18\x07 \x03(\x0b\x32\x33.google.bigtable.v2.ExecuteQueryRequest.ParamsEntryB\x03\xe0\x41\x02\x1aH\n\x0bParamsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x96\x01\n\x14\x45xecuteQueryResponse\x12\x39\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadataH\x00\x12\x37\n\x07results\x18\x02 \x01(\x0b\x32$.google.bigtable.v2.PartialResultSetH\x00\x42\n\n\x08response\"\xf4\x02\n\x13PrepareQueryRequest\x12\x44\n\rinstance_name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%bigtableadmin.googleapis.com/Instance\x12\x1b\n\x0e\x61pp_profile_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05query\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x0cproto_format\x18\x04 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoFormatH\x00\x12Q\n\x0bparam_types\x18\x06 \x03(\x0b\x32\x37.google.bigtable.v2.PrepareQueryRequest.ParamTypesEntryB\x03\xe0\x41\x02\x1aK\n\x0fParamTypesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\'\n\x05value\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type:\x02\x38\x01\x42\r\n\x0b\x64\x61ta_format\"\x98\x01\n\x14PrepareQueryResponse\x12\x37\n\x08metadata\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.ResultSetMetadata\x12\x16\n\x0eprepared_query\x18\x02 \x01(\x0c\x12/\n\x0bvalid_until\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xdb\'\n\x08\x42igtable\x12\xd5\x04\n\x08ReadRows\x12#.google.bigtable.v2.ReadRowsRequest\x1a$.google.bigtable.v2.ReadRowsResponse\"\xfb\x03\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\xf1\x01\"9/v2/{table_name=projects/*/instances/*/tables/*}:readRows:\x01*ZZ\"U/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readRows:\x01*ZU\"P/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:readRows:\x01*\x8a\xd3\xe4\x93\x02\xd3\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12:\n\x16materialized_view_name\x12 {name=projects/*/instances/*}/**0\x01\x12\xea\x04\n\rSampleRowKeys\x12(.google.bigtable.v2.SampleRowKeysRequest\x1a).google.bigtable.v2.SampleRowKeysResponse\"\x81\x04\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\xf7\x01\x12>/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeysZ\\\x12Z/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:sampleRowKeysZW\x12U/v2/{materialized_view_name=projects/*/instances/*/materializedViews/*}:sampleRowKeys\x8a\xd3\xe4\x93\x02\xd3\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12:\n\x16materialized_view_name\x12 {name=projects/*/instances/*}/**0\x01\x12\xe9\x03\n\tMutateRow\x12$.google.bigtable.v2.MutateRowRequest\x1a%.google.bigtable.v2.MutateRowResponse\"\x8e\x03\xda\x41\x1ctable_name,row_key,mutations\xda\x41+table_name,row_key,mutations,app_profile_id\x82\xd3\xe4\x93\x02\x9c\x01\":/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow:\x01*Z[\"V/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xdc\x03\n\nMutateRows\x12%.google.bigtable.v2.MutateRowsRequest\x1a&.google.bigtable.v2.MutateRowsResponse\"\xfc\x02\xda\x41\x12table_name,entries\xda\x41!table_name,entries,app_profile_id\x82\xd3\xe4\x93\x02\x9e\x01\";/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows:\x01*Z\\\"W/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:mutateRows:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**0\x01\x12\xdd\x04\n\x11\x43heckAndMutateRow\x12,.google.bigtable.v2.CheckAndMutateRowRequest\x1a-.google.bigtable.v2.CheckAndMutateRowResponse\"\xea\x03\xda\x41\x42table_name,row_key,predicate_filter,true_mutations,false_mutations\xda\x41Qtable_name,row_key,predicate_filter,true_mutations,false_mutations,app_profile_id\x82\xd3\xe4\x93\x02\xac\x01\"B/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow:\x01*Zc\"^/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:checkAndMutateRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xee\x01\n\x0bPingAndWarm\x12&.google.bigtable.v2.PingAndWarmRequest\x1a\'.google.bigtable.v2.PingAndWarmResponse\"\x8d\x01\xda\x41\x04name\xda\x41\x13name,app_profile_id\x82\xd3\xe4\x93\x02+\"&/v2/{name=projects/*/instances/*}:ping:\x01*\x8a\xd3\xe4\x93\x02\x39\x12%\n\x04name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\x8e\x04\n\x12ReadModifyWriteRow\x12-.google.bigtable.v2.ReadModifyWriteRowRequest\x1a..google.bigtable.v2.ReadModifyWriteRowResponse\"\x98\x03\xda\x41\x18table_name,row_key,rules\xda\x41\'table_name,row_key,rules,app_profile_id\x82\xd3\xe4\x93\x02\xae\x01\"C/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow:\x01*Zd\"_/v2/{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}:readModifyWriteRow:\x01*\x8a\xd3\xe4\x93\x02\x97\x01\x12:\n\ntable_name\x12,{table_name=projects/*/instances/*/tables/*}\x12\x10\n\x0e\x61pp_profile_id\x12G\n\x14\x61uthorized_view_name\x12/{table_name=projects/*/instances/*/tables/*}/**\x12\xbb\x02\n%GenerateInitialChangeStreamPartitions\x12@.google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest\x1a\x41.google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse\"\x8a\x01\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02[\"V/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions:\x01*0\x01\x12\xe6\x01\n\x10ReadChangeStream\x12+.google.bigtable.v2.ReadChangeStreamRequest\x1a,.google.bigtable.v2.ReadChangeStreamResponse\"u\xda\x41\ntable_name\xda\x41\x19table_name,app_profile_id\x82\xd3\xe4\x93\x02\x46\"A/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream:\x01*0\x01\x12\xa9\x02\n\x0cPrepareQuery\x12\'.google.bigtable.v2.PrepareQueryRequest\x1a(.google.bigtable.v2.PrepareQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:prepareQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id\x12\xab\x02\n\x0c\x45xecuteQuery\x12\'.google.bigtable.v2.ExecuteQueryRequest\x1a(.google.bigtable.v2.ExecuteQueryResponse\"\xc5\x01\xda\x41\x13instance_name,query\xda\x41\"instance_name,query,app_profile_id\x82\xd3\xe4\x93\x02<\"7/v2/{instance_name=projects/*/instances/*}:executeQuery:\x01*\x8a\xd3\xe4\x93\x02\x42\x12.\n\rinstance_name\x12\x1d{name=projects/*/instances/*}\x12\x10\n\x0e\x61pp_profile_id0\x01\x1a\xdb\x02\xca\x41\x17\x62igtable.googleapis.com\xd2\x41\xbd\x02https://www.googleapis.com/auth/bigtable.data,https://www.googleapis.com/auth/bigtable.data.readonly,https://www.googleapis.com/auth/cloud-bigtable.data,https://www.googleapis.com/auth/cloud-bigtable.data.readonly,https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-onlyB\xf5\x04\n\x16\x63om.google.bigtable.v2B\rBigtableProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2\xea\x41P\n%bigtableadmin.googleapis.com/Instance\x12\'projects/{project}/instances/{instance}\xea\x41\\\n\"bigtableadmin.googleapis.com/Table\x12\x36projects/{project}/instances/{instance}/tables/{table}\xea\x41\x87\x01\n+bigtableadmin.googleapis.com/AuthorizedView\x12Xprojects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}\xea\x41~\n-bigtableadmin.googleapis.com/MaterializedView\x12Mprojects/{project}/instances/{instance}/materializedViews/{materialized_view}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigtable - module V2 - ReadRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsRequest").msgclass - ReadRowsRequest::RequestStatsView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsRequest.RequestStatsView").enummodule - ReadRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsResponse").msgclass - ReadRowsResponse::CellChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadRowsResponse.CellChunk").msgclass - SampleRowKeysRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.SampleRowKeysRequest").msgclass - SampleRowKeysResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.SampleRowKeysResponse").msgclass - MutateRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowRequest").msgclass - MutateRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowResponse").msgclass - MutateRowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsRequest").msgclass - MutateRowsRequest::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsRequest.Entry").msgclass - MutateRowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsResponse").msgclass - MutateRowsResponse::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.MutateRowsResponse.Entry").msgclass - RateLimitInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RateLimitInfo").msgclass - CheckAndMutateRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.CheckAndMutateRowRequest").msgclass - CheckAndMutateRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.CheckAndMutateRowResponse").msgclass - PingAndWarmRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PingAndWarmRequest").msgclass - PingAndWarmResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PingAndWarmResponse").msgclass - ReadModifyWriteRowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRowRequest").msgclass - ReadModifyWriteRowResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRowResponse").msgclass - GenerateInitialChangeStreamPartitionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest").msgclass - GenerateInitialChangeStreamPartitionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse").msgclass - ReadChangeStreamRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamRequest").msgclass - ReadChangeStreamResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse").msgclass - ReadChangeStreamResponse::MutationChunk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.MutationChunk").msgclass - ReadChangeStreamResponse::MutationChunk::ChunkInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo").msgclass - ReadChangeStreamResponse::DataChange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.DataChange").msgclass - ReadChangeStreamResponse::DataChange::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type").enummodule - ReadChangeStreamResponse::Heartbeat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.Heartbeat").msgclass - ReadChangeStreamResponse::CloseStream = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadChangeStreamResponse.CloseStream").msgclass - ExecuteQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ExecuteQueryRequest").msgclass - ExecuteQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ExecuteQueryResponse").msgclass - PrepareQueryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PrepareQueryRequest").msgclass - PrepareQueryResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PrepareQueryResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb deleted file mode 100644 index dc36d1c5f9b5..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/bigtable_services_pb.rb +++ /dev/null @@ -1,86 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/bigtable/v2/bigtable.proto for package 'Google.Cloud.Bigtable.V2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/bigtable/v2/bigtable_pb' - -module Google - module Cloud - module Bigtable - module V2 - module Bigtable - # Service for reading from and writing to existing Bigtable tables. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.bigtable.v2.Bigtable' - - # Streams back the contents of all requested rows in key order, optionally - # applying the same Reader filter to each. Depending on their size, - # rows and cells may be broken up across multiple responses, but - # atomicity of each row will still be preserved. See the - # ReadRowsResponse documentation for details. - rpc :ReadRows, ::Google::Cloud::Bigtable::V2::ReadRowsRequest, stream(::Google::Cloud::Bigtable::V2::ReadRowsResponse) - # Returns a sample of row keys in the table. The returned row keys will - # delimit contiguous sections of the table of approximately equal size, - # which can be used to break up the data for distributed tasks like - # mapreduces. - rpc :SampleRowKeys, ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest, stream(::Google::Cloud::Bigtable::V2::SampleRowKeysResponse) - # Mutates a row atomically. Cells already present in the row are left - # unchanged unless explicitly changed by `mutation`. - rpc :MutateRow, ::Google::Cloud::Bigtable::V2::MutateRowRequest, ::Google::Cloud::Bigtable::V2::MutateRowResponse - # Mutates multiple rows in a batch. Each individual row is mutated - # atomically as in MutateRow, but the entire batch is not executed - # atomically. - rpc :MutateRows, ::Google::Cloud::Bigtable::V2::MutateRowsRequest, stream(::Google::Cloud::Bigtable::V2::MutateRowsResponse) - # Mutates a row atomically based on the output of a predicate Reader filter. - rpc :CheckAndMutateRow, ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest, ::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse - # Warm up associated instance metadata for this connection. - # This call is not required but may be useful for connection keep-alive. - rpc :PingAndWarm, ::Google::Cloud::Bigtable::V2::PingAndWarmRequest, ::Google::Cloud::Bigtable::V2::PingAndWarmResponse - # Modifies a row atomically on the server. The method reads the latest - # existing timestamp and value from the specified columns and writes a new - # entry based on pre-defined read/modify/write rules. The new value for the - # timestamp is the greater of the existing timestamp or the current server - # time. The method returns the new contents of all modified cells. - rpc :ReadModifyWriteRow, ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest, ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse - # Returns the current list of partitions that make up the table's - # change stream. The union of partitions will cover the entire keyspace. - # Partitions can be read with `ReadChangeStream`. - # NOTE: This API is only intended to be used by Apache Beam BigtableIO. - rpc :GenerateInitialChangeStreamPartitions, ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest, stream(::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse) - # Reads changes from a table's change stream. Changes will - # reflect both user-initiated mutations and mutations that are caused by - # garbage collection. - # NOTE: This API is only intended to be used by Apache Beam BigtableIO. - rpc :ReadChangeStream, ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest, stream(::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse) - # Prepares a GoogleSQL query for execution on a particular Bigtable instance. - rpc :PrepareQuery, ::Google::Cloud::Bigtable::V2::PrepareQueryRequest, ::Google::Cloud::Bigtable::V2::PrepareQueryResponse - # Executes a SQL query against a particular Bigtable instance. - rpc :ExecuteQuery, ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest, stream(::Google::Cloud::Bigtable::V2::ExecuteQueryResponse) - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb deleted file mode 100644 index 94d19a4d19ee..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/data_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/bigtable/v2/data.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/bigtable/v2/types_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' - - -descriptor_data = "\n\x1dgoogle/bigtable/v2/data.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1egoogle/bigtable/v2/types.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"@\n\x03Row\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12,\n\x08\x66\x61milies\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Family\"C\n\x06\x46\x61mily\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x1a.google.bigtable.v2.Column\"D\n\x06\x43olumn\x12\x11\n\tqualifier\x18\x01 \x01(\x0c\x12\'\n\x05\x63\x65lls\x18\x02 \x03(\x0b\x32\x18.google.bigtable.v2.Cell\"?\n\x04\x43\x65ll\x12\x18\n\x10timestamp_micros\x18\x01 \x01(\x03\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x0e\n\x06labels\x18\x03 \x03(\t\"\xf4\x02\n\x05Value\x12&\n\x04type\x18\x07 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x13\n\traw_value\x18\x08 \x01(\x0cH\x00\x12\x1e\n\x14raw_timestamp_micros\x18\t \x01(\x03H\x00\x12\x15\n\x0b\x62ytes_value\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0cstring_value\x18\x03 \x01(\tH\x00\x12\x13\n\tint_value\x18\x06 \x01(\x03H\x00\x12\x14\n\nbool_value\x18\n \x01(\x08H\x00\x12\x15\n\x0b\x66loat_value\x18\x0b \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\'\n\ndate_value\x18\r \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x35\n\x0b\x61rray_value\x18\x04 \x01(\x0b\x32\x1e.google.bigtable.v2.ArrayValueH\x00\x42\x06\n\x04kind\"7\n\nArrayValue\x12)\n\x06values\x18\x01 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"\x8a\x01\n\x08RowRange\x12\x1a\n\x10start_key_closed\x18\x01 \x01(\x0cH\x00\x12\x18\n\x0estart_key_open\x18\x02 \x01(\x0cH\x00\x12\x16\n\x0c\x65nd_key_open\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_key_closed\x18\x04 \x01(\x0cH\x01\x42\x0b\n\tstart_keyB\t\n\x07\x65nd_key\"L\n\x06RowSet\x12\x10\n\x08row_keys\x18\x01 \x03(\x0c\x12\x30\n\nrow_ranges\x18\x02 \x03(\x0b\x32\x1c.google.bigtable.v2.RowRange\"\xc6\x01\n\x0b\x43olumnRange\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12 \n\x16start_qualifier_closed\x18\x02 \x01(\x0cH\x00\x12\x1e\n\x14start_qualifier_open\x18\x03 \x01(\x0cH\x00\x12\x1e\n\x14\x65nd_qualifier_closed\x18\x04 \x01(\x0cH\x01\x12\x1c\n\x12\x65nd_qualifier_open\x18\x05 \x01(\x0cH\x01\x42\x11\n\x0fstart_qualifierB\x0f\n\rend_qualifier\"N\n\x0eTimestampRange\x12\x1e\n\x16start_timestamp_micros\x18\x01 \x01(\x03\x12\x1c\n\x14\x65nd_timestamp_micros\x18\x02 \x01(\x03\"\x98\x01\n\nValueRange\x12\x1c\n\x12start_value_closed\x18\x01 \x01(\x0cH\x00\x12\x1a\n\x10start_value_open\x18\x02 \x01(\x0cH\x00\x12\x1a\n\x10\x65nd_value_closed\x18\x03 \x01(\x0cH\x01\x12\x18\n\x0e\x65nd_value_open\x18\x04 \x01(\x0cH\x01\x42\r\n\x0bstart_valueB\x0b\n\tend_value\"\xdf\x08\n\tRowFilter\x12\x34\n\x05\x63hain\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.RowFilter.ChainH\x00\x12>\n\ninterleave\x18\x02 \x01(\x0b\x32(.google.bigtable.v2.RowFilter.InterleaveH\x00\x12<\n\tcondition\x18\x03 \x01(\x0b\x32\'.google.bigtable.v2.RowFilter.ConditionH\x00\x12\x0e\n\x04sink\x18\x10 \x01(\x08H\x00\x12\x19\n\x0fpass_all_filter\x18\x11 \x01(\x08H\x00\x12\x1a\n\x10\x62lock_all_filter\x18\x12 \x01(\x08H\x00\x12\x1e\n\x14row_key_regex_filter\x18\x04 \x01(\x0cH\x00\x12\x1b\n\x11row_sample_filter\x18\x0e \x01(\x01H\x00\x12\"\n\x18\x66\x61mily_name_regex_filter\x18\x05 \x01(\tH\x00\x12\'\n\x1d\x63olumn_qualifier_regex_filter\x18\x06 \x01(\x0cH\x00\x12>\n\x13\x63olumn_range_filter\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.ColumnRangeH\x00\x12\x44\n\x16timestamp_range_filter\x18\x08 \x01(\x0b\x32\".google.bigtable.v2.TimestampRangeH\x00\x12\x1c\n\x12value_regex_filter\x18\t \x01(\x0cH\x00\x12<\n\x12value_range_filter\x18\x0f \x01(\x0b\x32\x1e.google.bigtable.v2.ValueRangeH\x00\x12%\n\x1b\x63\x65lls_per_row_offset_filter\x18\n \x01(\x05H\x00\x12$\n\x1a\x63\x65lls_per_row_limit_filter\x18\x0b \x01(\x05H\x00\x12\'\n\x1d\x63\x65lls_per_column_limit_filter\x18\x0c \x01(\x05H\x00\x12!\n\x17strip_value_transformer\x18\r \x01(\x08H\x00\x12!\n\x17\x61pply_label_transformer\x18\x13 \x01(\tH\x00\x1a\x37\n\x05\x43hain\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a<\n\nInterleave\x12.\n\x07\x66ilters\x18\x01 \x03(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x1a\xad\x01\n\tCondition\x12\x37\n\x10predicate_filter\x18\x01 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x32\n\x0btrue_filter\x18\x02 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilter\x12\x33\n\x0c\x66\x61lse_filter\x18\x03 \x01(\x0b\x32\x1d.google.bigtable.v2.RowFilterB\x08\n\x06\x66ilter\"\xad\x08\n\x08Mutation\x12\x38\n\x08set_cell\x18\x01 \x01(\x0b\x32$.google.bigtable.v2.Mutation.SetCellH\x00\x12=\n\x0b\x61\x64\x64_to_cell\x18\x05 \x01(\x0b\x32&.google.bigtable.v2.Mutation.AddToCellH\x00\x12\x41\n\rmerge_to_cell\x18\x06 \x01(\x0b\x32(.google.bigtable.v2.Mutation.MergeToCellH\x00\x12K\n\x12\x64\x65lete_from_column\x18\x02 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromColumnH\x00\x12K\n\x12\x64\x65lete_from_family\x18\x03 \x01(\x0b\x32-.google.bigtable.v2.Mutation.DeleteFromFamilyH\x00\x12\x45\n\x0f\x64\x65lete_from_row\x18\x04 \x01(\x0b\x32*.google.bigtable.v2.Mutation.DeleteFromRowH\x00\x1a\x61\n\x07SetCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x18\n\x10timestamp_micros\x18\x03 \x01(\x03\x12\r\n\x05value\x18\x04 \x01(\x0c\x1a\xad\x01\n\tAddToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1a\xaf\x01\n\x0bMergeToCell\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x33\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12,\n\ttimestamp\x18\x03 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x12(\n\x05input\x18\x04 \x01(\x0b\x32\x19.google.bigtable.v2.Value\x1ay\n\x10\x44\x65leteFromColumn\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x36\n\ntime_range\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.TimestampRange\x1a\'\n\x10\x44\x65leteFromFamily\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x1a\x0f\n\rDeleteFromRowB\n\n\x08mutation\"\x80\x01\n\x13ReadModifyWriteRule\x12\x13\n\x0b\x66\x61mily_name\x18\x01 \x01(\t\x12\x18\n\x10\x63olumn_qualifier\x18\x02 \x01(\x0c\x12\x16\n\x0c\x61ppend_value\x18\x03 \x01(\x0cH\x00\x12\x1a\n\x10increment_amount\x18\x04 \x01(\x03H\x00\x42\x06\n\x04rule\"B\n\x0fStreamPartition\x12/\n\trow_range\x18\x01 \x01(\x0b\x32\x1c.google.bigtable.v2.RowRange\"W\n\x18StreamContinuationTokens\x12;\n\x06tokens\x18\x01 \x03(\x0b\x32+.google.bigtable.v2.StreamContinuationToken\"`\n\x17StreamContinuationToken\x12\x36\n\tpartition\x18\x01 \x01(\x0b\x32#.google.bigtable.v2.StreamPartition\x12\r\n\x05token\x18\x02 \x01(\t\"\r\n\x0bProtoFormat\"F\n\x0e\x43olumnMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\"B\n\x0bProtoSchema\x12\x33\n\x07\x63olumns\x18\x01 \x03(\x0b\x32\".google.bigtable.v2.ColumnMetadata\"V\n\x11ResultSetMetadata\x12\x37\n\x0cproto_schema\x18\x01 \x01(\x0b\x32\x1f.google.bigtable.v2.ProtoSchemaH\x00\x42\x08\n\x06schema\"6\n\tProtoRows\x12)\n\x06values\x18\x02 \x03(\x0b\x32\x19.google.bigtable.v2.Value\"$\n\x0eProtoRowsBatch\x12\x12\n\nbatch_data\x18\x01 \x01(\x0c\"\xd5\x01\n\x10PartialResultSet\x12>\n\x10proto_rows_batch\x18\x03 \x01(\x0b\x32\".google.bigtable.v2.ProtoRowsBatchH\x00\x12\x1b\n\x0e\x62\x61tch_checksum\x18\x06 \x01(\rH\x01\x88\x01\x01\x12\x14\n\x0cresume_token\x18\x05 \x01(\x0c\x12\r\n\x05reset\x18\x07 \x01(\x08\x12\x1c\n\x14\x65stimated_batch_size\x18\x04 \x01(\x05\x42\x0e\n\x0cpartial_rowsB\x11\n\x0f_batch_checksum\"L\n\x0bIdempotency\x12\r\n\x05token\x18\x01 \x01(\x0c\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\xb3\x01\n\x16\x63om.google.bigtable.v2B\tDataProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigtable - module V2 - Row = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Row").msgclass - Family = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Family").msgclass - Column = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Column").msgclass - Cell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Cell").msgclass - Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Value").msgclass - ArrayValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ArrayValue").msgclass - RowRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowRange").msgclass - RowSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowSet").msgclass - ColumnRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ColumnRange").msgclass - TimestampRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.TimestampRange").msgclass - ValueRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ValueRange").msgclass - RowFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter").msgclass - RowFilter::Chain = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter.Chain").msgclass - RowFilter::Interleave = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter.Interleave").msgclass - RowFilter::Condition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RowFilter.Condition").msgclass - Mutation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation").msgclass - Mutation::SetCell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.SetCell").msgclass - Mutation::AddToCell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.AddToCell").msgclass - Mutation::MergeToCell = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.MergeToCell").msgclass - Mutation::DeleteFromColumn = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.DeleteFromColumn").msgclass - Mutation::DeleteFromFamily = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.DeleteFromFamily").msgclass - Mutation::DeleteFromRow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Mutation.DeleteFromRow").msgclass - ReadModifyWriteRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadModifyWriteRule").msgclass - StreamPartition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.StreamPartition").msgclass - StreamContinuationTokens = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.StreamContinuationTokens").msgclass - StreamContinuationToken = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.StreamContinuationToken").msgclass - ProtoFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoFormat").msgclass - ColumnMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ColumnMetadata").msgclass - ProtoSchema = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoSchema").msgclass - ResultSetMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ResultSetMetadata").msgclass - ProtoRows = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoRows").msgclass - ProtoRowsBatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ProtoRowsBatch").msgclass - PartialResultSet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PartialResultSet").msgclass - Idempotency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Idempotency").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb deleted file mode 100644 index 9ac6658f8006..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/feature_flags_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/bigtable/v2/feature_flags.proto - -require 'google/protobuf' - - -descriptor_data = "\n&google/bigtable/v2/feature_flags.proto\x12\x12google.bigtable.v2\"\xb1\x02\n\x0c\x46\x65\x61tureFlags\x12\x15\n\rreverse_scans\x18\x01 \x01(\x08\x12\x1e\n\x16mutate_rows_rate_limit\x18\x03 \x01(\x08\x12\x1f\n\x17mutate_rows_rate_limit2\x18\x05 \x01(\x08\x12\"\n\x1alast_scanned_row_responses\x18\x04 \x01(\x08\x12\x16\n\x0erouting_cookie\x18\x06 \x01(\x08\x12\x12\n\nretry_info\x18\x07 \x01(\x08\x12#\n\x1b\x63lient_side_metrics_enabled\x18\x08 \x01(\x08\x12 \n\x18traffic_director_enabled\x18\t \x01(\x08\x12\x1f\n\x17\x64irect_access_requested\x18\n \x01(\x08\x12\x11\n\tpeer_info\x18\x0b \x01(\x08\x42\xbb\x01\n\x16\x63om.google.bigtable.v2B\x11\x46\x65\x61tureFlagsProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigtable - module V2 - FeatureFlags = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.FeatureFlags").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb deleted file mode 100644 index 8d46d3c4d318..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/peer_info_pb.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/bigtable/v2/peer_info.proto - -require 'google/protobuf' - - -descriptor_data = "\n\"google/bigtable/v2/peer_info.proto\x12\x12google.bigtable.v2\"\xfa\x03\n\x08PeerInfo\x12\x1a\n\x12google_frontend_id\x18\x01 \x01(\x03\x12\x1f\n\x17\x61pplication_frontend_id\x18\x02 \x01(\x03\x12!\n\x19\x61pplication_frontend_zone\x18\x03 \x01(\t\x12$\n\x1c\x61pplication_frontend_subzone\x18\x04 \x01(\t\x12\x42\n\x0etransport_type\x18\x05 \x01(\x0e\x32*.google.bigtable.v2.PeerInfo.TransportType\"\xa3\x02\n\rTransportType\x12\x1a\n\x16TRANSPORT_TYPE_UNKNOWN\x10\x00\x12\x1b\n\x17TRANSPORT_TYPE_EXTERNAL\x10\x01\x12\x1d\n\x19TRANSPORT_TYPE_CLOUD_PATH\x10\x02\x12 \n\x1cTRANSPORT_TYPE_DIRECT_ACCESS\x10\x03\x12\"\n\x1eTRANSPORT_TYPE_SESSION_UNKNOWN\x10\x04\x12#\n\x1fTRANSPORT_TYPE_SESSION_EXTERNAL\x10\x05\x12%\n!TRANSPORT_TYPE_SESSION_CLOUD_PATH\x10\x06\x12(\n$TRANSPORT_TYPE_SESSION_DIRECT_ACCESS\x10\x07\x42\xb7\x01\n\x16\x63om.google.bigtable.v2B\rPeerInfoProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigtable - module V2 - PeerInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PeerInfo").msgclass - PeerInfo::TransportType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.PeerInfo.TransportType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb deleted file mode 100644 index e9a78aa5a088..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/request_stats_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/bigtable/v2/request_stats.proto - -require 'google/protobuf' - -require 'google/protobuf/duration_pb' - - -descriptor_data = "\n&google/bigtable/v2/request_stats.proto\x12\x12google.bigtable.v2\x1a\x1egoogle/protobuf/duration.proto\"\x82\x01\n\x12ReadIterationStats\x12\x17\n\x0frows_seen_count\x18\x01 \x01(\x03\x12\x1b\n\x13rows_returned_count\x18\x02 \x01(\x03\x12\x18\n\x10\x63\x65lls_seen_count\x18\x03 \x01(\x03\x12\x1c\n\x14\x63\x65lls_returned_count\x18\x04 \x01(\x03\"Q\n\x13RequestLatencyStats\x12:\n\x17\x66rontend_server_latency\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\xa1\x01\n\x11\x46ullReadStatsView\x12\x44\n\x14read_iteration_stats\x18\x01 \x01(\x0b\x32&.google.bigtable.v2.ReadIterationStats\x12\x46\n\x15request_latency_stats\x18\x02 \x01(\x0b\x32\'.google.bigtable.v2.RequestLatencyStats\"c\n\x0cRequestStats\x12\x45\n\x14\x66ull_read_stats_view\x18\x01 \x01(\x0b\x32%.google.bigtable.v2.FullReadStatsViewH\x00\x42\x0c\n\nstats_viewB\xbb\x01\n\x16\x63om.google.bigtable.v2B\x11RequestStatsProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigtable - module V2 - ReadIterationStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ReadIterationStats").msgclass - RequestLatencyStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RequestLatencyStats").msgclass - FullReadStatsView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.FullReadStatsView").msgclass - RequestStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.RequestStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb deleted file mode 100644 index 633ab031729e..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/response_params_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/bigtable/v2/response_params.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/bigtable/v2/response_params.proto\x12\x12google.bigtable.v2\"z\n\x0eResponseParams\x12\x14\n\x07zone_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ncluster_id\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x13\n\x06\x61\x66\x65_id\x18\x03 \x01(\x03H\x02\x88\x01\x01\x42\n\n\x08_zone_idB\r\n\x0b_cluster_idB\t\n\x07_afe_idB\xbd\x01\n\x16\x63om.google.bigtable.v2B\x13ResponseParamsProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigtable - module V2 - ResponseParams = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.ResponseParams").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb deleted file mode 100644 index e55552c774fe..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/bigtable/v2/types_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/bigtable/v2/types.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n\x1egoogle/bigtable/v2/types.proto\x12\x12google.bigtable.v2\x1a\x1fgoogle/api/field_behavior.proto\"\x87\x18\n\x04Type\x12\x34\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesH\x00\x12\x36\n\x0bstring_type\x18\x02 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StringH\x00\x12\x34\n\nint64_type\x18\x05 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.Int64H\x00\x12\x38\n\x0c\x66loat32_type\x18\x0c \x01(\x0b\x32 .google.bigtable.v2.Type.Float32H\x00\x12\x38\n\x0c\x66loat64_type\x18\t \x01(\x0b\x32 .google.bigtable.v2.Type.Float64H\x00\x12\x32\n\tbool_type\x18\x08 \x01(\x0b\x32\x1d.google.bigtable.v2.Type.BoolH\x00\x12<\n\x0etimestamp_type\x18\n \x01(\x0b\x32\".google.bigtable.v2.Type.TimestampH\x00\x12\x32\n\tdate_type\x18\x0b \x01(\x0b\x32\x1d.google.bigtable.v2.Type.DateH\x00\x12<\n\x0e\x61ggregate_type\x18\x06 \x01(\x0b\x32\".google.bigtable.v2.Type.AggregateH\x00\x12\x36\n\x0bstruct_type\x18\x07 \x01(\x0b\x32\x1f.google.bigtable.v2.Type.StructH\x00\x12\x34\n\narray_type\x18\x03 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.ArrayH\x00\x12\x30\n\x08map_type\x18\x04 \x01(\x0b\x32\x1c.google.bigtable.v2.Type.MapH\x00\x12\x34\n\nproto_type\x18\r \x01(\x0b\x32\x1e.google.bigtable.v2.Type.ProtoH\x00\x12\x32\n\tenum_type\x18\x0e \x01(\x0b\x32\x1d.google.bigtable.v2.Type.EnumH\x00\x1a\xb3\x01\n\x05\x42ytes\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Bytes.Encoding\x1ao\n\x08\x45ncoding\x12:\n\x03raw\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.Type.Bytes.Encoding.RawH\x00\x1a\x1b\n\x03Raw\x12\x14\n\x0c\x65scape_nulls\x18\x01 \x01(\x08\x42\n\n\x08\x65ncoding\x1a\xa7\x02\n\x06String\x12:\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32(.google.bigtable.v2.Type.String.Encoding\x1a\xe0\x01\n\x08\x45ncoding\x12H\n\x08utf8_raw\x18\x01 \x01(\x0b\x32\x30.google.bigtable.v2.Type.String.Encoding.Utf8RawB\x02\x18\x01H\x00\x12H\n\nutf8_bytes\x18\x02 \x01(\x0b\x32\x32.google.bigtable.v2.Type.String.Encoding.Utf8BytesH\x00\x1a\r\n\x07Utf8Raw:\x02\x18\x01\x1a%\n\tUtf8Bytes\x12\x18\n\x10null_escape_char\x18\x01 \x01(\tB\n\n\x08\x65ncoding\x1a\xe5\x02\n\x05Int64\x12\x39\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Int64.Encoding\x1a\xa0\x02\n\x08\x45ncoding\x12R\n\x10\x62ig_endian_bytes\x18\x01 \x01(\x0b\x32\x36.google.bigtable.v2.Type.Int64.Encoding.BigEndianBytesH\x00\x12V\n\x12ordered_code_bytes\x18\x02 \x01(\x0b\x32\x38.google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytesH\x00\x1aH\n\x0e\x42igEndianBytes\x12\x36\n\nbytes_type\x18\x01 \x01(\x0b\x32\x1e.google.bigtable.v2.Type.BytesB\x02\x18\x01\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a\x06\n\x04\x42ool\x1a\t\n\x07\x46loat32\x1a\t\n\x07\x46loat64\x1a\xa8\x01\n\tTimestamp\x12=\n\x08\x65ncoding\x18\x01 \x01(\x0b\x32+.google.bigtable.v2.Type.Timestamp.Encoding\x1a\\\n\x08\x45ncoding\x12\x44\n\x11unix_micros_int64\x18\x01 \x01(\x0b\x32\'.google.bigtable.v2.Type.Int64.EncodingH\x00\x42\n\n\x08\x65ncoding\x1a\x06\n\x04\x44\x61te\x1a\x95\x04\n\x06Struct\x12\x35\n\x06\x66ields\x18\x01 \x03(\x0b\x32%.google.bigtable.v2.Type.Struct.Field\x12:\n\x08\x65ncoding\x18\x02 \x01(\x0b\x32(.google.bigtable.v2.Type.Struct.Encoding\x1a\x43\n\x05\x46ield\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12&\n\x04type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\xd2\x02\n\x08\x45ncoding\x12G\n\tsingleton\x18\x01 \x01(\x0b\x32\x32.google.bigtable.v2.Type.Struct.Encoding.SingletonH\x00\x12R\n\x0f\x64\x65limited_bytes\x18\x02 \x01(\x0b\x32\x37.google.bigtable.v2.Type.Struct.Encoding.DelimitedBytesH\x00\x12W\n\x12ordered_code_bytes\x18\x03 \x01(\x0b\x32\x39.google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytesH\x00\x1a\x0b\n\tSingleton\x1a#\n\x0e\x44\x65limitedBytes\x12\x11\n\tdelimiter\x18\x01 \x01(\x0c\x1a\x12\n\x10OrderedCodeBytesB\n\n\x08\x65ncoding\x1a\x37\n\x05Proto\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x14\n\x0cmessage_name\x18\x02 \x01(\t\x1a\x33\n\x04\x45num\x12\x18\n\x10schema_bundle_id\x18\x01 \x01(\t\x12\x11\n\tenum_name\x18\x02 \x01(\t\x1a\x37\n\x05\x41rray\x12.\n\x0c\x65lement_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a_\n\x03Map\x12*\n\x08key_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12,\n\nvalue_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x1a\xb7\x03\n\tAggregate\x12,\n\ninput_type\x18\x01 \x01(\x0b\x32\x18.google.bigtable.v2.Type\x12\x31\n\nstate_type\x18\x02 \x01(\x0b\x32\x18.google.bigtable.v2.TypeB\x03\xe0\x41\x03\x12\x35\n\x03sum\x18\x04 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.SumH\x00\x12_\n\x12hllpp_unique_count\x18\x05 \x01(\x0b\x32\x41.google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCountH\x00\x12\x35\n\x03max\x18\x06 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MaxH\x00\x12\x35\n\x03min\x18\x07 \x01(\x0b\x32&.google.bigtable.v2.Type.Aggregate.MinH\x00\x1a\x05\n\x03Sum\x1a\x05\n\x03Max\x1a\x05\n\x03Min\x1a \n\x1eHyperLogLogPlusPlusUniqueCountB\x0c\n\naggregatorB\x06\n\x04kindB\xb4\x01\n\x16\x63om.google.bigtable.v2B\nTypesProtoP\x01Z8cloud.google.com/go/bigtable/apiv2/bigtablepb;bigtablepb\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::V2b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Bigtable - module V2 - Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type").msgclass - Type::Bytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bytes").msgclass - Type::Bytes::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bytes.Encoding").msgclass - Type::Bytes::Encoding::Raw = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bytes.Encoding.Raw").msgclass - Type::String = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String").msgclass - Type::String::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String.Encoding").msgclass - Type::String::Encoding::Utf8Raw = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String.Encoding.Utf8Raw").msgclass - Type::String::Encoding::Utf8Bytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.String.Encoding.Utf8Bytes").msgclass - Type::Int64 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64").msgclass - Type::Int64::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64.Encoding").msgclass - Type::Int64::Encoding::BigEndianBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64.Encoding.BigEndianBytes").msgclass - Type::Int64::Encoding::OrderedCodeBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Int64.Encoding.OrderedCodeBytes").msgclass - Type::Bool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Bool").msgclass - Type::Float32 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Float32").msgclass - Type::Float64 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Float64").msgclass - Type::Timestamp = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Timestamp").msgclass - Type::Timestamp::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Timestamp.Encoding").msgclass - Type::Date = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Date").msgclass - Type::Struct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct").msgclass - Type::Struct::Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Field").msgclass - Type::Struct::Encoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding").msgclass - Type::Struct::Encoding::Singleton = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding.Singleton").msgclass - Type::Struct::Encoding::DelimitedBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding.DelimitedBytes").msgclass - Type::Struct::Encoding::OrderedCodeBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Struct.Encoding.OrderedCodeBytes").msgclass - Type::Proto = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Proto").msgclass - Type::Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Enum").msgclass - Type::Array = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Array").msgclass - Type::Map = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Map").msgclass - Type::Aggregate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate").msgclass - Type::Aggregate::Sum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.Sum").msgclass - Type::Aggregate::Max = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.Max").msgclass - Type::Aggregate::Min = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.Min").msgclass - Type::Aggregate::HyperLogLogPlusPlusUniqueCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.bigtable.v2.Type.Aggregate.HyperLogLogPlusPlusUniqueCount").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb deleted file mode 100644 index a38244a77770..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/bigtable/v2/bigtable" -require "google/cloud/bigtable/v2/version" - -module Google - module Cloud - module Bigtable - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/bigtable/v2" - # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/bigtable/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb deleted file mode 100644 index f7e9d3337d0b..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable.rb +++ /dev/null @@ -1,49 +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/bigtable/v2/version" - -require "google/cloud/bigtable/v2/bigtable/credentials" -require "google/cloud/bigtable/v2/bigtable/paths" -require "google/cloud/bigtable/v2/bigtable/client" - -module Google - module Cloud - module Bigtable - module V2 - ## - # Service for reading from and writing to existing Bigtable tables. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/bigtable/v2/bigtable" - # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - module Bigtable - end - end - end - end -end - -helper_path = ::File.join __dir__, "bigtable", "helpers.rb" -require "google/cloud/bigtable/v2/bigtable/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb deleted file mode 100644 index 3892f835ca57..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/client.rb +++ /dev/null @@ -1,1820 +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/bigtable/v2/bigtable_pb" - -module Google - module Cloud - module Bigtable - module V2 - module Bigtable - ## - # Client for the Bigtable service. - # - # Service for reading from and writing to existing Bigtable tables. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "bigtable.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :bigtable_stub - - ## - # Configure the Bigtable Client class. - # - # See {::Google::Cloud::Bigtable::V2::Bigtable::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Bigtable clients - # ::Google::Cloud::Bigtable::V2::Bigtable::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", "Bigtable", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.read_rows.timeout = 43_200.0 - - default_config.rpcs.sample_row_keys.timeout = 60.0 - - default_config.rpcs.mutate_row.timeout = 60.0 - default_config.rpcs.mutate_row.retry_policy = { - initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4] - } - - default_config.rpcs.mutate_rows.timeout = 600.0 - - default_config.rpcs.check_and_mutate_row.timeout = 20.0 - - default_config.rpcs.read_modify_write_row.timeout = 20.0 - - default_config.rpcs.generate_initial_change_stream_partitions.timeout = 60.0 - - default_config.rpcs.read_change_stream.timeout = 43_200.0 - - default_config.rpcs.execute_query.timeout = 43_200.0 - default_config.rpcs.execute_query.retry_policy = { - initial_delay: 0.01, max_delay: 60.0, multiplier: 2, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Bigtable 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::Bigtable::V2::Bigtable::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 - @bigtable_stub.universe_domain - end - - ## - # Create a new Bigtable client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Bigtable 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/bigtable/v2/bigtable_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 - - @bigtable_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Bigtable::V2::Bigtable::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 - ) - - @bigtable_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @bigtable_stub.logger - end - - # Service calls - - ## - # Streams back the contents of all requested rows in key order, optionally - # applying the same Reader filter to each. Depending on their size, - # rows and cells may be broken up across multiple responses, but - # atomicity of each row will still be preserved. See the - # ReadRowsResponse documentation for details. - # - # @overload read_rows(request, options = nil) - # Pass arguments to `read_rows` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::ReadRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::ReadRowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload read_rows(table_name: nil, authorized_view_name: nil, materialized_view_name: nil, app_profile_id: nil, rows: nil, filter: nil, rows_limit: nil, request_stats_view: nil, reversed: nil) - # Pass arguments to `read_rows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Optional. The unique name of the table from which to read. - # - # Values are of the form - # `projects//instances//tables/
`. - # @param authorized_view_name [::String] - # Optional. The unique name of the AuthorizedView from which to read. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @param materialized_view_name [::String] - # Optional. The unique name of the MaterializedView from which to read. - # - # Values are of the form - # `projects//instances//materializedViews/`. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @param rows [::Google::Cloud::Bigtable::V2::RowSet, ::Hash] - # The row keys and/or ranges to read sequentially. If not specified, reads - # from all rows. - # @param filter [::Google::Cloud::Bigtable::V2::RowFilter, ::Hash] - # The filter to apply to the contents of the specified row(s). If unset, - # reads the entirety of each row. - # @param rows_limit [::Integer] - # The read will stop after committing to N rows' worth of results. The - # default (zero) is to return all results. - # @param request_stats_view [::Google::Cloud::Bigtable::V2::ReadRowsRequest::RequestStatsView] - # The view into RequestStats, as described above. - # @param reversed [::Boolean] - # Experimental API - Please note that this API is currently experimental - # and can change in the future. - # - # Return rows in lexiographical descending order of the row keys. The row - # contents will not be affected by this flag. - # - # Example result set: - # - # [ - # {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - # {key: "k1", "f:col1": "v2", "f:col2": "v2"} - # ] - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::ReadRowsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigtable::V2::ReadRowsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::ReadRowsRequest.new - # - # # Call the read_rows method to start streaming. - # output = client.read_rows request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigtable::V2::ReadRowsResponse - # output.each do |current_response| - # p current_response - # end - # - def read_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ReadRowsRequest - - # Converts hash 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.read_rows.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::Bigtable::V2::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.table_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) - header_params["table_name"] = request.table_name - end - if request.authorized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name - if regex_match - header_params["table_name"] = regex_match["table_name".to_s] - end - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - if request.materialized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+)(?:/.*)?$}.match request.materialized_view_name - if regex_match - header_params["name"] = regex_match["name".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.read_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.read_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :read_rows, 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 - - ## - # Returns a sample of row keys in the table. The returned row keys will - # delimit contiguous sections of the table of approximately equal size, - # which can be used to break up the data for distributed tasks like - # mapreduces. - # - # @overload sample_row_keys(request, options = nil) - # Pass arguments to `sample_row_keys` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::SampleRowKeysRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::SampleRowKeysRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload sample_row_keys(table_name: nil, authorized_view_name: nil, materialized_view_name: nil, app_profile_id: nil) - # Pass arguments to `sample_row_keys` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Optional. The unique name of the table from which to sample row keys. - # - # Values are of the form - # `projects//instances//tables/
`. - # @param authorized_view_name [::String] - # Optional. The unique name of the AuthorizedView from which to sample row - # keys. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @param materialized_view_name [::String] - # Optional. The unique name of the MaterializedView from which to read. - # - # Values are of the form - # `projects//instances//materializedViews/`. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::SampleRowKeysResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigtable::V2::SampleRowKeysResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new - # - # # Call the sample_row_keys method to start streaming. - # output = client.sample_row_keys request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse - # output.each do |current_response| - # p current_response - # end - # - def sample_row_keys request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest - - # Converts hash 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.sample_row_keys.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::Bigtable::V2::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.table_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) - header_params["table_name"] = request.table_name - end - if request.authorized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name - if regex_match - header_params["table_name"] = regex_match["table_name".to_s] - end - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - if request.materialized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+)(?:/.*)?$}.match request.materialized_view_name - if regex_match - header_params["name"] = regex_match["name".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.sample_row_keys.timeout, - metadata: metadata, - retry_policy: @config.rpcs.sample_row_keys.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :sample_row_keys, 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 - - ## - # Mutates a row atomically. Cells already present in the row are left - # unchanged unless explicitly changed by `mutation`. - # - # @overload mutate_row(request, options = nil) - # Pass arguments to `mutate_row` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::MutateRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::MutateRowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload mutate_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, mutations: nil, idempotency: nil) - # Pass arguments to `mutate_row` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Optional. The unique name of the table to which the mutation should be - # applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @param authorized_view_name [::String] - # Optional. The unique name of the AuthorizedView to which the mutation - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @param row_key [::String] - # Required. The key of the row to which the mutation should be applied. - # @param mutations [::Array<::Google::Cloud::Bigtable::V2::Mutation, ::Hash>] - # Required. Changes to be atomically applied to the specified row. Entries - # are applied in order, meaning that earlier mutations can be masked by later - # ones. Must contain at least one entry and at most 100000. - # @param idempotency [::Google::Cloud::Bigtable::V2::Idempotency, ::Hash] - # If set consistently across retries, prevents this mutation from being - # double applied to aggregate column families within a 15m window. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigtable::V2::MutateRowResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigtable::V2::MutateRowResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::MutateRowRequest.new - # - # # Call the mutate_row method. - # result = client.mutate_row request - # - # # The returned object is of type Google::Cloud::Bigtable::V2::MutateRowResponse. - # p result - # - def mutate_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::MutateRowRequest - - # Converts hash 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.mutate_row.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::Bigtable::V2::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.table_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) - header_params["table_name"] = request.table_name - end - if request.authorized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name - if regex_match - header_params["table_name"] = regex_match["table_name".to_s] - end - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.mutate_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.mutate_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :mutate_row, 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 - - ## - # Mutates multiple rows in a batch. Each individual row is mutated - # atomically as in MutateRow, but the entire batch is not executed - # atomically. - # - # @overload mutate_rows(request, options = nil) - # Pass arguments to `mutate_rows` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::MutateRowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::MutateRowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload mutate_rows(table_name: nil, authorized_view_name: nil, app_profile_id: nil, entries: nil) - # Pass arguments to `mutate_rows` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Optional. The unique name of the table to which the mutations should be - # applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @param authorized_view_name [::String] - # Optional. The unique name of the AuthorizedView to which the mutations - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @param entries [::Array<::Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry, ::Hash>] - # Required. The row keys and corresponding mutations to be applied in bulk. - # Each entry is applied as an atomic mutation, but the entries may be - # applied in arbitrary order (even between entries for the same row). - # At least one entry must be specified, and in total the entries can - # contain at most 100000 mutations. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::MutateRowsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigtable::V2::MutateRowsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::MutateRowsRequest.new - # - # # Call the mutate_rows method to start streaming. - # output = client.mutate_rows request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigtable::V2::MutateRowsResponse - # output.each do |current_response| - # p current_response - # end - # - def mutate_rows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::MutateRowsRequest - - # Converts hash 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.mutate_rows.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::Bigtable::V2::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.table_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) - header_params["table_name"] = request.table_name - end - if request.authorized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name - if regex_match - header_params["table_name"] = regex_match["table_name".to_s] - end - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.mutate_rows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.mutate_rows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :mutate_rows, 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 - - ## - # Mutates a row atomically based on the output of a predicate Reader filter. - # - # @overload check_and_mutate_row(request, options = nil) - # Pass arguments to `check_and_mutate_row` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload check_and_mutate_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, predicate_filter: nil, true_mutations: nil, false_mutations: nil) - # Pass arguments to `check_and_mutate_row` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Optional. The unique name of the table to which the conditional mutation - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @param authorized_view_name [::String] - # Optional. The unique name of the AuthorizedView to which the conditional - # mutation should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @param row_key [::String] - # Required. The key of the row to which the conditional mutation should be - # applied. - # @param predicate_filter [::Google::Cloud::Bigtable::V2::RowFilter, ::Hash] - # The filter to be applied to the contents of the specified row. Depending - # on whether or not any results are yielded, either `true_mutations` or - # `false_mutations` will be executed. If unset, checks that the row contains - # any values at all. - # @param true_mutations [::Array<::Google::Cloud::Bigtable::V2::Mutation, ::Hash>] - # Changes to be atomically applied to the specified row if `predicate_filter` - # yields at least one cell when applied to `row_key`. Entries are applied in - # order, meaning that earlier mutations can be masked by later ones. - # Must contain at least one entry if `false_mutations` is empty, and at most - # 100000. - # @param false_mutations [::Array<::Google::Cloud::Bigtable::V2::Mutation, ::Hash>] - # Changes to be atomically applied to the specified row if `predicate_filter` - # does not yield any cells when applied to `row_key`. Entries are applied in - # order, meaning that earlier mutations can be masked by later ones. - # Must contain at least one entry if `true_mutations` is empty, and at most - # 100000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new - # - # # Call the check_and_mutate_row method. - # result = client.check_and_mutate_row request - # - # # The returned object is of type Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse. - # p result - # - def check_and_mutate_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest - - # Converts hash 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.check_and_mutate_row.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::Bigtable::V2::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.table_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) - header_params["table_name"] = request.table_name - end - if request.authorized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name - if regex_match - header_params["table_name"] = regex_match["table_name".to_s] - end - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.check_and_mutate_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.check_and_mutate_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :check_and_mutate_row, 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 - - ## - # Warm up associated instance metadata for this connection. - # This call is not required but may be useful for connection keep-alive. - # - # @overload ping_and_warm(request, options = nil) - # Pass arguments to `ping_and_warm` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::PingAndWarmRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::PingAndWarmRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload ping_and_warm(name: nil, app_profile_id: nil) - # Pass arguments to `ping_and_warm` via keyword arguments. Note that at - # least one keyword argument is 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 unique name of the instance to check permissions for as well - # as respond. Values are of the form - # `projects//instances/`. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigtable::V2::PingAndWarmResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigtable::V2::PingAndWarmResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::PingAndWarmRequest.new - # - # # Call the ping_and_warm method. - # result = client.ping_and_warm request - # - # # The returned object is of type Google::Cloud::Bigtable::V2::PingAndWarmResponse. - # p result - # - def ping_and_warm request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::PingAndWarmRequest - - # Converts hash 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.ping_and_warm.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::Bigtable::V2::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 && - %r{^projects/[^/]+/instances/[^/]+/?$}.match?(request.name) - header_params["name"] = request.name - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.ping_and_warm.timeout, - metadata: metadata, - retry_policy: @config.rpcs.ping_and_warm.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :ping_and_warm, 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 - - ## - # Modifies a row atomically on the server. The method reads the latest - # existing timestamp and value from the specified columns and writes a new - # entry based on pre-defined read/modify/write rules. The new value for the - # timestamp is the greater of the existing timestamp or the current server - # time. The method returns the new contents of all modified cells. - # - # @overload read_modify_write_row(request, options = nil) - # Pass arguments to `read_modify_write_row` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload read_modify_write_row(table_name: nil, authorized_view_name: nil, app_profile_id: nil, row_key: nil, rules: nil) - # Pass arguments to `read_modify_write_row` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Optional. The unique name of the table to which the read/modify/write rules - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @param authorized_view_name [::String] - # Optional. The unique name of the AuthorizedView to which the - # read/modify/write rules should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @param row_key [::String] - # Required. The key of the row to which the read/modify/write rules should be - # applied. - # @param rules [::Array<::Google::Cloud::Bigtable::V2::ReadModifyWriteRule, ::Hash>] - # Required. Rules specifying how the specified row's contents are to be - # transformed into writes. Entries are applied in order, meaning that earlier - # rules will affect the results of later ones. At least one entry must be - # specified, and there can be at most 100000 rules. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new - # - # # Call the read_modify_write_row method. - # result = client.read_modify_write_row request - # - # # The returned object is of type Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse. - # p result - # - def read_modify_write_row request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest - - # Converts hash 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.read_modify_write_row.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::Bigtable::V2::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.table_name && - %r{^projects/[^/]+/instances/[^/]+/tables/[^/]+/?$}.match?(request.table_name) - header_params["table_name"] = request.table_name - end - if request.authorized_view_name - regex_match = %r{^(?projects/[^/]+/instances/[^/]+/tables/[^/]+)(?:/.*)?$}.match request.authorized_view_name - if regex_match - header_params["table_name"] = regex_match["table_name".to_s] - end - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.read_modify_write_row.timeout, - metadata: metadata, - retry_policy: @config.rpcs.read_modify_write_row.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :read_modify_write_row, 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 - - ## - # Returns the current list of partitions that make up the table's - # change stream. The union of partitions will cover the entire keyspace. - # Partitions can be read with `ReadChangeStream`. - # NOTE: This API is only intended to be used by Apache Beam BigtableIO. - # - # @overload generate_initial_change_stream_partitions(request, options = nil) - # Pass arguments to `generate_initial_change_stream_partitions` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_initial_change_stream_partitions(table_name: nil, app_profile_id: nil) - # Pass arguments to `generate_initial_change_stream_partitions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Required. The unique name of the table from which to get change stream - # partitions. Values are of the form - # `projects//instances//tables/
`. - # Change streaming must be enabled on the table. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # Single cluster routing must be configured on the profile. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new - # - # # Call the generate_initial_change_stream_partitions method to start streaming. - # output = client.generate_initial_change_stream_partitions request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse - # output.each do |current_response| - # p current_response - # end - # - def generate_initial_change_stream_partitions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest - - # Converts hash 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_initial_change_stream_partitions.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::Bigtable::V2::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.table_name - header_params["table_name"] = request.table_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_initial_change_stream_partitions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_initial_change_stream_partitions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :generate_initial_change_stream_partitions, 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 - - ## - # Reads changes from a table's change stream. Changes will - # reflect both user-initiated mutations and mutations that are caused by - # garbage collection. - # NOTE: This API is only intended to be used by Apache Beam BigtableIO. - # - # @overload read_change_stream(request, options = nil) - # Pass arguments to `read_change_stream` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload read_change_stream(table_name: nil, app_profile_id: nil, partition: nil, start_time: nil, continuation_tokens: nil, end_time: nil, heartbeat_duration: nil) - # Pass arguments to `read_change_stream` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param table_name [::String] - # Required. The unique name of the table from which to read a change stream. - # Values are of the form - # `projects//instances//tables/
`. - # Change streaming must be enabled on the table. - # @param app_profile_id [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # Single cluster routing must be configured on the profile. - # @param partition [::Google::Cloud::Bigtable::V2::StreamPartition, ::Hash] - # The partition to read changes from. - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Start reading the stream at the specified timestamp. This timestamp must - # be within the change stream retention period, less than or equal to the - # current time, and after change stream creation, whichever is greater. - # This value is inclusive and will be truncated to microsecond granularity. - # - # Note: The following parameters are mutually exclusive: `start_time`, `continuation_tokens`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param continuation_tokens [::Google::Cloud::Bigtable::V2::StreamContinuationTokens, ::Hash] - # Tokens that describe how to resume reading a stream where reading - # previously left off. If specified, changes will be read starting at the - # the position. Tokens are delivered on the stream as part of `Heartbeat` - # and `CloseStream` messages. - # - # If a single token is provided, the token's partition must exactly match - # the request's partition. If multiple tokens are provided, as in the case - # of a partition merge, the union of the token partitions must exactly - # cover the request's partition. Otherwise, INVALID_ARGUMENT will be - # returned. - # - # Note: The following parameters are mutually exclusive: `continuation_tokens`, `start_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # If specified, OK will be returned when the stream advances beyond - # this time. Otherwise, changes will be continuously delivered on the stream. - # This value is inclusive and will be truncated to microsecond granularity. - # @param heartbeat_duration [::Google::Protobuf::Duration, ::Hash] - # If specified, the duration between `Heartbeat` messages on the stream. - # Otherwise, defaults to 5 seconds. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new - # - # # Call the read_change_stream method to start streaming. - # output = client.read_change_stream request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse - # output.each do |current_response| - # p current_response - # end - # - def read_change_stream request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest - - # Converts hash 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.read_change_stream.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::Bigtable::V2::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.table_name - header_params["table_name"] = request.table_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.read_change_stream.timeout, - metadata: metadata, - retry_policy: @config.rpcs.read_change_stream.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :read_change_stream, 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 - - ## - # Prepares a GoogleSQL query for execution on a particular Bigtable instance. - # - # @overload prepare_query(request, options = nil) - # Pass arguments to `prepare_query` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::PrepareQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::PrepareQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload prepare_query(instance_name: nil, app_profile_id: nil, query: nil, proto_format: nil, param_types: nil) - # Pass arguments to `prepare_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance_name [::String] - # Required. The unique name of the instance against which the query should be - # executed. - # Values are of the form `projects//instances/` - # @param app_profile_id [::String] - # Optional. This value specifies routing for preparing the query. Note that - # this `app_profile_id` is only used for preparing the query. The actual - # query execution will use the app profile specified in the - # `ExecuteQueryRequest`. If not specified, the `default` application profile - # will be used. - # @param query [::String] - # Required. The query string. - # @param proto_format [::Google::Cloud::Bigtable::V2::ProtoFormat, ::Hash] - # Protocol buffer format as described by ProtoSchema and ProtoRows - # messages. - # @param param_types [::Hash{::String => ::Google::Cloud::Bigtable::V2::Type, ::Hash}] - # Required. `param_types` is a map of parameter identifier strings to their - # `Type`s. - # - # In query string, a parameter placeholder consists of the - # `@` character followed by the parameter name (for example, `@firstName`) in - # the query string. - # - # For example, if param_types["firstName"] = Bytes then @firstName will be a - # query parameter of type Bytes. The specific `Value` to be used for the - # query execution must be sent in `ExecuteQueryRequest` in the `params` map. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Bigtable::V2::PrepareQueryResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Bigtable::V2::PrepareQueryResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::PrepareQueryRequest.new - # - # # Call the prepare_query method. - # result = client.prepare_query request - # - # # The returned object is of type Google::Cloud::Bigtable::V2::PrepareQueryResponse. - # p result - # - def prepare_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::PrepareQueryRequest - - # Converts hash 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.prepare_query.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::Bigtable::V2::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.instance_name && - %r{^projects/[^/]+/instances/[^/]+/?$}.match?(request.instance_name) - header_params["name"] = request.instance_name - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.prepare_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.prepare_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :prepare_query, 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 - - ## - # Executes a SQL query against a particular Bigtable instance. - # - # @overload execute_query(request, options = nil) - # Pass arguments to `execute_query` via a request object, either of type - # {::Google::Cloud::Bigtable::V2::ExecuteQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Bigtable::V2::ExecuteQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload execute_query(instance_name: nil, app_profile_id: nil, query: nil, prepared_query: nil, proto_format: nil, resume_token: nil, params: nil) - # Pass arguments to `execute_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param instance_name [::String] - # Required. The unique name of the instance against which the query should be - # executed. - # Values are of the form `projects//instances/` - # @param app_profile_id [::String] - # Optional. This value specifies routing for replication. If not specified, - # the `default` application profile will be used. - # @param query [::String] - # Required. The query string. - # - # Exactly one of `query` and `prepared_query` is required. Setting both - # or neither is an `INVALID_ARGUMENT`. - # @param prepared_query [::String] - # A prepared query that was returned from `PrepareQueryResponse`. - # - # Exactly one of `query` and `prepared_query` is required. Setting both - # or neither is an `INVALID_ARGUMENT`. - # - # Setting this field also places restrictions on several other fields: - # - `data_format` must be empty. - # - `validate_only` must be false. - # - `params` must match the `param_types` set in the `PrepareQueryRequest`. - # @param proto_format [::Google::Cloud::Bigtable::V2::ProtoFormat, ::Hash] - # Protocol buffer format as described by ProtoSchema and ProtoRows - # messages. - # @param resume_token [::String] - # Optional. If this request is resuming a previously interrupted query - # execution, `resume_token` should be copied from the last - # PartialResultSet yielded before the interruption. Doing this - # enables the query execution to resume where the last one left - # off. - # The rest of the request parameters must exactly match the - # request that yielded this token. Otherwise the request will fail. - # @param params [::Hash{::String => ::Google::Cloud::Bigtable::V2::Value, ::Hash}] - # Required. params contains string type keys and Bigtable type values that - # bind to placeholders in the query string. In query string, a parameter - # placeholder consists of the - # `@` character followed by the parameter name (for example, `@firstName`) in - # the query string. - # - # For example, if - # `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - # then `@firstName` will be replaced with googlesql bytes value "foo" in the - # query string during query evaluation. - # - # If `Value.kind` is not set, the value is treated as a NULL value of the - # given type. For example, if - # `params["firstName"] = type {string_type {}}` - # then `@firstName` will be replaced with googlesql null string. - # - # If `query` is set, any empty `Value.type` in the map will be rejected with - # `INVALID_ARGUMENT`. - # - # If `prepared_query` is set, any empty `Value.type` in the map will be - # inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty - # `Value.type` must match the corresponding `param_types` entry, or be - # rejected with `INVALID_ARGUMENT`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Bigtable::V2::ExecuteQueryResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Bigtable::V2::ExecuteQueryResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/bigtable/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new - # - # # Call the execute_query method to start streaming. - # output = client.execute_query request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse - # output.each do |current_response| - # p current_response - # end - # - def execute_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest - - # Converts hash 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.execute_query.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::Bigtable::V2::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.instance_name && - %r{^projects/[^/]+/instances/[^/]+/?$}.match?(request.instance_name) - header_params["name"] = request.instance_name - end - if request.app_profile_id && !request.app_profile_id.empty? - header_params["app_profile_id"] = request.app_profile_id - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.execute_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.execute_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @bigtable_stub.call_rpc :execute_query, 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 Bigtable API. - # - # This class represents the configuration for Bigtable, - # 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::Bigtable::V2::Bigtable::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 - # # read_rows to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Bigtable::V2::Bigtable::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.read_rows.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.read_rows.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::Bigtable::V2::Bigtable::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 = "bigtable.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 Bigtable 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 `read_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :read_rows - ## - # RPC-specific configuration for `sample_row_keys` - # @return [::Gapic::Config::Method] - # - attr_reader :sample_row_keys - ## - # RPC-specific configuration for `mutate_row` - # @return [::Gapic::Config::Method] - # - attr_reader :mutate_row - ## - # RPC-specific configuration for `mutate_rows` - # @return [::Gapic::Config::Method] - # - attr_reader :mutate_rows - ## - # RPC-specific configuration for `check_and_mutate_row` - # @return [::Gapic::Config::Method] - # - attr_reader :check_and_mutate_row - ## - # RPC-specific configuration for `ping_and_warm` - # @return [::Gapic::Config::Method] - # - attr_reader :ping_and_warm - ## - # RPC-specific configuration for `read_modify_write_row` - # @return [::Gapic::Config::Method] - # - attr_reader :read_modify_write_row - ## - # RPC-specific configuration for `generate_initial_change_stream_partitions` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_initial_change_stream_partitions - ## - # RPC-specific configuration for `read_change_stream` - # @return [::Gapic::Config::Method] - # - attr_reader :read_change_stream - ## - # RPC-specific configuration for `prepare_query` - # @return [::Gapic::Config::Method] - # - attr_reader :prepare_query - ## - # RPC-specific configuration for `execute_query` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_query - - # @private - def initialize parent_rpcs = nil - read_rows_config = parent_rpcs.read_rows if parent_rpcs.respond_to? :read_rows - @read_rows = ::Gapic::Config::Method.new read_rows_config - sample_row_keys_config = parent_rpcs.sample_row_keys if parent_rpcs.respond_to? :sample_row_keys - @sample_row_keys = ::Gapic::Config::Method.new sample_row_keys_config - mutate_row_config = parent_rpcs.mutate_row if parent_rpcs.respond_to? :mutate_row - @mutate_row = ::Gapic::Config::Method.new mutate_row_config - mutate_rows_config = parent_rpcs.mutate_rows if parent_rpcs.respond_to? :mutate_rows - @mutate_rows = ::Gapic::Config::Method.new mutate_rows_config - check_and_mutate_row_config = parent_rpcs.check_and_mutate_row if parent_rpcs.respond_to? :check_and_mutate_row - @check_and_mutate_row = ::Gapic::Config::Method.new check_and_mutate_row_config - ping_and_warm_config = parent_rpcs.ping_and_warm if parent_rpcs.respond_to? :ping_and_warm - @ping_and_warm = ::Gapic::Config::Method.new ping_and_warm_config - read_modify_write_row_config = parent_rpcs.read_modify_write_row if parent_rpcs.respond_to? :read_modify_write_row - @read_modify_write_row = ::Gapic::Config::Method.new read_modify_write_row_config - generate_initial_change_stream_partitions_config = parent_rpcs.generate_initial_change_stream_partitions if parent_rpcs.respond_to? :generate_initial_change_stream_partitions - @generate_initial_change_stream_partitions = ::Gapic::Config::Method.new generate_initial_change_stream_partitions_config - read_change_stream_config = parent_rpcs.read_change_stream if parent_rpcs.respond_to? :read_change_stream - @read_change_stream = ::Gapic::Config::Method.new read_change_stream_config - prepare_query_config = parent_rpcs.prepare_query if parent_rpcs.respond_to? :prepare_query - @prepare_query = ::Gapic::Config::Method.new prepare_query_config - execute_query_config = parent_rpcs.execute_query if parent_rpcs.respond_to? :execute_query - @execute_query = ::Gapic::Config::Method.new execute_query_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb deleted file mode 100644 index d211adfc3c1c..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/credentials.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Bigtable - module V2 - module Bigtable - # Credentials for the Bigtable API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/bigtable.data", - "https://www.googleapis.com/auth/bigtable.data.readonly", - "https://www.googleapis.com/auth/cloud-bigtable.data", - "https://www.googleapis.com/auth/cloud-bigtable.data.readonly", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - self.env_vars = [ - "BIGTABLE_CREDENTIALS", - "BIGTABLE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BIGTABLE_CREDENTIALS_JSON", - "BIGTABLE_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-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb deleted file mode 100644 index 4a3c0a760166..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/bigtable/paths.rb +++ /dev/null @@ -1,109 +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 Bigtable - module V2 - module Bigtable - # Path helper methods for the Bigtable API. - module Paths - ## - # Create a fully-qualified AuthorizedView resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}` - # - # @param project [String] - # @param instance [String] - # @param table [String] - # @param authorized_view [String] - # - # @return [::String] - def authorized_view_path project:, instance:, table:, authorized_view: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "table cannot contain /" if table.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/tables/#{table}/authorizedViews/#{authorized_view}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}` - # - # @param project [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/instances/#{instance}" - end - - ## - # Create a fully-qualified MaterializedView resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/materializedViews/{materialized_view}` - # - # @param project [String] - # @param instance [String] - # @param materialized_view [String] - # - # @return [::String] - def materialized_view_path project:, instance:, materialized_view: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/materializedViews/#{materialized_view}" - end - - ## - # Create a fully-qualified Table resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/instances/{instance}/tables/{table}` - # - # @param project [String] - # @param instance [String] - # @param table [String] - # - # @return [::String] - def table_path project:, instance:, table: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/instances/#{instance}/tables/#{table}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb b/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/version.rb deleted file mode 100644 index 4e494b427bcf..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/lib/google/cloud/bigtable/v2/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 Bigtable - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md deleted file mode 100644 index 3f339667be2d..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Bigtable V2 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-bigtable-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +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 - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb deleted file mode 100644 index b90f060b8eb2..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/bigtable.rb +++ /dev/null @@ -1,940 +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 Bigtable - module V2 - # Request message for Bigtable.ReadRows. - # @!attribute [rw] table_name - # @return [::String] - # Optional. The unique name of the table from which to read. - # - # Values are of the form - # `projects//instances//tables/
`. - # @!attribute [rw] authorized_view_name - # @return [::String] - # Optional. The unique name of the AuthorizedView from which to read. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @!attribute [rw] materialized_view_name - # @return [::String] - # Optional. The unique name of the MaterializedView from which to read. - # - # Values are of the form - # `projects//instances//materializedViews/`. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @!attribute [rw] rows - # @return [::Google::Cloud::Bigtable::V2::RowSet] - # The row keys and/or ranges to read sequentially. If not specified, reads - # from all rows. - # @!attribute [rw] filter - # @return [::Google::Cloud::Bigtable::V2::RowFilter] - # The filter to apply to the contents of the specified row(s). If unset, - # reads the entirety of each row. - # @!attribute [rw] rows_limit - # @return [::Integer] - # The read will stop after committing to N rows' worth of results. The - # default (zero) is to return all results. - # @!attribute [rw] request_stats_view - # @return [::Google::Cloud::Bigtable::V2::ReadRowsRequest::RequestStatsView] - # The view into RequestStats, as described above. - # @!attribute [rw] reversed - # @return [::Boolean] - # Experimental API - Please note that this API is currently experimental - # and can change in the future. - # - # Return rows in lexiographical descending order of the row keys. The row - # contents will not be affected by this flag. - # - # Example result set: - # - # [ - # {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - # {key: "k1", "f:col1": "v2", "f:col2": "v2"} - # ] - class ReadRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The desired view into RequestStats that should be returned in the response. - # - # See also: RequestStats message. - module RequestStatsView - # The default / unset value. The API will default to the NONE option below. - REQUEST_STATS_VIEW_UNSPECIFIED = 0 - - # Do not include any RequestStats in the response. This will leave the - # RequestStats embedded message unset in the response. - REQUEST_STATS_NONE = 1 - - # Include the full set of available RequestStats in the response, - # applicable to this read. - REQUEST_STATS_FULL = 2 - end - end - - # Response message for Bigtable.ReadRows. - # @!attribute [rw] chunks - # @return [::Array<::Google::Cloud::Bigtable::V2::ReadRowsResponse::CellChunk>] - # A collection of a row's contents as part of the read request. - # @!attribute [rw] last_scanned_row_key - # @return [::String] - # Optionally the server might return the row key of the last row it - # has scanned. The client can use this to construct a more - # efficient retry request if needed: any row keys or portions of - # ranges less than this row key can be dropped from the request. - # This is primarily useful for cases where the server has read a - # lot of data that was filtered out since the last committed row - # key, allowing the client to skip that work on a retry. - # @!attribute [rw] request_stats - # @return [::Google::Cloud::Bigtable::V2::RequestStats] - # If requested, return enhanced query performance statistics. The field - # request_stats is empty in a streamed response unless the ReadRowsResponse - # message contains request_stats in the last message of the stream. Always - # returned when requested, even when the read request returns an empty - # response. - class ReadRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies a piece of a row's contents returned as part of the read - # response stream. - # @!attribute [rw] row_key - # @return [::String] - # The row key for this chunk of data. If the row key is empty, - # this CellChunk is a continuation of the same row as the previous - # CellChunk in the response stream, even if that CellChunk was in a - # previous ReadRowsResponse message. - # @!attribute [rw] family_name - # @return [::Google::Protobuf::StringValue] - # The column family name for this chunk of data. If this message - # is not present this CellChunk is a continuation of the same column - # family as the previous CellChunk. The empty string can occur as a - # column family name in a response so clients must check - # explicitly for the presence of this message, not just for - # `family_name.value` being non-empty. - # @!attribute [rw] qualifier - # @return [::Google::Protobuf::BytesValue] - # The column qualifier for this chunk of data. If this message - # is not present, this CellChunk is a continuation of the same column - # as the previous CellChunk. Column qualifiers may be empty so - # clients must check for the presence of this message, not just - # for `qualifier.value` being non-empty. - # @!attribute [rw] timestamp_micros - # @return [::Integer] - # The cell's stored timestamp, which also uniquely identifies it - # within its column. Values are always expressed in - # microseconds, but individual tables may set a coarser - # granularity to further restrict the allowed values. For - # example, a table which specifies millisecond granularity will - # only allow values of `timestamp_micros` which are multiples of - # 1000. Timestamps are only set in the first CellChunk per cell - # (for cells split into multiple chunks). - # @!attribute [rw] labels - # @return [::Array<::String>] - # Labels applied to the cell by a - # {::Google::Cloud::Bigtable::V2::RowFilter RowFilter}. Labels are only set - # on the first CellChunk per cell. - # @!attribute [rw] value - # @return [::String] - # The value stored in the cell. Cell values can be split across - # multiple CellChunks. In that case only the value field will be - # set in CellChunks after the first: the timestamp and labels - # will only be present in the first CellChunk, even if the first - # CellChunk came in a previous ReadRowsResponse. - # @!attribute [rw] value_size - # @return [::Integer] - # If this CellChunk is part of a chunked cell value and this is - # not the final chunk of that cell, value_size will be set to the - # total length of the cell value. The client can use this size - # to pre-allocate memory to hold the full cell value. - # @!attribute [rw] reset_row - # @return [::Boolean] - # Indicates that the client should drop all previous chunks for - # `row_key`, as it will be re-read from the beginning. - # - # Note: The following fields are mutually exclusive: `reset_row`, `commit_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] commit_row - # @return [::Boolean] - # Indicates that the client can safely process all previous chunks for - # `row_key`, as its data has been fully read. - # - # Note: The following fields are mutually exclusive: `commit_row`, `reset_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CellChunk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for Bigtable.SampleRowKeys. - # @!attribute [rw] table_name - # @return [::String] - # Optional. The unique name of the table from which to sample row keys. - # - # Values are of the form - # `projects//instances//tables/
`. - # @!attribute [rw] authorized_view_name - # @return [::String] - # Optional. The unique name of the AuthorizedView from which to sample row - # keys. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @!attribute [rw] materialized_view_name - # @return [::String] - # Optional. The unique name of the MaterializedView from which to read. - # - # Values are of the form - # `projects//instances//materializedViews/`. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - class SampleRowKeysRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for Bigtable.SampleRowKeys. - # @!attribute [rw] row_key - # @return [::String] - # Sorted streamed sequence of sample row keys in the table. The table might - # have contents before the first row key in the list and after the last one, - # but a key containing the empty string indicates "end of table" and will be - # the last response given, if present. - # Note that row keys in this list may not have ever been written to or read - # from, and users should therefore not make any assumptions about the row key - # structure that are specific to their use case. - # @!attribute [rw] offset_bytes - # @return [::Integer] - # Approximate total storage space used by all rows in the table which precede - # `row_key`. Buffering the contents of all rows between two subsequent - # samples would require space roughly equal to the difference in their - # `offset_bytes` fields. - class SampleRowKeysResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for Bigtable.MutateRow. - # @!attribute [rw] table_name - # @return [::String] - # Optional. The unique name of the table to which the mutation should be - # applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @!attribute [rw] authorized_view_name - # @return [::String] - # Optional. The unique name of the AuthorizedView to which the mutation - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @!attribute [rw] row_key - # @return [::String] - # Required. The key of the row to which the mutation should be applied. - # @!attribute [rw] mutations - # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] - # Required. Changes to be atomically applied to the specified row. Entries - # are applied in order, meaning that earlier mutations can be masked by later - # ones. Must contain at least one entry and at most 100000. - # @!attribute [rw] idempotency - # @return [::Google::Cloud::Bigtable::V2::Idempotency] - # If set consistently across retries, prevents this mutation from being - # double applied to aggregate column families within a 15m window. - class MutateRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for Bigtable.MutateRow. - class MutateRowResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for BigtableService.MutateRows. - # @!attribute [rw] table_name - # @return [::String] - # Optional. The unique name of the table to which the mutations should be - # applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @!attribute [rw] authorized_view_name - # @return [::String] - # Optional. The unique name of the AuthorizedView to which the mutations - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry>] - # Required. The row keys and corresponding mutations to be applied in bulk. - # Each entry is applied as an atomic mutation, but the entries may be - # applied in arbitrary order (even between entries for the same row). - # At least one entry must be specified, and in total the entries can - # contain at most 100000 mutations. - class MutateRowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A mutation for a given row. - # @!attribute [rw] row_key - # @return [::String] - # The key of the row to which the `mutations` should be applied. - # @!attribute [rw] mutations - # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] - # Required. Changes to be atomically applied to the specified row. - # Mutations are applied in order, meaning that earlier mutations can be - # masked by later ones. You must specify at least one mutation. - # @!attribute [rw] idempotency - # @return [::Google::Cloud::Bigtable::V2::Idempotency] - # If set consistently across retries, prevents this mutation from being - # double applied to aggregate column families within a 15m window. - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for BigtableService.MutateRows. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Bigtable::V2::MutateRowsResponse::Entry>] - # One or more results for Entries from the batch request. - # @!attribute [rw] rate_limit_info - # @return [::Google::Cloud::Bigtable::V2::RateLimitInfo] - # Information about how client should limit the rate (QPS). Primirily used by - # supported official Cloud Bigtable clients. If unset, the rate limit info is - # not provided by the server. - class MutateRowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The result of applying a passed mutation in the original request. - # @!attribute [rw] index - # @return [::Integer] - # The index into the original request's `entries` list of the Entry - # for which a result is being reported. - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # The result of the request Entry identified by `index`. - # Depending on how requests are batched during execution, it is possible - # for one Entry to fail due to an error with another Entry. In the event - # that this occurs, the same error will be reported for both entries. - class Entry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Information about how client should adjust the load to Bigtable. - # @!attribute [rw] period - # @return [::Google::Protobuf::Duration] - # Time that clients should wait before adjusting the target rate again. - # If clients adjust rate too frequently, the impact of the previous - # adjustment may not have been taken into account and may - # over-throttle or under-throttle. If clients adjust rate too slowly, they - # will not be responsive to load changes on server side, and may - # over-throttle or under-throttle. - # @!attribute [rw] factor - # @return [::Float] - # If it has been at least one `period` since the last load adjustment, the - # client should multiply the current load by this value to get the new target - # load. For example, if the current load is 100 and `factor` is 0.8, the new - # target load should be 80. After adjusting, the client should ignore - # `factor` until another `period` has passed. - # - # The client can measure its load using any unit that's comparable over time. - # For example, QPS can be used as long as each request involves a similar - # amount of work. - class RateLimitInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for Bigtable.CheckAndMutateRow. - # @!attribute [rw] table_name - # @return [::String] - # Optional. The unique name of the table to which the conditional mutation - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @!attribute [rw] authorized_view_name - # @return [::String] - # Optional. The unique name of the AuthorizedView to which the conditional - # mutation should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @!attribute [rw] row_key - # @return [::String] - # Required. The key of the row to which the conditional mutation should be - # applied. - # @!attribute [rw] predicate_filter - # @return [::Google::Cloud::Bigtable::V2::RowFilter] - # The filter to be applied to the contents of the specified row. Depending - # on whether or not any results are yielded, either `true_mutations` or - # `false_mutations` will be executed. If unset, checks that the row contains - # any values at all. - # @!attribute [rw] true_mutations - # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] - # Changes to be atomically applied to the specified row if `predicate_filter` - # yields at least one cell when applied to `row_key`. Entries are applied in - # order, meaning that earlier mutations can be masked by later ones. - # Must contain at least one entry if `false_mutations` is empty, and at most - # 100000. - # @!attribute [rw] false_mutations - # @return [::Array<::Google::Cloud::Bigtable::V2::Mutation>] - # Changes to be atomically applied to the specified row if `predicate_filter` - # does not yield any cells when applied to `row_key`. Entries are applied in - # order, meaning that earlier mutations can be masked by later ones. - # Must contain at least one entry if `true_mutations` is empty, and at most - # 100000. - class CheckAndMutateRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for Bigtable.CheckAndMutateRow. - # @!attribute [rw] predicate_matched - # @return [::Boolean] - # Whether or not the request's `predicate_filter` yielded any results for - # the specified row. - class CheckAndMutateRowResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for client connection keep-alive and warming. - # @!attribute [rw] name - # @return [::String] - # Required. The unique name of the instance to check permissions for as well - # as respond. Values are of the form - # `projects//instances/`. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - class PingAndWarmRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for Bigtable.PingAndWarm connection keepalive and warming. - class PingAndWarmResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for Bigtable.ReadModifyWriteRow. - # @!attribute [rw] table_name - # @return [::String] - # Optional. The unique name of the table to which the read/modify/write rules - # should be applied. - # - # Values are of the form - # `projects//instances//tables/
`. - # @!attribute [rw] authorized_view_name - # @return [::String] - # Optional. The unique name of the AuthorizedView to which the - # read/modify/write rules should be applied. - # - # Values are of the form - # `projects//instances//tables/
/authorizedViews/`. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # @!attribute [rw] row_key - # @return [::String] - # Required. The key of the row to which the read/modify/write rules should be - # applied. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Bigtable::V2::ReadModifyWriteRule>] - # Required. Rules specifying how the specified row's contents are to be - # transformed into writes. Entries are applied in order, meaning that earlier - # rules will affect the results of later ones. At least one entry must be - # specified, and there can be at most 100000 rules. - class ReadModifyWriteRowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for Bigtable.ReadModifyWriteRow. - # @!attribute [rw] row - # @return [::Google::Cloud::Bigtable::V2::Row] - # A Row containing the new contents of all cells modified by the request. - class ReadModifyWriteRowResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NOTE: This API is intended to be used by Apache Beam BigtableIO. - # Request message for Bigtable.GenerateInitialChangeStreamPartitions. - # @!attribute [rw] table_name - # @return [::String] - # Required. The unique name of the table from which to get change stream - # partitions. Values are of the form - # `projects//instances//tables/
`. - # Change streaming must be enabled on the table. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # Single cluster routing must be configured on the profile. - class GenerateInitialChangeStreamPartitionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NOTE: This API is intended to be used by Apache Beam BigtableIO. - # Response message for Bigtable.GenerateInitialChangeStreamPartitions. - # @!attribute [rw] partition - # @return [::Google::Cloud::Bigtable::V2::StreamPartition] - # A partition of the change stream. - class GenerateInitialChangeStreamPartitionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NOTE: This API is intended to be used by Apache Beam BigtableIO. - # Request message for Bigtable.ReadChangeStream. - # @!attribute [rw] table_name - # @return [::String] - # Required. The unique name of the table from which to read a change stream. - # Values are of the form - # `projects//instances//tables/
`. - # Change streaming must be enabled on the table. - # @!attribute [rw] app_profile_id - # @return [::String] - # This value specifies routing for replication. If not specified, the - # "default" application profile will be used. - # Single cluster routing must be configured on the profile. - # @!attribute [rw] partition - # @return [::Google::Cloud::Bigtable::V2::StreamPartition] - # The partition to read changes from. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start reading the stream at the specified timestamp. This timestamp must - # be within the change stream retention period, less than or equal to the - # current time, and after change stream creation, whichever is greater. - # This value is inclusive and will be truncated to microsecond granularity. - # - # Note: The following fields are mutually exclusive: `start_time`, `continuation_tokens`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] continuation_tokens - # @return [::Google::Cloud::Bigtable::V2::StreamContinuationTokens] - # Tokens that describe how to resume reading a stream where reading - # previously left off. If specified, changes will be read starting at the - # the position. Tokens are delivered on the stream as part of `Heartbeat` - # and `CloseStream` messages. - # - # If a single token is provided, the token's partition must exactly match - # the request's partition. If multiple tokens are provided, as in the case - # of a partition merge, the union of the token partitions must exactly - # cover the request's partition. Otherwise, INVALID_ARGUMENT will be - # returned. - # - # Note: The following fields are mutually exclusive: `continuation_tokens`, `start_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # If specified, OK will be returned when the stream advances beyond - # this time. Otherwise, changes will be continuously delivered on the stream. - # This value is inclusive and will be truncated to microsecond granularity. - # @!attribute [rw] heartbeat_duration - # @return [::Google::Protobuf::Duration] - # If specified, the duration between `Heartbeat` messages on the stream. - # Otherwise, defaults to 5 seconds. - class ReadChangeStreamRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NOTE: This API is intended to be used by Apache Beam BigtableIO. - # Response message for Bigtable.ReadChangeStream. - # @!attribute [rw] data_change - # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::DataChange] - # A mutation to the partition. - # - # Note: The following fields are mutually exclusive: `data_change`, `heartbeat`, `close_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] heartbeat - # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::Heartbeat] - # A periodic heartbeat message. - # - # Note: The following fields are mutually exclusive: `heartbeat`, `data_change`, `close_stream`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] close_stream - # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::CloseStream] - # An indication that the stream should be closed. - # - # Note: The following fields are mutually exclusive: `close_stream`, `data_change`, `heartbeat`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ReadChangeStreamResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A partial or complete mutation. - # @!attribute [rw] chunk_info - # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::MutationChunk::ChunkInfo] - # If set, then the mutation is a `SetCell` with a chunked value across - # multiple messages. - # @!attribute [rw] mutation - # @return [::Google::Cloud::Bigtable::V2::Mutation] - # If this is a continuation of a chunked message (`chunked_value_offset` > - # 0), ignore all fields except the `SetCell`'s value and merge it with - # the previous message by concatenating the value fields. - class MutationChunk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the chunking of this mutation. - # Only `SetCell` mutations can be chunked, and all chunks for a `SetCell` - # will be delivered contiguously with no other mutation types interleaved. - # @!attribute [rw] chunked_value_size - # @return [::Integer] - # The total value size of all the chunks that make up the `SetCell`. - # @!attribute [rw] chunked_value_offset - # @return [::Integer] - # The byte offset of this chunk into the total value size of the - # mutation. - # @!attribute [rw] last_chunk - # @return [::Boolean] - # When true, this is the last chunk of a chunked `SetCell`. - class ChunkInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A message corresponding to one or more mutations to the partition - # being streamed. A single logical `DataChange` message may also be split - # across a sequence of multiple individual messages. Messages other than - # the first in a sequence will only have the `type` and `chunks` fields - # populated, with the final message in the sequence also containing `done` - # set to true. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::DataChange::Type] - # The type of the mutation. - # @!attribute [rw] source_cluster_id - # @return [::String] - # The cluster where the mutation was applied. - # Not set when `type` is `GARBAGE_COLLECTION`. - # @!attribute [rw] row_key - # @return [::String] - # The row key for all mutations that are part of this `DataChange`. - # If the `DataChange` is chunked across multiple messages, then this field - # will only be set for the first message. - # @!attribute [rw] commit_timestamp - # @return [::Google::Protobuf::Timestamp] - # The timestamp at which the mutation was applied on the Bigtable server. - # @!attribute [rw] tiebreaker - # @return [::Integer] - # A value that lets stream consumers reconstruct Bigtable's - # conflict resolution semantics. - # https://cloud.google.com/bigtable/docs/writes#conflict-resolution - # In the event that the same row key, column family, column qualifier, - # timestamp are modified on different clusters at the same - # `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - # one chosen for the eventually consistent state of the system. - # @!attribute [rw] chunks - # @return [::Array<::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse::MutationChunk>] - # The mutations associated with this change to the partition. - # May contain complete mutations or chunks of a multi-message chunked - # `DataChange` record. - # @!attribute [rw] done - # @return [::Boolean] - # When true, indicates that the entire `DataChange` has been read - # and the client can safely process the message. - # @!attribute [rw] token - # @return [::String] - # An encoded position for this stream's partition to restart reading from. - # This token is for the StreamPartition from the request. - # @!attribute [rw] estimated_low_watermark - # @return [::Google::Protobuf::Timestamp] - # An estimate of the commit timestamp that is usually lower than or equal - # to any timestamp for a record that will be delivered in the future on the - # stream. It is possible that, under particular circumstances that a future - # record has a timestamp that is lower than a previously seen timestamp. - # For an example usage see - # https://beam.apache.org/documentation/basics/#watermarks - class DataChange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of mutation. - module Type - # The type is unspecified. - TYPE_UNSPECIFIED = 0 - - # A user-initiated mutation. - USER = 1 - - # A system-initiated mutation as part of garbage collection. - # https://cloud.google.com/bigtable/docs/garbage-collection - GARBAGE_COLLECTION = 2 - - # This is a continuation of a multi-message change. - CONTINUATION = 3 - end - end - - # A periodic message with information that can be used to checkpoint - # the state of a stream. - # @!attribute [rw] continuation_token - # @return [::Google::Cloud::Bigtable::V2::StreamContinuationToken] - # A token that can be provided to a subsequent `ReadChangeStream` call - # to pick up reading at the current stream position. - # @!attribute [rw] estimated_low_watermark - # @return [::Google::Protobuf::Timestamp] - # An estimate of the commit timestamp that is usually lower than or equal - # to any timestamp for a record that will be delivered in the future on the - # stream. It is possible that, under particular circumstances that a future - # record has a timestamp that is lower than a previously seen timestamp. - # For an example usage see - # https://beam.apache.org/documentation/basics/#watermarks - class Heartbeat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message indicating that the client should stop reading from the stream. - # If status is OK and `continuation_tokens` & `new_partitions` are empty, the - # stream has finished (for example if there was an `end_time` specified). - # If `continuation_tokens` & `new_partitions` are present, then a change in - # partitioning requires the client to open a new stream for each token to - # resume reading. Example: - # - # [B, D) ends - # | - # v - # new_partitions: [A, C) [C, E) - # continuation_tokens.partitions: [B,C) [C,D) - # ^---^ ^---^ - # ^ ^ - # | | - # | StreamContinuationToken 2 - # | - # StreamContinuationToken 1 - # - # To read the new partition [A,C), supply the continuation tokens whose - # ranges cover the new partition, for example ContinuationToken[A,B) & - # ContinuationToken[B,C). - # @!attribute [rw] status - # @return [::Google::Rpc::Status] - # The status of the stream. - # @!attribute [rw] continuation_tokens - # @return [::Array<::Google::Cloud::Bigtable::V2::StreamContinuationToken>] - # If non-empty, contains the information needed to resume reading their - # associated partitions. - # @!attribute [rw] new_partitions - # @return [::Array<::Google::Cloud::Bigtable::V2::StreamPartition>] - # If non-empty, contains the new partitions to start reading from, which - # are related to but not necessarily identical to the partitions for the - # above `continuation_tokens`. - class CloseStream - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request message for Bigtable.ExecuteQuery - # @!attribute [rw] instance_name - # @return [::String] - # Required. The unique name of the instance against which the query should be - # executed. - # Values are of the form `projects//instances/` - # @!attribute [rw] app_profile_id - # @return [::String] - # Optional. This value specifies routing for replication. If not specified, - # the `default` application profile will be used. - # @!attribute [rw] query - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Required. The query string. - # - # Exactly one of `query` and `prepared_query` is required. Setting both - # or neither is an `INVALID_ARGUMENT`. - # @!attribute [rw] prepared_query - # @return [::String] - # A prepared query that was returned from `PrepareQueryResponse`. - # - # Exactly one of `query` and `prepared_query` is required. Setting both - # or neither is an `INVALID_ARGUMENT`. - # - # Setting this field also places restrictions on several other fields: - # - `data_format` must be empty. - # - `validate_only` must be false. - # - `params` must match the `param_types` set in the `PrepareQueryRequest`. - # @!attribute [rw] proto_format - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Bigtable::V2::ProtoFormat] - # Protocol buffer format as described by ProtoSchema and ProtoRows - # messages. - # @!attribute [rw] resume_token - # @return [::String] - # Optional. If this request is resuming a previously interrupted query - # execution, `resume_token` should be copied from the last - # PartialResultSet yielded before the interruption. Doing this - # enables the query execution to resume where the last one left - # off. - # The rest of the request parameters must exactly match the - # request that yielded this token. Otherwise the request will fail. - # @!attribute [rw] params - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigtable::V2::Value}] - # Required. params contains string type keys and Bigtable type values that - # bind to placeholders in the query string. In query string, a parameter - # placeholder consists of the - # `@` character followed by the parameter name (for example, `@firstName`) in - # the query string. - # - # For example, if - # `params["firstName"] = bytes_value: "foo" type {bytes_type {}}` - # then `@firstName` will be replaced with googlesql bytes value "foo" in the - # query string during query evaluation. - # - # If `Value.kind` is not set, the value is treated as a NULL value of the - # given type. For example, if - # `params["firstName"] = type {string_type {}}` - # then `@firstName` will be replaced with googlesql null string. - # - # If `query` is set, any empty `Value.type` in the map will be rejected with - # `INVALID_ARGUMENT`. - # - # If `prepared_query` is set, any empty `Value.type` in the map will be - # inferred from the `param_types` in the `PrepareQueryRequest`. Any non-empty - # `Value.type` must match the corresponding `param_types` entry, or be - # rejected with `INVALID_ARGUMENT`. - class ExecuteQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigtable::V2::Value] - class ParamsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for Bigtable.ExecuteQuery - # @!attribute [rw] metadata - # @return [::Google::Cloud::Bigtable::V2::ResultSetMetadata] - # Structure of rows in this response stream. The first (and only the first) - # response streamed from the server will be of this type. - # - # Note: The following fields are mutually exclusive: `metadata`, `results`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] results - # @return [::Google::Cloud::Bigtable::V2::PartialResultSet] - # A partial result set with row data potentially including additional - # instructions on how recent past and future partial responses should be - # interpreted. - # - # Note: The following fields are mutually exclusive: `results`, `metadata`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExecuteQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for Bigtable.PrepareQuery - # @!attribute [rw] instance_name - # @return [::String] - # Required. The unique name of the instance against which the query should be - # executed. - # Values are of the form `projects//instances/` - # @!attribute [rw] app_profile_id - # @return [::String] - # Optional. This value specifies routing for preparing the query. Note that - # this `app_profile_id` is only used for preparing the query. The actual - # query execution will use the app profile specified in the - # `ExecuteQueryRequest`. If not specified, the `default` application profile - # will be used. - # @!attribute [rw] query - # @return [::String] - # Required. The query string. - # @!attribute [rw] proto_format - # @return [::Google::Cloud::Bigtable::V2::ProtoFormat] - # Protocol buffer format as described by ProtoSchema and ProtoRows - # messages. - # @!attribute [rw] param_types - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Bigtable::V2::Type}] - # Required. `param_types` is a map of parameter identifier strings to their - # `Type`s. - # - # In query string, a parameter placeholder consists of the - # `@` character followed by the parameter name (for example, `@firstName`) in - # the query string. - # - # For example, if param_types["firstName"] = Bytes then @firstName will be a - # query parameter of type Bytes. The specific `Value` to be used for the - # query execution must be sent in `ExecuteQueryRequest` in the `params` map. - class PrepareQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Bigtable::V2::Type] - class ParamTypesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Response message for Bigtable.PrepareQueryResponse - # @!attribute [rw] metadata - # @return [::Google::Cloud::Bigtable::V2::ResultSetMetadata] - # Structure of rows in the response stream of `ExecuteQueryResponse` for the - # returned `prepared_query`. - # @!attribute [rw] prepared_query - # @return [::String] - # A serialized prepared query. Clients should treat this as an opaque - # blob of bytes to send in `ExecuteQueryRequest`. - # @!attribute [rw] valid_until - # @return [::Google::Protobuf::Timestamp] - # The time at which the prepared query token becomes invalid. - # A token may become invalid early due to changes in the data being read, but - # it provides a guideline to refresh query plans asynchronously. - class PrepareQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb deleted file mode 100644 index 5279c4c00f72..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/data.rb +++ /dev/null @@ -1,997 +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 Bigtable - module V2 - # Specifies the complete (requested) contents of a single row of a table. - # Rows which exceed 256MiB in size cannot be read in full. - # @!attribute [rw] key - # @return [::String] - # The unique key which identifies this row within its table. This is the same - # key that's used to identify the row in, for example, a MutateRowRequest. - # May contain any non-empty byte string up to 4KiB in length. - # @!attribute [rw] families - # @return [::Array<::Google::Cloud::Bigtable::V2::Family>] - # May be empty, but only if the entire row is empty. - # The mutual ordering of column families is not specified. - class Row - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies (some of) the contents of a single row/column family intersection - # of a table. - # @!attribute [rw] name - # @return [::String] - # The unique key which identifies this family within its row. This is the - # same key that's used to identify the family in, for example, a RowFilter - # which sets its "family_name_regex_filter" field. - # Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - # produce cells in a sentinel family with an empty name. - # Must be no greater than 64 characters in length. - # @!attribute [rw] columns - # @return [::Array<::Google::Cloud::Bigtable::V2::Column>] - # Must not be empty. Sorted in order of increasing "qualifier". - class Family - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies (some of) the contents of a single row/column intersection of a - # table. - # @!attribute [rw] qualifier - # @return [::String] - # The unique key which identifies this column within its family. This is the - # same key that's used to identify the column in, for example, a RowFilter - # which sets its `column_qualifier_regex_filter` field. - # May contain any byte string, including the empty string, up to 16kiB in - # length. - # @!attribute [rw] cells - # @return [::Array<::Google::Cloud::Bigtable::V2::Cell>] - # Must not be empty. Sorted in order of decreasing "timestamp_micros". - class Column - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies (some of) the contents of a single row/column/timestamp of a table. - # @!attribute [rw] timestamp_micros - # @return [::Integer] - # The cell's stored timestamp, which also uniquely identifies it within - # its column. - # Values are always expressed in microseconds, but individual tables may set - # a coarser granularity to further restrict the allowed values. For - # example, a table which specifies millisecond granularity will only allow - # values of `timestamp_micros` which are multiples of 1000. - # @!attribute [rw] value - # @return [::String] - # The value stored in the cell. - # May contain any byte string, including the empty string, up to 100MiB in - # length. - # @!attribute [rw] labels - # @return [::Array<::String>] - # Labels applied to the cell by a {::Google::Cloud::Bigtable::V2::RowFilter RowFilter}. - class Cell - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `Value` represents a dynamically typed value. - # The typed fields in `Value` are used as a transport encoding for the actual - # value (which may be of a more complex type). See the documentation of the - # `Type` message for more details. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigtable::V2::Type] - # The verified `Type` of this `Value`, if it cannot be inferred. - # - # Read results will never specify the encoding for `type` since the value - # will already have been decoded by the server. Furthermore, the `type` will - # be omitted entirely if it can be inferred from a previous response. The - # exact semantics for inferring `type` will vary, and are therefore - # documented separately for each read method. - # - # When using composite types (Struct, Array, Map) only the outermost `Value` - # will specify the `type`. This top-level `type` will define the types for - # any nested `Struct' fields, `Array` elements, or `Map` key/value pairs. - # If a nested `Value` provides a `type` on write, the request will be - # rejected with INVALID_ARGUMENT. - # @!attribute [rw] raw_value - # @return [::String] - # Represents a raw byte sequence with no type information. - # The `type` field must be omitted. - # - # Note: The following fields are mutually exclusive: `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] raw_timestamp_micros - # @return [::Integer] - # Represents a raw cell timestamp with no type information. - # The `type` field must be omitted. - # - # Note: The following fields are mutually exclusive: `raw_timestamp_micros`, `raw_value`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bytes_value - # @return [::String] - # Represents a typed value transported as a byte sequence. - # - # Note: The following fields are mutually exclusive: `bytes_value`, `raw_value`, `raw_timestamp_micros`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a typed value transported as a string. - # - # Note: The following fields are mutually exclusive: `string_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int_value - # @return [::Integer] - # Represents a typed value transported as an integer. - # - # Note: The following fields are mutually exclusive: `int_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a typed value transported as a boolean. - # - # Note: The following fields are mutually exclusive: `bool_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `float_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] float_value - # @return [::Float] - # Represents a typed value transported as a floating point number. - # Does not support NaN or infinities. - # - # Note: The following fields are mutually exclusive: `float_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `timestamp_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_value - # @return [::Google::Protobuf::Timestamp] - # Represents a typed value transported as a timestamp. - # - # Note: The following fields are mutually exclusive: `timestamp_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `date_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] date_value - # @return [::Google::Type::Date] - # Represents a typed value transported as a date. - # - # Note: The following fields are mutually exclusive: `date_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `array_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] array_value - # @return [::Google::Cloud::Bigtable::V2::ArrayValue] - # Represents a typed value transported as a sequence of values. - # To differentiate between `Struct`, `Array`, and `Map`, the outermost - # `Value` must provide an explicit `type` on write. This `type` will - # apply recursively to the nested `Struct` fields, `Array` elements, - # or `Map` key/value pairs, which *must not* supply their own `type`. - # - # Note: The following fields are mutually exclusive: `array_value`, `raw_value`, `raw_timestamp_micros`, `bytes_value`, `string_value`, `int_value`, `bool_value`, `float_value`, `timestamp_value`, `date_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ArrayValue` is an ordered list of `Value`. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Bigtable::V2::Value>] - # The ordered elements in the array. - class ArrayValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a contiguous range of rows. - # @!attribute [rw] start_key_closed - # @return [::String] - # Used when giving an inclusive lower bound for the range. - # - # Note: The following fields are mutually exclusive: `start_key_closed`, `start_key_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] start_key_open - # @return [::String] - # Used when giving an exclusive lower bound for the range. - # - # Note: The following fields are mutually exclusive: `start_key_open`, `start_key_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_key_open - # @return [::String] - # Used when giving an exclusive upper bound for the range. - # - # Note: The following fields are mutually exclusive: `end_key_open`, `end_key_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_key_closed - # @return [::String] - # Used when giving an inclusive upper bound for the range. - # - # Note: The following fields are mutually exclusive: `end_key_closed`, `end_key_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RowRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a non-contiguous set of rows. - # @!attribute [rw] row_keys - # @return [::Array<::String>] - # Single rows included in the set. - # @!attribute [rw] row_ranges - # @return [::Array<::Google::Cloud::Bigtable::V2::RowRange>] - # Contiguous row ranges included in the set. - class RowSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a contiguous range of columns within a single column family. - # The range spans from <column_family>:<start_qualifier> to - # <column_family>:<end_qualifier>, where both bounds can be either - # inclusive or exclusive. - # @!attribute [rw] family_name - # @return [::String] - # The name of the column family within which this range falls. - # @!attribute [rw] start_qualifier_closed - # @return [::String] - # Used when giving an inclusive lower bound for the range. - # - # Note: The following fields are mutually exclusive: `start_qualifier_closed`, `start_qualifier_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] start_qualifier_open - # @return [::String] - # Used when giving an exclusive lower bound for the range. - # - # Note: The following fields are mutually exclusive: `start_qualifier_open`, `start_qualifier_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_qualifier_closed - # @return [::String] - # Used when giving an inclusive upper bound for the range. - # - # Note: The following fields are mutually exclusive: `end_qualifier_closed`, `end_qualifier_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_qualifier_open - # @return [::String] - # Used when giving an exclusive upper bound for the range. - # - # Note: The following fields are mutually exclusive: `end_qualifier_open`, `end_qualifier_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ColumnRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specified a contiguous range of microsecond timestamps. - # @!attribute [rw] start_timestamp_micros - # @return [::Integer] - # Inclusive lower bound. If left empty, interpreted as 0. - # @!attribute [rw] end_timestamp_micros - # @return [::Integer] - # Exclusive upper bound. If left empty, interpreted as infinity. - class TimestampRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a contiguous range of raw byte values. - # @!attribute [rw] start_value_closed - # @return [::String] - # Used when giving an inclusive lower bound for the range. - # - # Note: The following fields are mutually exclusive: `start_value_closed`, `start_value_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] start_value_open - # @return [::String] - # Used when giving an exclusive lower bound for the range. - # - # Note: The following fields are mutually exclusive: `start_value_open`, `start_value_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_value_closed - # @return [::String] - # Used when giving an inclusive upper bound for the range. - # - # Note: The following fields are mutually exclusive: `end_value_closed`, `end_value_open`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] end_value_open - # @return [::String] - # Used when giving an exclusive upper bound for the range. - # - # Note: The following fields are mutually exclusive: `end_value_open`, `end_value_closed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ValueRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Takes a row as input and produces an alternate view of the row based on - # specified rules. For example, a RowFilter might trim down a row to include - # just the cells from columns matching a given regular expression, or might - # return all the cells of a row but not their values. More complicated filters - # can be composed out of these components to express requests such as, "within - # every column of a particular family, give just the two most recent cells - # which are older than timestamp X." - # - # There are two broad categories of RowFilters (true filters and transformers), - # as well as two ways to compose simple filters into more complex ones - # (chains and interleaves). They work as follows: - # - # * True filters alter the input row by excluding some of its cells wholesale - # from the output row. An example of a true filter is the `value_regex_filter`, - # which excludes cells whose values don't match the specified pattern. All - # regex true filters use RE2 syntax (https://github.com/google/re2/wiki/Syntax) - # in raw byte mode (RE2::Latin1), and are evaluated as full matches. An - # important point to keep in mind is that `RE2(.)` is equivalent by default to - # `RE2([^\n])`, meaning that it does not match newlines. When attempting to - # match an arbitrary byte, you should therefore use the escape sequence `\C`, - # which may need to be further escaped as `\\C` in your client language. - # - # * Transformers alter the input row by changing the values of some of its - # cells in the output, without excluding them completely. Currently, the only - # supported transformer is the `strip_value_transformer`, which replaces every - # cell's value with the empty string. - # - # * Chains and interleaves are described in more detail in the - # RowFilter.Chain and RowFilter.Interleave documentation. - # - # The total serialized size of a RowFilter message must not - # exceed 20480 bytes, and RowFilters may not be nested within each other - # (in Chains or Interleaves) to a depth of more than 20. - # @!attribute [rw] chain - # @return [::Google::Cloud::Bigtable::V2::RowFilter::Chain] - # Applies several RowFilters to the data in sequence, progressively - # narrowing the results. - # - # Note: The following fields are mutually exclusive: `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] interleave - # @return [::Google::Cloud::Bigtable::V2::RowFilter::Interleave] - # Applies several RowFilters to the data in parallel and combines the - # results. - # - # Note: The following fields are mutually exclusive: `interleave`, `chain`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] condition - # @return [::Google::Cloud::Bigtable::V2::RowFilter::Condition] - # Applies one of two possible RowFilters to the data based on the output of - # a predicate RowFilter. - # - # Note: The following fields are mutually exclusive: `condition`, `chain`, `interleave`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sink - # @return [::Boolean] - # ADVANCED USE ONLY. - # Hook for introspection into the RowFilter. Outputs all cells directly to - # the output of the read rather than to any parent filter. Consider the - # following example: - # - # Chain( - # FamilyRegex("A"), - # Interleave( - # All(), - # Chain(Label("foo"), Sink()) - # ), - # QualifierRegex("B") - # ) - # - # A,A,1,w - # A,B,2,x - # B,B,4,z - # | - # FamilyRegex("A") - # | - # A,A,1,w - # A,B,2,x - # | - # +------------+-------------+ - # | | - # All() Label(foo) - # | | - # A,A,1,w A,A,1,w,labels:[foo] - # A,B,2,x A,B,2,x,labels:[foo] - # | | - # | Sink() --------------+ - # | | | - # +------------+ x------+ A,A,1,w,labels:[foo] - # | A,B,2,x,labels:[foo] - # A,A,1,w | - # A,B,2,x | - # | | - # QualifierRegex("B") | - # | | - # A,B,2,x | - # | | - # +--------------------------------+ - # | - # A,A,1,w,labels:[foo] - # A,B,2,x,labels:[foo] // could be switched - # A,B,2,x // could be switched - # - # Despite being excluded by the qualifier filter, a copy of every cell - # that reaches the sink is present in the final result. - # - # As with an {::Google::Cloud::Bigtable::V2::RowFilter::Interleave Interleave}, - # duplicate cells are possible, and appear in an unspecified mutual order. - # In this case we have a duplicate with column "A:B" and timestamp 2, - # because one copy passed through the all filter while the other was - # passed through the label and sink. Note that one copy has label "foo", - # while the other does not. - # - # Cannot be used within the `predicate_filter`, `true_filter`, or - # `false_filter` of a {::Google::Cloud::Bigtable::V2::RowFilter::Condition Condition}. - # - # Note: The following fields are mutually exclusive: `sink`, `chain`, `interleave`, `condition`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pass_all_filter - # @return [::Boolean] - # Matches all cells, regardless of input. Functionally equivalent to - # leaving `filter` unset, but included for completeness. - # - # Note: The following fields are mutually exclusive: `pass_all_filter`, `chain`, `interleave`, `condition`, `sink`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] block_all_filter - # @return [::Boolean] - # Does not match any cells, regardless of input. Useful for temporarily - # disabling just part of a filter. - # - # Note: The following fields are mutually exclusive: `block_all_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row_key_regex_filter - # @return [::String] - # Matches only cells from rows whose keys satisfy the given RE2 regex. In - # other words, passes through the entire row when the key matches, and - # otherwise produces an empty row. - # Note that, since row keys can contain arbitrary bytes, the `\C` escape - # sequence must be used if a true wildcard is desired. The `.` character - # will not match the new line character `\n`, which may be present in a - # binary key. - # - # Note: The following fields are mutually exclusive: `row_key_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] row_sample_filter - # @return [::Float] - # Matches all cells from a row with probability p, and matches no cells - # from the row with probability 1-p. - # - # Note: The following fields are mutually exclusive: `row_sample_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] family_name_regex_filter - # @return [::String] - # Matches only cells from columns whose families satisfy the given RE2 - # regex. For technical reasons, the regex must not contain the `:` - # character, even if it is not being used as a literal. - # Note that, since column families cannot contain the new line character - # `\n`, it is sufficient to use `.` as a full wildcard when matching - # column family names. - # - # Note: The following fields are mutually exclusive: `family_name_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column_qualifier_regex_filter - # @return [::String] - # Matches only cells from columns whose qualifiers satisfy the given RE2 - # regex. - # Note that, since column qualifiers can contain arbitrary bytes, the `\C` - # escape sequence must be used if a true wildcard is desired. The `.` - # character will not match the new line character `\n`, which may be - # present in a binary qualifier. - # - # Note: The following fields are mutually exclusive: `column_qualifier_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] column_range_filter - # @return [::Google::Cloud::Bigtable::V2::ColumnRange] - # Matches only cells from columns within the given range. - # - # Note: The following fields are mutually exclusive: `column_range_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_range_filter - # @return [::Google::Cloud::Bigtable::V2::TimestampRange] - # Matches only cells with timestamps within the given range. - # - # Note: The following fields are mutually exclusive: `timestamp_range_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value_regex_filter - # @return [::String] - # Matches only cells with values that satisfy the given regular expression. - # Note that, since cell values can contain arbitrary bytes, the `\C` escape - # sequence must be used if a true wildcard is desired. The `.` character - # will not match the new line character `\n`, which may be present in a - # binary value. - # - # Note: The following fields are mutually exclusive: `value_regex_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] value_range_filter - # @return [::Google::Cloud::Bigtable::V2::ValueRange] - # Matches only cells with values that fall within the given range. - # - # Note: The following fields are mutually exclusive: `value_range_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cells_per_row_offset_filter - # @return [::Integer] - # Skips the first N cells of each row, matching all subsequent cells. - # If duplicate cells are present, as is possible when using an Interleave, - # each copy of the cell is counted separately. - # - # Note: The following fields are mutually exclusive: `cells_per_row_offset_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cells_per_row_limit_filter - # @return [::Integer] - # Matches only the first N cells of each row. - # If duplicate cells are present, as is possible when using an Interleave, - # each copy of the cell is counted separately. - # - # Note: The following fields are mutually exclusive: `cells_per_row_limit_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cells_per_column_limit_filter - # @return [::Integer] - # Matches only the most recent N cells within each column. For example, - # if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, - # skip all earlier cells in `foo:bar`, and then begin matching again in - # column `foo:bar2`. - # If duplicate cells are present, as is possible when using an Interleave, - # each copy of the cell is counted separately. - # - # Note: The following fields are mutually exclusive: `cells_per_column_limit_filter`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `strip_value_transformer`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] strip_value_transformer - # @return [::Boolean] - # Replaces each cell's value with the empty string. - # - # Note: The following fields are mutually exclusive: `strip_value_transformer`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `apply_label_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] apply_label_transformer - # @return [::String] - # Applies the given label to all cells in the output row. This allows - # the client to determine which results were produced from which part of - # the filter. - # - # Values must be at most 15 characters in length, and match the RE2 - # pattern `[a-z0-9\\-]+` - # - # Due to a technical limitation, it is not currently possible to apply - # multiple labels to a cell. As a result, a Chain may have no more than - # one sub-filter which contains a `apply_label_transformer`. It is okay for - # an Interleave to contain multiple `apply_label_transformers`, as they - # will be applied to separate copies of the input. This may be relaxed in - # the future. - # - # Note: The following fields are mutually exclusive: `apply_label_transformer`, `chain`, `interleave`, `condition`, `sink`, `pass_all_filter`, `block_all_filter`, `row_key_regex_filter`, `row_sample_filter`, `family_name_regex_filter`, `column_qualifier_regex_filter`, `column_range_filter`, `timestamp_range_filter`, `value_regex_filter`, `value_range_filter`, `cells_per_row_offset_filter`, `cells_per_row_limit_filter`, `cells_per_column_limit_filter`, `strip_value_transformer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RowFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A RowFilter which sends rows through several RowFilters in sequence. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::Bigtable::V2::RowFilter>] - # The elements of "filters" are chained together to process the input row: - # in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - # The full chain is executed atomically. - class Chain - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A RowFilter which sends each row to each of several component - # RowFilters and interleaves the results. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::Bigtable::V2::RowFilter>] - # The elements of "filters" all process a copy of the input row, and the - # results are pooled, sorted, and combined into a single output row. - # If multiple cells are produced with the same column and timestamp, - # they will all appear in the output row in an unspecified mutual order. - # Consider the following example, with three filters: - # - # input row - # | - # ----------------------------------------------------- - # | | | - # f(0) f(1) f(2) - # | | | - # 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - # 2: foo,blah,11,z far,blah,5,x far,blah,5,x - # | | | - # ----------------------------------------------------- - # | - # 1: foo,bar,10,z // could have switched with #2 - # 2: foo,bar,10,x // could have switched with #1 - # 3: foo,blah,11,z - # 4: far,bar,7,a - # 5: far,blah,5,x // identical to #6 - # 6: far,blah,5,x // identical to #5 - # - # All interleaved filters are executed atomically. - class Interleave - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A RowFilter which evaluates one of two possible RowFilters, depending on - # whether or not a predicate RowFilter outputs any cells from the input row. - # - # IMPORTANT NOTE: The predicate filter does not execute atomically with the - # true and false filters, which may lead to inconsistent or unexpected - # results. Additionally, Condition filters have poor performance, especially - # when filters are set for the false condition. - # @!attribute [rw] predicate_filter - # @return [::Google::Cloud::Bigtable::V2::RowFilter] - # If `predicate_filter` outputs any cells, then `true_filter` will be - # evaluated on the input row. Otherwise, `false_filter` will be evaluated. - # @!attribute [rw] true_filter - # @return [::Google::Cloud::Bigtable::V2::RowFilter] - # The filter to apply to the input row if `predicate_filter` returns any - # results. If not provided, no results will be returned in the true case. - # @!attribute [rw] false_filter - # @return [::Google::Cloud::Bigtable::V2::RowFilter] - # The filter to apply to the input row if `predicate_filter` does not - # return any results. If not provided, no results will be returned in the - # false case. - class Condition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifies a particular change to be made to the contents of a row. - # @!attribute [rw] set_cell - # @return [::Google::Cloud::Bigtable::V2::Mutation::SetCell] - # Set a cell's value. - # - # Note: The following fields are mutually exclusive: `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] add_to_cell - # @return [::Google::Cloud::Bigtable::V2::Mutation::AddToCell] - # Incrementally updates an `Aggregate` cell. - # - # Note: The following fields are mutually exclusive: `add_to_cell`, `set_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] merge_to_cell - # @return [::Google::Cloud::Bigtable::V2::Mutation::MergeToCell] - # Merges accumulated state to an `Aggregate` cell. - # - # Note: The following fields are mutually exclusive: `merge_to_cell`, `set_cell`, `add_to_cell`, `delete_from_column`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delete_from_column - # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromColumn] - # Deletes cells from a column. - # - # Note: The following fields are mutually exclusive: `delete_from_column`, `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_family`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delete_from_family - # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromFamily] - # Deletes cells from a column family. - # - # Note: The following fields are mutually exclusive: `delete_from_family`, `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_row`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delete_from_row - # @return [::Google::Cloud::Bigtable::V2::Mutation::DeleteFromRow] - # Deletes cells from the entire row. - # - # Note: The following fields are mutually exclusive: `delete_from_row`, `set_cell`, `add_to_cell`, `merge_to_cell`, `delete_from_column`, `delete_from_family`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Mutation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A Mutation which sets the value of the specified cell. - # @!attribute [rw] family_name - # @return [::String] - # The name of the family into which new data should be written. - # Must match `[-_.a-zA-Z0-9]+` - # @!attribute [rw] column_qualifier - # @return [::String] - # The qualifier of the column into which new data should be written. - # Can be any byte string, including the empty string. - # @!attribute [rw] timestamp_micros - # @return [::Integer] - # The timestamp of the cell into which new data should be written. - # Use -1 for current Bigtable server time. - # Otherwise, the client should set this value itself, noting that the - # default value is a timestamp of zero if the field is left unspecified. - # Values must match the granularity of the table (e.g. micros, millis). - # @!attribute [rw] value - # @return [::String] - # The value to be written into the specified cell. - class SetCell - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Mutation which incrementally updates a cell in an `Aggregate` family. - # @!attribute [rw] family_name - # @return [::String] - # The name of the `Aggregate` family into which new data should be added. - # This must be a family with a `value_type` of `Aggregate`. - # Format: `[-_.a-zA-Z0-9]+` - # @!attribute [rw] column_qualifier - # @return [::Google::Cloud::Bigtable::V2::Value] - # The qualifier of the column into which new data should be added. This - # must be a `raw_value`. - # @!attribute [rw] timestamp - # @return [::Google::Cloud::Bigtable::V2::Value] - # The timestamp of the cell to which new data should be added. This must - # be a `raw_timestamp_micros` that matches the table's `granularity`. - # @!attribute [rw] input - # @return [::Google::Cloud::Bigtable::V2::Value] - # The input value to be accumulated into the specified cell. This must be - # compatible with the family's `value_type.input_type`. - class AddToCell - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Mutation which merges accumulated state into a cell in an `Aggregate` - # family. - # @!attribute [rw] family_name - # @return [::String] - # The name of the `Aggregate` family into which new data should be added. - # This must be a family with a `value_type` of `Aggregate`. - # Format: `[-_.a-zA-Z0-9]+` - # @!attribute [rw] column_qualifier - # @return [::Google::Cloud::Bigtable::V2::Value] - # The qualifier of the column into which new data should be added. This - # must be a `raw_value`. - # @!attribute [rw] timestamp - # @return [::Google::Cloud::Bigtable::V2::Value] - # The timestamp of the cell to which new data should be added. This must - # be a `raw_timestamp_micros` that matches the table's `granularity`. - # @!attribute [rw] input - # @return [::Google::Cloud::Bigtable::V2::Value] - # The input value to be merged into the specified cell. This must be - # compatible with the family's `value_type.state_type`. Merging `NULL` is - # allowed, but has no effect. - class MergeToCell - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Mutation which deletes cells from the specified column, optionally - # restricting the deletions to a given timestamp range. - # @!attribute [rw] family_name - # @return [::String] - # The name of the family from which cells should be deleted. - # Must match `[-_.a-zA-Z0-9]+` - # @!attribute [rw] column_qualifier - # @return [::String] - # The qualifier of the column from which cells should be deleted. - # Can be any byte string, including the empty string. - # @!attribute [rw] time_range - # @return [::Google::Cloud::Bigtable::V2::TimestampRange] - # The range of timestamps within which cells should be deleted. - class DeleteFromColumn - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Mutation which deletes all cells from the specified column family. - # @!attribute [rw] family_name - # @return [::String] - # The name of the family from which cells should be deleted. - # Must match `[-_.a-zA-Z0-9]+` - class DeleteFromFamily - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Mutation which deletes all cells from the containing row. - class DeleteFromRow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Specifies an atomic read/modify/write operation on the latest value of the - # specified column. - # @!attribute [rw] family_name - # @return [::String] - # The name of the family to which the read/modify/write should be applied. - # Must match `[-_.a-zA-Z0-9]+` - # @!attribute [rw] column_qualifier - # @return [::String] - # The qualifier of the column to which the read/modify/write should be - # applied. - # Can be any byte string, including the empty string. - # @!attribute [rw] append_value - # @return [::String] - # Rule specifying that `append_value` be appended to the existing value. - # If the targeted cell is unset, it will be treated as containing the - # empty string. - # - # Note: The following fields are mutually exclusive: `append_value`, `increment_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] increment_amount - # @return [::Integer] - # Rule specifying that `increment_amount` be added to the existing value. - # If the targeted cell is unset, it will be treated as containing a zero. - # Otherwise, the targeted cell must contain an 8-byte value (interpreted - # as a 64-bit big-endian signed integer), or the entire request will fail. - # - # Note: The following fields are mutually exclusive: `increment_amount`, `append_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ReadModifyWriteRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NOTE: This API is intended to be used by Apache Beam BigtableIO. - # A partition of a change stream. - # @!attribute [rw] row_range - # @return [::Google::Cloud::Bigtable::V2::RowRange] - # The row range covered by this partition and is specified by - # [`start_key_closed`, `end_key_open`). - class StreamPartition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NOTE: This API is intended to be used by Apache Beam BigtableIO. - # The information required to continue reading the data from multiple - # `StreamPartitions` from where a previous read left off. - # @!attribute [rw] tokens - # @return [::Array<::Google::Cloud::Bigtable::V2::StreamContinuationToken>] - # List of continuation tokens. - class StreamContinuationTokens - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NOTE: This API is intended to be used by Apache Beam BigtableIO. - # The information required to continue reading the data from a - # `StreamPartition` from where a previous read left off. - # @!attribute [rw] partition - # @return [::Google::Cloud::Bigtable::V2::StreamPartition] - # The partition that this token applies to. - # @!attribute [rw] token - # @return [::String] - # An encoded position in the stream to restart reading from. - class StreamContinuationToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Protocol buffers format descriptor, as described by Messages ProtoSchema and - # ProtoRows - class ProtoFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a column in a Bigtable Query Language result set. - # @!attribute [rw] name - # @return [::String] - # The name of the column. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigtable::V2::Type] - # The type of the column. - class ColumnMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ResultSet schema in proto format - # @!attribute [rw] columns - # @return [::Array<::Google::Cloud::Bigtable::V2::ColumnMetadata>] - # The columns in the result set. - class ProtoSchema - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the structure of a Bigtable result set. - # @!attribute [rw] proto_schema - # @return [::Google::Cloud::Bigtable::V2::ProtoSchema] - # Schema in proto format - class ResultSetMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Rows represented in proto format. - # - # This should be constructed by concatenating the `batch_data` from each - # of the relevant `ProtoRowsBatch` messages and parsing the result as a - # `ProtoRows` message. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Bigtable::V2::Value>] - # A proto rows message consists of a list of values. Every N complete values - # defines a row, where N is equal to the number of entries in the - # `metadata.proto_schema.columns` value received in the first response. - class ProtoRows - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A part of a serialized `ProtoRows` message. - # @!attribute [rw] batch_data - # @return [::String] - # Part of a serialized `ProtoRows` message. - # A complete, parseable ProtoRows message is constructed by - # concatenating `batch_data` from multiple `ProtoRowsBatch` messages. The - # `PartialResultSet` that contains the last part has `complete_batch` set to - # `true`. - class ProtoRowsBatch - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A partial result set from the streaming query API. - # Cloud Bigtable clients buffer partial results received in this message until - # a `resume_token` is received. - # - # The pseudocode below describes how to buffer and parse a stream of - # `PartialResultSet` messages. - # - # Having: - # - queue of row results waiting to be returned `queue` - # - extensible buffer of bytes `buffer` - # - a place to keep track of the most recent `resume_token` - # for each PartialResultSet `p` received { - # if p.reset { - # ensure `queue` is empty - # ensure `buffer` is empty - # } - # if p.estimated_batch_size != 0 { - # (optional) ensure `buffer` is sized to at least `p.estimated_batch_size` - # } - # if `p.proto_rows_batch` is set { - # append `p.proto_rows_batch.bytes` to `buffer` - # } - # if p.batch_checksum is set and `buffer` is not empty { - # validate the checksum matches the contents of `buffer` - # (see comments on `batch_checksum`) - # parse `buffer` as `ProtoRows` message, clearing `buffer` - # add parsed rows to end of `queue` - # } - # if p.resume_token is set { - # release results in `queue` - # save `p.resume_token` in `resume_token` - # } - # } - # @!attribute [rw] proto_rows_batch - # @return [::Google::Cloud::Bigtable::V2::ProtoRowsBatch] - # Partial rows in serialized ProtoRows format. - # @!attribute [rw] batch_checksum - # @return [::Integer] - # CRC32C checksum of concatenated `partial_rows` data for the current batch. - # - # When present, the buffered data from `partial_rows` forms a complete - # parseable message of the appropriate type. - # - # The client should mark the end of a parseable message and prepare to - # receive a new one starting from the next `PartialResultSet` message. - # Clients must verify the checksum of the serialized batch before yielding it - # to the caller. - # - # This does NOT mean the values can be yielded to the callers since a - # `resume_token` is required to safely do so. - # - # If `resume_token` is non-empty and any data has been received since the - # last one, this field is guaranteed to be non-empty. In other words, clients - # may assume that a batch will never cross a `resume_token` boundary. - # @!attribute [rw] resume_token - # @return [::String] - # An opaque token sent by the server to allow query resumption and signal - # that the buffered values constructed from received `partial_rows` can be - # yielded to the caller. Clients can provide this token in a subsequent - # request to resume the result stream from the current point. - # - # When `resume_token` is non-empty, the buffered values received from - # `partial_rows` since the last non-empty `resume_token` can be yielded to - # the callers, provided that the client keeps the value of `resume_token` and - # uses it on subsequent retries. - # - # A `resume_token` may be sent without information in `partial_rows` to - # checkpoint the progress of a sparse query. Any previous `partial_rows` data - # should still be yielded in this case, and the new `resume_token` should be - # saved for future retries as normal. - # - # A `resume_token` will only be sent on a boundary where there is either no - # ongoing result batch, or `batch_checksum` is also populated. - # - # The server will also send a sentinel `resume_token` when last batch of - # `partial_rows` is sent. If the client retries the ExecuteQueryRequest with - # the sentinel `resume_token`, the server will emit it again without any - # data in `partial_rows`, then return OK. - # @!attribute [rw] reset - # @return [::Boolean] - # If `true`, any data buffered since the last non-empty `resume_token` must - # be discarded before the other parts of this message, if any, are handled. - # @!attribute [rw] estimated_batch_size - # @return [::Integer] - # Estimated size of the buffer required to hold the next batch of results. - # - # This value will be sent with the first `partial_rows` of a batch. That is, - # on the first `partial_rows` received in a stream, on the first message - # after a `batch_checksum` message, and any time `reset` is true. - # - # The client can use this estimate to allocate a buffer for the next batch of - # results. This helps minimize the number of allocations required, though the - # buffer size may still need to be increased if the estimate is too low. - class PartialResultSet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Parameters on mutations where clients want to ensure idempotency (i.e. - # at-most-once semantics). This is currently only needed for certain aggregate - # types. - # @!attribute [rw] token - # @return [::String] - # Unique token used to identify replays of this mutation. - # Must be at least 8 bytes long. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Client-assigned timestamp when the mutation's first attempt was sent. - # Used to reject mutations that arrive after idempotency protection may - # have expired. May cause spurious rejections if clock skew is too high. - # - # Leave unset or zero to always accept the mutation, at the risk of - # double counting if the protection for previous attempts has expired. - class Idempotency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb deleted file mode 100644 index 52a9e0a7afeb..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/feature_flags.rb +++ /dev/null @@ -1,77 +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 Bigtable - module V2 - # Feature flags supported or enabled by a client. - # This is intended to be sent as part of request metadata to assure the server - # that certain behaviors are safe to enable. This proto is meant to be - # serialized and websafe-base64 encoded under the `bigtable-features` metadata - # key. The value will remain constant for the lifetime of a client and due to - # HTTP2's HPACK compression, the request overhead will be tiny. - # This is an internal implementation detail and should not be used by end users - # directly. - # @!attribute [rw] reverse_scans - # @return [::Boolean] - # Notify the server that the client supports reverse scans. The server will - # reject ReadRowsRequests with the reverse bit set when this is absent. - # @!attribute [rw] mutate_rows_rate_limit - # @return [::Boolean] - # Notify the server that the client enables batch write flow control by - # requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - # this disables partial retries. - # @!attribute [rw] mutate_rows_rate_limit2 - # @return [::Boolean] - # Notify the server that the client enables batch write flow control by - # requesting RateLimitInfo from MutateRowsResponse. With partial retries - # enabled. - # @!attribute [rw] last_scanned_row_responses - # @return [::Boolean] - # Notify the server that the client supports the last_scanned_row field - # in ReadRowsResponse for long-running scans. - # @!attribute [rw] routing_cookie - # @return [::Boolean] - # Notify the server that the client supports using encoded routing cookie - # strings to retry requests with. - # @!attribute [rw] retry_info - # @return [::Boolean] - # Notify the server that the client supports using retry info back off - # durations to retry requests with. - # @!attribute [rw] client_side_metrics_enabled - # @return [::Boolean] - # Notify the server that the client has client side metrics enabled. - # @!attribute [rw] traffic_director_enabled - # @return [::Boolean] - # Notify the server that the client using Traffic Director endpoint. - # @!attribute [rw] direct_access_requested - # @return [::Boolean] - # Notify the server that the client explicitly opted in for Direct Access. - # @!attribute [rw] peer_info - # @return [::Boolean] - # If the client can support using BigtablePeerInfo. - class FeatureFlags - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb deleted file mode 100644 index dd48ceaee1fc..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/peer_info.rb +++ /dev/null @@ -1,81 +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 Bigtable - module V2 - # PeerInfo contains information about the peer that the client is - # connecting to. - # @!attribute [rw] google_frontend_id - # @return [::Integer] - # An opaque identifier for the Google Frontend which serviced this request. - # Only set when not using DirectAccess. - # @!attribute [rw] application_frontend_id - # @return [::Integer] - # An opaque identifier for the application frontend which serviced this - # request. - # @!attribute [rw] application_frontend_zone - # @return [::String] - # The Cloud zone of the application frontend that served this request. - # @!attribute [rw] application_frontend_subzone - # @return [::String] - # The subzone of the application frontend that served this request, e.g. an - # identifier for where within the zone the application frontend is. - # @!attribute [rw] transport_type - # @return [::Google::Cloud::Bigtable::V2::PeerInfo::TransportType] - class PeerInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The transport type that the client used to connect to this peer. - module TransportType - # The transport type is unknown. - TRANSPORT_TYPE_UNKNOWN = 0 - - # The client connected to this peer via an external network - # (e.g. outside Google Coud). - TRANSPORT_TYPE_EXTERNAL = 1 - - # The client connected to this peer via CloudPath. - TRANSPORT_TYPE_CLOUD_PATH = 2 - - # The client connected to this peer via DirectAccess. - TRANSPORT_TYPE_DIRECT_ACCESS = 3 - - # The client connected to this peer via Bigtable Sessions using an unknown - # transport type. - TRANSPORT_TYPE_SESSION_UNKNOWN = 4 - - # The client connected to this peer via Bigtable Sessions on an external - # network (e.g. outside Google Cloud). - TRANSPORT_TYPE_SESSION_EXTERNAL = 5 - - # The client connected to this peer via Bigtable Sessions using CloudPath. - TRANSPORT_TYPE_SESSION_CLOUD_PATH = 6 - - # The client connected to this peer via Bigtable Sessions using - # DirectAccess. - TRANSPORT_TYPE_SESSION_DIRECT_ACCESS = 7 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb deleted file mode 100644 index dbd4d3596e23..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/request_stats.rb +++ /dev/null @@ -1,103 +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 Bigtable - module V2 - # ReadIterationStats captures information about the iteration of rows or cells - # over the course of a read, e.g. how many results were scanned in a read - # operation versus the results returned. - # @!attribute [rw] rows_seen_count - # @return [::Integer] - # The rows seen (scanned) as part of the request. This includes the count of - # rows returned, as captured below. - # @!attribute [rw] rows_returned_count - # @return [::Integer] - # The rows returned as part of the request. - # @!attribute [rw] cells_seen_count - # @return [::Integer] - # The cells seen (scanned) as part of the request. This includes the count of - # cells returned, as captured below. - # @!attribute [rw] cells_returned_count - # @return [::Integer] - # The cells returned as part of the request. - class ReadIterationStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RequestLatencyStats provides a measurement of the latency of the request as - # it interacts with different systems over its lifetime, e.g. how long the - # request took to execute within a frontend server. - # @!attribute [rw] frontend_server_latency - # @return [::Google::Protobuf::Duration] - # The latency measured by the frontend server handling this request, from - # when the request was received, to when this value is sent back in the - # response. For more context on the component that is measuring this latency, - # see: https://cloud.google.com/bigtable/docs/overview - # - # Note: This value may be slightly shorter than the value reported into - # aggregate latency metrics in Monitoring for this request - # (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - # needs to be sent in the response before the latency measurement including - # that transmission is finalized. - # - # Note: This value includes the end-to-end latency of contacting nodes in - # the targeted cluster, e.g. measuring from when the first byte arrives at - # the frontend server, to when this value is sent back as the last value in - # the response, including any latency incurred by contacting nodes, waiting - # for results from nodes, and finally sending results from nodes back to the - # caller. - class RequestLatencyStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # FullReadStatsView captures all known information about a read. - # @!attribute [rw] read_iteration_stats - # @return [::Google::Cloud::Bigtable::V2::ReadIterationStats] - # Iteration stats describe how efficient the read is, e.g. comparing - # rows seen vs. rows returned or cells seen vs cells returned can provide an - # indication of read efficiency (the higher the ratio of seen to retuned the - # better). - # @!attribute [rw] request_latency_stats - # @return [::Google::Cloud::Bigtable::V2::RequestLatencyStats] - # Request latency stats describe the time taken to complete a request, from - # the server side. - class FullReadStatsView - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RequestStats is the container for additional information pertaining to a - # single request, helpful for evaluating the performance of the sent request. - # Currently, the following method is supported: google.bigtable.v2.ReadRows - # @!attribute [rw] full_read_stats_view - # @return [::Google::Cloud::Bigtable::V2::FullReadStatsView] - # Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL - # view, see package google.bigtable.v2. - class RequestStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb deleted file mode 100644 index c909499b78f0..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/response_params.rb +++ /dev/null @@ -1,42 +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 Bigtable - module V2 - # Response metadata proto - # @!attribute [rw] zone_id - # @return [::String] - # The cloud bigtable zone associated with the cluster. - # @!attribute [rw] cluster_id - # @return [::String] - # Identifier for a cluster that represents set of - # bigtable resources. - # @!attribute [rw] afe_id - # @return [::Integer] - # The AFE ID for the AFE that is served this request. - class ResponseParams - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb deleted file mode 100644 index 2b77760b49db..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/bigtable/v2/types.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Bigtable - module V2 - # `Type` represents the type of data that is written to, read from, or stored - # in Bigtable. It is heavily based on the GoogleSQL standard to help maintain - # familiarity and consistency across products and features. - # - # For compatibility with Bigtable's existing untyped APIs, each `Type` includes - # an `Encoding` which describes how to convert to or from the underlying data. - # - # Each encoding can operate in one of two modes: - # - # - Sorted: In this mode, Bigtable guarantees that `Encode(X) <= Encode(Y)` - # if and only if `X <= Y`. This is useful anywhere sort order is important, - # for example when encoding keys. - # - Distinct: In this mode, Bigtable guarantees that if `X != Y` then - # `Encode(X) != Encode(Y)`. However, the converse is not guaranteed. For - # example, both `{'foo': '1', 'bar': '2'}` and `{'bar': '2', 'foo': '1'}` - # are valid encodings of the same JSON value. - # - # The API clearly documents which mode is used wherever an encoding can be - # configured. Each encoding also documents which values are supported in which - # modes. For example, when encoding INT64 as a numeric STRING, negative numbers - # cannot be encoded in sorted mode. This is because `INT64(1) > INT64(-1)`, but - # `STRING("-00001") > STRING("00001")`. - # @!attribute [rw] bytes_type - # @return [::Google::Cloud::Bigtable::V2::Type::Bytes] - # Bytes - # - # Note: The following fields are mutually exclusive: `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_type - # @return [::Google::Cloud::Bigtable::V2::Type::String] - # String - # - # Note: The following fields are mutually exclusive: `string_type`, `bytes_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] int64_type - # @return [::Google::Cloud::Bigtable::V2::Type::Int64] - # Int64 - # - # Note: The following fields are mutually exclusive: `int64_type`, `bytes_type`, `string_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] float32_type - # @return [::Google::Cloud::Bigtable::V2::Type::Float32] - # Float32 - # - # Note: The following fields are mutually exclusive: `float32_type`, `bytes_type`, `string_type`, `int64_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] float64_type - # @return [::Google::Cloud::Bigtable::V2::Type::Float64] - # Float64 - # - # Note: The following fields are mutually exclusive: `float64_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_type - # @return [::Google::Cloud::Bigtable::V2::Type::Bool] - # Bool - # - # Note: The following fields are mutually exclusive: `bool_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_type - # @return [::Google::Cloud::Bigtable::V2::Type::Timestamp] - # Timestamp - # - # Note: The following fields are mutually exclusive: `timestamp_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] date_type - # @return [::Google::Cloud::Bigtable::V2::Type::Date] - # Date - # - # Note: The following fields are mutually exclusive: `date_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] aggregate_type - # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate] - # Aggregate - # - # Note: The following fields are mutually exclusive: `aggregate_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `struct_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_type - # @return [::Google::Cloud::Bigtable::V2::Type::Struct] - # Struct - # - # Note: The following fields are mutually exclusive: `struct_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `array_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] array_type - # @return [::Google::Cloud::Bigtable::V2::Type::Array] - # Array - # - # Note: The following fields are mutually exclusive: `array_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `map_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] map_type - # @return [::Google::Cloud::Bigtable::V2::Type::Map] - # Map - # - # Note: The following fields are mutually exclusive: `map_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `proto_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] proto_type - # @return [::Google::Cloud::Bigtable::V2::Type::Proto] - # Proto - # - # Note: The following fields are mutually exclusive: `proto_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `enum_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] enum_type - # @return [::Google::Cloud::Bigtable::V2::Type::Enum] - # Enum - # - # Note: The following fields are mutually exclusive: `enum_type`, `bytes_type`, `string_type`, `int64_type`, `float32_type`, `float64_type`, `bool_type`, `timestamp_type`, `date_type`, `aggregate_type`, `struct_type`, `array_type`, `map_type`, `proto_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Type - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Bytes - # Values of type `Bytes` are stored in `Value.bytes_value`. - # @!attribute [rw] encoding - # @return [::Google::Cloud::Bigtable::V2::Type::Bytes::Encoding] - # The encoding to use when converting to or from lower level types. - class Bytes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Rules used to convert to or from lower level types. - # @!attribute [rw] raw - # @return [::Google::Cloud::Bigtable::V2::Type::Bytes::Encoding::Raw] - # Use `Raw` encoding. - class Encoding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Leaves the value as-is. - # - # Sorted mode: all values are supported. - # - # Distinct mode: all values are supported. - # @!attribute [rw] escape_nulls - # @return [::Boolean] - # If set, allows NULL values to be encoded as the empty string "". - # - # The actual empty string, or any value which only contains the - # null byte `0x00`, has one more null byte appended. - class Raw - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # String - # Values of type `String` are stored in `Value.string_value`. - # @!attribute [rw] encoding - # @return [::Google::Cloud::Bigtable::V2::Type::String::Encoding] - # The encoding to use when converting to or from lower level types. - class String - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Rules used to convert to or from lower level types. - # @!attribute [rw] utf8_raw - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Bigtable::V2::Type::String::Encoding::Utf8Raw] - # Deprecated: if set, converts to an empty `utf8_bytes`. - # - # Note: The following fields are mutually exclusive: `utf8_raw`, `utf8_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] utf8_bytes - # @return [::Google::Cloud::Bigtable::V2::Type::String::Encoding::Utf8Bytes] - # Use `Utf8Bytes` encoding. - # - # Note: The following fields are mutually exclusive: `utf8_bytes`, `utf8_raw`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Encoding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Deprecated: prefer the equivalent `Utf8Bytes`. - # @deprecated This message is deprecated and may be removed in the next major version update. - class Utf8Raw - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UTF-8 encoding. - # - # Sorted mode: - # - All values are supported. - # - Code point order is preserved. - # - # Distinct mode: all values are supported. - # - # Compatible with: - # - # - BigQuery `TEXT` encoding - # - HBase `Bytes.toBytes` - # - Java `String#getBytes(StandardCharsets.UTF_8)` - # @!attribute [rw] null_escape_char - # @return [::String] - # Single-character escape sequence used to support NULL values. - # - # If set, allows NULL values to be encoded as the empty string "". - # - # The actual empty string, or any value where every character equals - # `null_escape_char`, has one more `null_escape_char` appended. - # - # If `null_escape_char` is set and does not equal the ASCII null - # character `0x00`, then the encoding will not support sorted mode. - # - # . - class Utf8Bytes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Int64 - # Values of type `Int64` are stored in `Value.int_value`. - # @!attribute [rw] encoding - # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding] - # The encoding to use when converting to or from lower level types. - class Int64 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Rules used to convert to or from lower level types. - # @!attribute [rw] big_endian_bytes - # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding::BigEndianBytes] - # Use `BigEndianBytes` encoding. - # - # Note: The following fields are mutually exclusive: `big_endian_bytes`, `ordered_code_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ordered_code_bytes - # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding::OrderedCodeBytes] - # Use `OrderedCodeBytes` encoding. - # - # Note: The following fields are mutually exclusive: `ordered_code_bytes`, `big_endian_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Encoding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Encodes the value as an 8-byte big-endian two's complement value. - # - # Sorted mode: non-negative values are supported. - # - # Distinct mode: all values are supported. - # - # Compatible with: - # - # - BigQuery `BINARY` encoding - # - HBase `Bytes.toBytes` - # - Java `ByteBuffer.putLong()` with `ByteOrder.BIG_ENDIAN` - # @!attribute [rw] bytes_type - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Bigtable::V2::Type::Bytes] - # Deprecated: ignored if set. - class BigEndianBytes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encodes the value in a variable length binary format of up to 10 bytes. - # Values that are closer to zero use fewer bytes. - # - # Sorted mode: all values are supported. - # - # Distinct mode: all values are supported. - class OrderedCodeBytes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # bool - # Values of type `Bool` are stored in `Value.bool_value`. - class Bool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Float32 - # Values of type `Float32` are stored in `Value.float_value`. - class Float32 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Float64 - # Values of type `Float64` are stored in `Value.float_value`. - class Float64 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Timestamp - # Values of type `Timestamp` are stored in `Value.timestamp_value`. - # @!attribute [rw] encoding - # @return [::Google::Cloud::Bigtable::V2::Type::Timestamp::Encoding] - # The encoding to use when converting to or from lower level types. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Rules used to convert to or from lower level types. - # @!attribute [rw] unix_micros_int64 - # @return [::Google::Cloud::Bigtable::V2::Type::Int64::Encoding] - # Encodes the number of microseconds since the Unix epoch using the - # given `Int64` encoding. Values must be microsecond-aligned. - # - # Compatible with: - # - # - Java `Instant.truncatedTo()` with `ChronoUnit.MICROS` - class Encoding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Date - # Values of type `Date` are stored in `Value.date_value`. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A structured data value, consisting of fields which map to dynamically - # typed values. - # Values of type `Struct` are stored in `Value.array_value` where entries are - # in the same order and number as `field_types`. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Bigtable::V2::Type::Struct::Field>] - # The names and types of the fields in this struct. - # @!attribute [rw] encoding - # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding] - # The encoding to use when converting to or from lower level types. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A struct field and its type. - # @!attribute [rw] field_name - # @return [::String] - # The field name (optional). Fields without a `field_name` are considered - # anonymous and cannot be referenced by name. - # @!attribute [rw] type - # @return [::Google::Cloud::Bigtable::V2::Type] - # The type of values in this field. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Rules used to convert to or from lower level types. - # @!attribute [rw] singleton - # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding::Singleton] - # Use `Singleton` encoding. - # - # Note: The following fields are mutually exclusive: `singleton`, `delimited_bytes`, `ordered_code_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delimited_bytes - # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding::DelimitedBytes] - # Use `DelimitedBytes` encoding. - # - # Note: The following fields are mutually exclusive: `delimited_bytes`, `singleton`, `ordered_code_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ordered_code_bytes - # @return [::Google::Cloud::Bigtable::V2::Type::Struct::Encoding::OrderedCodeBytes] - # User `OrderedCodeBytes` encoding. - # - # Note: The following fields are mutually exclusive: `ordered_code_bytes`, `singleton`, `delimited_bytes`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Encoding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Uses the encoding of `fields[0].type` as-is. - # Only valid if `fields.size == 1`. - class Singleton - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields are encoded independently and concatenated with a configurable - # `delimiter` in between. - # - # A struct with no fields defined is encoded as a single `delimiter`. - # - # Sorted mode: - # - # - Fields are encoded in sorted mode. - # - Encoded field values must not contain any bytes <= `delimiter[0]` - # - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if - # `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. - # - # Distinct mode: - # - # - Fields are encoded in distinct mode. - # - Encoded field values must not contain `delimiter[0]`. - # @!attribute [rw] delimiter - # @return [::String] - # Byte sequence used to delimit concatenated fields. The delimiter must - # contain at least 1 character and at most 50 characters. - class DelimitedBytes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fields are encoded independently and concatenated with the fixed byte - # pair `{0x00, 0x01}` in between. - # - # Any null `(0x00)` byte in an encoded field is replaced by the fixed - # byte pair `{0x00, 0xFF}`. - # - # Fields that encode to the empty string "" have special handling: - # - # - If *every* field encodes to "", or if the STRUCT has no fields - # defined, then the STRUCT is encoded as the fixed byte pair - # `{0x00, 0x00}`. - # - Otherwise, the STRUCT only encodes until the last non-empty field, - # omitting any trailing empty fields. Any empty fields that aren't - # omitted are replaced with the fixed byte pair `{0x00, 0x00}`. - # - # Examples: - # - # ``` - # - STRUCT() -> "\00\00" - # - STRUCT("") -> "\00\00" - # - STRUCT("", "") -> "\00\00" - # - STRUCT("", "B") -> "\00\00" + "\00\01" + "B" - # - STRUCT("A", "") -> "A" - # - STRUCT("", "B", "") -> "\00\00" + "\00\01" + "B" - # - STRUCT("A", "", "C") -> "A" + "\00\01" + "\00\00" + "\00\01" + "C" - # ``` - # - # - # Since null bytes are always escaped, this encoding can cause size - # blowup for encodings like `Int64.BigEndianBytes` that are likely to - # produce many such bytes. - # - # Sorted mode: - # - # - Fields are encoded in sorted mode. - # - All values supported by the field encodings are allowed - # - Element-wise order is preserved: `A < B` if `A[0] < B[0]`, or if - # `A[0] == B[0] && A[1] < B[1]`, etc. Strict prefixes sort first. - # - # Distinct mode: - # - # - Fields are encoded in distinct mode. - # - All values supported by the field encodings are allowed. - class OrderedCodeBytes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A protobuf message type. - # Values of type `Proto` are stored in `Value.bytes_value`. - # @!attribute [rw] schema_bundle_id - # @return [::String] - # The ID of the schema bundle that this proto is defined in. - # @!attribute [rw] message_name - # @return [::String] - # The fully qualified name of the protobuf message, including package. In - # the format of "foo.bar.Message". - class Proto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A protobuf enum type. - # Values of type `Enum` are stored in `Value.int_value`. - # @!attribute [rw] schema_bundle_id - # @return [::String] - # The ID of the schema bundle that this enum is defined in. - # @!attribute [rw] enum_name - # @return [::String] - # The fully qualified name of the protobuf enum message, including package. - # In the format of "foo.bar.EnumMessage". - class Enum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An ordered list of elements of a given type. - # Values of type `Array` are stored in `Value.array_value`. - # @!attribute [rw] element_type - # @return [::Google::Cloud::Bigtable::V2::Type] - # The type of the elements in the array. This must not be `Array`. - class Array - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A mapping of keys to values of a given type. - # Values of type `Map` are stored in a `Value.array_value` where each entry - # is another `Value.array_value` with two elements (the key and the value, - # in that order). - # Normally encoded Map values won't have repeated keys, however, clients are - # expected to handle the case in which they do. If the same key appears - # multiple times, the _last_ value takes precedence. - # @!attribute [rw] key_type - # @return [::Google::Cloud::Bigtable::V2::Type] - # The type of a map key. - # Only `Bytes`, `String`, and `Int64` are allowed as key types. - # @!attribute [rw] value_type - # @return [::Google::Cloud::Bigtable::V2::Type] - # The type of the values in a map. - class Map - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A value that combines incremental updates into a summarized value. - # - # Data is never directly written or read using type `Aggregate`. Writes - # provide either the `input_type` or `state_type`, and reads always return - # the `state_type` . - # @!attribute [rw] input_type - # @return [::Google::Cloud::Bigtable::V2::Type] - # Type of the inputs that are accumulated by this `Aggregate`. - # Use `AddInput` mutations to accumulate new inputs. - # @!attribute [r] state_type - # @return [::Google::Cloud::Bigtable::V2::Type] - # Output only. Type that holds the internal accumulator state for the - # `Aggregate`. This is a function of the `input_type` and `aggregator` - # chosen. - # @!attribute [rw] sum - # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::Sum] - # Sum aggregator. - # - # Note: The following fields are mutually exclusive: `sum`, `hllpp_unique_count`, `max`, `min`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] hllpp_unique_count - # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::HyperLogLogPlusPlusUniqueCount] - # HyperLogLogPlusPlusUniqueCount aggregator. - # - # Note: The following fields are mutually exclusive: `hllpp_unique_count`, `sum`, `max`, `min`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] max - # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::Max] - # Max aggregator. - # - # Note: The following fields are mutually exclusive: `max`, `sum`, `hllpp_unique_count`, `min`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] min - # @return [::Google::Cloud::Bigtable::V2::Type::Aggregate::Min] - # Min aggregator. - # - # Note: The following fields are mutually exclusive: `min`, `sum`, `hllpp_unique_count`, `max`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Aggregate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Computes the sum of the input values. - # Allowed input: `Int64` - # State: same as input - class Sum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Computes the max of the input values. - # Allowed input: `Int64` - # State: same as input - class Max - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Computes the min of the input values. - # Allowed input: `Int64` - # State: same as input - class Min - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Computes an approximate unique count over the input values. When using - # raw data as input, be careful to use a consistent encoding. Otherwise - # the same value encoded differently could count more than once, or two - # distinct values could count as identical. - # Input: Any, or omit for Raw - # State: TBD - # Special state conversions: `Int64` (the unique count estimate) - class HyperLogLogPlusPlusUniqueCount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 9a7c0269fa42..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,148 +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 - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # - # Not recommended for use in new APIs, but still useful for legacy APIs and - # has no plan to be removed. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/type/date.rb deleted file mode 100644 index 1d0a9780457f..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-bigtable-v2/snippets/Gemfile deleted file mode 100644 index 8b28d0322449..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/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-bigtable-v2", path: "../" -else - gem "google-cloud-bigtable-v2" -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-bigtable-v2/snippets/bigtable/check_and_mutate_row.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/check_and_mutate_row.rb deleted file mode 100644 index 5814a6df6cc3..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/check_and_mutate_row.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 bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the check_and_mutate_row call in the Bigtable 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::Bigtable::V2::Bigtable::Client#check_and_mutate_row. -# -def check_and_mutate_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new - - # Call the check_and_mutate_row method. - result = client.check_and_mutate_row request - - # The returned object is of type Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse. - p result -end -# [END bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb deleted file mode 100644 index 6b3b09e893c4..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/execute_query.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigtable_v2_generated_Bigtable_ExecuteQuery_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the execute_query call in the Bigtable 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::Bigtable::V2::Bigtable::Client#execute_query. -# -def execute_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new - - # Call the execute_query method to start streaming. - output = client.execute_query request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse - output.each do |current_response| - p current_response - end -end -# [END bigtable_v2_generated_Bigtable_ExecuteQuery_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb deleted file mode 100644 index b1928966a6c7..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/generate_initial_change_stream_partitions.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the generate_initial_change_stream_partitions call in the Bigtable 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::Bigtable::V2::Bigtable::Client#generate_initial_change_stream_partitions. -# -def generate_initial_change_stream_partitions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new - - # Call the generate_initial_change_stream_partitions method to start streaming. - output = client.generate_initial_change_stream_partitions request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse - output.each do |current_response| - p current_response - end -end -# [END bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.rb deleted file mode 100644 index 6f148459d270..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_row.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 bigtable_v2_generated_Bigtable_MutateRow_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the mutate_row call in the Bigtable 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::Bigtable::V2::Bigtable::Client#mutate_row. -# -def mutate_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::MutateRowRequest.new - - # Call the mutate_row method. - result = client.mutate_row request - - # The returned object is of type Google::Cloud::Bigtable::V2::MutateRowResponse. - p result -end -# [END bigtable_v2_generated_Bigtable_MutateRow_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb deleted file mode 100644 index 319825bda340..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/mutate_rows.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigtable_v2_generated_Bigtable_MutateRows_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the mutate_rows call in the Bigtable 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::Bigtable::V2::Bigtable::Client#mutate_rows. -# -def mutate_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::MutateRowsRequest.new - - # Call the mutate_rows method to start streaming. - output = client.mutate_rows request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigtable::V2::MutateRowsResponse - output.each do |current_response| - p current_response - end -end -# [END bigtable_v2_generated_Bigtable_MutateRows_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.rb deleted file mode 100644 index eeef89c612d3..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/ping_and_warm.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 bigtable_v2_generated_Bigtable_PingAndWarm_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the ping_and_warm call in the Bigtable 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::Bigtable::V2::Bigtable::Client#ping_and_warm. -# -def ping_and_warm - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::PingAndWarmRequest.new - - # Call the ping_and_warm method. - result = client.ping_and_warm request - - # The returned object is of type Google::Cloud::Bigtable::V2::PingAndWarmResponse. - p result -end -# [END bigtable_v2_generated_Bigtable_PingAndWarm_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.rb deleted file mode 100644 index 6d883b1199b2..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/prepare_query.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 bigtable_v2_generated_Bigtable_PrepareQuery_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the prepare_query call in the Bigtable 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::Bigtable::V2::Bigtable::Client#prepare_query. -# -def prepare_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::PrepareQueryRequest.new - - # Call the prepare_query method. - result = client.prepare_query request - - # The returned object is of type Google::Cloud::Bigtable::V2::PrepareQueryResponse. - p result -end -# [END bigtable_v2_generated_Bigtable_PrepareQuery_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb deleted file mode 100644 index 7ecdc1345f72..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_change_stream.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigtable_v2_generated_Bigtable_ReadChangeStream_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the read_change_stream call in the Bigtable 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::Bigtable::V2::Bigtable::Client#read_change_stream. -# -def read_change_stream - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new - - # Call the read_change_stream method to start streaming. - output = client.read_change_stream request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse - output.each do |current_response| - p current_response - end -end -# [END bigtable_v2_generated_Bigtable_ReadChangeStream_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.rb deleted file mode 100644 index a65a94ba9865..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_modify_write_row.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 bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the read_modify_write_row call in the Bigtable 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::Bigtable::V2::Bigtable::Client#read_modify_write_row. -# -def read_modify_write_row - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new - - # Call the read_modify_write_row method. - result = client.read_modify_write_row request - - # The returned object is of type Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse. - p result -end -# [END bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb deleted file mode 100644 index 43326c1aa0be..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/read_rows.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigtable_v2_generated_Bigtable_ReadRows_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the read_rows call in the Bigtable 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::Bigtable::V2::Bigtable::Client#read_rows. -# -def read_rows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::ReadRowsRequest.new - - # Call the read_rows method to start streaming. - output = client.read_rows request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigtable::V2::ReadRowsResponse - output.each do |current_response| - p current_response - end -end -# [END bigtable_v2_generated_Bigtable_ReadRows_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb b/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb deleted file mode 100644 index 46d45fa6daf8..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/bigtable/sample_row_keys.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START bigtable_v2_generated_Bigtable_SampleRowKeys_sync] -require "google/cloud/bigtable/v2" - -## -# Snippet for the sample_row_keys call in the Bigtable 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::Bigtable::V2::Bigtable::Client#sample_row_keys. -# -def sample_row_keys - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Bigtable::V2::Bigtable::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new - - # Call the sample_row_keys method to start streaming. - output = client.sample_row_keys request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse - output.each do |current_response| - p current_response - end -end -# [END bigtable_v2_generated_Bigtable_SampleRowKeys_sync] diff --git a/owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json b/owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json deleted file mode 100644 index 2eb0c4fba5ad..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/snippets/snippet_metadata_google.bigtable.v2.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-bigtable-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.bigtable.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "bigtable_v2_generated_Bigtable_ReadRows_sync", - "title": "Snippet for the read_rows call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#read_rows.", - "file": "bigtable/read_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "read_rows", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#read_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::ReadRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::ReadRowsResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "ReadRows", - "full_name": "google.bigtable.v2.Bigtable.ReadRows", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_SampleRowKeys_sync", - "title": "Snippet for the sample_row_keys call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#sample_row_keys.", - "file": "bigtable/sample_row_keys.rb", - "language": "RUBY", - "client_method": { - "short_name": "sample_row_keys", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#sample_row_keys", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::SampleRowKeysRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::SampleRowKeysResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "SampleRowKeys", - "full_name": "google.bigtable.v2.Bigtable.SampleRowKeys", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_MutateRow_sync", - "title": "Snippet for the mutate_row call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_row.", - "file": "bigtable/mutate_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "mutate_row", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::MutateRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::MutateRowResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "MutateRow", - "full_name": "google.bigtable.v2.Bigtable.MutateRow", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_MutateRows_sync", - "title": "Snippet for the mutate_rows call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_rows.", - "file": "bigtable/mutate_rows.rb", - "language": "RUBY", - "client_method": { - "short_name": "mutate_rows", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#mutate_rows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::MutateRowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::MutateRowsResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "MutateRows", - "full_name": "google.bigtable.v2.Bigtable.MutateRows", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync", - "title": "Snippet for the check_and_mutate_row call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#check_and_mutate_row.", - "file": "bigtable/check_and_mutate_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "check_and_mutate_row", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#check_and_mutate_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "CheckAndMutateRow", - "full_name": "google.bigtable.v2.Bigtable.CheckAndMutateRow", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_PingAndWarm_sync", - "title": "Snippet for the ping_and_warm call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#ping_and_warm.", - "file": "bigtable/ping_and_warm.rb", - "language": "RUBY", - "client_method": { - "short_name": "ping_and_warm", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#ping_and_warm", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::PingAndWarmRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::PingAndWarmResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "PingAndWarm", - "full_name": "google.bigtable.v2.Bigtable.PingAndWarm", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync", - "title": "Snippet for the read_modify_write_row call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#read_modify_write_row.", - "file": "bigtable/read_modify_write_row.rb", - "language": "RUBY", - "client_method": { - "short_name": "read_modify_write_row", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#read_modify_write_row", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "ReadModifyWriteRow", - "full_name": "google.bigtable.v2.Bigtable.ReadModifyWriteRow", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync", - "title": "Snippet for the generate_initial_change_stream_partitions call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#generate_initial_change_stream_partitions.", - "file": "bigtable/generate_initial_change_stream_partitions.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_initial_change_stream_partitions", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#generate_initial_change_stream_partitions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "GenerateInitialChangeStreamPartitions", - "full_name": "google.bigtable.v2.Bigtable.GenerateInitialChangeStreamPartitions", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_ReadChangeStream_sync", - "title": "Snippet for the read_change_stream call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#read_change_stream.", - "file": "bigtable/read_change_stream.rb", - "language": "RUBY", - "client_method": { - "short_name": "read_change_stream", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#read_change_stream", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "ReadChangeStream", - "full_name": "google.bigtable.v2.Bigtable.ReadChangeStream", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_PrepareQuery_sync", - "title": "Snippet for the prepare_query call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#prepare_query.", - "file": "bigtable/prepare_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "prepare_query", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#prepare_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::PrepareQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::PrepareQueryResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "PrepareQuery", - "full_name": "google.bigtable.v2.Bigtable.PrepareQuery", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "bigtable_v2_generated_Bigtable_ExecuteQuery_sync", - "title": "Snippet for the execute_query call in the Bigtable service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Bigtable::V2::Bigtable::Client#execute_query.", - "file": "bigtable/execute_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_query", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client#execute_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Bigtable::V2::ExecuteQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Bigtable::V2::ExecuteQueryResponse", - "client": { - "short_name": "Bigtable::Client", - "full_name": "::Google::Cloud::Bigtable::V2::Bigtable::Client" - }, - "method": { - "short_name": "ExecuteQuery", - "full_name": "google.bigtable.v2.Bigtable.ExecuteQuery", - "service": { - "short_name": "Bigtable", - "full_name": "google.bigtable.v2.Bigtable" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb b/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb deleted file mode 100644 index c67b862eb238..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_paths_test.rb +++ /dev/null @@ -1,91 +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/bigtable/v2/bigtable" - -class ::Google::Cloud::Bigtable::V2::Bigtable::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_authorized_view_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.authorized_view_path project: "value0", instance: "value1", table: "value2", authorized_view: "value3" - assert_equal "projects/value0/instances/value1/tables/value2/authorizedViews/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", instance: "value1" - assert_equal "projects/value0/instances/value1", path - end - end - - def test_materialized_view_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.materialized_view_path project: "value0", instance: "value1", materialized_view: "value2" - assert_equal "projects/value0/instances/value1/materializedViews/value2", path - end - end - - def test_table_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.table_path project: "value0", instance: "value1", table: "value2" - assert_equal "projects/value0/instances/value1/tables/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb b/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb deleted file mode 100644 index 8733df8081d7..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/test/google/cloud/bigtable/v2/bigtable_test.rb +++ /dev/null @@ -1,927 +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/bigtable/v2/bigtable_pb" -require "google/cloud/bigtable/v2/bigtable" - -class ::Google::Cloud::Bigtable::V2::Bigtable::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_read_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::ReadRowsResponse.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 server streaming method. - table_name = "hello world" - authorized_view_name = "hello world" - materialized_view_name = "hello world" - app_profile_id = "hello world" - rows = {} - filter = {} - rows_limit = 42 - request_stats_view = :REQUEST_STATS_VIEW_UNSPECIFIED - reversed = true - - read_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :read_rows, name - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["authorized_view_name"] - assert_equal "hello world", request["materialized_view_name"] - assert_equal "hello world", request["app_profile_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::RowSet), request["rows"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::RowFilter), request["filter"] - assert_equal 42, request["rows_limit"] - assert_equal :REQUEST_STATS_VIEW_UNSPECIFIED, request["request_stats_view"] - assert_equal true, request["reversed"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, read_rows_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.read_rows({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.read_rows table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.read_rows ::Google::Cloud::Bigtable::V2::ReadRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.read_rows({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.read_rows(::Google::Cloud::Bigtable::V2::ReadRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id, rows: rows, filter: filter, rows_limit: rows_limit, request_stats_view: request_stats_view, reversed: reversed), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, read_rows_client_stub.call_rpc_count - end - end - - def test_sample_row_keys - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse.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 server streaming method. - table_name = "hello world" - authorized_view_name = "hello world" - materialized_view_name = "hello world" - app_profile_id = "hello world" - - sample_row_keys_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :sample_row_keys, name - assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["authorized_view_name"] - assert_equal "hello world", request["materialized_view_name"] - assert_equal "hello world", request["app_profile_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, sample_row_keys_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.sample_row_keys({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.sample_row_keys table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.sample_row_keys ::Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.sample_row_keys({ table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.sample_row_keys(::Google::Cloud::Bigtable::V2::SampleRowKeysRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, materialized_view_name: materialized_view_name, app_profile_id: app_profile_id), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::SampleRowKeysResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, sample_row_keys_client_stub.call_rpc_count - end - end - - def test_mutate_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::MutateRowResponse.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. - table_name = "hello world" - authorized_view_name = "hello world" - app_profile_id = "hello world" - row_key = "hello world" - mutations = [{}] - idempotency = {} - - mutate_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :mutate_row, name - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["authorized_view_name"] - assert_equal "hello world", request["app_profile_id"] - assert_equal "hello world", request["row_key"] - assert_kind_of ::Google::Cloud::Bigtable::V2::Mutation, request["mutations"].first - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::Idempotency), request["idempotency"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, mutate_row_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.mutate_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.mutate_row ::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.mutate_row(::Google::Cloud::Bigtable::V2::MutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, mutations: mutations, idempotency: idempotency), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, mutate_row_client_stub.call_rpc_count - end - end - - def test_mutate_rows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::MutateRowsResponse.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 server streaming method. - table_name = "hello world" - authorized_view_name = "hello world" - app_profile_id = "hello world" - entries = [{}] - - mutate_rows_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :mutate_rows, name - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["authorized_view_name"] - assert_equal "hello world", request["app_profile_id"] - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsRequest::Entry, request["entries"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, mutate_rows_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.mutate_rows({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.mutate_rows table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.mutate_rows ::Google::Cloud::Bigtable::V2::MutateRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.mutate_rows({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.mutate_rows(::Google::Cloud::Bigtable::V2::MutateRowsRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, entries: entries), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::MutateRowsResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, mutate_rows_client_stub.call_rpc_count - end - end - - def test_check_and_mutate_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::CheckAndMutateRowResponse.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. - table_name = "hello world" - authorized_view_name = "hello world" - app_profile_id = "hello world" - row_key = "hello world" - predicate_filter = {} - true_mutations = [{}] - false_mutations = [{}] - - check_and_mutate_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :check_and_mutate_row, name - assert_kind_of ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["authorized_view_name"] - assert_equal "hello world", request["app_profile_id"] - assert_equal "hello world", request["row_key"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::RowFilter), request["predicate_filter"] - assert_kind_of ::Google::Cloud::Bigtable::V2::Mutation, request["true_mutations"].first - assert_kind_of ::Google::Cloud::Bigtable::V2::Mutation, request["false_mutations"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, check_and_mutate_row_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.check_and_mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.check_and_mutate_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.check_and_mutate_row ::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.check_and_mutate_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.check_and_mutate_row(::Google::Cloud::Bigtable::V2::CheckAndMutateRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, predicate_filter: predicate_filter, true_mutations: true_mutations, false_mutations: false_mutations), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, check_and_mutate_row_client_stub.call_rpc_count - end - end - - def test_ping_and_warm - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::PingAndWarmResponse.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" - app_profile_id = "hello world" - - ping_and_warm_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :ping_and_warm, name - assert_kind_of ::Google::Cloud::Bigtable::V2::PingAndWarmRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["app_profile_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, ping_and_warm_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.ping_and_warm({ name: name, app_profile_id: app_profile_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.ping_and_warm name: name, app_profile_id: app_profile_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.ping_and_warm ::Google::Cloud::Bigtable::V2::PingAndWarmRequest.new(name: name, app_profile_id: app_profile_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.ping_and_warm({ name: name, app_profile_id: app_profile_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.ping_and_warm(::Google::Cloud::Bigtable::V2::PingAndWarmRequest.new(name: name, app_profile_id: app_profile_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, ping_and_warm_client_stub.call_rpc_count - end - end - - def test_read_modify_write_row - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowResponse.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. - table_name = "hello world" - authorized_view_name = "hello world" - app_profile_id = "hello world" - row_key = "hello world" - rules = [{}] - - read_modify_write_row_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :read_modify_write_row, name - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["authorized_view_name"] - assert_equal "hello world", request["app_profile_id"] - assert_equal "hello world", request["row_key"] - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadModifyWriteRule, request["rules"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, read_modify_write_row_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.read_modify_write_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.read_modify_write_row table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.read_modify_write_row ::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.read_modify_write_row({ table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.read_modify_write_row(::Google::Cloud::Bigtable::V2::ReadModifyWriteRowRequest.new(table_name: table_name, authorized_view_name: authorized_view_name, app_profile_id: app_profile_id, row_key: row_key, rules: rules), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, read_modify_write_row_client_stub.call_rpc_count - end - end - - def test_generate_initial_change_stream_partitions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse.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 server streaming method. - table_name = "hello world" - app_profile_id = "hello world" - - generate_initial_change_stream_partitions_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :generate_initial_change_stream_partitions, name - assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["app_profile_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_initial_change_stream_partitions_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_initial_change_stream_partitions({ table_name: table_name, app_profile_id: app_profile_id }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_initial_change_stream_partitions table_name: table_name, app_profile_id: app_profile_id do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_initial_change_stream_partitions ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new(table_name: table_name, app_profile_id: app_profile_id) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_initial_change_stream_partitions({ table_name: table_name, app_profile_id: app_profile_id }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_initial_change_stream_partitions(::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsRequest.new(table_name: table_name, app_profile_id: app_profile_id), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::GenerateInitialChangeStreamPartitionsResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_initial_change_stream_partitions_client_stub.call_rpc_count - end - end - - def test_read_change_stream - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse.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 server streaming method. - table_name = "hello world" - app_profile_id = "hello world" - partition = {} - start_time = {} - end_time = {} - heartbeat_duration = {} - - read_change_stream_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :read_change_stream, name - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest, request - assert_equal "hello world", request["table_name"] - assert_equal "hello world", request["app_profile_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::StreamPartition), request["partition"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - assert_equal :start_time, request.start_from - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["heartbeat_duration"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, read_change_stream_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.read_change_stream({ table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.read_change_stream table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.read_change_stream ::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new(table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.read_change_stream({ table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.read_change_stream(::Google::Cloud::Bigtable::V2::ReadChangeStreamRequest.new(table_name: table_name, app_profile_id: app_profile_id, partition: partition, start_time: start_time, end_time: end_time, heartbeat_duration: heartbeat_duration), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ReadChangeStreamResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, read_change_stream_client_stub.call_rpc_count - end - end - - def test_prepare_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::PrepareQueryResponse.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. - instance_name = "hello world" - app_profile_id = "hello world" - query = "hello world" - proto_format = {} - param_types = {} - - prepare_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :prepare_query, name - assert_kind_of ::Google::Cloud::Bigtable::V2::PrepareQueryRequest, request - assert_equal "hello world", request["instance_name"] - assert_equal "hello world", request["app_profile_id"] - assert_equal "hello world", request["query"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::ProtoFormat), request["proto_format"] - assert_equal :proto_format, request.data_format - assert_equal({}, request["param_types"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, prepare_query_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.prepare_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.prepare_query instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.prepare_query ::Google::Cloud::Bigtable::V2::PrepareQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.prepare_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.prepare_query(::Google::Cloud::Bigtable::V2::PrepareQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, proto_format: proto_format, param_types: param_types), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, prepare_query_client_stub.call_rpc_count - end - end - - def test_execute_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse.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 server streaming method. - instance_name = "hello world" - app_profile_id = "hello world" - query = "hello world" - prepared_query = "hello world" - proto_format = {} - resume_token = "hello world" - params = {} - - execute_query_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :execute_query, name - assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest, request - assert_equal "hello world", request["instance_name"] - assert_equal "hello world", request["app_profile_id"] - assert_equal "hello world", request["query"] - assert_equal "hello world", request["prepared_query"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Bigtable::V2::ProtoFormat), request["proto_format"] - assert_equal :proto_format, request.data_format - assert_equal "hello world", request["resume_token"] - assert_equal({}, request["params"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, execute_query_client_stub do - # Create client - client = ::Google::Cloud::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.execute_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.execute_query instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.execute_query ::Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.execute_query({ instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.execute_query(::Google::Cloud::Bigtable::V2::ExecuteQueryRequest.new(instance_name: instance_name, app_profile_id: app_profile_id, query: query, prepared_query: prepared_query, proto_format: proto_format, resume_token: resume_token, params: params), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Bigtable::V2::ExecuteQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, execute_query_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::Bigtable::V2::Bigtable::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::Bigtable::V2::Bigtable::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::Bigtable::V2::Bigtable::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Bigtable::V2::Bigtable::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb b/owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-bigtable-v2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/.gitignore b/owl-bot-staging/google-cloud-billing-budgets-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1/.repo-metadata.json deleted file mode 100644 index 4d0982fd70aa..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "billingbudgets.googleapis.com", - "api_shortname": "billingbudgets", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1/latest", - "distribution_name": "google-cloud-billing-budgets-v1", - "is_cloud": true, - "language": "ruby", - "name": "billingbudgets", - "name_pretty": "Billing Budgets V1 API", - "product_documentation": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BILLING_BUDGETS", - "ruby-cloud-product-url": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml b/owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml deleted file mode 100644 index dc447c9263d4..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-billing-budgets-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-billing-budgets-v1.rb" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/.toys.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/.yardopts b/owl-bot-staging/google-cloud-billing-budgets-v1/.yardopts deleted file mode 100644 index 3c6728b9e74f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Billing Budgets 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-billing-budgets-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-billing-budgets-v1/AUTHENTICATION.md deleted file mode 100644 index df4412dd47b5..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-billing-budgets-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-billing-budgets-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/billing/budgets/v1" - -client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/billing/budgets/v1" - -::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::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-billing-budgets-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/billing/budgets/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::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-billing-budgets-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-billing-budgets-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/LICENSE.md b/owl-bot-staging/google-cloud-billing-budgets-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1/README.md deleted file mode 100644 index 1dcd3d2bc2fc..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Billing Budgets V1 API - -The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan. - -Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Billing Budgets V1 API. Most users should consider using -the main client gem, -[google-cloud-billing-budgets](https://rubygems.org/gems/google-cloud-billing-budgets). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-billing-budgets-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/billingbudgets.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/billing/budgets/v1" - -client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new -request = ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new # (request fields as keyword arguments...) -response = client.create_budget request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/billing/docs/how-to/budget-api-overview) -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/billing/budgets/v1" -require "logger" - -client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::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-billing-budgets`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-billing-budgets-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-billing-budgets`. -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-billing-budgets-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-billing-budgets-v1/Rakefile b/owl-bot-staging/google-cloud-billing-budgets-v1/Rakefile deleted file mode 100644 index e3e19588f9c7..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BILLING_BUDGETS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BILLING_BUDGETS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BILLING_BUDGETS_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 BILLING_BUDGETS_TEST_PROJECT=test123 BILLING_BUDGETS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/billing/budgets/v1/budget_service/credentials" - ::Google::Cloud::Billing::Budgets::V1::BudgetService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BILLING_BUDGETS_PROJECT"] = project - ENV["BILLING_BUDGETS_TEST_PROJECT"] = project - ENV["BILLING_BUDGETS_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-billing-budgets-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-billing-budgets-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-billing-budgets-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-billing-budgets-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-billing-budgets-v1" - header "google-cloud-billing-budgets-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-billing-budgets-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-billing-budgets-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-billing-budgets-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-billing-budgets-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-billing-budgets-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1/gapic_metadata.json deleted file mode 100644 index 8d6ad700a101..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.billing.budgets.v1", - "libraryPackage": "::Google::Cloud::Billing::Budgets::V1", - "services": { - "BudgetService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client", - "rpcs": { - "CreateBudget": { - "methods": [ - "create_budget" - ] - }, - "UpdateBudget": { - "methods": [ - "update_budget" - ] - }, - "GetBudget": { - "methods": [ - "get_budget" - ] - }, - "ListBudgets": { - "methods": [ - "list_budgets" - ] - }, - "DeleteBudget": { - "methods": [ - "delete_budget" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec b/owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec deleted file mode 100644 index 83e9e358c91d..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/google-cloud-billing-budgets-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/billing/budgets/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-billing-budgets-v1" - gem.version = Google::Cloud::Billing::Budgets::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details." - gem.summary = "The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-v1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-v1.rb deleted file mode 100644 index 10c551ea9723..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google-cloud-billing-budgets-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/billing/budgets/v1" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb deleted file mode 100644 index 04752524d37a..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/billing/budgets/v1/budget_service" -require "google/cloud/billing/budgets/v1/version" - -module Google - module Cloud - module Billing - module Budgets - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/billing/budgets/v1" - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/billing/budgets/v1" - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/billing/budgets/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb deleted file mode 100644 index fd6927afae1b..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_model_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/billing/budgets/v1/budget_model.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' -require 'google/type/date_pb' -require 'google/type/money_pb' - - -descriptor_data = "\n2google/cloud/billing/budgets/v1/budget_model.proto\x12\x1fgoogle.cloud.billing.budgets.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\x1a\x17google/type/money.proto\"\xcf\x03\n\x06\x42udget\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x43\n\rbudget_filter\x18\x03 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.FilterB\x03\xe0\x41\x01\x12\x42\n\x06\x61mount\x18\x04 \x01(\x0b\x32-.google.cloud.billing.budgets.v1.BudgetAmountB\x03\xe0\x41\x02\x12L\n\x0fthreshold_rules\x18\x05 \x03(\x0b\x32..google.cloud.billing.budgets.v1.ThresholdRuleB\x03\xe0\x41\x01\x12S\n\x12notifications_rule\x18\x06 \x01(\x0b\x32\x32.google.cloud.billing.budgets.v1.NotificationsRuleB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:]\xea\x41Z\n$billingbudgets.googleapis.com/Budget\x12\x32\x62illingAccounts/{billing_account}/budgets/{budget}\"\xa0\x01\n\x0c\x42udgetAmount\x12.\n\x10specified_amount\x18\x01 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12O\n\x12last_period_amount\x18\x02 \x01(\x0b\x32\x31.google.cloud.billing.budgets.v1.LastPeriodAmountH\x00\x42\x0f\n\rbudget_amount\"\x12\n\x10LastPeriodAmount\"\xc8\x01\n\rThresholdRule\x12\x1e\n\x11threshold_percent\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12N\n\x0bspend_basis\x18\x02 \x01(\x0e\x32\x34.google.cloud.billing.budgets.v1.ThresholdRule.BasisB\x03\xe0\x41\x01\"G\n\x05\x42\x61sis\x12\x15\n\x11\x42\x41SIS_UNSPECIFIED\x10\x00\x12\x11\n\rCURRENT_SPEND\x10\x01\x12\x14\n\x10\x46ORECASTED_SPEND\x10\x02\"\xd5\x01\n\x11NotificationsRule\x12\x19\n\x0cpubsub_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eschema_version\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12-\n monitoring_notification_channels\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12+\n\x1e\x64isable_default_iam_recipients\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x65nable_project_level_recipients\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xc4\x05\n\x06\x46ilter\x12\x15\n\x08projects\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12resource_ancestors\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63redit_types\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x16\x63redit_types_treatment\x18\x04 \x01(\x0e\x32<.google.cloud.billing.budgets.v1.Filter.CreditTypesTreatmentB\x03\xe0\x41\x01\x12\x15\n\x08services\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsubaccounts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12H\n\x06labels\x18\x06 \x03(\x0b\x32\x33.google.cloud.billing.budgets.v1.Filter.LabelsEntryB\x03\xe0\x41\x01\x12O\n\x0f\x63\x61lendar_period\x18\x08 \x01(\x0e\x32/.google.cloud.billing.budgets.v1.CalendarPeriodB\x03\xe0\x41\x01H\x00\x12K\n\rcustom_period\x18\t \x01(\x0b\x32-.google.cloud.billing.budgets.v1.CustomPeriodB\x03\xe0\x41\x01H\x00\x1aI\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValue:\x02\x38\x01\"\x8f\x01\n\x14\x43reditTypesTreatment\x12&\n\"CREDIT_TYPES_TREATMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13INCLUDE_ALL_CREDITS\x10\x01\x12\x17\n\x13\x45XCLUDE_ALL_CREDITS\x10\x02\x12\x1d\n\x19INCLUDE_SPECIFIED_CREDITS\x10\x03\x42\x0e\n\x0cusage_period\"d\n\x0c\x43ustomPeriod\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01*S\n\x0e\x43\x61lendarPeriod\x12\x1f\n\x1b\x43\x41LENDAR_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x0b\n\x07QUARTER\x10\x02\x12\x08\n\x04YEAR\x10\x03\x42x\n#com.google.cloud.billing.budgets.v1B\x10\x42udgetModelProtoP\x01Z=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Billing - module Budgets - module V1 - Budget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.Budget").msgclass - BudgetAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.BudgetAmount").msgclass - LastPeriodAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.LastPeriodAmount").msgclass - ThresholdRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ThresholdRule").msgclass - ThresholdRule::Basis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ThresholdRule.Basis").enummodule - NotificationsRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.NotificationsRule").msgclass - Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.Filter").msgclass - Filter::CreditTypesTreatment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.Filter.CreditTypesTreatment").enummodule - CustomPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.CustomPeriod").msgclass - CalendarPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.CalendarPeriod").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb deleted file mode 100644 index cfcaa453bac2..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/billing/budgets/v1/version" - -require "google/cloud/billing/budgets/v1/budget_service/credentials" -require "google/cloud/billing/budgets/v1/budget_service/paths" -require "google/cloud/billing/budgets/v1/budget_service/client" -require "google/cloud/billing/budgets/v1/budget_service/rest" - -module Google - module Cloud - module Billing - module Budgets - module V1 - ## - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/billing/budgets/v1/budget_service" - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/billing/budgets/v1/budget_service/rest" - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - module BudgetService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "budget_service", "helpers.rb" -require "google/cloud/billing/budgets/v1/budget_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb deleted file mode 100644 index 210b31807b17..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/client.rb +++ /dev/null @@ -1,917 +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/billing/budgets/v1/budget_service_pb" - -module Google - module Cloud - module Billing - module Budgets - module V1 - module BudgetService - ## - # Client for the BudgetService service. - # - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "billingbudgets.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :budget_service_stub - - ## - # Configure the BudgetService Client class. - # - # See {::Google::Cloud::Billing::Budgets::V1::BudgetService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BudgetService clients - # ::Google::Cloud::Billing::Budgets::V1::BudgetService::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", "Billing", "Budgets", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_budget.timeout = 60.0 - - default_config.rpcs.update_budget.timeout = 60.0 - default_config.rpcs.update_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_budget.timeout = 60.0 - default_config.rpcs.get_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_budgets.timeout = 60.0 - default_config.rpcs.list_budgets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_budget.timeout = 60.0 - default_config.rpcs.delete_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BudgetService 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::Billing::Budgets::V1::BudgetService::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 - @budget_service_stub.universe_domain - end - - ## - # Create a new BudgetService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BudgetService 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/billing/budgets/v1/budget_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 - - @budget_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Billing::Budgets::V1::BudgetService::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 - ) - - @budget_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @budget_service_stub.logger - end - - # Service calls - - ## - # Creates a new budget. See - # [Quotas and limits](https://cloud.google.com/billing/quotas) - # for more information on the limits of the number of budgets you can create. - # - # @overload create_budget(request, options = nil) - # Pass arguments to `create_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(parent: nil, budget: nil) - # Pass arguments to `create_budget` via keyword arguments. Note that at - # least one keyword argument is 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 name of the billing account to create the budget in. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] - # Required. Budget to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::Budgets::V1::Budget] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new - # - # # Call the create_budget method. - # result = client.create_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - # p result - # - def create_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :create_budget, 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 budget and returns the updated budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. Budget fields that are not exposed in - # this API will not be changed by this method. - # - # @overload update_budget(request, options = nil) - # Pass arguments to `update_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(budget: nil, update_mask: nil) - # Pass arguments to `update_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] - # Required. The updated budget object. - # The budget to update is specified by the budget name in the budget. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Indicates which fields in the provided budget to update. - # Read-only fields (such as `name`) cannot be changed. If this is not - # provided, then only fields with non-default values from the request are - # updated. See - # https://developers.google.com/protocol-buffers/docs/proto3#default for more - # details about default values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::Budgets::V1::Budget] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new - # - # # Call the update_budget method. - # result = client.update_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - # p result - # - def update_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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.budget&.name - header_params["budget.name"] = request.budget.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_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :update_budget, 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 - - ## - # Returns a budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - # - # @overload get_budget(request, options = nil) - # Pass arguments to `get_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(name: nil) - # Pass arguments to `get_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of budget to get. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::Budgets::V1::Budget] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new - # - # # Call the get_budget method. - # result = client.get_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - # p result - # - def get_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :get_budget, 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 - - ## - # Returns a list of budgets for a billing account. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - # - # @overload list_budgets(request, options = nil) - # Pass arguments to `list_budgets` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budgets(parent: nil, scope: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_budgets` via keyword arguments. Note that at - # least one keyword argument is 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. Name of billing account to list budgets under. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @param scope [::String] - # Optional. Set the scope of the budgets to be returned, in the format of the - # resource name. The scope of a budget is the cost that it tracks, such as - # costs for a single project, or the costs for all projects in a folder. Only - # project scope (in the format of "projects/project-id" or "projects/123") is - # supported in this field. When this field is set to a project's resource - # name, the budgets returned are tracking the costs for that project. - # @param page_size [::Integer] - # Optional. The maximum number of budgets to return per page. - # The default and maximum value are 100. - # @param page_token [::String] - # Optional. The value returned by the last `ListBudgetsResponse` which - # indicates that this is a continuation of a prior `ListBudgets` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new - # - # # Call the list_budgets method. - # result = client.list_budgets 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::Billing::Budgets::V1::Budget. - # p item - # end - # - def list_budgets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest - - # Converts hash 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_budgets.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::Billing::Budgets::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_budgets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_budgets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :list_budgets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @budget_service_stub, :list_budgets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a budget. Returns successfully if already deleted. - # - # @overload delete_budget(request, options = nil) - # Pass arguments to `delete_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(name: nil) - # Pass arguments to `delete_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the budget to delete. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new - # - # # Call the delete_budget method. - # result = client.delete_budget request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :delete_budget, 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 BudgetService API. - # - # This class represents the configuration for BudgetService, - # 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::Billing::Budgets::V1::BudgetService::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 - # # create_budget to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_budget.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_budget.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::Billing::Budgets::V1::BudgetService::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 = "billingbudgets.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 BudgetService 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 `create_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :create_budget - ## - # RPC-specific configuration for `update_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :update_budget - ## - # RPC-specific configuration for `get_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :get_budget - ## - # RPC-specific configuration for `list_budgets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_budgets - ## - # RPC-specific configuration for `delete_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_budget - - # @private - def initialize parent_rpcs = nil - create_budget_config = parent_rpcs.create_budget if parent_rpcs.respond_to? :create_budget - @create_budget = ::Gapic::Config::Method.new create_budget_config - update_budget_config = parent_rpcs.update_budget if parent_rpcs.respond_to? :update_budget - @update_budget = ::Gapic::Config::Method.new update_budget_config - get_budget_config = parent_rpcs.get_budget if parent_rpcs.respond_to? :get_budget - @get_budget = ::Gapic::Config::Method.new get_budget_config - list_budgets_config = parent_rpcs.list_budgets if parent_rpcs.respond_to? :list_budgets - @list_budgets = ::Gapic::Config::Method.new list_budgets_config - delete_budget_config = parent_rpcs.delete_budget if parent_rpcs.respond_to? :delete_budget - @delete_budget = ::Gapic::Config::Method.new delete_budget_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.rb deleted file mode 100644 index 4fad20903d49..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Billing - module Budgets - module V1 - module BudgetService - # Credentials for the BudgetService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-billing", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BILLING_BUDGETS_CREDENTIALS", - "BILLING_BUDGETS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BILLING_BUDGETS_CREDENTIALS_JSON", - "BILLING_BUDGETS_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 -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb deleted file mode 100644 index baf4b4854f20..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Billing - module Budgets - module V1 - module BudgetService - # Path helper methods for the BudgetService API. - module Paths - ## - # Create a fully-qualified BillingAccount resource string. - # - # The resource will be in the following format: - # - # `billingAccounts/{billing_account}` - # - # @param billing_account [String] - # - # @return [::String] - def billing_account_path billing_account: - "billingAccounts/#{billing_account}" - end - - ## - # Create a fully-qualified Budget resource string. - # - # The resource will be in the following format: - # - # `billingAccounts/{billing_account}/budgets/{budget}` - # - # @param billing_account [String] - # @param budget [String] - # - # @return [::String] - def budget_path billing_account:, budget: - raise ::ArgumentError, "billing_account cannot contain /" if billing_account.to_s.include? "/" - - "billingAccounts/#{billing_account}/budgets/#{budget}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb deleted file mode 100644 index 8d5e31077772..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/billing/budgets/v1/version" - -require "google/cloud/billing/budgets/v1/budget_service/credentials" -require "google/cloud/billing/budgets/v1/budget_service/paths" -require "google/cloud/billing/budgets/v1/budget_service/rest/client" - -module Google - module Cloud - module Billing - module Budgets - module V1 - ## - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/billing/budgets/v1/budget_service/rest" - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - module BudgetService - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/billing/budgets/v1/budget_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb deleted file mode 100644 index 86317c5a6dec..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/client.rb +++ /dev/null @@ -1,839 +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/billing/budgets/v1/budget_service_pb" -require "google/cloud/billing/budgets/v1/budget_service/rest/service_stub" - -module Google - module Cloud - module Billing - module Budgets - module V1 - module BudgetService - module Rest - ## - # REST client for the BudgetService service. - # - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "billingbudgets.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :budget_service_stub - - ## - # Configure the BudgetService Client class. - # - # See {::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BudgetService clients - # ::Google::Cloud::Billing::Budgets::V1::BudgetService::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", "Billing", "Budgets", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_budget.timeout = 60.0 - - default_config.rpcs.update_budget.timeout = 60.0 - default_config.rpcs.update_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_budget.timeout = 60.0 - default_config.rpcs.get_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_budgets.timeout = 60.0 - default_config.rpcs.list_budgets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_budget.timeout = 60.0 - default_config.rpcs.delete_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BudgetService 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::Billing::Budgets::V1::BudgetService::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 - @budget_service_stub.universe_domain - end - - ## - # Create a new BudgetService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BudgetService 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 - - @budget_service_stub = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @budget_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @budget_service_stub.logger - end - - # Service calls - - ## - # Creates a new budget. See - # [Quotas and limits](https://cloud.google.com/billing/quotas) - # for more information on the limits of the number of budgets you can create. - # - # @overload create_budget(request, options = nil) - # Pass arguments to `create_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(parent: nil, budget: nil) - # Pass arguments to `create_budget` via keyword arguments. Note that at - # least one keyword argument is 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 name of the billing account to create the budget in. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] - # Required. Budget to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::Budgets::V1::Budget] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new - # - # # Call the create_budget method. - # result = client.create_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - # p result - # - def create_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.create_budget 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 budget and returns the updated budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. Budget fields that are not exposed in - # this API will not be changed by this method. - # - # @overload update_budget(request, options = nil) - # Pass arguments to `update_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(budget: nil, update_mask: nil) - # Pass arguments to `update_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param budget [::Google::Cloud::Billing::Budgets::V1::Budget, ::Hash] - # Required. The updated budget object. - # The budget to update is specified by the budget name in the budget. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Indicates which fields in the provided budget to update. - # Read-only fields (such as `name`) cannot be changed. If this is not - # provided, then only fields with non-default values from the request are - # updated. See - # https://developers.google.com/protocol-buffers/docs/proto3#default for more - # details about default values. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::Budgets::V1::Budget] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new - # - # # Call the update_budget method. - # result = client.update_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - # p result - # - def update_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.update_budget 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 - - ## - # Returns a budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - # - # @overload get_budget(request, options = nil) - # Pass arguments to `get_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(name: nil) - # Pass arguments to `get_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of budget to get. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::Budgets::V1::Budget] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new - # - # # Call the get_budget method. - # result = client.get_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - # p result - # - def get_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.get_budget 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 - - ## - # Returns a list of budgets for a billing account. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - # - # @overload list_budgets(request, options = nil) - # Pass arguments to `list_budgets` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budgets(parent: nil, scope: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_budgets` via keyword arguments. Note that at - # least one keyword argument is 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. Name of billing account to list budgets under. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @param scope [::String] - # Optional. Set the scope of the budgets to be returned, in the format of the - # resource name. The scope of a budget is the cost that it tracks, such as - # costs for a single project, or the costs for all projects in a folder. Only - # project scope (in the format of "projects/project-id" or "projects/123") is - # supported in this field. When this field is set to a project's resource - # name, the budgets returned are tracking the costs for that project. - # @param page_size [::Integer] - # Optional. The maximum number of budgets to return per page. - # The default and maximum value are 100. - # @param page_token [::String] - # Optional. The value returned by the last `ListBudgetsResponse` which - # indicates that this is a continuation of a prior `ListBudgets` call, - # and that the system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1::Budget>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new - # - # # Call the list_budgets method. - # result = client.list_budgets 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::Billing::Budgets::V1::Budget. - # p item - # end - # - def list_budgets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest - - # Converts hash 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_budgets.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::Billing::Budgets::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_budgets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_budgets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.list_budgets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @budget_service_stub, :list_budgets, "budgets", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a budget. Returns successfully if already deleted. - # - # @overload delete_budget(request, options = nil) - # Pass arguments to `delete_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(name: nil) - # Pass arguments to `delete_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the budget to delete. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new - # - # # Call the delete_budget method. - # result = client.delete_budget request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::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_budget.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.delete_budget 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 BudgetService REST API. - # - # This class represents the configuration for BudgetService 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::Billing::Budgets::V1::BudgetService::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 - # # create_budget to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_budget.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_budget.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 = "billingbudgets.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 BudgetService 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 `create_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :create_budget - ## - # RPC-specific configuration for `update_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :update_budget - ## - # RPC-specific configuration for `get_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :get_budget - ## - # RPC-specific configuration for `list_budgets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_budgets - ## - # RPC-specific configuration for `delete_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_budget - - # @private - def initialize parent_rpcs = nil - create_budget_config = parent_rpcs.create_budget if parent_rpcs.respond_to? :create_budget - @create_budget = ::Gapic::Config::Method.new create_budget_config - update_budget_config = parent_rpcs.update_budget if parent_rpcs.respond_to? :update_budget - @update_budget = ::Gapic::Config::Method.new update_budget_config - get_budget_config = parent_rpcs.get_budget if parent_rpcs.respond_to? :get_budget - @get_budget = ::Gapic::Config::Method.new get_budget_config - list_budgets_config = parent_rpcs.list_budgets if parent_rpcs.respond_to? :list_budgets - @list_budgets = ::Gapic::Config::Method.new list_budgets_config - delete_budget_config = parent_rpcs.delete_budget if parent_rpcs.respond_to? :delete_budget - @delete_budget = ::Gapic::Config::Method.new delete_budget_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb deleted file mode 100644 index e6842df2fc30..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service/rest/service_stub.rb +++ /dev/null @@ -1,390 +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/billing/budgets/v1/budget_service_pb" - -module Google - module Cloud - module Billing - module Budgets - module V1 - module BudgetService - module Rest - ## - # REST service stub for the BudgetService 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 create_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest] - # 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::Billing::Budgets::V1::Budget] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # A result object deserialized from the server's reply - def create_budget request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_budget_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_budget", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest] - # 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::Billing::Budgets::V1::Budget] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # A result object deserialized from the server's reply - def update_budget request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_budget_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_budget", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest] - # 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::Billing::Budgets::V1::Budget] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # A result object deserialized from the server's reply - def get_budget request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_budget_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_budget", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budgets REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest] - # 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::Billing::Budgets::V1::ListBudgetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse] - # A result object deserialized from the server's reply - def list_budgets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_budgets_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_budgets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse.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_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest] - # 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_budget request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_budget_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_budget", - 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 create_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest] - # 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_budget_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/budgets", - body: "budget", - matches: [ - ["parent", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest] - # 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_budget_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{budget.name}", - body: "budget", - matches: [ - ["budget.name", %r{^billingAccounts/[^/]+/budgets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest] - # 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_budget_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^billingAccounts/[^/]+/budgets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_budgets REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest] - # 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_budgets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/budgets", - matches: [ - ["parent", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_budget REST call - # - # @param request_pb [::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest] - # 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_budget_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^billingAccounts/[^/]+/budgets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb deleted file mode 100644 index 045f3faf1f79..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/billing/budgets/v1/budget_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/billing/budgets/v1/budget_model_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n4google/cloud/billing/budgets/v1/budget_service.proto\x12\x1fgoogle.cloud.billing.budgets.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x32google/cloud/billing/budgets/v1/budget_model.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x91\x01\n\x13\x43reateBudgetRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12<\n\x06\x62udget\x18\x02 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.BudgetB\x03\xe0\x41\x02\"\x89\x01\n\x13UpdateBudgetRequest\x12<\n\x06\x62udget\x18\x01 \x01(\x0b\x32\'.google.cloud.billing.budgets.v1.BudgetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x10GetBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget\"\x97\x01\n\x12ListBudgetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"h\n\x13ListBudgetsResponse\x12\x38\n\x07\x62udgets\x18\x01 \x03(\x0b\x32\'.google.cloud.billing.budgets.v1.Budget\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x13\x44\x65leteBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget2\xf7\x07\n\rBudgetService\x12\xb5\x01\n\x0c\x43reateBudget\x12\x34.google.cloud.billing.budgets.v1.CreateBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"F\xda\x41\rparent,budget\x82\xd3\xe4\x93\x02\x30\"&/v1/{parent=billingAccounts/*}/budgets:\x06\x62udget\x12\xc1\x01\n\x0cUpdateBudget\x12\x34.google.cloud.billing.budgets.v1.UpdateBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"R\xda\x41\x12\x62udget,update_mask\x82\xd3\xe4\x93\x02\x37\x32-/v1/{budget.name=billingAccounts/*/budgets/*}:\x06\x62udget\x12\x9e\x01\n\tGetBudget\x12\x31.google.cloud.billing.budgets.v1.GetBudgetRequest\x1a\'.google.cloud.billing.budgets.v1.Budget\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1/{name=billingAccounts/*/budgets/*}\x12\xb1\x01\n\x0bListBudgets\x12\x33.google.cloud.billing.budgets.v1.ListBudgetsRequest\x1a\x34.google.cloud.billing.budgets.v1.ListBudgetsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1/{parent=billingAccounts/*}/budgets\x12\x93\x01\n\x0c\x44\x65leteBudget\x12\x34.google.cloud.billing.budgets.v1.DeleteBudgetRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1/{name=billingAccounts/*/budgets/*}\x1a\x7f\xca\x41\x1d\x62illingbudgets.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-platformBz\n#com.google.cloud.billing.budgets.v1B\x12\x42udgetServiceProtoP\x01Z=cloud.google.com/go/billing/budgets/apiv1/budgetspb;budgetspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Billing - module Budgets - module V1 - CreateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.CreateBudgetRequest").msgclass - UpdateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.UpdateBudgetRequest").msgclass - GetBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.GetBudgetRequest").msgclass - ListBudgetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ListBudgetsRequest").msgclass - ListBudgetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.ListBudgetsResponse").msgclass - DeleteBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1.DeleteBudgetRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb deleted file mode 100644 index c474bd0b200e..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/budget_service_services_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/billing/budgets/v1/budget_service.proto for package 'google.cloud.billing.budgets.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/billing/budgets/v1/budget_service_pb' - -module Google - module Cloud - module Billing - module Budgets - module V1 - module BudgetService - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.billing.budgets.v1.BudgetService' - - # Creates a new budget. See - # [Quotas and limits](https://cloud.google.com/billing/quotas) - # for more information on the limits of the number of budgets you can create. - rpc :CreateBudget, ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1::Budget - # Updates a budget and returns the updated budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. Budget fields that are not exposed in - # this API will not be changed by this method. - rpc :UpdateBudget, ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1::Budget - # Returns a budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - rpc :GetBudget, ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, ::Google::Cloud::Billing::Budgets::V1::Budget - # Returns a list of budgets for a billing account. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - rpc :ListBudgets, ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse - # Deletes a budget. Returns successfully if already deleted. - rpc :DeleteBudget, ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb deleted file mode 100644 index 7c2dfeea0785..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/billing/budgets/v1/budget_service/rest" -require "google/cloud/billing/budgets/v1/version" - -module Google - module Cloud - module Billing - module Budgets - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/billing/budgets/v1/rest" - # client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb deleted file mode 100644 index f6a5569be827..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/lib/google/cloud/billing/budgets/v1/version.rb +++ /dev/null @@ -1,30 +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 Billing - module Budgets - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md deleted file mode 100644 index bfa240059526..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Billing Budgets 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-billing-budgets-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb deleted file mode 100644 index ee47bd9f5303..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_model.rb +++ /dev/null @@ -1,389 +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 Billing - module Budgets - module V1 - # A budget is a plan that describes what you expect to spend on Cloud - # projects, plus the rules to execute as spend is tracked against that plan, - # (for example, send an alert when 90% of the target spend is met). - # The budget time period is configurable, with options such as month (default), - # quarter, year, or custom time period. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the budget. - # The resource name implies the scope of a budget. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # @!attribute [rw] display_name - # @return [::String] - # User data for display name in UI. The name must be less than or equal to 60 - # characters. - # @!attribute [rw] budget_filter - # @return [::Google::Cloud::Billing::Budgets::V1::Filter] - # Optional. Filters that define which resources are used to compute the - # actual spend against the budget amount, such as projects, services, and the - # budget's time period, as well as other filters. - # @!attribute [rw] amount - # @return [::Google::Cloud::Billing::Budgets::V1::BudgetAmount] - # Required. Budgeted amount. - # @!attribute [rw] threshold_rules - # @return [::Array<::Google::Cloud::Billing::Budgets::V1::ThresholdRule>] - # Optional. Rules that trigger alerts (notifications of thresholds - # being crossed) when spend exceeds the specified percentages of the budget. - # - # Optional for `pubsubTopic` notifications. - # - # Required if using email notifications. - # @!attribute [rw] notifications_rule - # @return [::Google::Cloud::Billing::Budgets::V1::NotificationsRule] - # Optional. Rules to apply to notifications sent based on budget spend and - # thresholds. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag to validate that the object is unchanged for a - # read-modify-write operation. - # An empty etag causes an update to overwrite other changes. - class Budget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The budgeted amount for each usage period. - # @!attribute [rw] specified_amount - # @return [::Google::Type::Money] - # A specified amount to use as the budget. - # `currency_code` is optional. If specified when creating a budget, it must - # match the currency of the billing account. If specified when updating a - # budget, it must match the currency_code of the existing budget. - # The `currency_code` is provided on output. - # - # Note: The following fields are mutually exclusive: `specified_amount`, `last_period_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] last_period_amount - # @return [::Google::Cloud::Billing::Budgets::V1::LastPeriodAmount] - # Use the last period's actual spend as the budget for the present period. - # LastPeriodAmount can only be set when the budget's time period is a - # {::Google::Cloud::Billing::Budgets::V1::Filter#calendar_period Filter.calendar_period}. - # It cannot be set in combination with - # {::Google::Cloud::Billing::Budgets::V1::Filter#custom_period Filter.custom_period}. - # - # Note: The following fields are mutually exclusive: `last_period_amount`, `specified_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BudgetAmount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a budget amount targeted to the last - # {::Google::Cloud::Billing::Budgets::V1::Filter#calendar_period Filter.calendar_period} - # spend. At this time, the amount is automatically 100% of the last calendar - # period's spend; that is, there are no other options yet. - # LastPeriodAmount cannot be set for a budget configured with - # a - # {::Google::Cloud::Billing::Budgets::V1::Filter#custom_period Filter.custom_period}. - class LastPeriodAmount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ThresholdRule contains the definition of a threshold. Threshold rules define - # the triggering events used to generate a budget notification email. When a - # threshold is crossed (spend exceeds the specified percentages of the - # budget), budget alert emails are sent to the email recipients you specify - # in the - # [NotificationsRule](#notificationsrule). - # - # Threshold rules also affect the fields included in the - # [JSON data - # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) - # sent to a Pub/Sub topic. - # - # Threshold rules are _required_ if using email notifications. - # - # Threshold rules are _optional_ if only setting a - # [`pubsubTopic` NotificationsRule](#NotificationsRule), - # unless you want your JSON data object to include data about the thresholds - # you set. - # - # For more information, see - # [set budget threshold rules and - # actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions). - # @!attribute [rw] threshold_percent - # @return [::Float] - # Required. Send an alert when this threshold is exceeded. - # This is a 1.0-based percentage, so 0.5 = 50%. - # Validation: non-negative number. - # @!attribute [rw] spend_basis - # @return [::Google::Cloud::Billing::Budgets::V1::ThresholdRule::Basis] - # Optional. The type of basis used to determine if spend has passed the - # threshold. Behavior defaults to CURRENT_SPEND if not set. - class ThresholdRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of basis used to determine if spend has passed the threshold. - module Basis - # Unspecified threshold basis. - BASIS_UNSPECIFIED = 0 - - # Use current spend as the basis for comparison against the threshold. - CURRENT_SPEND = 1 - - # Use forecasted spend for the period as the basis for comparison against - # the threshold. - # FORECASTED_SPEND can only be set when the budget's time period is a - # {::Google::Cloud::Billing::Budgets::V1::Filter#calendar_period Filter.calendar_period}. - # It cannot be set in combination with - # {::Google::Cloud::Billing::Budgets::V1::Filter#custom_period Filter.custom_period}. - FORECASTED_SPEND = 2 - end - end - - # NotificationsRule defines notifications that are sent based on budget spend - # and thresholds. - # @!attribute [rw] pubsub_topic - # @return [::String] - # Optional. The name of the Pub/Sub topic where budget-related messages are - # published, in the form `projects/{project_id}/topics/{topic_id}`. Updates - # are sent to the topic at regular intervals; the timing of the updates is - # not dependent on the [threshold rules](#thresholdrule) you've set. - # - # Note that if you want your - # [Pub/Sub JSON - # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) - # to contain data for `alertThresholdExceeded`, you need at least one - # [alert threshold rule](#thresholdrule). When you set threshold rules, you - # must also enable at least one of the email notification options, either - # using the default IAM recipients or Cloud Monitoring email notification - # channels. - # - # To use Pub/Sub topics with budgets, you must do the following: - # - # 1. Create the Pub/Sub topic - # before connecting it to your budget. For guidance, see - # [Manage programmatic budget alert - # notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - # - # 2. Grant the API caller the `pubsub.topics.setIamPolicy` permission on - # the Pub/Sub topic. If not set, the API call fails with PERMISSION_DENIED. - # For additional details on Pub/Sub roles and permissions, see - # [Permissions required for this - # task](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task). - # @!attribute [rw] schema_version - # @return [::String] - # Optional. Required when - # {::Google::Cloud::Billing::Budgets::V1::NotificationsRule#pubsub_topic NotificationsRule.pubsub_topic} - # is set. The schema version of the notification sent to - # {::Google::Cloud::Billing::Budgets::V1::NotificationsRule#pubsub_topic NotificationsRule.pubsub_topic}. - # Only "1.0" is accepted. It represents the JSON schema as defined in - # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. - # @!attribute [rw] monitoring_notification_channels - # @return [::Array<::String>] - # Optional. Email targets to send notifications to when a threshold is - # exceeded. This is in addition to the `DefaultIamRecipients` who receive - # alert emails based on their billing account IAM role. The value is the full - # REST resource name of a Cloud Monitoring email notification channel with - # the form `projects/{project_id}/notificationChannels/{channel_id}`. A - # maximum of 5 email notifications are allowed. - # - # To customize budget alert email recipients with monitoring notification - # channels, you _must create the monitoring notification channels before - # you link them to a budget_. For guidance on setting up notification - # channels to use with budgets, see - # [Customize budget alert email - # recipients](https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients). - # - # For Cloud Billing budget alerts, you _must use email notification - # channels_. The other types of notification channels are _not_ - # supported, such as Slack, SMS, or PagerDuty. If you want to - # [send budget notifications to - # Slack](https://cloud.google.com/billing/docs/how-to/notify#send_notifications_to_slack), - # use a pubsubTopic and configure - # [programmatic - # notifications](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications). - # @!attribute [rw] disable_default_iam_recipients - # @return [::Boolean] - # Optional. When set to true, disables default notifications sent when a - # threshold is exceeded. Default notifications are sent to those with Billing - # Account Administrator and Billing Account User IAM roles for the target - # account. - # @!attribute [rw] enable_project_level_recipients - # @return [::Boolean] - # Optional. When set to true, and when the budget has a single project - # configured, notifications will be sent to project level recipients of that - # project. This field will be ignored if the budget has multiple or no - # project configured. - # - # Currently, project level recipients are the users with `Owner` role on a - # cloud project. - class NotificationsRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A filter for a budget, limiting the scope of the cost to calculate. - # @!attribute [rw] projects - # @return [::Array<::String>] - # Optional. A set of projects of the form `projects/{project}`, - # specifying that usage from only this set of projects should be - # included in the budget. If omitted, the report includes all usage for - # the billing account, regardless of which project the usage occurred on. - # @!attribute [rw] resource_ancestors - # @return [::Array<::String>] - # Optional. A set of folder and organization names of the form - # `folders/{folderId}` or `organizations/{organizationId}`, specifying that - # usage from only this set of folders and organizations should be included in - # the budget. If omitted, the budget includes all usage that the billing - # account pays for. If the folder or organization contains projects that are - # paid for by a different Cloud Billing account, the budget *doesn't* apply - # to those projects. - # @!attribute [rw] credit_types - # @return [::Array<::String>] - # Optional. If - # {::Google::Cloud::Billing::Budgets::V1::Filter#credit_types_treatment Filter.credit_types_treatment} - # is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be - # subtracted from gross cost to determine the spend for threshold - # calculations. See [a list of acceptable credit type - # values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - # - # If - # {::Google::Cloud::Billing::Budgets::V1::Filter#credit_types_treatment Filter.credit_types_treatment} - # is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. - # @!attribute [rw] credit_types_treatment - # @return [::Google::Cloud::Billing::Budgets::V1::Filter::CreditTypesTreatment] - # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. - # @!attribute [rw] services - # @return [::Array<::String>] - # Optional. A set of services of the form `services/{service_id}`, - # specifying that usage from only this set of services should be - # included in the budget. If omitted, the report includes usage for - # all the services. - # The service names are available through the Catalog API: - # https://cloud.google.com/billing/v1/how-tos/catalog-api. - # @!attribute [rw] subaccounts - # @return [::Array<::String>] - # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, - # specifying that usage from only this set of subaccounts should be included - # in the budget. If a subaccount is set to the name of the parent account, - # usage from the parent account is included. If the field is omitted, - # the report includes usage from the parent account and all subaccounts, - # if they exist. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::ListValue}] - # Optional. A single label and value pair specifying that usage from only - # this set of labeled resources should be included in the budget. If omitted, - # the report includes all labeled and unlabeled usage. - # - # An object containing a single `"key": value` pair. Example: `{ "name": - # "wrench" }`. - # - # _Currently, multiple entries or multiple values per entry are not - # allowed._ - # @!attribute [rw] calendar_period - # @return [::Google::Cloud::Billing::Budgets::V1::CalendarPeriod] - # Optional. Specifies to track usage for recurring calendar period. - # For example, assume that CalendarPeriod.QUARTER is set. The budget - # tracks usage from April 1 to June 30, when the current calendar month is - # April, May, June. After that, it tracks usage from July 1 to - # September 30 when the current calendar month is July, August, September, - # so on. - # - # Note: The following fields are mutually exclusive: `calendar_period`, `custom_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_period - # @return [::Google::Cloud::Billing::Budgets::V1::CustomPeriod] - # Optional. Specifies to track usage from any start date (required) to any - # end date (optional). This time period is static, it does not recur. - # - # Note: The following fields are mutually exclusive: `custom_period`, `calendar_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Filter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::ListValue] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how credits are applied when determining the spend for - # threshold calculations. Budgets track the total cost minus any applicable - # selected credits. - # [See the documentation for a list of credit - # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - module CreditTypesTreatment - CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0 - - # All types of credit are subtracted from the gross cost to determine the - # spend for threshold calculations. - INCLUDE_ALL_CREDITS = 1 - - # All types of credit are added to the net cost to determine the spend for - # threshold calculations. - EXCLUDE_ALL_CREDITS = 2 - - # [Credit - # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type) - # specified in the credit_types field are subtracted from the - # gross cost to determine the spend for threshold calculations. - INCLUDE_SPECIFIED_CREDITS = 3 - end - end - - # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Required. The start date must be after January 1, 2017. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Optional. The end date of the time period. Budgets with elapsed end date - # won't be processed. If unset, specifies to track all usage incurred since - # the start_date. - class CustomPeriod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `CalendarPeriod` represents the abstract concept of a time period that - # has a canonical start. Grammatically, "the start of the current - # `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian - # Pacific Time (UTC-8). - module CalendarPeriod - # Calendar period is unset. This is the default if the budget is for a - # custom time period (CustomPeriod). - CALENDAR_PERIOD_UNSPECIFIED = 0 - - # A month. Month starts on the first day of each month, such as January 1, - # February 1, March 1, and so on. - MONTH = 1 - - # A quarter. Quarters start on dates January 1, April 1, July 1, and October - # 1 of each year. - QUARTER = 2 - - # A year. Year starts on January 1. - YEAR = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb deleted file mode 100644 index 05eacd754ff5..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/cloud/billing/budgets/v1/budget_service.rb +++ /dev/null @@ -1,119 +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 Billing - module Budgets - module V1 - # Request for CreateBudget - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the billing account to create the budget in. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @!attribute [rw] budget - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # Required. Budget to create. - class CreateBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateBudget - # @!attribute [rw] budget - # @return [::Google::Cloud::Billing::Budgets::V1::Budget] - # Required. The updated budget object. - # The budget to update is specified by the budget name in the budget. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Indicates which fields in the provided budget to update. - # Read-only fields (such as `name`) cannot be changed. If this is not - # provided, then only fields with non-default values from the request are - # updated. See - # https://developers.google.com/protocol-buffers/docs/proto3#default for more - # details about default values. - class UpdateBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetBudget - # @!attribute [rw] name - # @return [::String] - # Required. Name of budget to get. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - class GetBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListBudgets - # @!attribute [rw] parent - # @return [::String] - # Required. Name of billing account to list budgets under. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @!attribute [rw] scope - # @return [::String] - # Optional. Set the scope of the budgets to be returned, in the format of the - # resource name. The scope of a budget is the cost that it tracks, such as - # costs for a single project, or the costs for all projects in a folder. Only - # project scope (in the format of "projects/project-id" or "projects/123") is - # supported in this field. When this field is set to a project's resource - # name, the budgets returned are tracking the costs for that project. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of budgets to return per page. - # The default and maximum value are 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value returned by the last `ListBudgetsResponse` which - # indicates that this is a continuation of a prior `ListBudgets` call, - # and that the system should return the next page of data. - class ListBudgetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListBudgets - # @!attribute [rw] budgets - # @return [::Array<::Google::Cloud::Billing::Budgets::V1::Budget>] - # List of the budgets owned by the requested billing account. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more budgets that match the - # request; this value should be passed in a new `ListBudgetsRequest`. - class ListBudgetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteBudget - # @!attribute [rw] name - # @return [::String] - # Required. Name of the budget to delete. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - class DeleteBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +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 - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb deleted file mode 100644 index 1d0a9780457f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb deleted file mode 100644 index 56a32eee300d..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/proto_docs/google/type/money.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents an amount of money with its currency type. - # @!attribute [rw] currency_code - # @return [::String] - # The three-letter currency code defined in ISO 4217. - # @!attribute [rw] units - # @return [::Integer] - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # @!attribute [rw] nanos - # @return [::Integer] - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - class Money - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/Gemfile deleted file mode 100644 index 34a2b4b14b43..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-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-billing-budgets-v1", path: "../" -else - gem "google-cloud-billing-budgets-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-billing-budgets-v1/snippets/budget_service/create_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/create_budget.rb deleted file mode 100644 index 09c193126293..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/create_budget.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 billingbudgets_v1_generated_BudgetService_CreateBudget_sync] -require "google/cloud/billing/budgets/v1" - -## -# Snippet for the create_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#create_budget. -# -def create_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new - - # Call the create_budget method. - result = client.create_budget request - - # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - p result -end -# [END billingbudgets_v1_generated_BudgetService_CreateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.rb deleted file mode 100644 index dfc77645805f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/delete_budget.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 billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] -require "google/cloud/billing/budgets/v1" - -## -# Snippet for the delete_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#delete_budget. -# -def delete_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new - - # Call the delete_budget method. - result = client.delete_budget request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END billingbudgets_v1_generated_BudgetService_DeleteBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.rb deleted file mode 100644 index 8246e9b4f2d7..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/get_budget.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 billingbudgets_v1_generated_BudgetService_GetBudget_sync] -require "google/cloud/billing/budgets/v1" - -## -# Snippet for the get_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#get_budget. -# -def get_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new - - # Call the get_budget method. - result = client.get_budget request - - # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - p result -end -# [END billingbudgets_v1_generated_BudgetService_GetBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.rb deleted file mode 100644 index 67de0896c0dc..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/list_budgets.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 billingbudgets_v1_generated_BudgetService_ListBudgets_sync] -require "google/cloud/billing/budgets/v1" - -## -# Snippet for the list_budgets call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#list_budgets. -# -def list_budgets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new - - # Call the list_budgets method. - result = client.list_budgets 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::Billing::Budgets::V1::Budget. - p item - end -end -# [END billingbudgets_v1_generated_BudgetService_ListBudgets_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.rb deleted file mode 100644 index f872e0949d77..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/budget_service/update_budget.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 billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] -require "google/cloud/billing/budgets/v1" - -## -# Snippet for the update_budget call in the BudgetService 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::Billing::Budgets::V1::BudgetService::Client#update_budget. -# -def update_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new - - # Call the update_budget method. - result = client.update_budget request - - # The returned object is of type Google::Cloud::Billing::Budgets::V1::Budget. - p result -end -# [END billingbudgets_v1_generated_BudgetService_UpdateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json b/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json deleted file mode 100644 index 26b75098d536..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/snippets/snippet_metadata_google.cloud.billing.budgets.v1.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-billing-budgets-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.billing.budgets.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "billingbudgets_v1_generated_BudgetService_CreateBudget_sync", - "title": "Snippet for the create_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#create_budget.", - "file": "budget_service/create_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#create_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1::Budget", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" - }, - "method": { - "short_name": "CreateBudget", - "full_name": "google.cloud.billing.budgets.v1.BudgetService.CreateBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1_generated_BudgetService_UpdateBudget_sync", - "title": "Snippet for the update_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#update_budget.", - "file": "budget_service/update_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#update_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1::Budget", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" - }, - "method": { - "short_name": "UpdateBudget", - "full_name": "google.cloud.billing.budgets.v1.BudgetService.UpdateBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1_generated_BudgetService_GetBudget_sync", - "title": "Snippet for the get_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#get_budget.", - "file": "budget_service/get_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#get_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1::Budget", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" - }, - "method": { - "short_name": "GetBudget", - "full_name": "google.cloud.billing.budgets.v1.BudgetService.GetBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1_generated_BudgetService_ListBudgets_sync", - "title": "Snippet for the list_budgets call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#list_budgets.", - "file": "budget_service/list_budgets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_budgets", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#list_budgets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" - }, - "method": { - "short_name": "ListBudgets", - "full_name": "google.cloud.billing.budgets.v1.BudgetService.ListBudgets", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1_generated_BudgetService_DeleteBudget_sync", - "title": "Snippet for the delete_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1::BudgetService::Client#delete_budget.", - "file": "budget_service/delete_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client#delete_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1::BudgetService::Client" - }, - "method": { - "short_name": "DeleteBudget", - "full_name": "google.cloud.billing.budgets.v1.BudgetService.DeleteBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1.BudgetService" - } - } - }, - "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-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb deleted file mode 100644 index 6e088281d20f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_paths_test.rb +++ /dev/null @@ -1,67 +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/billing/budgets/v1/budget_service" - -class ::Google::Cloud::Billing::Budgets::V1::BudgetService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_billing_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.billing_account_path billing_account: "value0" - assert_equal "billingAccounts/value0", path - end - end - - def test_budget_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.budget_path billing_account: "value0", budget: "value1" - assert_equal "billingAccounts/value0/budgets/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb deleted file mode 100644 index 8d3c7f2bf86e..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_rest_test.rb +++ /dev/null @@ -1,374 +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/billing/budgets/v1/budget_service_pb" -require "google/cloud/billing/budgets/v1/budget_service/rest" - - -class ::Google::Cloud::Billing::Budgets::V1::BudgetService::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_create_budget - # Create test objects. - client_result = ::Google::Cloud::Billing::Budgets::V1::Budget.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - budget = {} - - create_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_create_budget_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_budget({ parent: parent, budget: budget }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_budget parent: parent, budget: budget do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_budget ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_budget({ parent: parent, budget: budget }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_budget(::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_budget_client_stub.call_count - end - end - end - - def test_update_budget - # Create test objects. - client_result = ::Google::Cloud::Billing::Budgets::V1::Budget.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - budget = {} - update_mask = {} - - update_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_update_budget_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_budget({ budget: budget, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_budget budget: budget, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_budget ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_budget({ budget: budget, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_budget(::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_budget_client_stub.call_count - end - end - end - - def test_get_budget - # Create test objects. - client_result = ::Google::Cloud::Billing::Budgets::V1::Budget.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_get_budget_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_budget({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_budget name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_budget ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_budget({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_budget(::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_budget_client_stub.call_count - end - end - end - - def test_list_budgets - # Create test objects. - client_result = ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scope = "hello world" - page_size = 42 - page_token = "hello world" - - list_budgets_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_list_budgets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_budgets_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_budgets({ parent: parent, scope: scope, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_budgets parent: parent, scope: scope, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_budgets ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets({ parent: parent, scope: scope, 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_budgets(::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets_client_stub.call_count - end - end - end - - def test_delete_budget - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_budget_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::Billing::Budgets::V1::BudgetService::Rest::ServiceStub.stub :transcode_delete_budget_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_budget({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_budget name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_budget ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_budget({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_budget(::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_budget_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::Billing::Budgets::V1::BudgetService::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::Billing::Budgets::V1::BudgetService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb deleted file mode 100644 index 8c6851e19264..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/test/google/cloud/billing/budgets/v1/budget_service_test.rb +++ /dev/null @@ -1,409 +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/billing/budgets/v1/budget_service_pb" -require "google/cloud/billing/budgets/v1/budget_service" - -class ::Google::Cloud::Billing::Budgets::V1::BudgetService::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_create_budget - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1::Budget.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" - budget = {} - - create_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1::Budget), request["budget"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_budget({ parent: parent, budget: budget }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_budget parent: parent, budget: budget do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_budget ::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_budget({ parent: parent, budget: budget }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_budget(::Google::Cloud::Billing::Budgets::V1::CreateBudgetRequest.new(parent: parent, budget: budget), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_budget_client_stub.call_rpc_count - end - end - - def test_update_budget - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1::Budget.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. - budget = {} - update_mask = {} - - update_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1::Budget), request["budget"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_budget({ budget: budget, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_budget budget: budget, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_budget ::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_budget({ budget: budget, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_budget(::Google::Cloud::Billing::Budgets::V1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_budget_client_stub.call_rpc_count - end - end - - def test_get_budget - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1::Budget.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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_budget({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_budget name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_budget ::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1::GetBudgetRequest.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_budget_client_stub.call_rpc_count - end - end - - def test_list_budgets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1::ListBudgetsResponse.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 = "hello world" - page_size = 42 - page_token = "hello world" - - list_budgets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_budgets, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["scope"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_budgets_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_budgets({ parent: parent, scope: scope, 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_budgets parent: parent, scope: scope, 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_budgets ::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets({ parent: parent, scope: scope, 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_budgets(::Google::Cloud::Billing::Budgets::V1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets_client_stub.call_rpc_count - end - end - - def test_delete_budget - # 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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_budget({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_budget name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_budget ::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1::DeleteBudgetRequest.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_budget_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::Billing::Budgets::V1::BudgetService::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::Billing::Budgets::V1::BudgetService::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::Billing::Budgets::V1::BudgetService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Billing::Budgets::V1::BudgetService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb b/owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json deleted file mode 100644 index 59d782c7a1e7..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "billingbudgets.googleapis.com", - "api_shortname": "billingbudgets", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest", - "distribution_name": "google-cloud-billing-budgets-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "billingbudgets", - "name_pretty": "Billing Budgets V1beta1 API", - "product_documentation": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BILLING_BUDGETS", - "ruby-cloud-product-url": "https://cloud.google.com/billing/docs/how-to/budget-api-overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml deleted file mode 100644 index 1d4f685e648e..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-billing-budgets-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-billing-budgets-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts deleted file mode 100644 index 3487684a3e20..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Billing Budgets V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 855ce5251b53..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-billing-budgets-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-billing-budgets-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/billing/budgets/v1beta1" - -client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/billing/budgets/v1beta1" - -::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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-billing-budgets-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/billing/budgets/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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-billing-budgets-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md deleted file mode 100644 index 5bc643a79d4b..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Billing Budgets V1beta1 API - -The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan. - -Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Billing Budgets V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-billing-budgets](https://rubygems.org/gems/google-cloud-billing-budgets). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-billing-budgets-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/billingbudgets.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/billing/budgets/v1beta1" - -client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new -request = ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new # (request fields as keyword arguments...) -response = client.create_budget request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing-budgets-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/billing/docs/how-to/budget-api-overview) -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/billing/budgets/v1beta1" -require "logger" - -client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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-billing-budgets`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-billing-budgets-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-billing-budgets`. -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-billing-budgets-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile deleted file mode 100644 index 1b72d09b7f2e..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-billing-budgets-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BILLING_BUDGETS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BILLING_BUDGETS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BILLING_BUDGETS_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 BILLING_BUDGETS_TEST_PROJECT=test123 BILLING_BUDGETS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/billing/budgets/v1beta1/budget_service/credentials" - ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BILLING_BUDGETS_PROJECT"] = project - ENV["BILLING_BUDGETS_TEST_PROJECT"] = project - ENV["BILLING_BUDGETS_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-billing-budgets-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-billing-budgets-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-billing-budgets-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-billing-budgets-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-billing-budgets-v1beta1" - header "google-cloud-billing-budgets-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-billing-budgets-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-billing-budgets-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-billing-budgets-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-billing-budgets-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json deleted file mode 100644 index 2c54c331974c..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.billing.budgets.v1beta1", - "libraryPackage": "::Google::Cloud::Billing::Budgets::V1beta1", - "services": { - "BudgetService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client", - "rpcs": { - "CreateBudget": { - "methods": [ - "create_budget" - ] - }, - "UpdateBudget": { - "methods": [ - "update_budget" - ] - }, - "GetBudget": { - "methods": [ - "get_budget" - ] - }, - "ListBudgets": { - "methods": [ - "list_budgets" - ] - }, - "DeleteBudget": { - "methods": [ - "delete_budget" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec deleted file mode 100644 index 75c9a3db8e73..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/google-cloud-billing-budgets-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/billing/budgets/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-billing-budgets-v1beta1" - gem.version = Google::Cloud::Billing::Budgets::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Provides methods to view, create, and manage Cloud Billing budgets programmatically at scale. Note that google-cloud-billing-budgets-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing-budgets instead. See the readme for more details." - gem.summary = "The Cloud Billing Budget API stores Cloud Billing budgets, which define a budget plan and the rules to execute as spend is tracked against that plan." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb deleted file mode 100644 index a2c72ad8cb8f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google-cloud-billing-budgets-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/billing/budgets/v1beta1" diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb deleted file mode 100644 index 1faf0acee996..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1.rb +++ /dev/null @@ -1,42 +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/billing/budgets/v1beta1/budget_service" -require "google/cloud/billing/budgets/v1beta1/version" - -module Google - module Cloud - module Billing - module Budgets - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/billing/budgets/v1beta1" - # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - module V1beta1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/billing/budgets/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb deleted file mode 100644 index 751f63ae7de2..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_model_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/billing/budgets/v1beta1/budget_model.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/struct_pb' -require 'google/type/date_pb' -require 'google/type/money_pb' - - -descriptor_data = "\n7google/cloud/billing/budgets/v1beta1/budget_model.proto\x12$google.cloud.billing.budgets.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x16google/type/date.proto\x1a\x17google/type/money.proto\"\xde\x03\n\x06\x42udget\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12H\n\rbudget_filter\x18\x03 \x01(\x0b\x32,.google.cloud.billing.budgets.v1beta1.FilterB\x03\xe0\x41\x01\x12G\n\x06\x61mount\x18\x04 \x01(\x0b\x32\x32.google.cloud.billing.budgets.v1beta1.BudgetAmountB\x03\xe0\x41\x02\x12Q\n\x0fthreshold_rules\x18\x05 \x03(\x0b\x32\x33.google.cloud.billing.budgets.v1beta1.ThresholdRuleB\x03\xe0\x41\x01\x12S\n\x10\x61ll_updates_rule\x18\x06 \x01(\x0b\x32\x34.google.cloud.billing.budgets.v1beta1.AllUpdatesRuleB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:]\xea\x41Z\n$billingbudgets.googleapis.com/Budget\x12\x32\x62illingAccounts/{billing_account}/budgets/{budget}\"\xa5\x01\n\x0c\x42udgetAmount\x12.\n\x10specified_amount\x18\x01 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12T\n\x12last_period_amount\x18\x02 \x01(\x0b\x32\x36.google.cloud.billing.budgets.v1beta1.LastPeriodAmountH\x00\x42\x0f\n\rbudget_amount\"\x12\n\x10LastPeriodAmount\"\xcd\x01\n\rThresholdRule\x12\x1e\n\x11threshold_percent\x18\x01 \x01(\x01\x42\x03\xe0\x41\x02\x12S\n\x0bspend_basis\x18\x02 \x01(\x0e\x32\x39.google.cloud.billing.budgets.v1beta1.ThresholdRule.BasisB\x03\xe0\x41\x01\"G\n\x05\x42\x61sis\x12\x15\n\x11\x42\x41SIS_UNSPECIFIED\x10\x00\x12\x11\n\rCURRENT_SPEND\x10\x01\x12\x14\n\x10\x46ORECASTED_SPEND\x10\x02\"\xd2\x01\n\x0e\x41llUpdatesRule\x12\x19\n\x0cpubsub_topic\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eschema_version\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12-\n monitoring_notification_channels\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12+\n\x1e\x64isable_default_iam_recipients\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12,\n\x1f\x65nable_project_level_recipients\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\"\xd8\x05\n\x06\x46ilter\x12\x15\n\x08projects\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12\x1f\n\x12resource_ancestors\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x19\n\x0c\x63redit_types\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x16\x63redit_types_treatment\x18\x04 \x01(\x0e\x32\x41.google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatmentB\x03\xe0\x41\x01\x12\x15\n\x08services\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsubaccounts\x18\x05 \x03(\tB\x03\xe0\x41\x01\x12M\n\x06labels\x18\x06 \x03(\x0b\x32\x38.google.cloud.billing.budgets.v1beta1.Filter.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x0f\x63\x61lendar_period\x18\x08 \x01(\x0e\x32\x34.google.cloud.billing.budgets.v1beta1.CalendarPeriodB\x03\xe0\x41\x01H\x00\x12P\n\rcustom_period\x18\t \x01(\x0b\x32\x32.google.cloud.billing.budgets.v1beta1.CustomPeriodB\x03\xe0\x41\x01H\x00\x1aI\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.ListValue:\x02\x38\x01\"\x8f\x01\n\x14\x43reditTypesTreatment\x12&\n\"CREDIT_TYPES_TREATMENT_UNSPECIFIED\x10\x00\x12\x17\n\x13INCLUDE_ALL_CREDITS\x10\x01\x12\x17\n\x13\x45XCLUDE_ALL_CREDITS\x10\x02\x12\x1d\n\x19INCLUDE_SPECIFIED_CREDITS\x10\x03\x42\x0e\n\x0cusage_period\"d\n\x0c\x43ustomPeriod\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01*S\n\x0e\x43\x61lendarPeriod\x12\x1f\n\x1b\x43\x41LENDAR_PERIOD_UNSPECIFIED\x10\x00\x12\t\n\x05MONTH\x10\x01\x12\x0b\n\x07QUARTER\x10\x02\x12\x08\n\x04YEAR\x10\x03\x42p\n(com.google.cloud.billing.budgets.v1beta1P\x01ZBcloud.google.com/go/billing/budgets/apiv1beta1/budgetspb;budgetspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Billing - module Budgets - module V1beta1 - Budget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Budget").msgclass - BudgetAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.BudgetAmount").msgclass - LastPeriodAmount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.LastPeriodAmount").msgclass - ThresholdRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ThresholdRule").msgclass - ThresholdRule::Basis = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ThresholdRule.Basis").enummodule - AllUpdatesRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.AllUpdatesRule").msgclass - Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Filter").msgclass - Filter::CreditTypesTreatment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.Filter.CreditTypesTreatment").enummodule - CustomPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CustomPeriod").msgclass - CalendarPeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CalendarPeriod").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb deleted file mode 100644 index 36b20d003967..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service.rb +++ /dev/null @@ -1,52 +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/billing/budgets/v1beta1/version" - -require "google/cloud/billing/budgets/v1beta1/budget_service/credentials" -require "google/cloud/billing/budgets/v1beta1/budget_service/paths" -require "google/cloud/billing/budgets/v1beta1/budget_service/client" - -module Google - module Cloud - module Billing - module Budgets - module V1beta1 - ## - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/billing/budgets/v1beta1/budget_service" - # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - module BudgetService - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "budget_service", "helpers.rb" -require "google/cloud/billing/budgets/v1beta1/budget_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb deleted file mode 100644 index 0ad96b01af6b..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/client.rb +++ /dev/null @@ -1,917 +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/billing/budgets/v1beta1/budget_service_pb" - -module Google - module Cloud - module Billing - module Budgets - module V1beta1 - module BudgetService - ## - # Client for the BudgetService service. - # - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "billingbudgets.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :budget_service_stub - - ## - # Configure the BudgetService Client class. - # - # See {::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BudgetService clients - # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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", "Billing", "Budgets", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_budget.timeout = 60.0 - - default_config.rpcs.update_budget.timeout = 60.0 - default_config.rpcs.update_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_budget.timeout = 60.0 - default_config.rpcs.get_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_budgets.timeout = 60.0 - default_config.rpcs.list_budgets.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_budget.timeout = 60.0 - default_config.rpcs.delete_budget.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::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 - @budget_service_stub.universe_domain - end - - ## - # Create a new BudgetService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BudgetService 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/billing/budgets/v1beta1/budget_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 - - @budget_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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 - ) - - @budget_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @budget_service_stub.logger - end - - # Service calls - - ## - # Creates a new budget. See - # [Quotas and limits](https://cloud.google.com/billing/quotas) - # for more information on the limits of the number of budgets you can create. - # - # @overload create_budget(request, options = nil) - # Pass arguments to `create_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(parent: nil, budget: nil) - # Pass arguments to `create_budget` via keyword arguments. Note that at - # least one keyword argument is 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 name of the billing account to create the budget in. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @param budget [::Google::Cloud::Billing::Budgets::V1beta1::Budget, ::Hash] - # Required. Budget to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new - # - # # Call the create_budget method. - # result = client.create_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. - # p result - # - def create_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :create_budget, 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 budget and returns the updated budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. Budget fields that are not exposed in - # this API will not be changed by this method. - # - # @overload update_budget(request, options = nil) - # Pass arguments to `update_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(budget: nil, update_mask: nil) - # Pass arguments to `update_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param budget [::Google::Cloud::Billing::Budgets::V1beta1::Budget, ::Hash] - # Required. The updated budget object. - # The budget to update is specified by the budget name in the budget. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Indicates which fields in the provided budget to update. - # Read-only fields (such as `name`) cannot be changed. If this is not - # provided, then only fields with non-default values from the request are - # updated. See - # https://developers.google.com/protocol-buffers/docs/proto3#default for more - # details about default values. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new - # - # # Call the update_budget method. - # result = client.update_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. - # p result - # - def update_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.budget&.name - header_params["budget.name"] = request.budget.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_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :update_budget, 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 - - ## - # Returns a budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - # - # @overload get_budget(request, options = nil) - # Pass arguments to `get_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(name: nil) - # Pass arguments to `get_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of budget to get. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.new - # - # # Call the get_budget method. - # result = client.get_budget request - # - # # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. - # p result - # - def get_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :get_budget, 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 - - ## - # Returns a list of budgets for a billing account. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - # - # @overload list_budgets(request, options = nil) - # Pass arguments to `list_budgets` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budgets(parent: nil, scope: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_budgets` via keyword arguments. Note that at - # least one keyword argument is 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. Name of billing account to list budgets under. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @param scope [::String] - # Optional. Set the scope of the budgets to be returned, in the format of the - # resource name. The scope of a budget is the cost that it tracks, such as - # costs for a single project, or the costs for all projects in a folder. Only - # project scope (in the format of "projects/project-id" or "projects/123") is - # supported in this field. When this field is set to a project's resource - # name, the budgets returned are tracking the costs for that project. - # @param page_size [::Integer] - # Optional. The maximum number of budgets to return per page. - # The default and maximum value are 100. - # @param page_token [::String] - # Optional. The value returned by the last `ListBudgetsResponse` which - # indicates that this is a continuation of a prior `ListBudgets` call, - # and that the system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1beta1::Budget>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::Budgets::V1beta1::Budget>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new - # - # # Call the list_budgets method. - # result = client.list_budgets 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::Billing::Budgets::V1beta1::Budget. - # p item - # end - # - def list_budgets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest - - # Converts hash 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_budgets.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::Billing::Budgets::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_budgets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_budgets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :list_budgets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @budget_service_stub, :list_budgets, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a budget. Returns successfully if already deleted. - # - # @overload delete_budget(request, options = nil) - # Pass arguments to `delete_budget` via a request object, either of type - # {::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_budget(name: nil) - # Pass arguments to `delete_budget` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the budget to delete. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/budgets/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.new - # - # # Call the delete_budget method. - # result = client.delete_budget request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_budget request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest - - # Converts hash 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_budget.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::Billing::Budgets::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_budget.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_budget.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @budget_service_stub.call_rpc :delete_budget, 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 BudgetService API. - # - # This class represents the configuration for BudgetService, - # 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::Billing::Budgets::V1beta1::BudgetService::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 - # # create_budget to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_budget.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_budget.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::Billing::Budgets::V1beta1::BudgetService::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 = "billingbudgets.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 BudgetService 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 `create_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :create_budget - ## - # RPC-specific configuration for `update_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :update_budget - ## - # RPC-specific configuration for `get_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :get_budget - ## - # RPC-specific configuration for `list_budgets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_budgets - ## - # RPC-specific configuration for `delete_budget` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_budget - - # @private - def initialize parent_rpcs = nil - create_budget_config = parent_rpcs.create_budget if parent_rpcs.respond_to? :create_budget - @create_budget = ::Gapic::Config::Method.new create_budget_config - update_budget_config = parent_rpcs.update_budget if parent_rpcs.respond_to? :update_budget - @update_budget = ::Gapic::Config::Method.new update_budget_config - get_budget_config = parent_rpcs.get_budget if parent_rpcs.respond_to? :get_budget - @get_budget = ::Gapic::Config::Method.new get_budget_config - list_budgets_config = parent_rpcs.list_budgets if parent_rpcs.respond_to? :list_budgets - @list_budgets = ::Gapic::Config::Method.new list_budgets_config - delete_budget_config = parent_rpcs.delete_budget if parent_rpcs.respond_to? :delete_budget - @delete_budget = ::Gapic::Config::Method.new delete_budget_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.rb deleted file mode 100644 index 8e0dd7cbb5f7..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Billing - module Budgets - module V1beta1 - module BudgetService - # Credentials for the BudgetService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-billing", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BILLING_BUDGETS_CREDENTIALS", - "BILLING_BUDGETS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BILLING_BUDGETS_CREDENTIALS_JSON", - "BILLING_BUDGETS_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 -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb deleted file mode 100644 index ed4331cea5fb..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Billing - module Budgets - module V1beta1 - module BudgetService - # Path helper methods for the BudgetService API. - module Paths - ## - # Create a fully-qualified BillingAccount resource string. - # - # The resource will be in the following format: - # - # `billingAccounts/{billing_account}` - # - # @param billing_account [String] - # - # @return [::String] - def billing_account_path billing_account: - "billingAccounts/#{billing_account}" - end - - ## - # Create a fully-qualified Budget resource string. - # - # The resource will be in the following format: - # - # `billingAccounts/{billing_account}/budgets/{budget}` - # - # @param billing_account [String] - # @param budget [String] - # - # @return [::String] - def budget_path billing_account:, budget: - raise ::ArgumentError, "billing_account cannot contain /" if billing_account.to_s.include? "/" - - "billingAccounts/#{billing_account}/budgets/#{budget}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb deleted file mode 100644 index d21779b6826a..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/billing/budgets/v1beta1/budget_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/billing/budgets/v1beta1/budget_model_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n9google/cloud/billing/budgets/v1beta1/budget_service.proto\x12$google.cloud.billing.budgets.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x37google/cloud/billing/budgets/v1beta1/budget_model.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\x96\x01\n\x13\x43reateBudgetRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12\x41\n\x06\x62udget\x18\x02 \x01(\x0b\x32,.google.cloud.billing.budgets.v1beta1.BudgetB\x03\xe0\x41\x02\"\x8e\x01\n\x13UpdateBudgetRequest\x12\x41\n\x06\x62udget\x18\x01 \x01(\x0b\x32,.google.cloud.billing.budgets.v1beta1.BudgetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"N\n\x10GetBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget\"\x97\x01\n\x12ListBudgetsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$billingbudgets.googleapis.com/Budget\x12\x12\n\x05scope\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"m\n\x13ListBudgetsResponse\x12=\n\x07\x62udgets\x18\x01 \x03(\x0b\x32,.google.cloud.billing.budgets.v1beta1.Budget\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Q\n\x13\x44\x65leteBudgetRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$billingbudgets.googleapis.com/Budget2\xf7\x07\n\rBudgetService\x12\xaf\x01\n\x0c\x43reateBudget\x12\x39.google.cloud.billing.budgets.v1beta1.CreateBudgetRequest\x1a,.google.cloud.billing.budgets.v1beta1.Budget\"6\x82\xd3\xe4\x93\x02\x30\"+/v1beta1/{parent=billingAccounts/*}/budgets:\x01*\x12\xb6\x01\n\x0cUpdateBudget\x12\x39.google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest\x1a,.google.cloud.billing.budgets.v1beta1.Budget\"=\x82\xd3\xe4\x93\x02\x37\x32\x32/v1beta1/{budget.name=billingAccounts/*/budgets/*}:\x01*\x12\xa6\x01\n\tGetBudget\x12\x36.google.cloud.billing.budgets.v1beta1.GetBudgetRequest\x1a,.google.cloud.billing.budgets.v1beta1.Budget\"3\x82\xd3\xe4\x93\x02-\x12+/v1beta1/{name=billingAccounts/*/budgets/*}\x12\xb7\x01\n\x0bListBudgets\x12\x38.google.cloud.billing.budgets.v1beta1.ListBudgetsRequest\x1a\x39.google.cloud.billing.budgets.v1beta1.ListBudgetsResponse\"3\x82\xd3\xe4\x93\x02-\x12+/v1beta1/{parent=billingAccounts/*}/budgets\x12\x96\x01\n\x0c\x44\x65leteBudget\x12\x39.google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest\x1a\x16.google.protobuf.Empty\"3\x82\xd3\xe4\x93\x02-*+/v1beta1/{name=billingAccounts/*/budgets/*}\x1a\x7f\xca\x41\x1d\x62illingbudgets.googleapis.com\xd2\x41\\https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-platformBp\n(com.google.cloud.billing.budgets.v1beta1P\x01ZBcloud.google.com/go/billing/budgets/apiv1beta1/budgetspb;budgetspbb\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Billing - module Budgets - module V1beta1 - CreateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.CreateBudgetRequest").msgclass - UpdateBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.UpdateBudgetRequest").msgclass - GetBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.GetBudgetRequest").msgclass - ListBudgetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ListBudgetsRequest").msgclass - ListBudgetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.ListBudgetsResponse").msgclass - DeleteBudgetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.budgets.v1beta1.DeleteBudgetRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb deleted file mode 100644 index b78f8d6c013f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/budget_service_services_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/billing/budgets/v1beta1/budget_service.proto for package 'google.cloud.billing.budgets.v1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/billing/budgets/v1beta1/budget_service_pb' - -module Google - module Cloud - module Billing - module Budgets - module V1beta1 - module BudgetService - # BudgetService stores Cloud Billing budgets, which define a - # budget plan and rules to execute as we track spend against that plan. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.billing.budgets.v1beta1.BudgetService' - - # Creates a new budget. See - # [Quotas and limits](https://cloud.google.com/billing/quotas) - # for more information on the limits of the number of budgets you can create. - rpc :CreateBudget, ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1beta1::Budget - # Updates a budget and returns the updated budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. Budget fields that are not exposed in - # this API will not be changed by this method. - rpc :UpdateBudget, ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest, ::Google::Cloud::Billing::Budgets::V1beta1::Budget - # Returns a budget. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - rpc :GetBudget, ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest, ::Google::Cloud::Billing::Budgets::V1beta1::Budget - # Returns a list of budgets for a billing account. - # - # WARNING: There are some fields exposed on the Google Cloud Console that - # aren't available on this API. When reading from the API, you will not - # see these fields in the return value, though they may have been set - # in the Cloud Console. - rpc :ListBudgets, ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest, ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsResponse - # Deletes a budget. Returns successfully if already deleted. - rpc :DeleteBudget, ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb deleted file mode 100644 index 1d9cee314360..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/lib/google/cloud/billing/budgets/v1beta1/version.rb +++ /dev/null @@ -1,30 +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 Billing - module Budgets - module V1beta1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md deleted file mode 100644 index 5150803f7b0e..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Billing Budgets V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb deleted file mode 100644 index f638c97a06bf..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_model.rb +++ /dev/null @@ -1,362 +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 Billing - module Budgets - module V1beta1 - # A budget is a plan that describes what you expect to spend on Cloud - # projects, plus the rules to execute as spend is tracked against that plan, - # (for example, send an alert when 90% of the target spend is met). - # The budget time period is configurable, with options such as month (default), - # quarter, year, or custom time period. - # @!attribute [r] name - # @return [::String] - # Output only. Resource name of the budget. - # The resource name implies the scope of a budget. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - # @!attribute [rw] display_name - # @return [::String] - # User data for display name in UI. - # Validation: <= 60 chars. - # @!attribute [rw] budget_filter - # @return [::Google::Cloud::Billing::Budgets::V1beta1::Filter] - # Optional. Filters that define which resources are used to compute the - # actual spend against the budget amount, such as projects, services, and the - # budget's time period, as well as other filters. - # @!attribute [rw] amount - # @return [::Google::Cloud::Billing::Budgets::V1beta1::BudgetAmount] - # Required. Budgeted amount. - # @!attribute [rw] threshold_rules - # @return [::Array<::Google::Cloud::Billing::Budgets::V1beta1::ThresholdRule>] - # Optional. Rules that trigger alerts (notifications of thresholds - # being crossed) when spend exceeds the specified percentages of the budget. - # - # Optional for `pubsubTopic` notifications. - # - # Required if using email notifications. - # @!attribute [rw] all_updates_rule - # @return [::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule] - # Optional. Rules to apply to notifications sent based on budget spend and - # thresholds. - # @!attribute [rw] etag - # @return [::String] - # Optional. Etag to validate that the object is unchanged for a - # read-modify-write operation. - # An empty etag will cause an update to overwrite other changes. - class Budget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The budgeted amount for each usage period. - # @!attribute [rw] specified_amount - # @return [::Google::Type::Money] - # A specified amount to use as the budget. - # `currency_code` is optional. If specified when creating a budget, it must - # match the currency of the billing account. If specified when updating a - # budget, it must match the currency_code of the existing budget. - # The `currency_code` is provided on output. - # - # Note: The following fields are mutually exclusive: `specified_amount`, `last_period_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] last_period_amount - # @return [::Google::Cloud::Billing::Budgets::V1beta1::LastPeriodAmount] - # Use the last period's actual spend as the budget for the present period. - # LastPeriodAmount can only be set when the budget's time period is a - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}. - # It cannot be set in combination with - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}. - # - # Note: The following fields are mutually exclusive: `last_period_amount`, `specified_amount`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BudgetAmount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes a budget amount targeted to the last - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period} - # spend. At this time, the amount is automatically 100% of the last calendar - # period's spend; that is, there are no other options yet. - # Future configuration options will be described here (for example, configuring - # a percentage of last period's spend). - # LastPeriodAmount cannot be set for a budget configured with - # a - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}. - class LastPeriodAmount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ThresholdRule contains the definition of a threshold. Threshold rules define - # the triggering events used to generate a budget notification email. When a - # threshold is crossed (spend exceeds the specified percentages of the - # budget), budget alert emails are sent to the email recipients you specify - # in the - # [NotificationsRule](#notificationsrule). - # - # Threshold rules also affect the fields included in the - # [JSON data - # object](https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format) - # sent to a Pub/Sub topic. - # - # Threshold rules are _required_ if using email notifications. - # - # Threshold rules are _optional_ if only setting a - # [`pubsubTopic` NotificationsRule](#NotificationsRule), - # unless you want your JSON data object to include data about the thresholds - # you set. - # - # For more information, see - # [set budget threshold rules and - # actions](https://cloud.google.com/billing/docs/how-to/budgets#budget-actions). - # @!attribute [rw] threshold_percent - # @return [::Float] - # Required. Send an alert when this threshold is exceeded. - # This is a 1.0-based percentage, so 0.5 = 50%. - # Validation: non-negative number. - # @!attribute [rw] spend_basis - # @return [::Google::Cloud::Billing::Budgets::V1beta1::ThresholdRule::Basis] - # Optional. The type of basis used to determine if spend has passed the - # threshold. Behavior defaults to CURRENT_SPEND if not set. - class ThresholdRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of basis used to determine if spend has passed the threshold. - module Basis - # Unspecified threshold basis. - BASIS_UNSPECIFIED = 0 - - # Use current spend as the basis for comparison against the threshold. - CURRENT_SPEND = 1 - - # Use forecasted spend for the period as the basis for comparison against - # the threshold. - # FORECASTED_SPEND can only be set when the budget's time period is a - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#calendar_period Filter.calendar_period}. - # It cannot be set in combination with - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#custom_period Filter.custom_period}. - FORECASTED_SPEND = 2 - end - end - - # AllUpdatesRule defines notifications that are sent based on budget spend - # and thresholds. - # @!attribute [rw] pubsub_topic - # @return [::String] - # Optional. The name of the Pub/Sub topic where budget related messages will - # be published, in the form `projects/{project_id}/topics/{topic_id}`. - # Updates are sent at regular intervals to the topic. The topic needs to be - # created before the budget is created; see - # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications - # for more details. - # Caller is expected to have - # `pubsub.topics.setIamPolicy` permission on the topic when it's set for a - # budget, otherwise, the API call will fail with PERMISSION_DENIED. See - # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#permissions_required_for_this_task - # for more details on Pub/Sub roles and permissions. - # @!attribute [rw] schema_version - # @return [::String] - # Optional. Required when - # {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic} - # is set. The schema version of the notification sent to - # {::Google::Cloud::Billing::Budgets::V1beta1::AllUpdatesRule#pubsub_topic AllUpdatesRule.pubsub_topic}. - # Only "1.0" is accepted. It represents the JSON schema as defined in - # https://cloud.google.com/billing/docs/how-to/budgets-programmatic-notifications#notification_format. - # @!attribute [rw] monitoring_notification_channels - # @return [::Array<::String>] - # Optional. Targets to send notifications to when a threshold is exceeded. - # This is in addition to default recipients who have billing account IAM - # roles. The value is the full REST resource name of a monitoring - # notification channel with the form - # `projects/{project_id}/notificationChannels/{channel_id}`. A maximum of 5 - # channels are allowed. See - # https://cloud.google.com/billing/docs/how-to/budgets-notification-recipients - # for more details. - # @!attribute [rw] disable_default_iam_recipients - # @return [::Boolean] - # Optional. When set to true, disables default notifications sent when a - # threshold is exceeded. Default notifications are sent to those with Billing - # Account Administrator and Billing Account User IAM roles for the target - # account. - # @!attribute [rw] enable_project_level_recipients - # @return [::Boolean] - # Optional. When set to true, and when the budget has a single project - # configured, notifications will be sent to project level recipients of that - # project. This field will be ignored if the budget has multiple or no - # project configured. - # - # Currently, project level recipients are the users with `Owner` role on a - # cloud project. - class AllUpdatesRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A filter for a budget, limiting the scope of the cost to calculate. - # @!attribute [rw] projects - # @return [::Array<::String>] - # Optional. A set of projects of the form `projects/{project}`, - # specifying that usage from only this set of projects should be - # included in the budget. If omitted, the report will include all usage for - # the billing account, regardless of which project the usage occurred on. - # @!attribute [rw] resource_ancestors - # @return [::Array<::String>] - # Optional. A set of folder and organization names of the form - # `folders/{folderId}` or `organizations/{organizationId}`, specifying that - # usage from only this set of folders and organizations should be included in - # the budget. If omitted, the budget includes all usage that the billing - # account pays for. If the folder or organization contains projects that are - # paid for by a different Cloud Billing account, the budget *doesn't* apply - # to those projects. - # @!attribute [rw] credit_types - # @return [::Array<::String>] - # Optional. If - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment} - # is INCLUDE_SPECIFIED_CREDITS, this is a list of credit types to be - # subtracted from gross cost to determine the spend for threshold - # calculations. See [a list of acceptable credit type - # values](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - # - # If - # {::Google::Cloud::Billing::Budgets::V1beta1::Filter#credit_types_treatment Filter.credit_types_treatment} - # is **not** INCLUDE_SPECIFIED_CREDITS, this field must be empty. - # @!attribute [rw] credit_types_treatment - # @return [::Google::Cloud::Billing::Budgets::V1beta1::Filter::CreditTypesTreatment] - # Optional. If not set, default behavior is `INCLUDE_ALL_CREDITS`. - # @!attribute [rw] services - # @return [::Array<::String>] - # Optional. A set of services of the form `services/{service_id}`, - # specifying that usage from only this set of services should be - # included in the budget. If omitted, the report will include usage for - # all the services. - # The service names are available through the Catalog API: - # https://cloud.google.com/billing/v1/how-tos/catalog-api. - # @!attribute [rw] subaccounts - # @return [::Array<::String>] - # Optional. A set of subaccounts of the form `billingAccounts/{account_id}`, - # specifying that usage from only this set of subaccounts should be included - # in the budget. If a subaccount is set to the name of the parent account, - # usage from the parent account will be included. If omitted, the - # report will include usage from the parent account and all - # subaccounts, if they exist. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::ListValue}] - # Optional. A single label and value pair specifying that usage from only - # this set of labeled resources should be included in the budget. If omitted, - # the report will include all labeled and unlabeled usage. - # - # An object containing a single `"key": value` pair. Example: `{ "name": - # "wrench" }`. - # - # _Currently, multiple entries or multiple values per entry are not - # allowed._ - # @!attribute [rw] calendar_period - # @return [::Google::Cloud::Billing::Budgets::V1beta1::CalendarPeriod] - # Optional. Specifies to track usage for recurring calendar period. - # For example, assume that CalendarPeriod.QUARTER is set. The budget will - # track usage from April 1 to June 30, when the current calendar month is - # April, May, June. After that, it will track usage from July 1 to - # September 30 when the current calendar month is July, August, September, - # so on. - # - # Note: The following fields are mutually exclusive: `calendar_period`, `custom_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_period - # @return [::Google::Cloud::Billing::Budgets::V1beta1::CustomPeriod] - # Optional. Specifies to track usage from any start date (required) to any - # end date (optional). This time period is static, it does not recur. - # - # Note: The following fields are mutually exclusive: `custom_period`, `calendar_period`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Filter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::ListValue] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies how credits are applied when determining the spend for - # threshold calculations. Budgets track the total cost minus any applicable - # selected credits. - # [See the documentation for a list of credit - # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type). - module CreditTypesTreatment - CREDIT_TYPES_TREATMENT_UNSPECIFIED = 0 - - # All types of credit are subtracted from the gross cost to determine the - # spend for threshold calculations. - INCLUDE_ALL_CREDITS = 1 - - # All types of credit are added to the net cost to determine the spend for - # threshold calculations. - EXCLUDE_ALL_CREDITS = 2 - - # [Credit - # types](https://cloud.google.com/billing/docs/how-to/export-data-bigquery-tables#credits-type) - # specified in the credit_types field are subtracted from the - # gross cost to determine the spend for threshold calculations. - INCLUDE_SPECIFIED_CREDITS = 3 - end - end - - # All date times begin at 12 AM US and Canadian Pacific Time (UTC-8). - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Required. The start date must be after January 1, 2017. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Optional. The end date of the time period. Budgets with elapsed end date - # won't be processed. If unset, specifies to track all usage incurred since - # the start_date. - class CustomPeriod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A `CalendarPeriod` represents the abstract concept of a time period that - # has a canonical start. Grammatically, "the start of the current - # `CalendarPeriod`". All calendar times begin at 12 AM US and Canadian - # Pacific Time (UTC-8). - module CalendarPeriod - # Calendar period is unset. This is the default if the budget is for a - # custom time period (CustomPeriod). - CALENDAR_PERIOD_UNSPECIFIED = 0 - - # A month. Month starts on the first day of each month, such as January 1, - # February 1, March 1, and so on. - MONTH = 1 - - # A quarter. Quarters start on dates January 1, April 1, July 1, and October - # 1 of each year. - QUARTER = 2 - - # A year. Year starts on January 1. - YEAR = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb deleted file mode 100644 index f99b0780bbd9..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/cloud/billing/budgets/v1beta1/budget_service.rb +++ /dev/null @@ -1,119 +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 Billing - module Budgets - module V1beta1 - # Request for CreateBudget - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the billing account to create the budget in. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @!attribute [rw] budget - # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # Required. Budget to create. - class CreateBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for UpdateBudget - # @!attribute [rw] budget - # @return [::Google::Cloud::Billing::Budgets::V1beta1::Budget] - # Required. The updated budget object. - # The budget to update is specified by the budget name in the budget. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Indicates which fields in the provided budget to update. - # Read-only fields (such as `name`) cannot be changed. If this is not - # provided, then only fields with non-default values from the request are - # updated. See - # https://developers.google.com/protocol-buffers/docs/proto3#default for more - # details about default values. - class UpdateBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for GetBudget - # @!attribute [rw] name - # @return [::String] - # Required. Name of budget to get. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - class GetBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for ListBudgets - # @!attribute [rw] parent - # @return [::String] - # Required. Name of billing account to list budgets under. Values - # are of the form `billingAccounts/{billingAccountId}`. - # @!attribute [rw] scope - # @return [::String] - # Optional. Set the scope of the budgets to be returned, in the format of the - # resource name. The scope of a budget is the cost that it tracks, such as - # costs for a single project, or the costs for all projects in a folder. Only - # project scope (in the format of "projects/project-id" or "projects/123") is - # supported in this field. When this field is set to a project's resource - # name, the budgets returned are tracking the costs for that project. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of budgets to return per page. - # The default and maximum value are 100. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value returned by the last `ListBudgetsResponse` which - # indicates that this is a continuation of a prior `ListBudgets` call, - # and that the system should return the next page of data. - class ListBudgetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for ListBudgets - # @!attribute [rw] budgets - # @return [::Array<::Google::Cloud::Billing::Budgets::V1beta1::Budget>] - # List of the budgets owned by the requested billing account. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more budgets that match the - # request; this value should be passed in a new `ListBudgetsRequest`. - class ListBudgetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for DeleteBudget - # @!attribute [rw] name - # @return [::String] - # Required. Name of the budget to delete. Values are of the form - # `billingAccounts/{billingAccountId}/budgets/{budgetId}`. - class DeleteBudgetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/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-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/protobuf/struct.rb +++ /dev/null @@ -1,108 +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 - # `Struct` represents a structured data value, consisting of fields - # which map to dynamically typed values. In some languages, `Struct` - # might be supported by a native representation. For example, in - # scripting languages like JS a struct is represented as an - # object. The details of that representation are described together - # with the proto support for the language. - # - # The JSON representation for `Struct` is JSON object. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Protobuf::Value}] - # Unordered map of dynamically typed values. - class Struct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Protobuf::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # `Value` represents a dynamically typed value which can be either - # null, a number, a string, a boolean, a recursive struct value, or a - # list of values. A producer of value is expected to set one of these - # variants. Absence of any variant indicates an error. - # - # The JSON representation for `Value` is JSON value. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # Represents a null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] number_value - # @return [::Float] - # Represents a double value. - # - # Note: The following fields are mutually exclusive: `number_value`, `null_value`, `string_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Represents a string value. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `number_value`, `bool_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Represents a boolean value. - # - # Note: The following fields are mutually exclusive: `bool_value`, `null_value`, `number_value`, `string_value`, `struct_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] struct_value - # @return [::Google::Protobuf::Struct] - # Represents a structured value. - # - # Note: The following fields are mutually exclusive: `struct_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `list_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] list_value - # @return [::Google::Protobuf::ListValue] - # Represents a repeated `Value`. - # - # Note: The following fields are mutually exclusive: `list_value`, `null_value`, `number_value`, `string_value`, `bool_value`, `struct_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `ListValue` is a wrapper around a repeated field of values. - # - # The JSON representation for `ListValue` is JSON array. - # @!attribute [rw] values - # @return [::Array<::Google::Protobuf::Value>] - # Repeated field of dynamically typed values. - class ListValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `NullValue` is a singleton enumeration to represent the null value for the - # `Value` type union. - # - # The JSON representation for `NullValue` is JSON `null`. - module NullValue - # Null value. - NULL_VALUE = 0 - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb deleted file mode 100644 index 1d0a9780457f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb deleted file mode 100644 index 56a32eee300d..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/proto_docs/google/type/money.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents an amount of money with its currency type. - # @!attribute [rw] currency_code - # @return [::String] - # The three-letter currency code defined in ISO 4217. - # @!attribute [rw] units - # @return [::Integer] - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # @!attribute [rw] nanos - # @return [::Integer] - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - class Money - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile deleted file mode 100644 index 26910abc8eb6..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-billing-budgets-v1beta1", path: "../" -else - gem "google-cloud-billing-budgets-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.rb deleted file mode 100644 index b12baf0dd6f9..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/create_budget.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 billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync] -require "google/cloud/billing/budgets/v1beta1" - -## -# Snippet for the create_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#create_budget. -# -def create_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new - - # Call the create_budget method. - result = client.create_budget request - - # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. - p result -end -# [END billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.rb deleted file mode 100644 index e4e196bfaa6f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/delete_budget.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 billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync] -require "google/cloud/billing/budgets/v1beta1" - -## -# Snippet for the delete_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#delete_budget. -# -def delete_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.new - - # Call the delete_budget method. - result = client.delete_budget request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.rb deleted file mode 100644 index 9e8690b6bfee..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/get_budget.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 billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync] -require "google/cloud/billing/budgets/v1beta1" - -## -# Snippet for the get_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#get_budget. -# -def get_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.new - - # Call the get_budget method. - result = client.get_budget request - - # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. - p result -end -# [END billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.rb deleted file mode 100644 index 6c682097f2a5..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/list_budgets.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 billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync] -require "google/cloud/billing/budgets/v1beta1" - -## -# Snippet for the list_budgets call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#list_budgets. -# -def list_budgets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new - - # Call the list_budgets method. - result = client.list_budgets 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::Billing::Budgets::V1beta1::Budget. - p item - end -end -# [END billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.rb deleted file mode 100644 index 5098bdbfe810..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/budget_service/update_budget.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 billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync] -require "google/cloud/billing/budgets/v1beta1" - -## -# Snippet for the update_budget call in the BudgetService 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::Billing::Budgets::V1beta1::BudgetService::Client#update_budget. -# -def update_budget - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new - - # Call the update_budget method. - result = client.update_budget request - - # The returned object is of type Google::Cloud::Billing::Budgets::V1beta1::Budget. - p result -end -# [END billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync] diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json deleted file mode 100644 index d6e6546dbb6f..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/snippets/snippet_metadata_google.cloud.billing.budgets.v1beta1.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-billing-budgets-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.billing.budgets.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "billingbudgets_v1beta1_generated_BudgetService_CreateBudget_sync", - "title": "Snippet for the create_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#create_budget.", - "file": "budget_service/create_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#create_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::Budget", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" - }, - "method": { - "short_name": "CreateBudget", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.CreateBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1beta1_generated_BudgetService_UpdateBudget_sync", - "title": "Snippet for the update_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#update_budget.", - "file": "budget_service/update_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#update_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::Budget", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" - }, - "method": { - "short_name": "UpdateBudget", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.UpdateBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1beta1_generated_BudgetService_GetBudget_sync", - "title": "Snippet for the get_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#get_budget.", - "file": "budget_service/get_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#get_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::Budget", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" - }, - "method": { - "short_name": "GetBudget", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.GetBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1beta1_generated_BudgetService_ListBudgets_sync", - "title": "Snippet for the list_budgets call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#list_budgets.", - "file": "budget_service/list_budgets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_budgets", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#list_budgets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsResponse", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" - }, - "method": { - "short_name": "ListBudgets", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.ListBudgets", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "billingbudgets_v1beta1_generated_BudgetService_DeleteBudget_sync", - "title": "Snippet for the delete_budget call in the BudgetService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#delete_budget.", - "file": "budget_service/delete_budget.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_budget", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client#delete_budget", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BudgetService::Client", - "full_name": "::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client" - }, - "method": { - "short_name": "DeleteBudget", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService.DeleteBudget", - "service": { - "short_name": "BudgetService", - "full_name": "google.cloud.billing.budgets.v1beta1.BudgetService" - } - } - }, - "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-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb deleted file mode 100644 index 3096f8e3b8fb..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_paths_test.rb +++ /dev/null @@ -1,67 +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/billing/budgets/v1beta1/budget_service" - -class ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_billing_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.billing_account_path billing_account: "value0" - assert_equal "billingAccounts/value0", path - end - end - - def test_budget_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.budget_path billing_account: "value0", budget: "value1" - assert_equal "billingAccounts/value0/budgets/value1", path - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb deleted file mode 100644 index 06529d586698..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/google/cloud/billing/budgets/v1beta1/budget_service_test.rb +++ /dev/null @@ -1,409 +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/billing/budgets/v1beta1/budget_service_pb" -require "google/cloud/billing/budgets/v1beta1/budget_service" - -class ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::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_create_budget - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::Budget.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" - budget = {} - - create_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1beta1::Budget), request["budget"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_budget({ parent: parent, budget: budget }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_budget parent: parent, budget: budget do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_budget ::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new(parent: parent, budget: budget) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_budget({ parent: parent, budget: budget }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_budget(::Google::Cloud::Billing::Budgets::V1beta1::CreateBudgetRequest.new(parent: parent, budget: budget), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_budget_client_stub.call_rpc_count - end - end - - def test_update_budget - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::Budget.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. - budget = {} - update_mask = {} - - update_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::Budgets::V1beta1::Budget), request["budget"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_budget({ budget: budget, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_budget budget: budget, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_budget ::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_budget({ budget: budget, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_budget(::Google::Cloud::Billing::Budgets::V1beta1::UpdateBudgetRequest.new(budget: budget, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_budget_client_stub.call_rpc_count - end - end - - def test_get_budget - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::Budget.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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_budget({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_budget name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_budget ::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1beta1::GetBudgetRequest.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_budget_client_stub.call_rpc_count - end - end - - def test_list_budgets - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsResponse.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 = "hello world" - page_size = 42 - page_token = "hello world" - - list_budgets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_budgets, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["scope"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_budgets_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_budgets({ parent: parent, scope: scope, 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_budgets parent: parent, scope: scope, 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_budgets ::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets({ parent: parent, scope: scope, 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_budgets(::Google::Cloud::Billing::Budgets::V1beta1::ListBudgetsRequest.new(parent: parent, scope: scope, 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_budgets_client_stub.call_rpc_count - end - end - - def test_delete_budget - # 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_budget_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_budget, name - assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_budget_client_stub do - # Create client - client = ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_budget({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_budget name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_budget ::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_budget({ 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_budget(::Google::Cloud::Billing::Budgets::V1beta1::DeleteBudgetRequest.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_budget_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::Billing::Budgets::V1beta1::BudgetService::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::Billing::Budgets::V1beta1::BudgetService::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::Billing::Budgets::V1beta1::BudgetService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Billing::Budgets::V1beta1::BudgetService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-billing-budgets-v1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-billing-v1/.gitignore b/owl-bot-staging/google-cloud-billing-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-billing-v1/.repo-metadata.json deleted file mode 100644 index bdf366e4672e..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudbilling.googleapis.com", - "api_shortname": "cloudbilling", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest", - "distribution_name": "google-cloud-billing-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudbilling", - "name_pretty": "Billing V1 API", - "product_documentation": "https://cloud.google.com/billing", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Allows developers to manage billing for their Google Cloud Platform projects programmatically. Note that google-cloud-billing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BILLING", - "ruby-cloud-product-url": "https://cloud.google.com/billing", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-billing-v1/.rubocop.yml b/owl-bot-staging/google-cloud-billing-v1/.rubocop.yml deleted file mode 100644 index cce464ee31a6..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-billing-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-billing-v1.rb" diff --git a/owl-bot-staging/google-cloud-billing-v1/.toys.rb b/owl-bot-staging/google-cloud-billing-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/.yardopts b/owl-bot-staging/google-cloud-billing-v1/.yardopts deleted file mode 100644 index ba89231033b1..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Billing 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-billing-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-billing-v1/AUTHENTICATION.md deleted file mode 100644 index d3019af522da..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-billing-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-billing-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/billing/v1" - -client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/billing/v1" - -::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Billing::V1::CloudBilling::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-billing-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/billing/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Billing::V1::CloudBilling::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-billing-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-billing-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-billing-v1/Gemfile b/owl-bot-staging/google-cloud-billing-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-billing-v1/LICENSE.md b/owl-bot-staging/google-cloud-billing-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/README.md b/owl-bot-staging/google-cloud-billing-v1/README.md deleted file mode 100644 index d86ca5910bc6..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Billing V1 API - -Allows developers to manage billing for their Google Cloud Platform projects programmatically. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Billing V1 API. Most users should consider using -the main client gem, -[google-cloud-billing](https://rubygems.org/gems/google-cloud-billing). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-billing-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/cloudbilling.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/billing/v1" - -client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new -request = ::Google::Cloud::Billing::V1::GetBillingAccountRequest.new # (request fields as keyword arguments...) -response = client.get_billing_account request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-billing-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/billing) -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/billing/v1" -require "logger" - -client = ::Google::Cloud::Billing::V1::CloudBilling::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-billing`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-billing-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-billing`. -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-billing-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-billing-v1/Rakefile b/owl-bot-staging/google-cloud-billing-v1/Rakefile deleted file mode 100644 index caabb9f5ec72..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BILLING_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BILLING_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BILLING_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 BILLING_TEST_PROJECT=test123 BILLING_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/billing/v1/cloud_billing/credentials" - ::Google::Cloud::Billing::V1::CloudBilling::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BILLING_PROJECT"] = project - ENV["BILLING_TEST_PROJECT"] = project - ENV["BILLING_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-billing-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-billing-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-billing-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-billing-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-billing-v1" - header "google-cloud-billing-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-billing-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-billing-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-billing-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-billing-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-billing-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-billing-v1/gapic_metadata.json deleted file mode 100644 index 89b5aa748982..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.billing.v1", - "libraryPackage": "::Google::Cloud::Billing::V1", - "services": { - "CloudBilling": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Billing::V1::CloudBilling::Client", - "rpcs": { - "GetBillingAccount": { - "methods": [ - "get_billing_account" - ] - }, - "ListBillingAccounts": { - "methods": [ - "list_billing_accounts" - ] - }, - "UpdateBillingAccount": { - "methods": [ - "update_billing_account" - ] - }, - "CreateBillingAccount": { - "methods": [ - "create_billing_account" - ] - }, - "ListProjectBillingInfo": { - "methods": [ - "list_project_billing_info" - ] - }, - "GetProjectBillingInfo": { - "methods": [ - "get_project_billing_info" - ] - }, - "UpdateProjectBillingInfo": { - "methods": [ - "update_project_billing_info" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - }, - "MoveBillingAccount": { - "methods": [ - "move_billing_account" - ] - } - } - } - } - }, - "CloudCatalog": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Billing::V1::CloudCatalog::Client", - "rpcs": { - "ListServices": { - "methods": [ - "list_services" - ] - }, - "ListSkus": { - "methods": [ - "list_skus" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec b/owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec deleted file mode 100644 index c45dd7943fb0..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/google-cloud-billing-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/billing/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-billing-v1" - gem.version = Google::Cloud::Billing::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Allows developers to manage billing for their Google Cloud Platform projects programmatically. Note that google-cloud-billing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-billing instead. See the readme for more details." - gem.summary = "Allows developers to manage billing for their Google Cloud Platform projects programmatically." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grpc-google-iam-v1", "~> 1.11" -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-v1.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-v1.rb deleted file mode 100644 index e785b6f302ee..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google-cloud-billing-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/billing/v1" diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb deleted file mode 100644 index 7ab843f1772f..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/billing/v1/cloud_billing" -require "google/cloud/billing/v1/cloud_catalog" -require "google/cloud/billing/v1/version" - -module Google - module Cloud - module Billing - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/billing/v1" - # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/billing/v1" - # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/billing/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb deleted file mode 100644 index c14464975446..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/billing/v1/version" - -require "google/cloud/billing/v1/cloud_billing/credentials" -require "google/cloud/billing/v1/cloud_billing/paths" -require "google/cloud/billing/v1/cloud_billing/client" -require "google/cloud/billing/v1/cloud_billing/rest" - -module Google - module Cloud - module Billing - module V1 - ## - # Retrieves the Google Cloud Console billing accounts and associates them with - # projects. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/billing/v1/cloud_billing" - # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/billing/v1/cloud_billing/rest" - # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - module CloudBilling - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_billing", "helpers.rb" -require "google/cloud/billing/v1/cloud_billing/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb deleted file mode 100644 index b590c031a4e7..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/client.rb +++ /dev/null @@ -1,1588 +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/billing/v1/cloud_billing_pb" - -module Google - module Cloud - module Billing - module V1 - module CloudBilling - ## - # Client for the CloudBilling service. - # - # Retrieves the Google Cloud Console billing accounts and associates them with - # projects. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_billing_stub - - ## - # Configure the CloudBilling Client class. - # - # See {::Google::Cloud::Billing::V1::CloudBilling::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudBilling clients - # ::Google::Cloud::Billing::V1::CloudBilling::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", "Billing", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_billing_account.timeout = 60.0 - default_config.rpcs.get_billing_account.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_billing_accounts.timeout = 60.0 - default_config.rpcs.list_billing_accounts.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_billing_account.timeout = 60.0 - default_config.rpcs.update_billing_account.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_billing_account.timeout = 60.0 - - default_config.rpcs.list_project_billing_info.timeout = 60.0 - default_config.rpcs.list_project_billing_info.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_project_billing_info.timeout = 60.0 - default_config.rpcs.get_project_billing_info.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_project_billing_info.timeout = 60.0 - default_config.rpcs.update_project_billing_info.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - default_config.rpcs.set_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudBilling 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::Billing::V1::CloudBilling::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_billing_stub.universe_domain - end - - ## - # Create a new CloudBilling client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudBilling 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/billing/v1/cloud_billing_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_billing_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Billing::V1::CloudBilling::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_billing_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_billing_stub.logger - end - - # Service calls - - ## - # Gets information about a billing account. The current authenticated user - # must be a [viewer of the billing - # account](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload get_billing_account(request, options = nil) - # Pass arguments to `get_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::GetBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_account(name: nil) - # Pass arguments to `get_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the billing account to retrieve. For - # example, `billingAccounts/012345-567890-ABCDEF`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::GetBillingAccountRequest.new - # - # # Call the get_billing_account method. - # result = client.get_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def get_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetBillingAccountRequest - - # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :get_billing_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the billing accounts that the current authenticated user has - # permission to - # [view](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload list_billing_accounts(request, options = nil) - # Pass arguments to `list_billing_accounts` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListBillingAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_accounts(page_size: nil, page_token: nil, filter: nil, parent: nil) - # Pass arguments to `list_billing_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Requested page size. The maximum page size is 100; this is also the - # default. - # @param page_token [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListBillingAccounts` - # call. If unspecified, the first page of results is returned. - # @param filter [::String] - # Options for how to filter the returned billing accounts. - # This only supports filtering for - # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a - # single provided parent billing account. - # (for example, - # `master_billing_account=billingAccounts/012345-678901-ABCDEF`). - # Boolean algebra and other fields are not currently supported. - # @param parent [::String] - # Optional. The parent resource to list billing accounts from. - # Format: - # - `organizations/{organization_id}`, for example, - # `organizations/12345678` - # - `billingAccounts/{billing_account_id}`, for example, - # `billingAccounts/012345-567890-ABCDEF` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListBillingAccountsRequest.new - # - # # Call the list_billing_accounts method. - # result = client.list_billing_accounts 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::Billing::V1::BillingAccount. - # p item - # end - # - def list_billing_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListBillingAccountsRequest - - # Converts hash 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_billing_accounts.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::Billing::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_billing_accounts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_billing_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :list_billing_accounts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, 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 - - ## - # Updates a billing account's fields. - # Currently the only field that can be edited is `display_name`. - # The current authenticated user must have the `billing.accounts.update` - # IAM permission, which is typically given to the - # [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) - # of the billing account. - # - # @overload update_billing_account(request, options = nil) - # Pass arguments to `update_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::UpdateBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_account(name: nil, account: nil, update_mask: nil) - # Pass arguments to `update_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the billing account resource to be updated. - # @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] - # Required. The billing account resource to replace the resource on the - # server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applied to the resource. - # Only "display_name" is currently supported. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new - # - # # Call the update_billing_account method. - # result = client.update_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def update_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest - - # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :update_billing_account, 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 - - ## - # This method creates [billing - # subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). - # - # Google Cloud resellers should use the - # Channel Services APIs, - # [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) - # and - # [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). - # - # When creating a subaccount, the current authenticated user must have the - # `billing.accounts.update` IAM permission on the parent account, which is - # typically given to billing account - # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - # This method will return an error if the parent account has not been - # provisioned for subaccounts. - # - # @overload create_billing_account(request, options = nil) - # Pass arguments to `create_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::CreateBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_account(billing_account: nil, parent: nil) - # Pass arguments to `create_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param billing_account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] - # Required. The billing account resource to create. - # Currently CreateBillingAccount only supports subaccount creation, so - # any created billing accounts must be under a provided parent billing - # account. - # @param parent [::String] - # Optional. The parent to create a billing account from. - # Format: - # - `billingAccounts/{billing_account_id}`, for example, - # `billingAccounts/012345-567890-ABCDEF` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::CreateBillingAccountRequest.new - # - # # Call the create_billing_account method. - # result = client.create_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def create_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::CreateBillingAccountRequest - - # Converts hash 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_billing_account.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::Billing::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.create_billing_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :create_billing_account, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the projects associated with a billing account. The current - # authenticated user must have the `billing.resourceAssociations.list` IAM - # permission, which is often given to billing account - # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload list_project_billing_info(request, options = nil) - # Pass arguments to `list_project_billing_info` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_project_billing_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the billing account associated with the - # projects that you want to list. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @param page_size [::Integer] - # Requested page size. The maximum page size is 100; this is also the - # default. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous `ListProjectBillingInfo` - # call. If unspecified, the first page of results is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new - # - # # Call the list_project_billing_info method. - # result = client.list_project_billing_info 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::Billing::V1::ProjectBillingInfo. - # p item - # end - # - def list_project_billing_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest - - # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_project_billing_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :list_project_billing_info, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, 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 billing information for a project. The current authenticated user - # must have the `resourcemanager.projects.get` permission for the project, - # which can be granted by assigning the [Project - # Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) - # role. - # - # @overload get_project_billing_info(request, options = nil) - # Pass arguments to `get_project_billing_info` via a request object, either of type - # {::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_project_billing_info(name: nil) - # Pass arguments to `get_project_billing_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the project for which billing information is - # retrieved. For example, `projects/tokyo-rain-123`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new - # - # # Call the get_project_billing_info method. - # result = client.get_project_billing_info request - # - # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. - # p result - # - def get_project_billing_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest - - # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_project_billing_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :get_project_billing_info, 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 - - ## - # Sets or updates the billing account associated with a project. You specify - # the new billing account by setting the `billing_account_name` in the - # `ProjectBillingInfo` resource to the resource name of a billing account. - # Associating a project with an open billing account enables billing on the - # project and allows charges for resource usage. If the project already had a - # billing account, this method changes the billing account used for resource - # usage charges. - # - # *Note:* Incurred charges that have not yet been reported in the transaction - # history of the Google Cloud Console might be billed to the new billing - # account, even if the charge occurred before the new billing account was - # assigned to the project. - # - # The current authenticated user must have ownership privileges for both - # the - # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo - # ) and the [billing - # account](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # You can disable billing on the project by setting the - # `billing_account_name` field to empty. This action disassociates the - # current billing account from the project. Any billable activity of your - # in-use services will stop, and your application could stop functioning as - # expected. Any unbilled charges to date will be billed to the previously - # associated account. The current authenticated user must be either an owner - # of the project or an owner of the billing account for the project. - # - # Note that associating a project with a *closed* billing account will have - # much the same effect as disabling billing on the project: any paid - # resources used by the project will be shut down. Thus, unless you wish to - # disable billing, you should always call this method with the name of an - # *open* billing account. - # - # @overload update_project_billing_info(request, options = nil) - # Pass arguments to `update_project_billing_info` via a request object, either of type - # {::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, project_billing_info: nil) - # Pass arguments to `update_project_billing_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the project associated with the billing - # information that you want to update. For example, - # `projects/tokyo-rain-123`. - # @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash] - # The new billing information for the project. Output-only fields are - # ignored; thus, you can leave empty all fields except - # `billing_account_name`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new - # - # # Call the update_project_billing_info method. - # result = client.update_project_billing_info request - # - # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. - # p result - # - def update_project_billing_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest - - # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_project_billing_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :update_project_billing_info, 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 the access control policy for a billing account. - # The caller must have the `billing.accounts.getIamPolicy` permission on the - # account, which is often given to billing account - # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::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.resource - header_params["resource"] = request.resource - 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_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a billing account. Replaces any existing - # policy. - # The caller must have the `billing.accounts.setIamPolicy` permission on the - # account, which is often given to billing account - # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::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.resource - header_params["resource"] = request.resource - 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.set_iam_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests the access control policy for a billing account. This method takes - # the resource and a set of permissions as input and returns the subset of - # the input permissions that the caller is allowed for that resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Billing::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.resource - header_params["resource"] = request.resource - 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.test_iam_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :test_iam_permissions, 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 - - ## - # Changes which parent organization a billing account belongs to. - # - # @overload move_billing_account(request, options = nil) - # Pass arguments to `move_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::MoveBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload move_billing_account(name: nil, destination_parent: nil) - # Pass arguments to `move_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the billing account to move. - # Must be of the form `billingAccounts/{billing_account_id}`. - # The specified billing account cannot be a subaccount, since a subaccount - # always belongs to the same organization as its parent account. - # @param destination_parent [::String] - # Required. The resource name of the Organization to move - # the billing account under. - # Must be of the form `organizations/{organization_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new - # - # # Call the move_billing_account method. - # result = client.move_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def move_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::MoveBillingAccountRequest - - # Converts hash 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.move_billing_account.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::Billing::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.move_billing_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.move_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.call_rpc :move_billing_account, 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 CloudBilling API. - # - # This class represents the configuration for CloudBilling, - # 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::Billing::V1::CloudBilling::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_billing_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Billing::V1::CloudBilling::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_billing_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_billing_account.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::Billing::V1::CloudBilling::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 = "cloudbilling.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 CloudBilling 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 `get_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_billing_account - ## - # RPC-specific configuration for `list_billing_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_billing_accounts - ## - # RPC-specific configuration for `update_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_billing_account - ## - # RPC-specific configuration for `create_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_billing_account - ## - # RPC-specific configuration for `list_project_billing_info` - # @return [::Gapic::Config::Method] - # - attr_reader :list_project_billing_info - ## - # RPC-specific configuration for `get_project_billing_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_billing_info - ## - # RPC-specific configuration for `update_project_billing_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_billing_info - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `move_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :move_billing_account - - # @private - def initialize parent_rpcs = nil - get_billing_account_config = parent_rpcs.get_billing_account if parent_rpcs.respond_to? :get_billing_account - @get_billing_account = ::Gapic::Config::Method.new get_billing_account_config - list_billing_accounts_config = parent_rpcs.list_billing_accounts if parent_rpcs.respond_to? :list_billing_accounts - @list_billing_accounts = ::Gapic::Config::Method.new list_billing_accounts_config - update_billing_account_config = parent_rpcs.update_billing_account if parent_rpcs.respond_to? :update_billing_account - @update_billing_account = ::Gapic::Config::Method.new update_billing_account_config - create_billing_account_config = parent_rpcs.create_billing_account if parent_rpcs.respond_to? :create_billing_account - @create_billing_account = ::Gapic::Config::Method.new create_billing_account_config - list_project_billing_info_config = parent_rpcs.list_project_billing_info if parent_rpcs.respond_to? :list_project_billing_info - @list_project_billing_info = ::Gapic::Config::Method.new list_project_billing_info_config - get_project_billing_info_config = parent_rpcs.get_project_billing_info if parent_rpcs.respond_to? :get_project_billing_info - @get_project_billing_info = ::Gapic::Config::Method.new get_project_billing_info_config - update_project_billing_info_config = parent_rpcs.update_project_billing_info if parent_rpcs.respond_to? :update_project_billing_info - @update_project_billing_info = ::Gapic::Config::Method.new update_project_billing_info_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - move_billing_account_config = parent_rpcs.move_billing_account if parent_rpcs.respond_to? :move_billing_account - @move_billing_account = ::Gapic::Config::Method.new move_billing_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb deleted file mode 100644 index 0bd5383cab54..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/credentials.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Billing - module V1 - module CloudBilling - # Credentials for the CloudBilling API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-billing", - "https://www.googleapis.com/auth/cloud-billing.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BILLING_CREDENTIALS", - "BILLING_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BILLING_CREDENTIALS_JSON", - "BILLING_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-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb deleted file mode 100644 index 1d16099cbc03..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/paths.rb +++ /dev/null @@ -1,111 +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 Billing - module V1 - module CloudBilling - # Path helper methods for the CloudBilling API. - module Paths - ## - # Create a fully-qualified BillingAccount resource string. - # - # @overload billing_account_path(billing_account:) - # The resource will be in the following format: - # - # `billingAccounts/{billing_account}` - # - # @param billing_account [String] - # - # @overload billing_account_path(organization:, billing_account:) - # The resource will be in the following format: - # - # `organizations/{organization}/billingAccounts/{billing_account}` - # - # @param organization [String] - # @param billing_account [String] - # - # @return [::String] - def billing_account_path **args - resources = { - "billing_account" => (proc do |billing_account:| - "billingAccounts/#{billing_account}" - end), - "billing_account:organization" => (proc do |organization:, billing_account:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/billingAccounts/#{billing_account}" - 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 Organization resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}` - # - # @param organization [String] - # - # @return [::String] - def organization_path organization: - "organizations/#{organization}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified ProjectBillingInfo resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/billingInfo` - # - # @param project [String] - # - # @return [::String] - def project_billing_info_path project: - "projects/#{project}/billingInfo" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb deleted file mode 100644 index 4fd6ef3e7b63..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/billing/v1/version" - -require "google/cloud/billing/v1/cloud_billing/credentials" -require "google/cloud/billing/v1/cloud_billing/paths" -require "google/cloud/billing/v1/cloud_billing/rest/client" - -module Google - module Cloud - module Billing - module V1 - ## - # Retrieves the Google Cloud Console billing accounts and associates them with - # projects. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/billing/v1/cloud_billing/rest" - # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - module CloudBilling - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/billing/v1/cloud_billing/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb deleted file mode 100644 index e6ca150d8fc0..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/client.rb +++ /dev/null @@ -1,1484 +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/billing/v1/cloud_billing_pb" -require "google/cloud/billing/v1/cloud_billing/rest/service_stub" - -module Google - module Cloud - module Billing - module V1 - module CloudBilling - module Rest - ## - # REST client for the CloudBilling service. - # - # Retrieves the Google Cloud Console billing accounts and associates them with - # projects. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_billing_stub - - ## - # Configure the CloudBilling Client class. - # - # See {::Google::Cloud::Billing::V1::CloudBilling::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudBilling clients - # ::Google::Cloud::Billing::V1::CloudBilling::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", "Billing", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_billing_account.timeout = 60.0 - default_config.rpcs.get_billing_account.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_billing_accounts.timeout = 60.0 - default_config.rpcs.list_billing_accounts.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_billing_account.timeout = 60.0 - default_config.rpcs.update_billing_account.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_billing_account.timeout = 60.0 - - default_config.rpcs.list_project_billing_info.timeout = 60.0 - default_config.rpcs.list_project_billing_info.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_project_billing_info.timeout = 60.0 - default_config.rpcs.get_project_billing_info.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_project_billing_info.timeout = 60.0 - default_config.rpcs.update_project_billing_info.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_iam_policy.timeout = 60.0 - default_config.rpcs.get_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.set_iam_policy.timeout = 60.0 - default_config.rpcs.set_iam_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.test_iam_permissions.timeout = 60.0 - default_config.rpcs.test_iam_permissions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudBilling 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::Billing::V1::CloudBilling::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_billing_stub.universe_domain - end - - ## - # Create a new CloudBilling REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudBilling client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_billing_stub = ::Google::Cloud::Billing::V1::CloudBilling::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_billing_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_billing_stub.logger - end - - # Service calls - - ## - # Gets information about a billing account. The current authenticated user - # must be a [viewer of the billing - # account](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload get_billing_account(request, options = nil) - # Pass arguments to `get_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::GetBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_account(name: nil) - # Pass arguments to `get_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the billing account to retrieve. For - # example, `billingAccounts/012345-567890-ABCDEF`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::GetBillingAccountRequest.new - # - # # Call the get_billing_account method. - # result = client.get_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def get_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetBillingAccountRequest - - # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.get_billing_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the billing accounts that the current authenticated user has - # permission to - # [view](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload list_billing_accounts(request, options = nil) - # Pass arguments to `list_billing_accounts` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListBillingAccountsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_accounts(page_size: nil, page_token: nil, filter: nil, parent: nil) - # Pass arguments to `list_billing_accounts` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Requested page size. The maximum page size is 100; this is also the - # default. - # @param page_token [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListBillingAccounts` - # call. If unspecified, the first page of results is returned. - # @param filter [::String] - # Options for how to filter the returned billing accounts. - # This only supports filtering for - # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a - # single provided parent billing account. - # (for example, - # `master_billing_account=billingAccounts/012345-678901-ABCDEF`). - # Boolean algebra and other fields are not currently supported. - # @param parent [::String] - # Optional. The parent resource to list billing accounts from. - # Format: - # - `organizations/{organization_id}`, for example, - # `organizations/12345678` - # - `billingAccounts/{billing_account_id}`, for example, - # `billingAccounts/012345-567890-ABCDEF` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::BillingAccount>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListBillingAccountsRequest.new - # - # # Call the list_billing_accounts method. - # result = client.list_billing_accounts 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::Billing::V1::BillingAccount. - # p item - # end - # - def list_billing_accounts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListBillingAccountsRequest - - # Converts hash 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_billing_accounts.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::Billing::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_billing_accounts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_billing_accounts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.list_billing_accounts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_billing_stub, :list_billing_accounts, "billing_accounts", 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 - - ## - # Updates a billing account's fields. - # Currently the only field that can be edited is `display_name`. - # The current authenticated user must have the `billing.accounts.update` - # IAM permission, which is typically given to the - # [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) - # of the billing account. - # - # @overload update_billing_account(request, options = nil) - # Pass arguments to `update_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::UpdateBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_account(name: nil, account: nil, update_mask: nil) - # Pass arguments to `update_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the billing account resource to be updated. - # @param account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] - # Required. The billing account resource to replace the resource on the - # server. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The update mask applied to the resource. - # Only "display_name" is currently supported. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new - # - # # Call the update_billing_account method. - # result = client.update_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def update_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest - - # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.update_billing_account 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 - - ## - # This method creates [billing - # subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). - # - # Google Cloud resellers should use the - # Channel Services APIs, - # [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) - # and - # [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). - # - # When creating a subaccount, the current authenticated user must have the - # `billing.accounts.update` IAM permission on the parent account, which is - # typically given to billing account - # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - # This method will return an error if the parent account has not been - # provisioned for subaccounts. - # - # @overload create_billing_account(request, options = nil) - # Pass arguments to `create_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::CreateBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_billing_account(billing_account: nil, parent: nil) - # Pass arguments to `create_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param billing_account [::Google::Cloud::Billing::V1::BillingAccount, ::Hash] - # Required. The billing account resource to create. - # Currently CreateBillingAccount only supports subaccount creation, so - # any created billing accounts must be under a provided parent billing - # account. - # @param parent [::String] - # Optional. The parent to create a billing account from. - # Format: - # - `billingAccounts/{billing_account_id}`, for example, - # `billingAccounts/012345-567890-ABCDEF` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::CreateBillingAccountRequest.new - # - # # Call the create_billing_account method. - # result = client.create_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def create_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::CreateBillingAccountRequest - - # Converts hash 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_billing_account.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::Billing::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_billing_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.create_billing_account request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists the projects associated with a billing account. The current - # authenticated user must have the `billing.resourceAssociations.list` IAM - # permission, which is often given to billing account - # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload list_project_billing_info(request, options = nil) - # Pass arguments to `list_project_billing_info` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_project_billing_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the billing account associated with the - # projects that you want to list. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @param page_size [::Integer] - # Requested page size. The maximum page size is 100; this is also the - # default. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous `ListProjectBillingInfo` - # call. If unspecified, the first page of results is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::ProjectBillingInfo>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new - # - # # Call the list_project_billing_info method. - # result = client.list_project_billing_info 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::Billing::V1::ProjectBillingInfo. - # p item - # end - # - def list_project_billing_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest - - # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_project_billing_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.list_project_billing_info request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_billing_stub, :list_project_billing_info, "project_billing_info", 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 billing information for a project. The current authenticated user - # must have the `resourcemanager.projects.get` permission for the project, - # which can be granted by assigning the [Project - # Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) - # role. - # - # @overload get_project_billing_info(request, options = nil) - # Pass arguments to `get_project_billing_info` via a request object, either of type - # {::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_project_billing_info(name: nil) - # Pass arguments to `get_project_billing_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the project for which billing information is - # retrieved. For example, `projects/tokyo-rain-123`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new - # - # # Call the get_project_billing_info method. - # result = client.get_project_billing_info request - # - # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. - # p result - # - def get_project_billing_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest - - # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_project_billing_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.get_project_billing_info 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 - - ## - # Sets or updates the billing account associated with a project. You specify - # the new billing account by setting the `billing_account_name` in the - # `ProjectBillingInfo` resource to the resource name of a billing account. - # Associating a project with an open billing account enables billing on the - # project and allows charges for resource usage. If the project already had a - # billing account, this method changes the billing account used for resource - # usage charges. - # - # *Note:* Incurred charges that have not yet been reported in the transaction - # history of the Google Cloud Console might be billed to the new billing - # account, even if the charge occurred before the new billing account was - # assigned to the project. - # - # The current authenticated user must have ownership privileges for both - # the - # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo - # ) and the [billing - # account](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # You can disable billing on the project by setting the - # `billing_account_name` field to empty. This action disassociates the - # current billing account from the project. Any billable activity of your - # in-use services will stop, and your application could stop functioning as - # expected. Any unbilled charges to date will be billed to the previously - # associated account. The current authenticated user must be either an owner - # of the project or an owner of the billing account for the project. - # - # Note that associating a project with a *closed* billing account will have - # much the same effect as disabling billing on the project: any paid - # resources used by the project will be shut down. Thus, unless you wish to - # disable billing, you should always call this method with the name of an - # *open* billing account. - # - # @overload update_project_billing_info(request, options = nil) - # Pass arguments to `update_project_billing_info` via a request object, either of type - # {::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_project_billing_info(name: nil, project_billing_info: nil) - # Pass arguments to `update_project_billing_info` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the project associated with the billing - # information that you want to update. For example, - # `projects/tokyo-rain-123`. - # @param project_billing_info [::Google::Cloud::Billing::V1::ProjectBillingInfo, ::Hash] - # The new billing information for the project. Output-only fields are - # ignored; thus, you can leave empty all fields except - # `billing_account_name`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new - # - # # Call the update_project_billing_info method. - # result = client.update_project_billing_info request - # - # # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. - # p result - # - def update_project_billing_info request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest - - # Converts hash 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_project_billing_info.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::Billing::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_project_billing_info.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_project_billing_info.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.update_project_billing_info 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 the access control policy for a billing account. - # The caller must have the `billing.accounts.getIamPolicy` permission on the - # account, which is often given to billing account - # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload get_iam_policy(request, options = nil) - # Pass arguments to `get_iam_policy` via a request object, either of type - # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_iam_policy(resource: nil, options: nil) - # Pass arguments to `get_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::GetIamPolicyRequest.new - # - # # Call the get_iam_policy method. - # result = client.get_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def get_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest - - # Converts hash 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_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::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_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.get_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Sets the access control policy for a billing account. Replaces any existing - # policy. - # The caller must have the `billing.accounts.setIamPolicy` permission on the - # account, which is often given to billing account - # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # @overload set_iam_policy(request, options = nil) - # Pass arguments to `set_iam_policy` via a request object, either of type - # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil) - # Pass arguments to `set_iam_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @param policy [::Google::Iam::V1::Policy, ::Hash] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::SetIamPolicyRequest.new - # - # # Call the set_iam_policy method. - # result = client.set_iam_policy request - # - # # The returned object is of type Google::Iam::V1::Policy. - # p result - # - def set_iam_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest - - # Converts hash 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.set_iam_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::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.set_iam_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.set_iam_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.set_iam_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Tests the access control policy for a billing account. This method takes - # the resource and a set of permissions as input and returns the subset of - # the input permissions that the caller is allowed for that resource. - # - # @overload test_iam_permissions(request, options = nil) - # Pass arguments to `test_iam_permissions` via a request object, either of type - # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload test_iam_permissions(resource: nil, permissions: nil) - # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param resource [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @param permissions [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::V1::TestIamPermissionsRequest.new - # - # # Call the test_iam_permissions method. - # result = client.test_iam_permissions request - # - # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - # p result - # - def test_iam_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest - - # Converts hash 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.test_iam_permissions.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::Billing::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.test_iam_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.test_iam_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.test_iam_permissions 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 - - ## - # Changes which parent organization a billing account belongs to. - # - # @overload move_billing_account(request, options = nil) - # Pass arguments to `move_billing_account` via a request object, either of type - # {::Google::Cloud::Billing::V1::MoveBillingAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload move_billing_account(name: nil, destination_parent: nil) - # Pass arguments to `move_billing_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the billing account to move. - # Must be of the form `billingAccounts/{billing_account_id}`. - # The specified billing account cannot be a subaccount, since a subaccount - # always belongs to the same organization as its parent account. - # @param destination_parent [::String] - # Required. The resource name of the Organization to move - # the billing account under. - # Must be of the form `organizations/{organization_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new - # - # # Call the move_billing_account method. - # result = client.move_billing_account request - # - # # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - # p result - # - def move_billing_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::MoveBillingAccountRequest - - # Converts hash 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.move_billing_account.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::Billing::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.move_billing_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.move_billing_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_billing_stub.move_billing_account 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 CloudBilling REST API. - # - # This class represents the configuration for CloudBilling 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::Billing::V1::CloudBilling::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_billing_account to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_billing_account.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_billing_account.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 = "cloudbilling.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 CloudBilling 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 `get_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_billing_account - ## - # RPC-specific configuration for `list_billing_accounts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_billing_accounts - ## - # RPC-specific configuration for `update_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :update_billing_account - ## - # RPC-specific configuration for `create_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :create_billing_account - ## - # RPC-specific configuration for `list_project_billing_info` - # @return [::Gapic::Config::Method] - # - attr_reader :list_project_billing_info - ## - # RPC-specific configuration for `get_project_billing_info` - # @return [::Gapic::Config::Method] - # - attr_reader :get_project_billing_info - ## - # RPC-specific configuration for `update_project_billing_info` - # @return [::Gapic::Config::Method] - # - attr_reader :update_project_billing_info - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - ## - # RPC-specific configuration for `move_billing_account` - # @return [::Gapic::Config::Method] - # - attr_reader :move_billing_account - - # @private - def initialize parent_rpcs = nil - get_billing_account_config = parent_rpcs.get_billing_account if parent_rpcs.respond_to? :get_billing_account - @get_billing_account = ::Gapic::Config::Method.new get_billing_account_config - list_billing_accounts_config = parent_rpcs.list_billing_accounts if parent_rpcs.respond_to? :list_billing_accounts - @list_billing_accounts = ::Gapic::Config::Method.new list_billing_accounts_config - update_billing_account_config = parent_rpcs.update_billing_account if parent_rpcs.respond_to? :update_billing_account - @update_billing_account = ::Gapic::Config::Method.new update_billing_account_config - create_billing_account_config = parent_rpcs.create_billing_account if parent_rpcs.respond_to? :create_billing_account - @create_billing_account = ::Gapic::Config::Method.new create_billing_account_config - list_project_billing_info_config = parent_rpcs.list_project_billing_info if parent_rpcs.respond_to? :list_project_billing_info - @list_project_billing_info = ::Gapic::Config::Method.new list_project_billing_info_config - get_project_billing_info_config = parent_rpcs.get_project_billing_info if parent_rpcs.respond_to? :get_project_billing_info - @get_project_billing_info = ::Gapic::Config::Method.new get_project_billing_info_config - update_project_billing_info_config = parent_rpcs.update_project_billing_info if parent_rpcs.respond_to? :update_project_billing_info - @update_project_billing_info = ::Gapic::Config::Method.new update_project_billing_info_config - get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy - @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config - set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy - @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config - test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions - @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config - move_billing_account_config = parent_rpcs.move_billing_account if parent_rpcs.respond_to? :move_billing_account - @move_billing_account = ::Gapic::Config::Method.new move_billing_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb deleted file mode 100644 index 1fc692b95281..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing/rest/service_stub.rb +++ /dev/null @@ -1,792 +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/billing/v1/cloud_billing_pb" - -module Google - module Cloud - module Billing - module V1 - module CloudBilling - module Rest - ## - # REST service stub for the CloudBilling service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::GetBillingAccountRequest] - # 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::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # A result object deserialized from the server's reply - def get_billing_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_billing_account_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_billing_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::BillingAccount.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_billing_accounts REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListBillingAccountsRequest] - # 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::Billing::V1::ListBillingAccountsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ListBillingAccountsResponse] - # A result object deserialized from the server's reply - def list_billing_accounts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_billing_accounts_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_billing_accounts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::ListBillingAccountsResponse.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_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest] - # 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::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # A result object deserialized from the server's reply - def update_billing_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_billing_account_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_billing_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::BillingAccount.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_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::CreateBillingAccountRequest] - # 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::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # A result object deserialized from the server's reply - def create_billing_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_billing_account_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_billing_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::BillingAccount.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_project_billing_info REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest] - # 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::Billing::V1::ListProjectBillingInfoResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse] - # A result object deserialized from the server's reply - def list_project_billing_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_project_billing_info_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_project_billing_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse.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_project_billing_info REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest] - # 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::Billing::V1::ProjectBillingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # A result object deserialized from the server's reply - def get_project_billing_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_project_billing_info_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_project_billing_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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_project_billing_info REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest] - # 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::Billing::V1::ProjectBillingInfo] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # A result object deserialized from the server's reply - def update_project_billing_info request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_project_billing_info_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_project_billing_info", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # 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::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def get_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # 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::Iam::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::Policy] - # A result object deserialized from the server's reply - def set_iam_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "set_iam_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # 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::Iam::V1::TestIamPermissionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::V1::TestIamPermissionsResponse] - # A result object deserialized from the server's reply - def test_iam_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_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: "test_iam_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the move_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::MoveBillingAccountRequest] - # 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::Billing::V1::BillingAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # A result object deserialized from the server's reply - def move_billing_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_move_billing_account_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: "move_billing_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::BillingAccount.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::GetBillingAccountRequest] - # 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_billing_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_billing_accounts REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListBillingAccountsRequest] - # 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_billing_accounts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/billingAccounts", - matches: [] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/billingAccounts", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/subAccounts", - matches: [ - ["parent", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::UpdateBillingAccountRequest] - # 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_billing_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "account", - matches: [ - ["name", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::CreateBillingAccountRequest] - # 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_billing_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/billingAccounts", - body: "billing_account", - matches: [] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/billingAccounts", - body: "billing_account", - matches: [ - ["parent", %r{^organizations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/subAccounts", - body: "billing_account", - matches: [ - ["parent", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_project_billing_info REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest] - # 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_project_billing_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/projects", - matches: [ - ["name", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_project_billing_info REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest] - # 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_project_billing_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/billingInfo", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_project_billing_info REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest] - # 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_project_billing_info_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{name}/billingInfo", - body: "project_billing_info", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest] - # 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_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the set_iam_policy REST call - # - # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_set_iam_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - body: "*", - matches: [ - ["resource", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the test_iam_permissions REST call - # - # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_test_iam_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - body: "*", - matches: [ - ["resource", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the move_billing_account REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::MoveBillingAccountRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_move_billing_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:move", - body: "*", - matches: [ - ["name", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{destination_parent}/{name}:move", - matches: [ - ["destination_parent", %r{^organizations/[^/]+/?$}, false], - ["name", %r{^billingAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb deleted file mode 100644 index dc797afffb21..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/billing/v1/cloud_billing.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/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n+google/cloud/billing/v1/cloud_billing.proto\x12\x17google.cloud.billing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a google/protobuf/field_mask.proto\"\x83\x03\n\x0e\x42illingAccount\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x03\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\x04open\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x1e\n\x16master_billing_account\x18\x04 \x01(\t\x12\x13\n\x06parent\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rcurrency_code\x18\x07 \x01(\tB\x03\xe0\x41\x01:\xb4\x01\xea\x41\xb0\x01\n*cloudbilling.googleapis.com/BillingAccount\x12!billingAccounts/{billing_account}\x12>organizations/{organization}/billingAccounts/{billing_account}*\x0f\x62illingAccounts2\x0e\x62illingAccount\"\xd1\x01\n\x12ProjectBillingInfo\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x62illing_account_name\x18\x03 \x01(\t\x12\x1c\n\x0f\x62illing_enabled\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03:S\xea\x41P\n.cloudbilling.googleapis.com/ProjectBillingInfo\x12\x1eprojects/{project}/billingInfo\"\\\n\x18GetBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\"h\n\x1aListBillingAccountsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x03 \x01(\t\x12\x13\n\x06parent\x18\x04 \x01(\tB\x03\xe0\x41\x01\"y\n\x1bListBillingAccountsResponse\x12\x41\n\x10\x62illing_accounts\x18\x01 \x03(\x0b\x32\'.google.cloud.billing.v1.BillingAccount\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x1b\x43reateBillingAccountRequest\x12\x45\n\x0f\x62illing_account\x18\x01 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\x12\x13\n\x06parent\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xcf\x01\n\x1bUpdateBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12=\n\x07\x61\x63\x63ount\x18\x02 \x01(\x0b\x32\'.google.cloud.billing.v1.BillingAccountB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x88\x01\n\x1dListProjectBillingInfoRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x84\x01\n\x1eListProjectBillingInfoResponse\x12I\n\x14project_billing_info\x18\x01 \x03(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"a\n\x1cGetProjectBillingInfoRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\"\x7f\n\x1fUpdateProjectBillingInfoRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12I\n\x14project_billing_info\x18\x02 \x01(\x0b\x32+.google.cloud.billing.v1.ProjectBillingInfo\"\xb3\x01\n\x19MoveBillingAccountRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12T\n\x12\x64\x65stination_parent\x18\x02 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudresourcemanager.googleapis.com/Organization2\xa1\x13\n\x0c\x43loudBilling\x12\x9c\x01\n\x11GetBillingAccount\x12\x31.google.cloud.billing.v1.GetBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=billingAccounts/*}\x12\x88\x02\n\x13ListBillingAccounts\x12\x33.google.cloud.billing.v1.ListBillingAccountsRequest\x1a\x34.google.cloud.billing.v1.ListBillingAccountsResponse\"\x85\x01\xda\x41\x00\xda\x41\x06parent\x82\xd3\xe4\x93\x02s\x12\x13/v1/billingAccountsZ.\x12,/v1/{parent=organizations/*}/billingAccountsZ,\x12*/v1/{parent=billingAccounts/*}/subAccounts\x12\xb3\x01\n\x14UpdateBillingAccount\x12\x34.google.cloud.billing.v1.UpdateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"<\xda\x41\x0cname,account\x82\xd3\xe4\x93\x02\'2\x1c/v1/{name=billingAccounts/*}:\x07\x61\x63\x63ount\x12\xd0\x02\n\x14\x43reateBillingAccount\x12\x34.google.cloud.billing.v1.CreateBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"\xd8\x01\xda\x41\x0f\x62illing_account\xda\x41\x16\x62illing_account,parent\x82\xd3\xe4\x93\x02\xa6\x01\"\x13/v1/billingAccounts:\x0f\x62illing_accountZ?\",/v1/{parent=organizations/*}/billingAccounts:\x0f\x62illing_accountZ=\"*/v1/{parent=billingAccounts/*}/subAccounts:\x0f\x62illing_account\x12\xbf\x01\n\x16ListProjectBillingInfo\x12\x36.google.cloud.billing.v1.ListProjectBillingInfoRequest\x1a\x37.google.cloud.billing.v1.ListProjectBillingInfoResponse\"4\xda\x41\x04name\x82\xd3\xe4\x93\x02\'\x12%/v1/{name=billingAccounts/*}/projects\x12\xad\x01\n\x15GetProjectBillingInfo\x12\x35.google.cloud.billing.v1.GetProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*}/billingInfo\x12\xde\x01\n\x18UpdateProjectBillingInfo\x12\x38.google.cloud.billing.v1.UpdateProjectBillingInfoRequest\x1a+.google.cloud.billing.v1.ProjectBillingInfo\"[\xda\x41\x19name,project_billing_info\x82\xd3\xe4\x93\x02\x39\x1a!/v1/{name=projects/*}/billingInfo:\x14project_billing_info\x12\x8b\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"@\xda\x41\x08resource\x82\xd3\xe4\x93\x02/\x12-/v1/{resource=billingAccounts/*}:getIamPolicy\x12\x95\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"J\xda\x41\x0fresource,policy\x82\xd3\xe4\x93\x02\x32\"-/v1/{resource=billingAccounts/*}:setIamPolicy:\x01*\x12\xc0\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"U\xda\x41\x14resource,permissions\x82\xd3\xe4\x93\x02\x38\"3/v1/{resource=billingAccounts/*}:testIamPermissions:\x01*\x12\xe9\x01\n\x12MoveBillingAccount\x12\x32.google.cloud.billing.v1.MoveBillingAccountRequest\x1a\'.google.cloud.billing.v1.BillingAccount\"v\x82\xd3\xe4\x93\x02p\"!/v1/{name=billingAccounts/*}:move:\x01*ZH\x12\x46/v1/{destination_parent=organizations/*}/{name=billingAccounts/*}:move\x1a\xb5\x01\xca\x41\x1b\x63loudbilling.googleapis.com\xd2\x41\x93\x01https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-billing.readonly,https://www.googleapis.com/auth/cloud-platformB\x80\x02\n\x1b\x63om.google.cloud.billing.v1B\x11\x43loudBillingProtoP\x01Z5cloud.google.com/go/billing/apiv1/billingpb;billingpb\xea\x41\x41\n+cloudresourcemanager.googleapis.com/Project\x12\x12projects/{project}\xea\x41P\n0cloudresourcemanager.googleapis.com/Organization\x12\x1corganizations/{organization}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Billing - module V1 - BillingAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.BillingAccount").msgclass - ProjectBillingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ProjectBillingInfo").msgclass - GetBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GetBillingAccountRequest").msgclass - ListBillingAccountsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListBillingAccountsRequest").msgclass - ListBillingAccountsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListBillingAccountsResponse").msgclass - CreateBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.CreateBillingAccountRequest").msgclass - UpdateBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.UpdateBillingAccountRequest").msgclass - ListProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListProjectBillingInfoRequest").msgclass - ListProjectBillingInfoResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListProjectBillingInfoResponse").msgclass - GetProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GetProjectBillingInfoRequest").msgclass - UpdateProjectBillingInfoRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.UpdateProjectBillingInfoRequest").msgclass - MoveBillingAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.MoveBillingAccountRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb deleted file mode 100644 index f3b66e53c0fc..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_billing_services_pb.rb +++ /dev/null @@ -1,136 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/billing/v1/cloud_billing.proto for package 'google.cloud.billing.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/billing/v1/cloud_billing_pb' - -module Google - module Cloud - module Billing - module V1 - module CloudBilling - # Retrieves the Google Cloud Console billing accounts and associates them with - # projects. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.billing.v1.CloudBilling' - - # Gets information about a billing account. The current authenticated user - # must be a [viewer of the billing - # account](https://cloud.google.com/billing/docs/how-to/billing-access). - rpc :GetBillingAccount, ::Google::Cloud::Billing::V1::GetBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount - # Lists the billing accounts that the current authenticated user has - # permission to - # [view](https://cloud.google.com/billing/docs/how-to/billing-access). - rpc :ListBillingAccounts, ::Google::Cloud::Billing::V1::ListBillingAccountsRequest, ::Google::Cloud::Billing::V1::ListBillingAccountsResponse - # Updates a billing account's fields. - # Currently the only field that can be edited is `display_name`. - # The current authenticated user must have the `billing.accounts.update` - # IAM permission, which is typically given to the - # [administrator](https://cloud.google.com/billing/docs/how-to/billing-access) - # of the billing account. - rpc :UpdateBillingAccount, ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount - # This method creates [billing - # subaccounts](https://cloud.google.com/billing/docs/concepts#subaccounts). - # - # Google Cloud resellers should use the - # Channel Services APIs, - # [accounts.customers.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create) - # and - # [accounts.customers.entitlements.create](https://cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create). - # - # When creating a subaccount, the current authenticated user must have the - # `billing.accounts.update` IAM permission on the parent account, which is - # typically given to billing account - # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - # This method will return an error if the parent account has not been - # provisioned for subaccounts. - rpc :CreateBillingAccount, ::Google::Cloud::Billing::V1::CreateBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount - # Lists the projects associated with a billing account. The current - # authenticated user must have the `billing.resourceAssociations.list` IAM - # permission, which is often given to billing account - # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - rpc :ListProjectBillingInfo, ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse - # Gets the billing information for a project. The current authenticated user - # must have the `resourcemanager.projects.get` permission for the project, - # which can be granted by assigning the [Project - # Viewer](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) - # role. - rpc :GetProjectBillingInfo, ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, ::Google::Cloud::Billing::V1::ProjectBillingInfo - # Sets or updates the billing account associated with a project. You specify - # the new billing account by setting the `billing_account_name` in the - # `ProjectBillingInfo` resource to the resource name of a billing account. - # Associating a project with an open billing account enables billing on the - # project and allows charges for resource usage. If the project already had a - # billing account, this method changes the billing account used for resource - # usage charges. - # - # *Note:* Incurred charges that have not yet been reported in the transaction - # history of the Google Cloud Console might be billed to the new billing - # account, even if the charge occurred before the new billing account was - # assigned to the project. - # - # The current authenticated user must have ownership privileges for both - # the - # [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo - # ) and the [billing - # account](https://cloud.google.com/billing/docs/how-to/billing-access). - # - # You can disable billing on the project by setting the - # `billing_account_name` field to empty. This action disassociates the - # current billing account from the project. Any billable activity of your - # in-use services will stop, and your application could stop functioning as - # expected. Any unbilled charges to date will be billed to the previously - # associated account. The current authenticated user must be either an owner - # of the project or an owner of the billing account for the project. - # - # Note that associating a project with a *closed* billing account will have - # much the same effect as disabling billing on the project: any paid - # resources used by the project will be shut down. Thus, unless you wish to - # disable billing, you should always call this method with the name of an - # *open* billing account. - rpc :UpdateProjectBillingInfo, ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, ::Google::Cloud::Billing::V1::ProjectBillingInfo - # Gets the access control policy for a billing account. - # The caller must have the `billing.accounts.getIamPolicy` permission on the - # account, which is often given to billing account - # [viewers](https://cloud.google.com/billing/docs/how-to/billing-access). - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Sets the access control policy for a billing account. Replaces any existing - # policy. - # The caller must have the `billing.accounts.setIamPolicy` permission on the - # account, which is often given to billing account - # [administrators](https://cloud.google.com/billing/docs/how-to/billing-access). - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Tests the access control policy for a billing account. This method takes - # the resource and a set of permissions as input and returns the subset of - # the input permissions that the caller is allowed for that resource. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - # Changes which parent organization a billing account belongs to. - rpc :MoveBillingAccount, ::Google::Cloud::Billing::V1::MoveBillingAccountRequest, ::Google::Cloud::Billing::V1::BillingAccount - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb deleted file mode 100644 index 59fc46362306..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/billing/v1/version" - -require "google/cloud/billing/v1/cloud_catalog/credentials" -require "google/cloud/billing/v1/cloud_catalog/paths" -require "google/cloud/billing/v1/cloud_catalog/client" -require "google/cloud/billing/v1/cloud_catalog/rest" - -module Google - module Cloud - module Billing - module V1 - ## - # A catalog of Google Cloud Platform services and SKUs. - # Provides pricing information and metadata on Google Cloud Platform services - # and SKUs. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/billing/v1/cloud_catalog" - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/billing/v1/cloud_catalog/rest" - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new - # - module CloudCatalog - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_catalog", "helpers.rb" -require "google/cloud/billing/v1/cloud_catalog/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb deleted file mode 100644 index 0ff66b9822eb..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/client.rb +++ /dev/null @@ -1,605 +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/billing/v1/cloud_catalog_pb" - -module Google - module Cloud - module Billing - module V1 - module CloudCatalog - ## - # Client for the CloudCatalog service. - # - # A catalog of Google Cloud Platform services and SKUs. - # Provides pricing information and metadata on Google Cloud Platform services - # and SKUs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_catalog_stub - - ## - # Configure the CloudCatalog Client class. - # - # See {::Google::Cloud::Billing::V1::CloudCatalog::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudCatalog clients - # ::Google::Cloud::Billing::V1::CloudCatalog::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", "Billing", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_services.timeout = 60.0 - - default_config.rpcs.list_skus.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudCatalog 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::Billing::V1::CloudCatalog::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_catalog_stub.universe_domain - end - - ## - # Create a new CloudCatalog client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudCatalog 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/billing/v1/cloud_catalog_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_catalog_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Billing::V1::CloudCatalog::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_catalog_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_catalog_stub.logger - end - - # Service calls - - ## - # Lists all public cloud services. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_services(page_size: nil, page_token: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Requested page size. Defaults to 5000. - # @param page_token [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListServices` - # call. If unspecified, the first page of results is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudCatalog::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Billing::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_catalog_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all publicly available SKUs for a given cloud service. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the service. - # Example: "services/6F81-5844-456A" - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional inclusive start time of the time range for which the pricing - # versions will be returned. Timestamps in the future are not allowed. - # The time range has to be within a single calendar month in - # America/Los_Angeles timezone. Time range as a whole is optional. If not - # specified, the latest pricing will be returned (up to 12 hours old at - # most). - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional exclusive end time of the time range for which the pricing - # versions will be returned. Timestamps in the future are not allowed. - # The time range has to be within a single calendar month in - # America/Los_Angeles timezone. Time range as a whole is optional. If not - # specified, the latest pricing will be returned (up to 12 hours old at - # most). - # @param currency_code [::String] - # The ISO 4217 currency code for the pricing info in the response proto. - # Will use the conversion rate as of start_time. - # Optional. If not specified USD will be used. - # @param page_size [::Integer] - # Requested page size. Defaults to 5000. - # @param page_token [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListSkus` - # call. If unspecified, the first page of results is returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudCatalog::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Billing::V1::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::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_skus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_catalog_stub.call_rpc :list_skus, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_catalog_stub, :list_skus, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudCatalog API. - # - # This class represents the configuration for CloudCatalog, - # 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::Billing::V1::CloudCatalog::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Billing::V1::CloudCatalog::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::Billing::V1::CloudCatalog::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 = "cloudbilling.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 CloudCatalog 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_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb deleted file mode 100644 index 42a05a48cd3f..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/credentials.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Billing - module V1 - module CloudCatalog - # Credentials for the CloudCatalog API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-billing", - "https://www.googleapis.com/auth/cloud-billing.readonly", - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BILLING_CREDENTIALS", - "BILLING_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BILLING_CREDENTIALS_JSON", - "BILLING_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-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.rb deleted file mode 100644 index 51cadd42d8c6..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/paths.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! - - -module Google - module Cloud - module Billing - module V1 - module CloudCatalog - # Path helper methods for the CloudCatalog API. - module Paths - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `services/{service}` - # - # @param service [String] - # - # @return [::String] - def service_path service: - "services/#{service}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.rb deleted file mode 100644 index a6a690402016..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest.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! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/billing/v1/version" - -require "google/cloud/billing/v1/cloud_catalog/credentials" -require "google/cloud/billing/v1/cloud_catalog/paths" -require "google/cloud/billing/v1/cloud_catalog/rest/client" - -module Google - module Cloud - module Billing - module V1 - ## - # A catalog of Google Cloud Platform services and SKUs. - # Provides pricing information and metadata on Google Cloud Platform services - # and SKUs. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/billing/v1/cloud_catalog/rest" - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new - # - module CloudCatalog - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/billing/v1/cloud_catalog/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb deleted file mode 100644 index 715c4e134c51..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/client.rb +++ /dev/null @@ -1,556 +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/billing/v1/cloud_catalog_pb" -require "google/cloud/billing/v1/cloud_catalog/rest/service_stub" - -module Google - module Cloud - module Billing - module V1 - module CloudCatalog - module Rest - ## - # REST client for the CloudCatalog service. - # - # A catalog of Google Cloud Platform services and SKUs. - # Provides pricing information and metadata on Google Cloud Platform services - # and SKUs. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbilling.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_catalog_stub - - ## - # Configure the CloudCatalog Client class. - # - # See {::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudCatalog clients - # ::Google::Cloud::Billing::V1::CloudCatalog::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", "Billing", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_services.timeout = 60.0 - - default_config.rpcs.list_skus.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudCatalog 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::Billing::V1::CloudCatalog::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_catalog_stub.universe_domain - end - - ## - # Create a new CloudCatalog REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudCatalog client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_catalog_stub = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_catalog_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_catalog_stub.logger - end - - # Service calls - - ## - # Lists all public cloud services. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_services(page_size: nil, page_token: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param page_size [::Integer] - # Requested page size. Defaults to 5000. - # @param page_token [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListServices` - # call. If unspecified, the first page of results is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Billing::V1::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::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_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_catalog_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_catalog_stub, :list_services, "services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all publicly available SKUs for a given cloud service. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::Billing::V1::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Billing::V1::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_skus(parent: nil, start_time: nil, end_time: nil, currency_code: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The name of the service. - # Example: "services/6F81-5844-456A" - # @param start_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional inclusive start time of the time range for which the pricing - # versions will be returned. Timestamps in the future are not allowed. - # The time range has to be within a single calendar month in - # America/Los_Angeles timezone. Time range as a whole is optional. If not - # specified, the latest pricing will be returned (up to 12 hours old at - # most). - # @param end_time [::Google::Protobuf::Timestamp, ::Hash] - # Optional exclusive end time of the time range for which the pricing - # versions will be returned. Timestamps in the future are not allowed. - # The time range has to be within a single calendar month in - # America/Los_Angeles timezone. Time range as a whole is optional. If not - # specified, the latest pricing will be returned (up to 12 hours old at - # most). - # @param currency_code [::String] - # The ISO 4217 currency code for the pricing info in the response proto. - # Will use the conversion rate as of start_time. - # Optional. If not specified USD will be used. - # @param page_size [::Integer] - # Requested page size. Defaults to 5000. - # @param page_token [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListSkus` - # call. If unspecified, the first page of results is returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Billing::V1::Sku>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/billing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Billing::V1::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Billing::V1::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Billing::V1::ListSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Billing::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_skus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_catalog_stub.list_skus request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_catalog_stub, :list_skus, "skus", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CloudCatalog REST API. - # - # This class represents the configuration for CloudCatalog 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::Billing::V1::CloudCatalog::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `: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 = "cloudbilling.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 CloudCatalog 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_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb deleted file mode 100644 index b60dfcea11a1..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog/rest/service_stub.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/billing/v1/cloud_catalog_pb" - -module Google - module Cloud - module Billing - module V1 - module CloudCatalog - module Rest - ## - # REST service stub for the CloudCatalog service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_services REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ListServicesResponse] - # A result object deserialized from the server's reply - def list_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_skus REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListSkusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Billing::V1::ListSkusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Billing::V1::ListSkusResponse] - # A result object deserialized from the server's reply - def list_skus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_skus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Billing::V1::ListSkusResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/services", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_skus REST call - # - # @param request_pb [::Google::Cloud::Billing::V1::ListSkusRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_skus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/skus", - matches: [ - ["parent", %r{^services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb deleted file mode 100644 index e40749f6ead2..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/billing/v1/cloud_catalog.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/protobuf/timestamp_pb' -require 'google/type/money_pb' - - -descriptor_data = "\n+google/cloud/billing/v1/cloud_catalog.proto\x12\x17google.cloud.billing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/type/money.proto\"\x9d\x01\n\x07Service\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nservice_id\x18\x02 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x03 \x01(\t\x12\x1c\n\x14\x62usiness_entity_name\x18\x04 \x01(\t:<\xea\x41\x39\n#cloudbilling.googleapis.com/Service\x12\x12services/{service}\"\xe2\x02\n\x03Sku\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06sku_id\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x33\n\x08\x63\x61tegory\x18\x04 \x01(\x0b\x32!.google.cloud.billing.v1.Category\x12\x17\n\x0fservice_regions\x18\x05 \x03(\t\x12:\n\x0cpricing_info\x18\x06 \x03(\x0b\x32$.google.cloud.billing.v1.PricingInfo\x12\x1d\n\x15service_provider_name\x18\x07 \x01(\t\x12:\n\x0cgeo_taxonomy\x18\x08 \x01(\x0b\x32$.google.cloud.billing.v1.GeoTaxonomy:C\xea\x41@\n\x1f\x63loudbilling.googleapis.com/Sku\x12\x1dservices/{service}/skus/{sku}\"m\n\x08\x43\x61tegory\x12\x1c\n\x14service_display_name\x18\x01 \x01(\t\x12\x17\n\x0fresource_family\x18\x02 \x01(\t\x12\x16\n\x0eresource_group\x18\x03 \x01(\t\x12\x12\n\nusage_type\x18\x04 \x01(\t\"\x80\x02\n\x0bPricingInfo\x12\x32\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07summary\x18\x02 \x01(\t\x12\x46\n\x12pricing_expression\x18\x03 \x01(\x0b\x32*.google.cloud.billing.v1.PricingExpression\x12\x42\n\x10\x61ggregation_info\x18\x04 \x01(\x0b\x32(.google.cloud.billing.v1.AggregationInfo\x12 \n\x18\x63urrency_conversion_rate\x18\x05 \x01(\x01\"\xd3\x02\n\x11PricingExpression\x12\x12\n\nusage_unit\x18\x01 \x01(\t\x12\x18\n\x10\x64isplay_quantity\x18\x02 \x01(\x01\x12I\n\x0ctiered_rates\x18\x03 \x03(\x0b\x32\x33.google.cloud.billing.v1.PricingExpression.TierRate\x12\x1e\n\x16usage_unit_description\x18\x04 \x01(\t\x12\x11\n\tbase_unit\x18\x05 \x01(\t\x12\x1d\n\x15\x62\x61se_unit_description\x18\x06 \x01(\t\x12#\n\x1b\x62\x61se_unit_conversion_factor\x18\x07 \x01(\x01\x1aN\n\x08TierRate\x12\x1a\n\x12start_usage_amount\x18\x01 \x01(\x01\x12&\n\nunit_price\x18\x02 \x01(\x0b\x32\x12.google.type.Money\"\x84\x03\n\x0f\x41ggregationInfo\x12T\n\x11\x61ggregation_level\x18\x01 \x01(\x0e\x32\x39.google.cloud.billing.v1.AggregationInfo.AggregationLevel\x12Z\n\x14\x61ggregation_interval\x18\x02 \x01(\x0e\x32<.google.cloud.billing.v1.AggregationInfo.AggregationInterval\x12\x19\n\x11\x61ggregation_count\x18\x03 \x01(\x05\"O\n\x10\x41ggregationLevel\x12!\n\x1d\x41GGREGATION_LEVEL_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41\x43\x43OUNT\x10\x01\x12\x0b\n\x07PROJECT\x10\x02\"S\n\x13\x41ggregationInterval\x12$\n AGGREGATION_INTERVAL_UNSPECIFIED\x10\x00\x12\t\n\x05\x44\x41ILY\x10\x01\x12\x0b\n\x07MONTHLY\x10\x02\"\xa3\x01\n\x0bGeoTaxonomy\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).google.cloud.billing.v1.GeoTaxonomy.Type\x12\x0f\n\x07regions\x18\x02 \x03(\t\"J\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GLOBAL\x10\x01\x12\x0c\n\x08REGIONAL\x10\x02\x12\x12\n\x0eMULTI_REGIONAL\x10\x03\"<\n\x13ListServicesRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\"c\n\x14ListServicesResponse\x12\x32\n\x08services\x18\x01 \x03(\x0b\x32 .google.cloud.billing.v1.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xea\x01\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#cloudbilling.googleapis.com/Service\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x15\n\rcurrency_code\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12\x12\n\npage_token\x18\x06 \x01(\t\"W\n\x10ListSkusResponse\x12*\n\x04skus\x18\x01 \x03(\x0b\x32\x1c.google.cloud.billing.v1.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xde\x03\n\x0c\x43loudCatalog\x12\x84\x01\n\x0cListServices\x12,.google.cloud.billing.v1.ListServicesRequest\x1a-.google.cloud.billing.v1.ListServicesResponse\"\x17\xda\x41\x00\x82\xd3\xe4\x93\x02\x0e\x12\x0c/v1/services\x12\x8e\x01\n\x08ListSkus\x12(.google.cloud.billing.v1.ListSkusRequest\x1a).google.cloud.billing.v1.ListSkusResponse\"-\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{parent=services/*}/skus\x1a\xb5\x01\xca\x41\x1b\x63loudbilling.googleapis.com\xd2\x41\x93\x01https://www.googleapis.com/auth/cloud-billing,https://www.googleapis.com/auth/cloud-billing.readonly,https://www.googleapis.com/auth/cloud-platformB\x8d\x01\n\x1b\x63om.google.cloud.billing.v1B\x11\x43loudCatalogProtoP\x01Z5cloud.google.com/go/billing/apiv1/billingpb;billingpb\xa2\x02\x07\x43LDCTLG\xaa\x02\x17Google.Cloud.Billing.V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Billing - module V1 - Service = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.Service").msgclass - Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.Sku").msgclass - Category = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.Category").msgclass - PricingInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.PricingInfo").msgclass - PricingExpression = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.PricingExpression").msgclass - PricingExpression::TierRate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.PricingExpression.TierRate").msgclass - AggregationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.AggregationInfo").msgclass - AggregationInfo::AggregationLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.AggregationInfo.AggregationLevel").enummodule - AggregationInfo::AggregationInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.AggregationInfo.AggregationInterval").enummodule - GeoTaxonomy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GeoTaxonomy").msgclass - GeoTaxonomy::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.GeoTaxonomy.Type").enummodule - ListServicesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListServicesRequest").msgclass - ListServicesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListServicesResponse").msgclass - ListSkusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListSkusRequest").msgclass - ListSkusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.billing.v1.ListSkusResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb deleted file mode 100644 index 1d1fc7617b64..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/cloud_catalog_services_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/billing/v1/cloud_catalog.proto for package 'google.cloud.billing.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/billing/v1/cloud_catalog_pb' - -module Google - module Cloud - module Billing - module V1 - module CloudCatalog - # A catalog of Google Cloud Platform services and SKUs. - # Provides pricing information and metadata on Google Cloud Platform services - # and SKUs. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.billing.v1.CloudCatalog' - - # Lists all public cloud services. - rpc :ListServices, ::Google::Cloud::Billing::V1::ListServicesRequest, ::Google::Cloud::Billing::V1::ListServicesResponse - # Lists all publicly available SKUs for a given cloud service. - rpc :ListSkus, ::Google::Cloud::Billing::V1::ListSkusRequest, ::Google::Cloud::Billing::V1::ListSkusResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb deleted file mode 100644 index d682da7fb8e8..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/billing/v1/cloud_billing/rest" -require "google/cloud/billing/v1/cloud_catalog/rest" -require "google/cloud/billing/v1/version" - -module Google - module Cloud - module Billing - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/billing/v1/rest" - # client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/version.rb b/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/v1/version.rb deleted file mode 100644 index a642717700c0..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/lib/google/cloud/billing/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 Billing - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md deleted file mode 100644 index d407f523c013..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Billing 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-billing-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb deleted file mode 100644 index 93232edac528..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_billing.rb +++ /dev/null @@ -1,276 +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 Billing - module V1 - # A billing account in the - # [Google Cloud Console](https://console.cloud.google.com/). You can assign a - # billing account to one or more projects. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the billing account. The resource name - # has the form `billingAccounts/{billing_account_id}`. For example, - # `billingAccounts/012345-567890-ABCDEF` would be the resource name for - # billing account `012345-567890-ABCDEF`. - # @!attribute [r] open - # @return [::Boolean] - # Output only. True if the billing account is open, and will therefore be - # charged for any usage on associated projects. False if the billing account - # is closed, and therefore projects associated with it are unable to use paid - # services. - # @!attribute [rw] display_name - # @return [::String] - # The display name given to the billing account, such as `My Billing - # Account`. This name is displayed in the Google Cloud Console. - # @!attribute [rw] master_billing_account - # @return [::String] - # If this account is a - # [subaccount](https://cloud.google.com/billing/docs/concepts), then this - # will be the resource name of the parent billing account that it is being - # resold through. - # Otherwise this will be empty. - # @!attribute [r] parent - # @return [::String] - # Output only. The billing account's parent resource identifier. - # Use the `MoveBillingAccount` method to update the account's parent resource - # if it is a organization. - # Format: - # - `organizations/{organization_id}`, for example, - # `organizations/12345678` - # - `billingAccounts/{billing_account_id}`, for example, - # `billingAccounts/012345-567890-ABCDEF` - # @!attribute [rw] currency_code - # @return [::String] - # Optional. The currency in which the billing account is billed and charged, - # represented as an ISO 4217 code such as `USD`. - # - # Billing account currency is determined at the time of billing account - # creation and cannot be updated subsequently, so this field should not be - # set on update requests. In addition, a subaccount always matches the - # currency of its parent billing account, so this field should not be set on - # subaccount creation requests. Clients can read this field to determine the - # currency of an existing billing account. - class BillingAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encapsulation of billing information for a Google Cloud Console project. A - # project has at most one associated billing account at a time (but a billing - # account can be assigned to multiple projects). - # @!attribute [r] name - # @return [::String] - # Output only. The resource name for the `ProjectBillingInfo`; has the form - # `projects/{project_id}/billingInfo`. For example, the resource name for the - # billing information for project `tokyo-rain-123` would be - # `projects/tokyo-rain-123/billingInfo`. - # @!attribute [r] project_id - # @return [::String] - # Output only. The ID of the project that this `ProjectBillingInfo` - # represents, such as `tokyo-rain-123`. This is a convenience field so that - # you don't need to parse the `name` field to obtain a project ID. - # @!attribute [rw] billing_account_name - # @return [::String] - # The resource name of the billing account associated with the project, if - # any. For example, `billingAccounts/012345-567890-ABCDEF`. - # @!attribute [r] billing_enabled - # @return [::Boolean] - # Output only. True if the project is associated with an open billing - # account, to which usage on the project is charged. False if the project is - # associated with a closed billing account, or no billing account at all, and - # therefore cannot use paid services. - class ProjectBillingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetBillingAccount`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the billing account to retrieve. For - # example, `billingAccounts/012345-567890-ABCDEF`. - class GetBillingAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ListBillingAccounts`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The maximum page size is 100; this is also the - # default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListBillingAccounts` - # call. If unspecified, the first page of results is returned. - # @!attribute [rw] filter - # @return [::String] - # Options for how to filter the returned billing accounts. - # This only supports filtering for - # [subaccounts](https://cloud.google.com/billing/docs/concepts) under a - # single provided parent billing account. - # (for example, - # `master_billing_account=billingAccounts/012345-678901-ABCDEF`). - # Boolean algebra and other fields are not currently supported. - # @!attribute [rw] parent - # @return [::String] - # Optional. The parent resource to list billing accounts from. - # Format: - # - `organizations/{organization_id}`, for example, - # `organizations/12345678` - # - `billingAccounts/{billing_account_id}`, for example, - # `billingAccounts/012345-567890-ABCDEF` - class ListBillingAccountsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `ListBillingAccounts`. - # @!attribute [rw] billing_accounts - # @return [::Array<::Google::Cloud::Billing::V1::BillingAccount>] - # A list of billing accounts. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. To retrieve the next page, - # call `ListBillingAccounts` again with the `page_token` field set to this - # value. This field is empty if there are no more results to retrieve. - class ListBillingAccountsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `CreateBillingAccount`. - # @!attribute [rw] billing_account - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # Required. The billing account resource to create. - # Currently CreateBillingAccount only supports subaccount creation, so - # any created billing accounts must be under a provided parent billing - # account. - # @!attribute [rw] parent - # @return [::String] - # Optional. The parent to create a billing account from. - # Format: - # - `billingAccounts/{billing_account_id}`, for example, - # `billingAccounts/012345-567890-ABCDEF` - class CreateBillingAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `UpdateBillingAccount`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the billing account resource to be updated. - # @!attribute [rw] account - # @return [::Google::Cloud::Billing::V1::BillingAccount] - # Required. The billing account resource to replace the resource on the - # server. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The update mask applied to the resource. - # Only "display_name" is currently supported. - class UpdateBillingAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ListProjectBillingInfo`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the billing account associated with the - # projects that you want to list. For example, - # `billingAccounts/012345-567890-ABCDEF`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The maximum page size is 100; this is also the - # default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous `ListProjectBillingInfo` - # call. If unspecified, the first page of results is returned. - class ListProjectBillingInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ListProjectBillingInfoResponse`. - # @!attribute [rw] project_billing_info - # @return [::Array<::Google::Cloud::Billing::V1::ProjectBillingInfo>] - # A list of `ProjectBillingInfo` resources representing the projects - # associated with the billing account. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. To retrieve the next page, - # call `ListProjectBillingInfo` again with the `page_token` field set to this - # value. This field is empty if there are no more results to retrieve. - class ListProjectBillingInfoResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetProjectBillingInfo`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the project for which billing information is - # retrieved. For example, `projects/tokyo-rain-123`. - class GetProjectBillingInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `UpdateProjectBillingInfo`. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the project associated with the billing - # information that you want to update. For example, - # `projects/tokyo-rain-123`. - # @!attribute [rw] project_billing_info - # @return [::Google::Cloud::Billing::V1::ProjectBillingInfo] - # The new billing information for the project. Output-only fields are - # ignored; thus, you can leave empty all fields except - # `billing_account_name`. - class UpdateProjectBillingInfoRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `MoveBillingAccount` RPC. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the billing account to move. - # Must be of the form `billingAccounts/{billing_account_id}`. - # The specified billing account cannot be a subaccount, since a subaccount - # always belongs to the same organization as its parent account. - # @!attribute [rw] destination_parent - # @return [::String] - # Required. The resource name of the Organization to move - # the billing account under. - # Must be of the form `organizations/{organization_id}`. - class MoveBillingAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb deleted file mode 100644 index 9075ac0bdd4b..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/cloud/billing/v1/cloud_catalog.rb +++ /dev/null @@ -1,352 +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 Billing - module V1 - # Encapsulates a single service in Google Cloud Platform. - # @!attribute [rw] name - # @return [::String] - # The resource name for the service. - # Example: "services/6F81-5844-456A" - # @!attribute [rw] service_id - # @return [::String] - # The identifier for the service. - # Example: "6F81-5844-456A" - # @!attribute [rw] display_name - # @return [::String] - # A human readable display name for this service. - # @!attribute [rw] business_entity_name - # @return [::String] - # The business under which the service is offered. - # Ex. "businessEntities/GCP", "businessEntities/Maps" - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Encapsulates a single SKU in Google Cloud - # @!attribute [rw] name - # @return [::String] - # The resource name for the SKU. - # Example: "services/6F81-5844-456A/skus/D041-B8A1-6E0B" - # @!attribute [rw] sku_id - # @return [::String] - # The identifier for the SKU. - # Example: "D041-B8A1-6E0B" - # @!attribute [rw] description - # @return [::String] - # A human readable description of the SKU, has a maximum length of 256 - # characters. - # @!attribute [rw] category - # @return [::Google::Cloud::Billing::V1::Category] - # The category hierarchy of this SKU, purely for organizational purpose. - # @!attribute [rw] service_regions - # @return [::Array<::String>] - # List of service regions this SKU is offered at. - # Example: "asia-east1" - # Service regions can be found at https://cloud.google.com/about/locations/ - # @!attribute [rw] pricing_info - # @return [::Array<::Google::Cloud::Billing::V1::PricingInfo>] - # A timeline of pricing info for this SKU in chronological order. - # @!attribute [rw] service_provider_name - # @return [::String] - # Identifies the service provider. - # This is 'Google' for first party services in Google Cloud Platform. - # @!attribute [rw] geo_taxonomy - # @return [::Google::Cloud::Billing::V1::GeoTaxonomy] - # The geographic taxonomy for this sku. - class Sku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the category hierarchy of a SKU. - # @!attribute [rw] service_display_name - # @return [::String] - # The display name of the service this SKU belongs to. - # @!attribute [rw] resource_family - # @return [::String] - # The type of product the SKU refers to. - # Example: "Compute", "Storage", "Network", "ApplicationServices" etc. - # @!attribute [rw] resource_group - # @return [::String] - # A group classification for related SKUs. - # Example: "RAM", "GPU", "Prediction", "Ops", "GoogleEgress" etc. - # @!attribute [rw] usage_type - # @return [::String] - # Represents how the SKU is consumed. - # Example: "OnDemand", "Preemptible", "Commit1Mo", "Commit1Yr" etc. - class Category - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the pricing information for a SKU at a single point of time. - # @!attribute [rw] effective_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp from which this pricing was effective within the requested - # time range. This is guaranteed to be greater than or equal to the - # start_time field in the request and less than the end_time field in the - # request. If a time range was not specified in the request this field will - # be equivalent to a time within the last 12 hours, indicating the latest - # pricing info. - # @!attribute [rw] summary - # @return [::String] - # An optional human readable summary of the pricing information, has a - # maximum length of 256 characters. - # @!attribute [rw] pricing_expression - # @return [::Google::Cloud::Billing::V1::PricingExpression] - # Expresses the pricing formula. See `PricingExpression` for an example. - # @!attribute [rw] aggregation_info - # @return [::Google::Cloud::Billing::V1::AggregationInfo] - # Aggregation Info. This can be left unspecified if the pricing expression - # doesn't require aggregation. - # @!attribute [rw] currency_conversion_rate - # @return [::Float] - # Conversion rate used for currency conversion, from USD to the currency - # specified in the request. This includes any surcharge collected for billing - # in non USD currency. If a currency is not specified in the request this - # defaults to 1.0. - # Example: USD * currency_conversion_rate = JPY - class PricingInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Expresses a mathematical pricing formula. For Example:- - # - # `usage_unit: GBy` - # `tiered_rates:` - # `[start_usage_amount: 20, unit_price: $10]` - # `[start_usage_amount: 100, unit_price: $5]` - # - # The above expresses a pricing formula where the first 20GB is free, the - # next 80GB is priced at $10 per GB followed by $5 per GB for additional - # usage. - # @!attribute [rw] usage_unit - # @return [::String] - # The short hand for unit of usage this pricing is specified in. - # Example: usage_unit of "GiBy" means that usage is specified in "Gibi Byte". - # @!attribute [rw] display_quantity - # @return [::Float] - # The recommended quantity of units for displaying pricing info. When - # displaying pricing info it is recommended to display: - # (unit_price * display_quantity) per display_quantity usage_unit. - # This field does not affect the pricing formula and is for display purposes - # only. - # Example: If the unit_price is "0.0001 USD", the usage_unit is "GB" and - # the display_quantity is "1000" then the recommended way of displaying the - # pricing info is "0.10 USD per 1000 GB" - # @!attribute [rw] tiered_rates - # @return [::Array<::Google::Cloud::Billing::V1::PricingExpression::TierRate>] - # The list of tiered rates for this pricing. The total cost is computed by - # applying each of the tiered rates on usage. This repeated list is sorted - # by ascending order of start_usage_amount. - # @!attribute [rw] usage_unit_description - # @return [::String] - # The unit of usage in human readable form. - # Example: "gibi byte". - # @!attribute [rw] base_unit - # @return [::String] - # The base unit for the SKU which is the unit used in usage exports. - # Example: "By" - # @!attribute [rw] base_unit_description - # @return [::String] - # The base unit in human readable form. - # Example: "byte". - # @!attribute [rw] base_unit_conversion_factor - # @return [::Float] - # Conversion factor for converting from price per usage_unit to price per - # base_unit, and start_usage_amount to start_usage_amount in base_unit. - # unit_price / base_unit_conversion_factor = price per base_unit. - # start_usage_amount * base_unit_conversion_factor = start_usage_amount in - # base_unit. - class PricingExpression - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The price rate indicating starting usage and its corresponding price. - # @!attribute [rw] start_usage_amount - # @return [::Float] - # Usage is priced at this rate only after this amount. - # Example: start_usage_amount of 10 indicates that the usage will be priced - # at the unit_price after the first 10 usage_units. - # @!attribute [rw] unit_price - # @return [::Google::Type::Money] - # The price per unit of usage. - # Example: unit_price of amount $10 indicates that each unit will cost $10. - class TierRate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents the aggregation level and interval for pricing of a single SKU. - # @!attribute [rw] aggregation_level - # @return [::Google::Cloud::Billing::V1::AggregationInfo::AggregationLevel] - # @!attribute [rw] aggregation_interval - # @return [::Google::Cloud::Billing::V1::AggregationInfo::AggregationInterval] - # @!attribute [rw] aggregation_count - # @return [::Integer] - # The number of intervals to aggregate over. - # Example: If aggregation_level is "DAILY" and aggregation_count is 14, - # aggregation will be over 14 days. - class AggregationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The level at which usage is aggregated to compute cost. - # Example: "ACCOUNT" aggregation level indicates that usage for tiered - # pricing is aggregated across all projects in a single account. - module AggregationLevel - AGGREGATION_LEVEL_UNSPECIFIED = 0 - - ACCOUNT = 1 - - PROJECT = 2 - end - - # The interval at which usage is aggregated to compute cost. - # Example: "MONTHLY" aggregation interval indicates that usage for tiered - # pricing is aggregated every month. - module AggregationInterval - AGGREGATION_INTERVAL_UNSPECIFIED = 0 - - DAILY = 1 - - MONTHLY = 2 - end - end - - # Encapsulates the geographic taxonomy data for a sku. - # @!attribute [rw] type - # @return [::Google::Cloud::Billing::V1::GeoTaxonomy::Type] - # The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. - # @!attribute [rw] regions - # @return [::Array<::String>] - # The list of regions associated with a sku. Empty for Global skus, which are - # associated with all Google Cloud regions. - class GeoTaxonomy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of Geo Taxonomy: GLOBAL, REGIONAL, or MULTI_REGIONAL. - module Type - # The type is not specified. - TYPE_UNSPECIFIED = 0 - - # The sku is global in nature, e.g. a license sku. Global skus are - # available in all regions, and so have an empty region list. - GLOBAL = 1 - - # The sku is available in a specific region, e.g. "us-west2". - REGIONAL = 2 - - # The sku is associated with multiple regions, e.g. "us-west2" and - # "us-east1". - MULTI_REGIONAL = 3 - end - end - - # Request message for `ListServices`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Defaults to 5000. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListServices` - # call. If unspecified, the first page of results is returned. - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `ListServices`. - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::Billing::V1::Service>] - # A list of services. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. To retrieve the next page, - # call `ListServices` again with the `page_token` field set to this - # value. This field is empty if there are no more results to retrieve. - class ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `ListSkus`. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the service. - # Example: "services/6F81-5844-456A" - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional inclusive start time of the time range for which the pricing - # versions will be returned. Timestamps in the future are not allowed. - # The time range has to be within a single calendar month in - # America/Los_Angeles timezone. Time range as a whole is optional. If not - # specified, the latest pricing will be returned (up to 12 hours old at - # most). - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional exclusive end time of the time range for which the pricing - # versions will be returned. Timestamps in the future are not allowed. - # The time range has to be within a single calendar month in - # America/Los_Angeles timezone. Time range as a whole is optional. If not - # specified, the latest pricing will be returned (up to 12 hours old at - # most). - # @!attribute [rw] currency_code - # @return [::String] - # The ISO 4217 currency code for the pricing info in the response proto. - # Will use the conversion rate as of start_time. - # Optional. If not specified USD will be used. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. Defaults to 5000. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to return. This should be a - # `next_page_token` value returned from a previous `ListSkus` - # call. If unspecified, the first page of results is returned. - class ListSkusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `ListSkus`. - # @!attribute [rw] skus - # @return [::Array<::Google::Cloud::Billing::V1::Sku>] - # The list of public SKUs of the given service. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. To retrieve the next page, - # call `ListSkus` again with the `page_token` field set to this - # value. This field is empty if there are no more results to retrieve. - class ListSkusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb deleted file mode 100644 index 5445c77f8258..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/iam_policy.rb +++ /dev/null @@ -1,87 +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 Iam - module V1 - # Request message for `SetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being specified. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] policy - # @return [::Google::Iam::V1::Policy] - # REQUIRED: The complete policy to be applied to the `resource`. The size of - # the policy is limited to a few 10s of KB. An empty policy is a - # valid policy but certain Cloud Platform services (such as Projects) - # might reject them. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - # the fields in the mask will be modified. If no mask is provided, the - # following default mask is used: - # - # `paths: "bindings, etag"` - class SetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GetIamPolicy` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] options - # @return [::Google::Iam::V1::GetPolicyOptions] - # OPTIONAL: A `GetPolicyOptions` object for specifying options to - # `GetIamPolicy`. - class GetIamPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `TestIamPermissions` method. - # @!attribute [rw] resource - # @return [::String] - # REQUIRED: The resource for which the policy detail is being requested. - # See the operation documentation for the appropriate value for this field. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # The set of permissions to check for the `resource`. Permissions with - # wildcards (such as '*' or 'storage.*') are not allowed. For more - # information see - # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - class TestIamPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for `TestIamPermissions` method. - # @!attribute [rw] permissions - # @return [::Array<::String>] - # A subset of `TestPermissionsRequest.permissions` that the caller is - # allowed. - class TestIamPermissionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb deleted file mode 100644 index 60713d995b86..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/options.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module V1 - # Encapsulates settings provided to GetIamPolicy. - # @!attribute [rw] requested_policy_version - # @return [::Integer] - # Optional. The maximum policy version that will be used to format the - # policy. - # - # Valid values are 0, 1, and 3. Requests specifying an invalid value will be - # rejected. - # - # Requests for policies with any conditional role bindings must specify - # version 3. Policies with no conditional role bindings may specify any valid - # value or leave the field unset. - # - # The policy in the response might use the policy version that you specified, - # or it might use a lower policy version. For example, if you specify version - # 3, but the policy has no conditional role bindings, the response uses - # version 1. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class GetPolicyOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb deleted file mode 100644 index 999575b797df..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/iam/v1/policy.rb +++ /dev/null @@ -1,426 +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 Iam - module V1 - # An Identity and Access Management (IAM) policy, which specifies access - # controls for Google Cloud resources. - # - # - # A `Policy` is a collection of `bindings`. A `binding` binds one or more - # `members`, or principals, to a single `role`. Principals can be user - # accounts, service accounts, Google groups, and domains (such as G Suite). A - # `role` is a named list of permissions; each `role` can be an IAM predefined - # role or a user-created custom role. - # - # For some types of Google Cloud resources, a `binding` can also specify a - # `condition`, which is a logical expression that allows access to a resource - # only if the expression evaluates to `true`. A condition can add constraints - # based on attributes of the request, the resource, or both. To learn which - # resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # - # **JSON example:** - # - # ``` - # { - # "bindings": [ - # { - # "role": "roles/resourcemanager.organizationAdmin", - # "members": [ - # "user:mike@example.com", - # "group:admins@example.com", - # "domain:google.com", - # "serviceAccount:my-project-id@appspot.gserviceaccount.com" - # ] - # }, - # { - # "role": "roles/resourcemanager.organizationViewer", - # "members": [ - # "user:eve@example.com" - # ], - # "condition": { - # "title": "expirable access", - # "description": "Does not grant access after Sep 2020", - # "expression": "request.time < - # timestamp('2020-10-01T00:00:00.000Z')", - # } - # } - # ], - # "etag": "BwWWja0YfJA=", - # "version": 3 - # } - # ``` - # - # **YAML example:** - # - # ``` - # bindings: - # - members: - # - user:mike@example.com - # - group:admins@example.com - # - domain:google.com - # - serviceAccount:my-project-id@appspot.gserviceaccount.com - # role: roles/resourcemanager.organizationAdmin - # - members: - # - user:eve@example.com - # role: roles/resourcemanager.organizationViewer - # condition: - # title: expirable access - # description: Does not grant access after Sep 2020 - # expression: request.time < timestamp('2020-10-01T00:00:00.000Z') - # etag: BwWWja0YfJA= - # version: 3 - # ``` - # - # For a description of IAM and its features, see the - # [IAM documentation](https://cloud.google.com/iam/docs/). - # @!attribute [rw] version - # @return [::Integer] - # Specifies the format of the policy. - # - # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value - # are rejected. - # - # Any operation that affects conditional role bindings must specify version - # `3`. This requirement applies to the following operations: - # - # * Getting a policy that includes a conditional role binding - # * Adding a conditional role binding to a policy - # * Changing a conditional role binding in a policy - # * Removing any role binding, with or without a condition, from a policy - # that includes conditions - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - # - # If a policy does not include any conditions, operations on that policy may - # specify any valid version or leave the field unset. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - # @!attribute [rw] bindings - # @return [::Array<::Google::Iam::V1::Binding>] - # Associates a list of `members`, or principals, with a `role`. Optionally, - # may specify a `condition` that determines how and when the `bindings` are - # applied. Each of the `bindings` must contain at least one principal. - # - # The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 - # of these principals can be Google groups. Each occurrence of a principal - # counts towards these limits. For example, if the `bindings` grant 50 - # different roles to `user:alice@example.com`, and not to any other - # principal, then you can add another 1,450 principals to the `bindings` in - # the `Policy`. - # @!attribute [rw] audit_configs - # @return [::Array<::Google::Iam::V1::AuditConfig>] - # Specifies cloud audit logging configuration for this policy. - # @!attribute [rw] etag - # @return [::String] - # `etag` is used for optimistic concurrency control as a way to help - # prevent simultaneous updates of a policy from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform policy updates in order to avoid race - # conditions: An `etag` is returned in the response to `getIamPolicy`, and - # systems are expected to put that etag in the request to `setIamPolicy` to - # ensure that their change will be applied to the same version of the policy. - # - # **Important:** If you use IAM Conditions, you must include the `etag` field - # whenever you call `setIamPolicy`. If you omit this field, then IAM allows - # you to overwrite a version `3` policy with a version `1` policy, and all of - # the conditions in the version `3` policy are lost. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Associates `members`, or principals, with a `role`. - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to the list of `members`, or principals. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # @!attribute [rw] members - # @return [::Array<::String>] - # Specifies the principals requesting access for a Google Cloud resource. - # `members` can have the following values: - # - # * `allUsers`: A special identifier that represents anyone who is - # on the internet; with or without a Google account. - # - # * `allAuthenticatedUsers`: A special identifier that represents anyone - # who is authenticated with a Google account or a service account. - # - # * `user:{emailid}`: An email address that represents a specific Google - # account. For example, `alice@example.com` . - # - # - # * `serviceAccount:{emailid}`: An email address that represents a service - # account. For example, `my-other-app@appspot.gserviceaccount.com`. - # - # * `group:{emailid}`: An email address that represents a Google group. - # For example, `admins@example.com`. - # - # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a user that has been recently deleted. For - # example, `alice@example.com?uid=123456789012345678901`. If the user is - # recovered, this value reverts to `user:{emailid}` and the recovered user - # retains the role in the binding. - # - # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - # unique identifier) representing a service account that has been recently - # deleted. For example, - # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. - # If the service account is undeleted, this value reverts to - # `serviceAccount:{emailid}` and the undeleted service account retains the - # role in the binding. - # - # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique - # identifier) representing a Google group that has been recently - # deleted. For example, `admins@example.com?uid=123456789012345678901`. If - # the group is recovered, this value reverts to `group:{emailid}` and the - # recovered group retains the role in the binding. - # - # - # * `domain:{domain}`: The G Suite domain (primary) that represents all the - # users of that domain. For example, `google.com` or `example.com`. - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - # - # If the condition evaluates to `true`, then this binding applies to the - # current request. - # - # If the condition evaluates to `false`, then this binding does not apply to - # the current request. However, a different role binding might grant the same - # role to one or more of the principals in this binding. - # - # To learn which resources support conditions in their IAM policies, see the - # [IAM - # documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - class Binding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the audit configuration for a service. - # The configuration determines which permission types are logged, and what - # identities, if any, are exempted from logging. - # An AuditConfig must have one or more AuditLogConfigs. - # - # If there are AuditConfigs for both `allServices` and a specific service, - # the union of the two AuditConfigs is used for that service: the log_types - # specified in each AuditConfig are enabled, and the exempted_members in each - # AuditLogConfig are exempted. - # - # Example Policy with multiple AuditConfigs: - # - # { - # "audit_configs": [ - # { - # "service": "allServices", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # }, - # { - # "log_type": "ADMIN_READ" - # } - # ] - # }, - # { - # "service": "sampleservice.googleapis.com", - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ" - # }, - # { - # "log_type": "DATA_WRITE", - # "exempted_members": [ - # "user:aliya@example.com" - # ] - # } - # ] - # } - # ] - # } - # - # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ - # logging. It also exempts `jose@example.com` from DATA_READ logging, and - # `aliya@example.com` from DATA_WRITE logging. - # @!attribute [rw] service - # @return [::String] - # Specifies a service that will be enabled for audit logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # @!attribute [rw] audit_log_configs - # @return [::Array<::Google::Iam::V1::AuditLogConfig>] - # The configuration for logging of each type of permission. - class AuditConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provides the configuration for logging a type of permissions. - # Example: - # - # { - # "audit_log_configs": [ - # { - # "log_type": "DATA_READ", - # "exempted_members": [ - # "user:jose@example.com" - # ] - # }, - # { - # "log_type": "DATA_WRITE" - # } - # ] - # } - # - # This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting - # jose@example.com from DATA_READ logging. - # @!attribute [rw] log_type - # @return [::Google::Iam::V1::AuditLogConfig::LogType] - # The log type that this config enables. - # @!attribute [rw] exempted_members - # @return [::Array<::String>] - # Specifies the identities that do not cause logging for this type of - # permission. - # Follows the same format of - # [Binding.members][google.iam.v1.Binding.members]. - class AuditLogConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The list of valid permission types for which logging can be configured. - # Admin writes are always logged, and are not configurable. - module LogType - # Default case. Should never be this. - LOG_TYPE_UNSPECIFIED = 0 - - # Admin reads. Example: CloudIAM getIamPolicy - ADMIN_READ = 1 - - # Data writes. Example: CloudSQL Users create - DATA_WRITE = 2 - - # Data reads. Example: CloudSQL Users list - DATA_READ = 3 - end - end - - # The difference delta between two policies. - # @!attribute [rw] binding_deltas - # @return [::Array<::Google::Iam::V1::BindingDelta>] - # The delta for Bindings between two policies. - # @!attribute [rw] audit_config_deltas - # @return [::Array<::Google::Iam::V1::AuditConfigDelta>] - # The delta for AuditConfigs between two policies. - class PolicyDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # One delta entry for Binding. Each individual change (only one member in each - # entry) to a binding will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::BindingDelta::Action] - # The action that was performed on a Binding. - # Required - # @!attribute [rw] role - # @return [::String] - # Role that is assigned to `members`. - # For example, `roles/viewer`, `roles/editor`, or `roles/owner`. - # Required - # @!attribute [rw] member - # @return [::String] - # A single identity requesting access for a Google Cloud resource. - # Follows the same format of Binding.members. - # Required - # @!attribute [rw] condition - # @return [::Google::Type::Expr] - # The condition that is associated with this binding. - class BindingDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on a Binding in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of a Binding. - ADD = 1 - - # Removal of a Binding. - REMOVE = 2 - end - end - - # One delta entry for AuditConfig. Each individual change (only one - # exempted_member in each entry) to a AuditConfig will be a separate entry. - # @!attribute [rw] action - # @return [::Google::Iam::V1::AuditConfigDelta::Action] - # The action that was performed on an audit configuration in a policy. - # Required - # @!attribute [rw] service - # @return [::String] - # Specifies a service that was configured for Cloud Audit Logging. - # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. - # `allServices` is a special value that covers all services. - # Required - # @!attribute [rw] exempted_member - # @return [::String] - # A single identity that is exempted from "data access" audit - # logging for the `service` specified above. - # Follows the same format of Binding.members. - # @!attribute [rw] log_type - # @return [::String] - # Specifies the log_type that was be enabled. ADMIN_ACTIVITY is always - # enabled, and cannot be configured. - # Required - class AuditConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of action performed on an audit configuration in a policy. - module Action - # Unspecified. - ACTION_UNSPECIFIED = 0 - - # Addition of an audit configuration. - ADD = 1 - - # Removal of an audit configuration. - REMOVE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb deleted file mode 100644 index 56a32eee300d..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/proto_docs/google/type/money.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents an amount of money with its currency type. - # @!attribute [rw] currency_code - # @return [::String] - # The three-letter currency code defined in ISO 4217. - # @!attribute [rw] units - # @return [::Integer] - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # @!attribute [rw] nanos - # @return [::Integer] - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - class Money - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-billing-v1/snippets/Gemfile deleted file mode 100644 index 2b728daed1e3..000000000000 --- a/owl-bot-staging/google-cloud-billing-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-billing-v1", path: "../" -else - gem "google-cloud-billing-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-billing-v1/snippets/cloud_billing/create_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/create_billing_account.rb deleted file mode 100644 index 1385c575fafd..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/create_billing_account.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 cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the create_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#create_billing_account. -# -def create_billing_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::CreateBillingAccountRequest.new - - # Call the create_billing_account method. - result = client.create_billing_account request - - # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.rb deleted file mode 100644 index 700eceb80480..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_billing_account.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 cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the get_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#get_billing_account. -# -def get_billing_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::GetBillingAccountRequest.new - - # Call the get_billing_account method. - result = client.get_billing_account request - - # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb deleted file mode 100644 index 771874816c3b..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the get_iam_policy call in the CloudBilling 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::Billing::V1::CloudBilling::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::GetIamPolicyRequest.new - - # Call the get_iam_policy method. - result = client.get_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.rb deleted file mode 100644 index f4b3858e1779..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/get_project_billing_info.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 cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the get_project_billing_info call in the CloudBilling 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::Billing::V1::CloudBilling::Client#get_project_billing_info. -# -def get_project_billing_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new - - # Call the get_project_billing_info method. - result = client.get_project_billing_info request - - # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.rb deleted file mode 100644 index 42ef1543b041..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_billing_accounts.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 cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the list_billing_accounts call in the CloudBilling 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::Billing::V1::CloudBilling::Client#list_billing_accounts. -# -def list_billing_accounts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::ListBillingAccountsRequest.new - - # Call the list_billing_accounts method. - result = client.list_billing_accounts 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::Billing::V1::BillingAccount. - p item - end -end -# [END cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.rb deleted file mode 100644 index cd67e7762780..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/list_project_billing_info.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 cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the list_project_billing_info call in the CloudBilling 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::Billing::V1::CloudBilling::Client#list_project_billing_info. -# -def list_project_billing_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new - - # Call the list_project_billing_info method. - result = client.list_project_billing_info 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::Billing::V1::ProjectBillingInfo. - p item - end -end -# [END cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.rb deleted file mode 100644 index 8cee8230f794..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/move_billing_account.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 cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the move_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#move_billing_account. -# -def move_billing_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::MoveBillingAccountRequest.new - - # Call the move_billing_account method. - result = client.move_billing_account request - - # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb deleted file mode 100644 index 96a269f56eea..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/set_iam_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the set_iam_policy call in the CloudBilling 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::Billing::V1::CloudBilling::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::SetIamPolicyRequest.new - - # Call the set_iam_policy method. - result = client.set_iam_policy request - - # The returned object is of type Google::Iam::V1::Policy. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.rb deleted file mode 100644 index 8883eb7bd0ae..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/test_iam_permissions.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 cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the test_iam_permissions call in the CloudBilling 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::Billing::V1::CloudBilling::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::V1::TestIamPermissionsRequest.new - - # Call the test_iam_permissions method. - result = client.test_iam_permissions request - - # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.rb deleted file mode 100644 index 1bc84c05613d..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_billing_account.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 cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the update_billing_account call in the CloudBilling 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::Billing::V1::CloudBilling::Client#update_billing_account. -# -def update_billing_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new - - # Call the update_billing_account method. - result = client.update_billing_account request - - # The returned object is of type Google::Cloud::Billing::V1::BillingAccount. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.rb deleted file mode 100644 index 7a2ae2af8c69..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_billing/update_project_billing_info.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 cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the update_project_billing_info call in the CloudBilling 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::Billing::V1::CloudBilling::Client#update_project_billing_info. -# -def update_project_billing_info - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudBilling::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new - - # Call the update_project_billing_info method. - result = client.update_project_billing_info request - - # The returned object is of type Google::Cloud::Billing::V1::ProjectBillingInfo. - p result -end -# [END cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb deleted file mode 100644 index c1e36fe6b0e5..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudbilling_v1_generated_CloudCatalog_ListServices_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the list_services call in the CloudCatalog 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::Billing::V1::CloudCatalog::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudCatalog::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::ListServicesRequest.new - - # Call the list_services method. - result = client.list_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Billing::V1::Service. - p item - end -end -# [END cloudbilling_v1_generated_CloudCatalog_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb b/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb deleted file mode 100644 index f973fcb6c3f0..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/cloud_catalog/list_skus.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] -require "google/cloud/billing/v1" - -## -# Snippet for the list_skus call in the CloudCatalog 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::Billing::V1::CloudCatalog::Client#list_skus. -# -def list_skus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Billing::V1::CloudCatalog::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Billing::V1::ListSkusRequest.new - - # Call the list_skus method. - result = client.list_skus request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Billing::V1::Sku. - p item - end -end -# [END cloudbilling_v1_generated_CloudCatalog_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json b/owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json deleted file mode 100644 index 33ae25137419..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/snippets/snippet_metadata_google.cloud.billing.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-billing-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.billing.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync", - "title": "Snippet for the get_billing_account call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#get_billing_account.", - "file": "cloud_billing/get_billing_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_billing_account", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#get_billing_account", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::GetBillingAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::BillingAccount", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "GetBillingAccount", - "full_name": "google.cloud.billing.v1.CloudBilling.GetBillingAccount", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync", - "title": "Snippet for the list_billing_accounts call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#list_billing_accounts.", - "file": "cloud_billing/list_billing_accounts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_billing_accounts", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#list_billing_accounts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::ListBillingAccountsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::ListBillingAccountsResponse", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "ListBillingAccounts", - "full_name": "google.cloud.billing.v1.CloudBilling.ListBillingAccounts", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync", - "title": "Snippet for the update_billing_account call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#update_billing_account.", - "file": "cloud_billing/update_billing_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_billing_account", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#update_billing_account", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::UpdateBillingAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::BillingAccount", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "UpdateBillingAccount", - "full_name": "google.cloud.billing.v1.CloudBilling.UpdateBillingAccount", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync", - "title": "Snippet for the create_billing_account call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#create_billing_account.", - "file": "cloud_billing/create_billing_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_billing_account", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#create_billing_account", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::CreateBillingAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::BillingAccount", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "CreateBillingAccount", - "full_name": "google.cloud.billing.v1.CloudBilling.CreateBillingAccount", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync", - "title": "Snippet for the list_project_billing_info call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#list_project_billing_info.", - "file": "cloud_billing/list_project_billing_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_project_billing_info", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#list_project_billing_info", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "ListProjectBillingInfo", - "full_name": "google.cloud.billing.v1.CloudBilling.ListProjectBillingInfo", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync", - "title": "Snippet for the get_project_billing_info call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#get_project_billing_info.", - "file": "cloud_billing/get_project_billing_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_project_billing_info", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#get_project_billing_info", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::ProjectBillingInfo", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "GetProjectBillingInfo", - "full_name": "google.cloud.billing.v1.CloudBilling.GetProjectBillingInfo", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync", - "title": "Snippet for the update_project_billing_info call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#update_project_billing_info.", - "file": "cloud_billing/update_project_billing_info.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_project_billing_info", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#update_project_billing_info", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::ProjectBillingInfo", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "UpdateProjectBillingInfo", - "full_name": "google.cloud.billing.v1.CloudBilling.UpdateProjectBillingInfo", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#get_iam_policy.", - "file": "cloud_billing/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.billing.v1.CloudBilling.GetIamPolicy", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#set_iam_policy.", - "file": "cloud_billing/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.billing.v1.CloudBilling.SetIamPolicy", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#test_iam_permissions.", - "file": "cloud_billing/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.billing.v1.CloudBilling.TestIamPermissions", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudBilling_MoveBillingAccount_sync", - "title": "Snippet for the move_billing_account call in the CloudBilling service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudBilling::Client#move_billing_account.", - "file": "cloud_billing/move_billing_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "move_billing_account", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client#move_billing_account", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::MoveBillingAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::BillingAccount", - "client": { - "short_name": "CloudBilling::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudBilling::Client" - }, - "method": { - "short_name": "MoveBillingAccount", - "full_name": "google.cloud.billing.v1.CloudBilling.MoveBillingAccount", - "service": { - "short_name": "CloudBilling", - "full_name": "google.cloud.billing.v1.CloudBilling" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudCatalog_ListServices_sync", - "title": "Snippet for the list_services call in the CloudCatalog service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudCatalog::Client#list_services.", - "file": "cloud_catalog/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::ListServicesResponse", - "client": { - "short_name": "CloudCatalog::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.cloud.billing.v1.CloudCatalog.ListServices", - "service": { - "short_name": "CloudCatalog", - "full_name": "google.cloud.billing.v1.CloudCatalog" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbilling_v1_generated_CloudCatalog_ListSkus_sync", - "title": "Snippet for the list_skus call in the CloudCatalog service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Billing::V1::CloudCatalog::Client#list_skus.", - "file": "cloud_catalog/list_skus.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_skus", - "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client#list_skus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Billing::V1::ListSkusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Billing::V1::ListSkusResponse", - "client": { - "short_name": "CloudCatalog::Client", - "full_name": "::Google::Cloud::Billing::V1::CloudCatalog::Client" - }, - "method": { - "short_name": "ListSkus", - "full_name": "google.cloud.billing.v1.CloudCatalog.ListSkus", - "service": { - "short_name": "CloudCatalog", - "full_name": "google.cloud.billing.v1.CloudCatalog" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb deleted file mode 100644 index cc05f53a8296..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_paths_test.rb +++ /dev/null @@ -1,94 +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/billing/v1/cloud_billing" - -class ::Google::Cloud::Billing::V1::CloudBilling::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_billing_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.billing_account_path billing_account: "value0" - assert_equal "billingAccounts/value0", path - - path = client.billing_account_path organization: "value0", billing_account: "value1" - assert_equal "organizations/value0/billingAccounts/value1", path - end - end - - def test_organization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_path organization: "value0" - assert_equal "organizations/value0", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_project_billing_info_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_billing_info_path project: "value0" - assert_equal "projects/value0/billingInfo", path - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb deleted file mode 100644 index 983617c47c75..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_rest_test.rb +++ /dev/null @@ -1,707 +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/billing/v1/cloud_billing_pb" -require "google/cloud/billing/v1/cloud_billing/rest" - - -class ::Google::Cloud::Billing::V1::CloudBilling::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_billing_account - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::BillingAccount.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_get_billing_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_billing_account({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_billing_account name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_billing_account ::Google::Cloud::Billing::V1::GetBillingAccountRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_billing_account({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_billing_account(::Google::Cloud::Billing::V1::GetBillingAccountRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_billing_account_client_stub.call_count - end - end - end - - def test_list_billing_accounts - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::ListBillingAccountsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - parent = "hello world" - - list_billing_accounts_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_list_billing_accounts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_billing_accounts_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_billing_accounts page_size: page_size, page_token: page_token, filter: filter, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_billing_accounts ::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_billing_accounts(::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_billing_accounts_client_stub.call_count - end - end - end - - def test_update_billing_account - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::BillingAccount.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - account = {} - update_mask = {} - - update_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_update_billing_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_billing_account({ name: name, account: account, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_billing_account name: name, account: account, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_billing_account ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_billing_account({ name: name, account: account, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_billing_account(::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_billing_account_client_stub.call_count - end - end - end - - def test_create_billing_account - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::BillingAccount.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - billing_account = {} - parent = "hello world" - - create_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_create_billing_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_billing_account({ billing_account: billing_account, parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_billing_account billing_account: billing_account, parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_billing_account ::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_billing_account({ billing_account: billing_account, parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_billing_account(::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_billing_account_client_stub.call_count - end - end - end - - def test_list_project_billing_info - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_project_billing_info_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_list_project_billing_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_project_billing_info_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_project_billing_info({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_project_billing_info name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_project_billing_info ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info({ name: name, 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_project_billing_info(::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info_client_stub.call_count - end - end - end - - def test_get_project_billing_info - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_project_billing_info_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_get_project_billing_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_project_billing_info_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_project_billing_info({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_project_billing_info name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_project_billing_info ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_project_billing_info({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_project_billing_info(::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_project_billing_info_client_stub.call_count - end - end - end - - def test_update_project_billing_info - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::ProjectBillingInfo.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - project_billing_info = {} - - update_project_billing_info_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_update_project_billing_info_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_project_billing_info_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_project_billing_info name: name, project_billing_info: project_billing_info do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_project_billing_info ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_project_billing_info(::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_project_billing_info_client_stub.call_count - end - end - end - - def test_get_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_get_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_count - end - end - end - - def test_set_iam_policy - # Create test objects. - client_result = ::Google::Iam::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_set_iam_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_count - end - end - end - - def test_test_iam_permissions - # Create test objects. - client_result = ::Google::Iam::V1::TestIamPermissionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_test_iam_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_count - end - end - end - - def test_move_billing_account - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::BillingAccount.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - destination_parent = "hello world" - - move_billing_account_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::Billing::V1::CloudBilling::Rest::ServiceStub.stub :transcode_move_billing_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, move_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.move_billing_account({ name: name, destination_parent: destination_parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.move_billing_account name: name, destination_parent: destination_parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.move_billing_account ::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.move_billing_account({ name: name, destination_parent: destination_parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.move_billing_account(::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, move_billing_account_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::Billing::V1::CloudBilling::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::Billing::V1::CloudBilling::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb deleted file mode 100644 index 5765cf5c730f..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_billing_test.rb +++ /dev/null @@ -1,780 +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/billing/v1/cloud_billing_pb" -require "google/cloud/billing/v1/cloud_billing" - -class ::Google::Cloud::Billing::V1::CloudBilling::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_billing_account - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_billing_account, name - assert_kind_of ::Google::Cloud::Billing::V1::GetBillingAccountRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_billing_account({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_billing_account name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_billing_account ::Google::Cloud::Billing::V1::GetBillingAccountRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_billing_account({ 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_billing_account(::Google::Cloud::Billing::V1::GetBillingAccountRequest.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_billing_account_client_stub.call_rpc_count - end - end - - def test_list_billing_accounts - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::ListBillingAccountsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - filter = "hello world" - parent = "hello world" - - list_billing_accounts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_billing_accounts, name - assert_kind_of ::Google::Cloud::Billing::V1::ListBillingAccountsRequest, request - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_billing_accounts_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }) 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_billing_accounts page_size: page_size, page_token: page_token, filter: filter, parent: parent 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_billing_accounts ::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent) 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_billing_accounts({ page_size: page_size, page_token: page_token, filter: filter, parent: parent }, 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_billing_accounts(::Google::Cloud::Billing::V1::ListBillingAccountsRequest.new(page_size: page_size, page_token: page_token, filter: filter, parent: parent), 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_billing_accounts_client_stub.call_rpc_count - end - end - - def test_update_billing_account - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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" - account = {} - update_mask = {} - - update_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_billing_account, name - assert_kind_of ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::V1::BillingAccount), request["account"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_billing_account({ name: name, account: account, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_billing_account name: name, account: account, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_billing_account ::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_billing_account({ name: name, account: account, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_billing_account(::Google::Cloud::Billing::V1::UpdateBillingAccountRequest.new(name: name, account: account, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_billing_account_client_stub.call_rpc_count - end - end - - def test_create_billing_account - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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. - billing_account = {} - parent = "hello world" - - create_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_billing_account, name - assert_kind_of ::Google::Cloud::Billing::V1::CreateBillingAccountRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::V1::BillingAccount), request["billing_account"] - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_billing_account({ billing_account: billing_account, parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_billing_account billing_account: billing_account, parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_billing_account ::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_billing_account({ billing_account: billing_account, parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_billing_account(::Google::Cloud::Billing::V1::CreateBillingAccountRequest.new(billing_account: billing_account, parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_billing_account_client_stub.call_rpc_count - end - end - - def test_list_project_billing_info - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::ListProjectBillingInfoResponse.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" - page_size = 42 - page_token = "hello world" - - list_project_billing_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_project_billing_info, name - assert_kind_of ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_project_billing_info_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_project_billing_info({ name: name, 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_project_billing_info name: name, 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_project_billing_info ::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info({ name: name, 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_project_billing_info(::Google::Cloud::Billing::V1::ListProjectBillingInfoRequest.new(name: name, 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_project_billing_info_client_stub.call_rpc_count - end - end - - def test_get_project_billing_info - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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_project_billing_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_project_billing_info, name - assert_kind_of ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_project_billing_info_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_project_billing_info({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_project_billing_info name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_project_billing_info ::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_project_billing_info({ 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_project_billing_info(::Google::Cloud::Billing::V1::GetProjectBillingInfoRequest.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_project_billing_info_client_stub.call_rpc_count - end - end - - def test_update_project_billing_info - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::ProjectBillingInfo.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" - project_billing_info = {} - - update_project_billing_info_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_project_billing_info, name - assert_kind_of ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Billing::V1::ProjectBillingInfo), request["project_billing_info"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_project_billing_info_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_project_billing_info name: name, project_billing_info: project_billing_info do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_project_billing_info ::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_project_billing_info({ name: name, project_billing_info: project_billing_info }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_project_billing_info(::Google::Cloud::Billing::V1::UpdateProjectBillingInfoRequest.new(name: name, project_billing_info: project_billing_info), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_project_billing_info_client_stub.call_rpc_count - end - end - - def test_get_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - options = {} - - get_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_iam_policy, name - assert_kind_of ::Google::Iam::V1::GetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::GetPolicyOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_iam_policy({ resource: resource, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_iam_policy resource: resource, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_iam_policy ::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_iam_policy({ resource: resource, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_iam_policy(::Google::Iam::V1::GetIamPolicyRequest.new(resource: resource, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_iam_policy_client_stub.call_rpc_count - end - end - - def test_set_iam_policy - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - resource = "hello world" - policy = {} - update_mask = {} - - set_iam_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :set_iam_policy, name - assert_kind_of ::Google::Iam::V1::SetIamPolicyRequest, request - assert_equal "hello world", request["resource"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Iam::V1::Policy), request["policy"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, set_iam_policy_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.set_iam_policy resource: resource, policy: policy, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.set_iam_policy ::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.set_iam_policy({ resource: resource, policy: policy, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.set_iam_policy(::Google::Iam::V1::SetIamPolicyRequest.new(resource: resource, policy: policy, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, set_iam_policy_client_stub.call_rpc_count - end - end - - def test_test_iam_permissions - # Create GRPC objects. - grpc_response = ::Google::Iam::V1::TestIamPermissionsResponse.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. - resource = "hello world" - permissions = ["hello world"] - - test_iam_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :test_iam_permissions, name - assert_kind_of ::Google::Iam::V1::TestIamPermissionsRequest, request - assert_equal "hello world", request["resource"] - assert_equal ["hello world"], request["permissions"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, test_iam_permissions_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.test_iam_permissions({ resource: resource, permissions: permissions }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.test_iam_permissions resource: resource, permissions: permissions do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.test_iam_permissions ::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.test_iam_permissions({ resource: resource, permissions: permissions }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.test_iam_permissions(::Google::Iam::V1::TestIamPermissionsRequest.new(resource: resource, permissions: permissions), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, test_iam_permissions_client_stub.call_rpc_count - end - end - - def test_move_billing_account - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::BillingAccount.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" - destination_parent = "hello world" - - move_billing_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :move_billing_account, name - assert_kind_of ::Google::Cloud::Billing::V1::MoveBillingAccountRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["destination_parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, move_billing_account_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.move_billing_account({ name: name, destination_parent: destination_parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.move_billing_account name: name, destination_parent: destination_parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.move_billing_account ::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.move_billing_account({ name: name, destination_parent: destination_parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.move_billing_account(::Google::Cloud::Billing::V1::MoveBillingAccountRequest.new(name: name, destination_parent: destination_parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, move_billing_account_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::Billing::V1::CloudBilling::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::Billing::V1::CloudBilling::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::Billing::V1::CloudBilling::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Billing::V1::CloudBilling::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb deleted file mode 100644 index 76b68632db8d..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/billing/v1/cloud_catalog" - -class ::Google::Cloud::Billing::V1::CloudCatalog::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_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path service: "value0" - assert_equal "services/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb deleted file mode 100644 index f2eb76dce2ba..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_rest_test.rb +++ /dev/null @@ -1,213 +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/billing/v1/cloud_catalog_pb" -require "google/cloud/billing/v1/cloud_catalog/rest" - - -class ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::ListServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - - list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_services({ page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_services page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_services ::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_services({ 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_services(::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_count - end - end - end - - def test_list_skus - # Create test objects. - client_result = ::Google::Cloud::Billing::V1::ListSkusResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - start_time = {} - end_time = {} - currency_code = "hello world" - page_size = 42 - page_token = "hello world" - - list_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Billing::V1::CloudCatalog::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudCatalog::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_skus parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_skus ::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus(::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_skus_client_stub.call_count - end - end - end - - def test_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::Billing::V1::CloudCatalog::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::Billing::V1::CloudCatalog::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb b/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb deleted file mode 100644 index 2d02240021cd..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/test/google/cloud/billing/v1/cloud_catalog_test.rb +++ /dev/null @@ -1,242 +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/billing/v1/cloud_catalog_pb" -require "google/cloud/billing/v1/cloud_catalog" - -class ::Google::Cloud::Billing::V1::CloudCatalog::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::ListServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - - list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_services, name - assert_kind_of ::Google::Cloud::Billing::V1::ListServicesRequest, request - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_services_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_services({ 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_services 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_services ::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_services({ 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_services(::Google::Cloud::Billing::V1::ListServicesRequest.new(page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_rpc_count - end - end - - def test_list_skus - # Create GRPC objects. - grpc_response = ::Google::Cloud::Billing::V1::ListSkusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - start_time = {} - end_time = {} - currency_code = "hello world" - page_size = 42 - page_token = "hello world" - - list_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_skus, name - assert_kind_of ::Google::Cloud::Billing::V1::ListSkusRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["start_time"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["end_time"] - assert_equal "hello world", request["currency_code"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_skus_client_stub do - # Create client - client = ::Google::Cloud::Billing::V1::CloudCatalog::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus ::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus({ parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, 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_skus(::Google::Cloud::Billing::V1::ListSkusRequest.new(parent: parent, start_time: start_time, end_time: end_time, currency_code: currency_code, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_skus_client_stub.call_rpc_count - end - end - - def test_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::Billing::V1::CloudCatalog::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::Billing::V1::CloudCatalog::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::Billing::V1::CloudCatalog::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Billing::V1::CloudCatalog::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-billing-v1/test/helper.rb b/owl-bot-staging/google-cloud-billing-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-billing-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/.gitignore b/owl-bot-staging/google-cloud-binary_authorization-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1/.repo-metadata.json deleted file mode 100644 index 2f8790a17bc3..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/.repo-metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "api_id": "binaryauthorization.googleapis.com", - "api_shortname": "binaryauthorization", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest", - "distribution_name": "google-cloud-binary_authorization-v1", - "is_cloud": true, - "language": "ruby", - "name": "binaryauthorization", - "name_pretty": "Binary Authorization V1 API", - "product_documentation": "https://cloud.google.com/binary-authorization/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BINARY_AUTHORIZATION", - "ruby-cloud-product-url": "https://cloud.google.com/binary-authorization/", - "ruby-cloud-service-override": "BinauthzManagementServiceV1=BinauthzManagementService;SystemPolicyV1=SystemPolicy;ValidationHelperV1=ValidationHelper", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml b/owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml deleted file mode 100644 index d50625d49551..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-binary_authorization-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-binary_authorization-v1.rb" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/.toys.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/.yardopts b/owl-bot-staging/google-cloud-binary_authorization-v1/.yardopts deleted file mode 100644 index a2253f9a1ac0..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Binary Authorization 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-binary_authorization-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-binary_authorization-v1/AUTHENTICATION.md deleted file mode 100644 index 8279621c45ca..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-binary_authorization-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-binary_authorization-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/binary_authorization/v1" - -client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/binary_authorization/v1" - -::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-binary_authorization-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/binary_authorization/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/LICENSE.md b/owl-bot-staging/google-cloud-binary_authorization-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1/README.md deleted file mode 100644 index 1421b3d50521..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Binary Authorization V1 API - -The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run. - -Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Binary Authorization V1 API. Most users should consider using -the main client gem, -[google-cloud-binary_authorization](https://rubygems.org/gems/google-cloud-binary_authorization). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-binary_authorization-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/binaryauthorization.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/binary_authorization/v1" - -client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new -request = ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new # (request fields as keyword arguments...) -response = client.get_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/binary-authorization/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/binary_authorization/v1" -require "logger" - -client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.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-binary_authorization`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-binary_authorization-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-binary_authorization`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-binary_authorization-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-binary_authorization-v1/Rakefile b/owl-bot-staging/google-cloud-binary_authorization-v1/Rakefile deleted file mode 100644 index ed9face33f1e..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/Rakefile +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-binary_authorization-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BINARY_AUTHORIZATION_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BINARY_AUTHORIZATION_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BINARY_AUTHORIZATION_TEST_PROJECT=test123 BINARY_AUTHORIZATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/binary_authorization/v1/binauthz_management_service/credentials" - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BINARY_AUTHORIZATION_PROJECT"] = project - ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] = project - ENV["BINARY_AUTHORIZATION_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-binary_authorization-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-binary_authorization-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-binary_authorization-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-binary_authorization-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-binary_authorization-v1" - header "google-cloud-binary_authorization-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-binary_authorization-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-binary_authorization-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-binary_authorization-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-binary_authorization-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-binary_authorization-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1/gapic_metadata.json deleted file mode 100644 index 62616714fd74..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/gapic_metadata.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.binaryauthorization.v1", - "libraryPackage": "::Google::Cloud::BinaryAuthorization::V1", - "services": { - "BinauthzManagementServiceV1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client", - "rpcs": { - "GetPolicy": { - "methods": [ - "get_policy" - ] - }, - "UpdatePolicy": { - "methods": [ - "update_policy" - ] - }, - "CreateAttestor": { - "methods": [ - "create_attestor" - ] - }, - "GetAttestor": { - "methods": [ - "get_attestor" - ] - }, - "UpdateAttestor": { - "methods": [ - "update_attestor" - ] - }, - "ListAttestors": { - "methods": [ - "list_attestors" - ] - }, - "DeleteAttestor": { - "methods": [ - "delete_attestor" - ] - } - } - } - } - }, - "SystemPolicyV1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client", - "rpcs": { - "GetSystemPolicy": { - "methods": [ - "get_system_policy" - ] - } - } - } - } - }, - "ValidationHelperV1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client", - "rpcs": { - "ValidateAttestationOccurrence": { - "methods": [ - "validate_attestation_occurrence" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec b/owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec deleted file mode 100644 index c6477e89d7bc..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/google-cloud-binary_authorization-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/binary_authorization/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-binary_authorization-v1" - gem.version = Google::Cloud::BinaryAuthorization::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details." - gem.summary = "The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "grafeas-v1", "> 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-v1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-v1.rb deleted file mode 100644 index 6fd39b3fb94a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google-cloud-binary_authorization-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/binary_authorization/v1" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb deleted file mode 100644 index d797dafc8014..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binary_authorization/v1/binauthz_management_service" -require "google/cloud/binary_authorization/v1/system_policy" -require "google/cloud/binary_authorization/v1/validation_helper" -require "google/cloud/binary_authorization/v1/version" - -module Google - module Cloud - module BinaryAuthorization - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1" - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1" - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/binary_authorization/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb deleted file mode 100644 index 1efe07271436..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1/version" - -require "google/cloud/binary_authorization/v1/binauthz_management_service/credentials" -require "google/cloud/binary_authorization/v1/binauthz_management_service/paths" -require "google/cloud/binary_authorization/v1/binauthz_management_service/client" -require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1 - ## - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1/binauthz_management_service" - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - module BinauthzManagementService - end - end - end - end -end - -helper_path = ::File.join __dir__, "binauthz_management_service", "helpers.rb" -require "google/cloud/binary_authorization/v1/binauthz_management_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb deleted file mode 100644 index 7f2a92bf4c5a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/client.rb +++ /dev/null @@ -1,1108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module BinauthzManagementService - ## - # Client for the BinauthzManagementService service. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :binauthz_management_service_stub - - ## - # Configure the BinauthzManagementService Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BinauthzManagementService clients - # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_policy.timeout = 600.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_policy.timeout = 600.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_attestor.timeout = 600.0 - - default_config.rpcs.get_attestor.timeout = 600.0 - default_config.rpcs.get_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_attestor.timeout = 600.0 - default_config.rpcs.update_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_attestors.timeout = 600.0 - default_config.rpcs.list_attestors.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_attestor.timeout = 600.0 - default_config.rpcs.delete_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BinauthzManagementService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @binauthz_management_service_stub.universe_domain - end - - ## - # Create a new BinauthzManagementService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BinauthzManagementService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/binaryauthorization/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 - - @binauthz_management_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementServiceV1::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @binauthz_management_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @binauthz_management_service_stub.logger - end - - # Service calls - - ## - # A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} that must attest to - # a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1::Policy policy} if the project does not have one. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, - # in the format `projects/*/policy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :get_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1::Policy policy}, and returns a copy of the - # new {::Google::Cloud::BinaryAuthorization::V1::Policy policy}. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Cloud::BinaryAuthorization::V1::Policy, ::Hash] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - # p result - # - def update_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :update_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} already exists. - # - # @overload create_attestor(request, options = nil) - # Pass arguments to `create_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) - # Pass arguments to `create_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. - # @param attestor_id [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID. - # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new - # - # # Call the create_attestor method. - # result = client.create_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - # p result - # - def create_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :create_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. - # - # @overload get_attestor(request, options = nil) - # Pass arguments to `get_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_attestor(name: nil) - # Pass arguments to `get_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new - # - # # Call the get_attestor method. - # result = client.get_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - # p result - # - def get_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :get_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. - # - # @overload update_attestor(request, options = nil) - # Pass arguments to `update_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_attestor(attestor: nil) - # Pass arguments to `update_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new - # - # # Call the update_attestor method. - # result = client.update_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - # p result - # - def update_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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.attestor&.name - header_params["attestor.name"] = request.attestor.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :update_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}. - # Returns INVALID_ARGUMENT if the project does not exist. - # - # @overload list_attestors(request, options = nil) - # Pass arguments to `list_attestors` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attestors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format `projects/*`. - # @param page_size [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new - # - # # Call the list_attestors method. - # result = client.list_attestors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1::Attestor. - # p item - # end - # - def list_attestors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_attestors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attestors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :list_attestors, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. - # - # @overload delete_attestor(request, options = nil) - # Pass arguments to `delete_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_attestor(name: nil) - # Pass arguments to `delete_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new - # - # # Call the delete_attestor method. - # result = client.delete_attestor request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :delete_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BinauthzManagementService API. - # - # This class represents the configuration for BinauthzManagementService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BinauthzManagementService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `create_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attestor - ## - # RPC-specific configuration for `get_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attestor - ## - # RPC-specific configuration for `update_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :update_attestor - ## - # RPC-specific configuration for `list_attestors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attestors - ## - # RPC-specific configuration for `delete_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attestor - - # @private - def initialize parent_rpcs = nil - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor - @create_attestor = ::Gapic::Config::Method.new create_attestor_config - get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor - @get_attestor = ::Gapic::Config::Method.new get_attestor_config - update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor - @update_attestor = ::Gapic::Config::Method.new update_attestor_config - list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors - @list_attestors = ::Gapic::Config::Method.new list_attestors_config - delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor - @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb deleted file mode 100644 index 530400adb780..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module BinauthzManagementService - # Credentials for the BinauthzManagementService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BINARY_AUTHORIZATION_CREDENTIALS", - "BINARY_AUTHORIZATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BINARY_AUTHORIZATION_CREDENTIALS_JSON", - "BINARY_AUTHORIZATION_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb deleted file mode 100644 index a4282d52ea46..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/paths.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1 - module BinauthzManagementService - # Path helper methods for the BinauthzManagementService API. - module Paths - ## - # Create a fully-qualified Attestor resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/attestors/{attestor}` - # - # @param project [String] - # @param attestor [String] - # - # @return [::String] - def attestor_path project:, attestor: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/attestors/#{attestor}" - end - - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/policy` - # - # @param project [String] - # - # @overload policy_path(location:) - # The resource will be in the following format: - # - # `locations/{location}/policy` - # - # @param location [String] - # - # @return [::String] - def policy_path **args - resources = { - "project" => (proc do |project:| - "projects/#{project}/policy" - end), - "location" => (proc do |location:| - "locations/#{location}/policy" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb deleted file mode 100644 index 6a6ed328774c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1/version" - -require "google/cloud/binary_authorization/v1/binauthz_management_service/credentials" -require "google/cloud/binary_authorization/v1/binauthz_management_service/paths" -require "google/cloud/binary_authorization/v1/binauthz_management_service/rest/client" - -module Google - module Cloud - module BinaryAuthorization - module V1 - ## - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - module BinauthzManagementService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/binary_authorization/v1/binauthz_management_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb deleted file mode 100644 index 5469431c70f2..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/client.rb +++ /dev/null @@ -1,1016 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module BinauthzManagementService - module Rest - ## - # REST client for the BinauthzManagementService service. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :binauthz_management_service_stub - - ## - # Configure the BinauthzManagementService Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BinauthzManagementService clients - # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_policy.timeout = 600.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_policy.timeout = 600.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_attestor.timeout = 600.0 - - default_config.rpcs.get_attestor.timeout = 600.0 - default_config.rpcs.get_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_attestor.timeout = 600.0 - default_config.rpcs.update_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_attestors.timeout = 600.0 - default_config.rpcs.list_attestors.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_attestor.timeout = 600.0 - default_config.rpcs.delete_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BinauthzManagementService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @binauthz_management_service_stub.universe_domain - end - - ## - # Create a new BinauthzManagementService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BinauthzManagementService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @binauthz_management_service_stub = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @binauthz_management_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @binauthz_management_service_stub.logger - end - - # Service calls - - ## - # A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} that must attest to - # a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for this project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1::Policy policy} if the project does not have one. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, - # in the format `projects/*/policy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.get_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1::Policy policy}, and returns a copy of the - # new {::Google::Cloud::BinaryAuthorization::V1::Policy policy}. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Cloud::BinaryAuthorization::V1::Policy, ::Hash] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - # p result - # - def update_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.update_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}, and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} already exists. - # - # @overload create_attestor(request, options = nil) - # Pass arguments to `create_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) - # Pass arguments to `create_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. - # @param attestor_id [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID. - # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new - # - # # Call the create_attestor method. - # result = client.create_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - # p result - # - def create_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.create_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. - # - # @overload get_attestor(request, options = nil) - # Pass arguments to `get_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_attestor(name: nil) - # Pass arguments to `get_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new - # - # # Call the get_attestor method. - # result = client.get_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - # p result - # - def get_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.get_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. - # - # @overload update_attestor(request, options = nil) - # Pass arguments to `update_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_attestor(attestor: nil) - # Pass arguments to `update_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param attestor [::Google::Cloud::BinaryAuthorization::V1::Attestor, ::Hash] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new - # - # # Call the update_attestor method. - # result = client.update_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - # p result - # - def update_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.update_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}. - # Returns INVALID_ARGUMENT if the project does not exist. - # - # @overload list_attestors(request, options = nil) - # Pass arguments to `list_attestors` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attestors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format `projects/*`. - # @param page_size [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1::Attestor>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new - # - # # Call the list_attestors method. - # result = client.list_attestors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1::Attestor. - # p item - # end - # - def list_attestors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_attestors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestors.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attestors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.list_attestors request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, "attestors", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} does not exist. - # - # @overload delete_attestor(request, options = nil) - # Pass arguments to `delete_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_attestor(name: nil) - # Pass arguments to `delete_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new - # - # # Call the delete_attestor method. - # result = client.delete_attestor request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.delete_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BinauthzManagementService REST API. - # - # This class represents the configuration for BinauthzManagementService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BinauthzManagementService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `create_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attestor - ## - # RPC-specific configuration for `get_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attestor - ## - # RPC-specific configuration for `update_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :update_attestor - ## - # RPC-specific configuration for `list_attestors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attestors - ## - # RPC-specific configuration for `delete_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attestor - - # @private - def initialize parent_rpcs = nil - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor - @create_attestor = ::Gapic::Config::Method.new create_attestor_config - get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor - @get_attestor = ::Gapic::Config::Method.new get_attestor_config - update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor - @update_attestor = ::Gapic::Config::Method.new update_attestor_config - list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors - @list_attestors = ::Gapic::Config::Method.new list_attestors_config - delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor - @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb deleted file mode 100644 index 7b1298ec749d..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/binauthz_management_service/rest/service_stub.rb +++ /dev/null @@ -1,511 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binaryauthorization/v1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module BinauthzManagementService - module Rest - ## - # REST service stub for the BinauthzManagementService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # A result object deserialized from the server's reply - def get_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # A result object deserialized from the server's reply - def update_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # A result object deserialized from the server's reply - def create_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # A result object deserialized from the server's reply - def get_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # A result object deserialized from the server's reply - def update_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_attestors REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse] - # A result object deserialized from the server's reply - def list_attestors request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attestors_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_attestors", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^projects/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/attestors", - body: "attestor", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1/{attestor.name}", - body: "attestor", - matches: [ - ["attestor.name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attestors REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_attestors_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/attestors", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb deleted file mode 100644 index 999349ce2371..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/rest.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" -require "google/cloud/binary_authorization/v1/system_policy/rest" -require "google/cloud/binary_authorization/v1/validation_helper/rest" -require "google/cloud/binary_authorization/v1/version" - -module Google - module Cloud - module BinaryAuthorization - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/binary_authorization/v1/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb deleted file mode 100644 index 1bd243e5d524..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1/version" - -require "google/cloud/binary_authorization/v1/system_policy/credentials" -require "google/cloud/binary_authorization/v1/system_policy/paths" -require "google/cloud/binary_authorization/v1/system_policy/client" -require "google/cloud/binary_authorization/v1/system_policy/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1 - ## - # API for working with the system policy. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1/system_policy" - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1/system_policy/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new - # - module SystemPolicy - end - end - end - end -end - -helper_path = ::File.join __dir__, "system_policy", "helpers.rb" -require "google/cloud/binary_authorization/v1/system_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb deleted file mode 100644 index 8e7f2b36ad22..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/client.rb +++ /dev/null @@ -1,475 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module SystemPolicy - ## - # Client for the SystemPolicy service. - # - # API for working with the system policy. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :system_policy_stub - - ## - # Configure the SystemPolicy Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SystemPolicy clients - # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SystemPolicy Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @system_policy_stub.universe_domain - end - - ## - # Create a new SystemPolicy client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SystemPolicy client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/binaryauthorization/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 - - @system_policy_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BinaryAuthorization::V1::SystemPolicyV1::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @system_policy_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @system_policy_stub.logger - end - - # Service calls - - ## - # Gets the current system policy in the specified location. - # - # @overload get_system_policy(request, options = nil) - # Pass arguments to `get_system_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_system_policy(name: nil) - # Pass arguments to `get_system_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new - # - # # Call the get_system_policy method. - # result = client.get_system_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - # p result - # - def get_system_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_system_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_system_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_system_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @system_policy_stub.call_rpc :get_system_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SystemPolicy API. - # - # This class represents the configuration for SystemPolicy, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_system_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SystemPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_system_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_system_policy - - # @private - def initialize parent_rpcs = nil - get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy - @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb deleted file mode 100644 index 31966bc1a626..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module SystemPolicy - # Credentials for the SystemPolicy API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BINARY_AUTHORIZATION_CREDENTIALS", - "BINARY_AUTHORIZATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BINARY_AUTHORIZATION_CREDENTIALS_JSON", - "BINARY_AUTHORIZATION_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb deleted file mode 100644 index a34ddc6ef1de..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1 - module SystemPolicy - # Path helper methods for the SystemPolicy API. - module Paths - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/policy` - # - # @param project [String] - # - # @overload policy_path(location:) - # The resource will be in the following format: - # - # `locations/{location}/policy` - # - # @param location [String] - # - # @return [::String] - def policy_path **args - resources = { - "project" => (proc do |project:| - "projects/#{project}/policy" - end), - "location" => (proc do |location:| - "locations/#{location}/policy" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb deleted file mode 100644 index 2155f943b245..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1/version" - -require "google/cloud/binary_authorization/v1/system_policy/credentials" -require "google/cloud/binary_authorization/v1/system_policy/paths" -require "google/cloud/binary_authorization/v1/system_policy/rest/client" - -module Google - module Cloud - module BinaryAuthorization - module V1 - ## - # API for working with the system policy. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/binary_authorization/v1/system_policy/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new - # - module SystemPolicy - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/binary_authorization/v1/system_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb deleted file mode 100644 index bef7a2dd8fad..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/client.rb +++ /dev/null @@ -1,425 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/system_policy/rest/service_stub" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module SystemPolicy - module Rest - ## - # REST client for the SystemPolicy service. - # - # API for working with the system policy. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :system_policy_stub - - ## - # Configure the SystemPolicy Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SystemPolicy clients - # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SystemPolicy Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @system_policy_stub.universe_domain - end - - ## - # Create a new SystemPolicy REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SystemPolicy client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @system_policy_stub = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @system_policy_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @system_policy_stub.logger - end - - # Service calls - - ## - # Gets the current system policy in the specified location. - # - # @overload get_system_policy(request, options = nil) - # Pass arguments to `get_system_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_system_policy(name: nil) - # Pass arguments to `get_system_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new - # - # # Call the get_system_policy method. - # result = client.get_system_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - # p result - # - def get_system_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_system_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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_system_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_system_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @system_policy_stub.get_system_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SystemPolicy REST API. - # - # This class represents the configuration for SystemPolicy REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_system_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SystemPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_system_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_system_policy - - # @private - def initialize parent_rpcs = nil - get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy - @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb deleted file mode 100644 index e2ae8689bfc2..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/system_policy/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binaryauthorization/v1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module SystemPolicy - module Rest - ## - # REST service stub for the SystemPolicy service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_system_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # A result object deserialized from the server's reply - def get_system_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_system_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_system_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_system_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_system_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^locations/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.rb deleted file mode 100644 index c0b4f435f7a7..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1/version" - -require "google/cloud/binary_authorization/v1/validation_helper/credentials" -require "google/cloud/binary_authorization/v1/validation_helper/client" -require "google/cloud/binary_authorization/v1/validation_helper/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1 - ## - # BinAuthz Attestor verification - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1/validation_helper" - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1/validation_helper/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new - # - module ValidationHelper - end - end - end - end -end - -helper_path = ::File.join __dir__, "validation_helper", "helpers.rb" -require "google/cloud/binary_authorization/v1/validation_helper/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb deleted file mode 100644 index 74c59831b8c1..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/client.rb +++ /dev/null @@ -1,486 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module ValidationHelper - ## - # Client for the ValidationHelper service. - # - # BinAuthz Attestor verification - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :validation_helper_stub - - ## - # Configure the ValidationHelper Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ValidationHelper clients - # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ValidationHelper Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 - @validation_helper_stub.universe_domain - end - - ## - # Create a new ValidationHelper client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ValidationHelper client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/binaryauthorization/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 - - @validation_helper_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BinaryAuthorization::V1::ValidationHelperV1::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 - ) - - @validation_helper_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @validation_helper_stub.logger - end - - # Service calls - - ## - # Returns whether the given Attestation for the given image URI - # was signed by the given Attestor - # - # @overload validate_attestation_occurrence(request, options = nil) - # Pass arguments to `validate_attestation_occurrence` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil) - # Pass arguments to `validate_attestation_occurrence` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param attestor [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} of the - # [occurrence][grafeas.v1.Occurrence], in the format - # `projects/*/attestors/*`. - # @param attestation [::Grafeas::V1::AttestationOccurrence, ::Hash] - # Required. An {::Grafeas::V1::AttestationOccurrence AttestationOccurrence} to - # be checked that it can be verified by the Attestor. It does not have to be - # an existing entity in Container Analysis. It must otherwise be a valid - # AttestationOccurrence. - # @param occurrence_note [::String] - # Required. The resource name of the [Note][grafeas.v1.Note] to which the - # containing [Occurrence][grafeas.v1.Occurrence] is associated. - # @param occurrence_resource_uri [::String] - # Required. The URI of the artifact (e.g. container image) that is the - # subject of the containing [Occurrence][grafeas.v1.Occurrence]. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new - # - # # Call the validate_attestation_occurrence method. - # result = client.validate_attestation_occurrence request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse. - # p result - # - def validate_attestation_occurrence request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest - - # Converts hash 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.validate_attestation_occurrence.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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.attestor - header_params["attestor"] = request.attestor - 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.validate_attestation_occurrence.timeout, - metadata: metadata, - retry_policy: @config.rpcs.validate_attestation_occurrence.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @validation_helper_stub.call_rpc :validate_attestation_occurrence, 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 ValidationHelper API. - # - # This class represents the configuration for ValidationHelper, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 - # # validate_attestation_occurrence to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.validate_attestation_occurrence.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.validate_attestation_occurrence.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the ValidationHelper 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 `validate_attestation_occurrence` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_attestation_occurrence - - # @private - def initialize parent_rpcs = nil - validate_attestation_occurrence_config = parent_rpcs.validate_attestation_occurrence if parent_rpcs.respond_to? :validate_attestation_occurrence - @validate_attestation_occurrence = ::Gapic::Config::Method.new validate_attestation_occurrence_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb deleted file mode 100644 index bec24ad23cd8..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module ValidationHelper - # Credentials for the ValidationHelper API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BINARY_AUTHORIZATION_CREDENTIALS", - "BINARY_AUTHORIZATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BINARY_AUTHORIZATION_CREDENTIALS_JSON", - "BINARY_AUTHORIZATION_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.rb deleted file mode 100644 index 33b694b610be..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest.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 "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1/version" - -require "google/cloud/binary_authorization/v1/validation_helper/credentials" -require "google/cloud/binary_authorization/v1/validation_helper/rest/client" - -module Google - module Cloud - module BinaryAuthorization - module V1 - ## - # BinAuthz Attestor verification - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/binary_authorization/v1/validation_helper/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new - # - module ValidationHelper - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/binary_authorization/v1/validation_helper/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb deleted file mode 100644 index ac1888ead4ab..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/client.rb +++ /dev/null @@ -1,436 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/validation_helper/rest/service_stub" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module ValidationHelper - module Rest - ## - # REST client for the ValidationHelper service. - # - # BinAuthz Attestor verification - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :validation_helper_stub - - ## - # Configure the ValidationHelper Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ValidationHelper clients - # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ValidationHelper Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 - @validation_helper_stub.universe_domain - end - - ## - # Create a new ValidationHelper REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ValidationHelper 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 - - @validation_helper_stub = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @validation_helper_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @validation_helper_stub.logger - end - - # Service calls - - ## - # Returns whether the given Attestation for the given image URI - # was signed by the given Attestor - # - # @overload validate_attestation_occurrence(request, options = nil) - # Pass arguments to `validate_attestation_occurrence` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload validate_attestation_occurrence(attestor: nil, attestation: nil, occurrence_note: nil, occurrence_resource_uri: nil) - # Pass arguments to `validate_attestation_occurrence` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param attestor [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} of the - # [occurrence][grafeas.v1.Occurrence], in the format - # `projects/*/attestors/*`. - # @param attestation [::Grafeas::V1::AttestationOccurrence, ::Hash] - # Required. An {::Grafeas::V1::AttestationOccurrence AttestationOccurrence} to - # be checked that it can be verified by the Attestor. It does not have to be - # an existing entity in Container Analysis. It must otherwise be a valid - # AttestationOccurrence. - # @param occurrence_note [::String] - # Required. The resource name of the [Note][grafeas.v1.Note] to which the - # containing [Occurrence][grafeas.v1.Occurrence] is associated. - # @param occurrence_resource_uri [::String] - # Required. The URI of the artifact (e.g. container image) that is the - # subject of the containing [Occurrence][grafeas.v1.Occurrence]. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new - # - # # Call the validate_attestation_occurrence method. - # result = client.validate_attestation_occurrence request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse. - # p result - # - def validate_attestation_occurrence request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest - - # Converts hash 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.validate_attestation_occurrence.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::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.validate_attestation_occurrence.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.validate_attestation_occurrence.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @validation_helper_stub.validate_attestation_occurrence 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 ValidationHelper REST API. - # - # This class represents the configuration for ValidationHelper REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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 - # # validate_attestation_occurrence to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.validate_attestation_occurrence.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.validate_attestation_occurrence.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 = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - 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 ValidationHelper 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 `validate_attestation_occurrence` - # @return [::Gapic::Config::Method] - # - attr_reader :validate_attestation_occurrence - - # @private - def initialize parent_rpcs = nil - validate_attestation_occurrence_config = parent_rpcs.validate_attestation_occurrence if parent_rpcs.respond_to? :validate_attestation_occurrence - @validate_attestation_occurrence = ::Gapic::Config::Method.new validate_attestation_occurrence_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb deleted file mode 100644 index c67a95fd8ea5..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/validation_helper/rest/service_stub.rb +++ /dev/null @@ -1,143 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binaryauthorization/v1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1 - module ValidationHelper - module Rest - ## - # REST service stub for the ValidationHelper 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 validate_attestation_occurrence REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse] - # A result object deserialized from the server's reply - def validate_attestation_occurrence request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_validate_attestation_occurrence_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: "validate_attestation_occurrence", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.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 validate_attestation_occurrence REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_validate_attestation_occurrence_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{attestor}:validateAttestationOccurrence", - body: "*", - matches: [ - ["attestor", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/version.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/v1/version.rb deleted file mode 100644 index d95ffedb69c8..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binary_authorization/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 BinaryAuthorization - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb deleted file mode 100644 index a82e617c64e7..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/resources_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/v1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/binaryauthorization/v1/resources.proto\x12#google.cloud.binaryauthorization.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf8\x0c\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12r\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12i\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32>.google.cloud.binaryauthorization.v1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12l\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32\x46.google.cloud.binaryauthorization.v1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x85\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32R.google.cloud.binaryauthorization.v1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x90\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32W.google.cloud.binaryauthorization.v1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x88\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32S.google.cloud.binaryauthorization.v1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12W\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1ap\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\x1a|\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\x1a}\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xda\x03\n\rAdmissionRule\x12_\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x41.google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x61\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32\x42.google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xb7\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\\\n\x17user_owned_grafeas_note\x18\x03 \x01(\x0b\x32\x39.google.cloud.binaryauthorization.v1.UserOwnedGrafeasNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb4\x01\n\x14UserOwnedGrafeasNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12P\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32\x36.google.cloud.binaryauthorization.v1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xbf\x04\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12\x62\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32\x45.google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm\"\xb1\x03\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x1a\x02\x10\x01\"\xba\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12M\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\x8c\x02\n5com.google.protos.google.cloud.binaryauthorization.v1P\x00ZYcloud.google.com/go/binaryauthorization/apiv1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02#Google.Cloud.BinaryAuthorization.V1\xca\x02#Google\\Cloud\\BinaryAuthorization\\V1\xea\x02&Google::Cloud::BinaryAuthorization::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1 - Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.Policy").msgclass - Policy::GlobalPolicyEvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode").enummodule - AdmissionWhitelistPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern").msgclass - AdmissionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionRule").msgclass - AdmissionRule::EvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode").enummodule - AdmissionRule::EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode").enummodule - Attestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.Attestor").msgclass - UserOwnedGrafeasNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote").msgclass - PkixPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.PkixPublicKey").msgclass - PkixPublicKey::SignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm").enummodule - AttestorPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.AttestorPublicKey").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb deleted file mode 100644 index f2f357a019f3..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_pb.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/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/binaryauthorization/v1/resources_pb' -require 'google/protobuf/empty_pb' -require 'grafeas/v1/attestation_pb' - - -descriptor_data = "\n1google/cloud/binaryauthorization/v1/service.proto\x12#google.cloud.binaryauthorization.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x33google/cloud/binaryauthorization/v1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgrafeas/v1/attestation.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"W\n\x13UpdatePolicyRequest\x12@\n\x06policy\x18\x01 \x01(\x0b\x32+.google.cloud.binaryauthorization.v1.PolicyB\x03\xe0\x41\x02\"\xbc\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x44\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32-.google.cloud.binaryauthorization.v1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"]\n\x15UpdateAttestorRequest\x12\x44\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32-.google.cloud.binaryauthorization.v1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x15ListAttestorsResponse\x12@\n\tattestors\x18\x01 \x03(\x0b\x32-.google.cloud.binaryauthorization.v1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\xbe\x01\n$ValidateAttestationOccurrenceRequest\x12\x15\n\x08\x61ttestor\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x0b\x61ttestation\x18\x02 \x01(\x0b\x32!.grafeas.v1.AttestationOccurrenceB\x03\xe0\x41\x02\x12\x1c\n\x0foccurrence_note\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12$\n\x17occurrence_resource_uri\x18\x04 \x01(\tB\x03\xe0\x41\x02\"\xf1\x01\n%ValidateAttestationOccurrenceResponse\x12\x61\n\x06result\x18\x01 \x01(\x0e\x32Q.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result\x12\x15\n\rdenial_reason\x18\x02 \x01(\t\"N\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\x12\x1e\n\x1a\x41TTESTATION_NOT_VERIFIABLE\x10\x02\x32\xe2\n\n\x1b\x42inauthzManagementServiceV1\x12\x9c\x01\n\tGetPolicy\x12\x35.google.cloud.binaryauthorization.v1.GetPolicyRequest\x1a+.google.cloud.binaryauthorization.v1.Policy\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=projects/*/policy}\x12\xb3\x01\n\x0cUpdatePolicy\x12\x38.google.cloud.binaryauthorization.v1.UpdatePolicyRequest\x1a+.google.cloud.binaryauthorization.v1.Policy\"<\xda\x41\x06policy\x82\xd3\xe4\x93\x02-\x1a#/v1/{policy.name=projects/*/policy}:\x06policy\x12\xce\x01\n\x0e\x43reateAttestor\x12:.google.cloud.binaryauthorization.v1.CreateAttestorRequest\x1a-.google.cloud.binaryauthorization.v1.Attestor\"Q\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xa7\x01\n\x0bGetAttestor\x12\x37.google.cloud.binaryauthorization.v1.GetAttestorRequest\x1a-.google.cloud.binaryauthorization.v1.Attestor\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/attestors/*}\x12\xc4\x01\n\x0eUpdateAttestor\x12:.google.cloud.binaryauthorization.v1.UpdateAttestorRequest\x1a-.google.cloud.binaryauthorization.v1.Attestor\"G\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02\x36\x1a*/v1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xba\x01\n\rListAttestors\x12\x39.google.cloud.binaryauthorization.v1.ListAttestorsRequest\x1a:.google.cloud.binaryauthorization.v1.ListAttestorsResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/attestors\x12\x96\x01\n\x0e\x44\x65leteAttestor\x12:.google.cloud.binaryauthorization.v1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\x94\x02\n\x0eSystemPolicyV1\x12\xa9\x01\n\x0fGetSystemPolicy\x12;.google.cloud.binaryauthorization.v1.GetSystemPolicyRequest\x1a+.google.cloud.binaryauthorization.v1.Policy\",\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1f\x12\x1d/v1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xf5\x02\n\x12ValidationHelperV1\x12\x86\x02\n\x1dValidateAttestationOccurrence\x12I.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest\x1aJ.google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse\"N\x82\xd3\xe4\x93\x02H\"C/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence:\x01*\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8c\x02\n5com.google.protos.google.cloud.binaryauthorization.v1P\x00ZYcloud.google.com/go/binaryauthorization/apiv1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02#Google.Cloud.BinaryAuthorization.V1\xca\x02#Google\\Cloud\\BinaryAuthorization\\V1\xea\x02&Google::Cloud::BinaryAuthorization::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1 - GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.GetPolicyRequest").msgclass - UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.UpdatePolicyRequest").msgclass - CreateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.CreateAttestorRequest").msgclass - GetAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.GetAttestorRequest").msgclass - UpdateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.UpdateAttestorRequest").msgclass - ListAttestorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ListAttestorsRequest").msgclass - ListAttestorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ListAttestorsResponse").msgclass - DeleteAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.DeleteAttestorRequest").msgclass - GetSystemPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.GetSystemPolicyRequest").msgclass - ValidateAttestationOccurrenceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest").msgclass - ValidateAttestationOccurrenceResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse").msgclass - ValidateAttestationOccurrenceResponse::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb deleted file mode 100644 index 8e3e1b2e4ff5..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/lib/google/cloud/binaryauthorization/v1/service_services_pb.rb +++ /dev/null @@ -1,115 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/binaryauthorization/v1/service.proto for package 'Google.Cloud.BinaryAuthorization.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/binaryauthorization/v1/service_pb' - -module Google - module Cloud - module BinaryAuthorization - module V1 - module BinauthzManagementServiceV1 - # Customer-facing API for Cloud Binary Authorization. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * [Policy][google.cloud.binaryauthorization.v1.Policy] - # * [Attestor][google.cloud.binaryauthorization.v1.Attestor] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1' - - # A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to - # a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default - # [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. - rpc :GetPolicy, ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1::Policy - # Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the - # new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. - rpc :UpdatePolicy, ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, ::Google::Cloud::BinaryAuthorization::V1::Policy - # Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new - # [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. - rpc :CreateAttestor, ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1::Attestor - # Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. - # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - rpc :GetAttestor, ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1::Attestor - # Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. - # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - rpc :UpdateAttestor, ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1::Attestor - # Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. - # Returns INVALID_ARGUMENT if the project does not exist. - rpc :ListAttestors, ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse - # Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - # [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - rpc :DeleteAttestor, ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - module SystemPolicyV1 - # API for working with the system policy. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.binaryauthorization.v1.SystemPolicyV1' - - # Gets the current system policy in the specified location. - rpc :GetSystemPolicy, ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1::Policy - end - - Stub = Service.rpc_stub_class - end - module ValidationHelperV1 - # BinAuthz Attestor verification - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.binaryauthorization.v1.ValidationHelperV1' - - # Returns whether the given Attestation for the given image URI - # was signed by the given Attestor - rpc :ValidateAttestationOccurrence, ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md deleted file mode 100644 index f3a8af37824d..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Binary Authorization 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-binary_authorization-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb deleted file mode 100644 index 810eb1c1a992..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/resources.rb +++ /dev/null @@ -1,374 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1 - # A {::Google::Cloud::BinaryAuthorization::V1::Policy policy} for container image binary authorization. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name, in the format `projects/*/policy`. There is - # at most one policy per project. - # @!attribute [rw] description - # @return [::String] - # Optional. A descriptive comment. - # @!attribute [rw] global_policy_evaluation_mode - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy::GlobalPolicyEvaluationMode] - # Optional. Controls the evaluation of a Google-maintained global admission - # policy for common system-level images. Images not covered by the global - # policy will be subject to the project admission policy. This setting - # has no effect when specified inside a global admission policy. - # @!attribute [rw] admission_whitelist_patterns - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern>] - # Optional. Admission policy allowlisting. A matching admission request will - # always be permitted. This feature is typically used to exclude Google or - # third-party infrastructure images from Binary Authorization policies. - # @!attribute [rw] cluster_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] - # Optional. Per-cluster admission rules. Cluster spec format: - # `location.clusterId`. There can be at most one admission rule per cluster - # spec. - # A `location` is either a compute zone (e.g. us-central1-a) or a region - # (e.g. us-central1). - # For `clusterId` syntax restrictions see - # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - # @!attribute [rw] kubernetes_namespace_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] - # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - # [a-z.-]+, e.g. 'some-namespace' - # @!attribute [rw] kubernetes_service_account_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] - # Optional. Per-kubernetes-service-account admission rules. Service account - # spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' - # @!attribute [rw] istio_service_identity_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1::AdmissionRule}] - # Optional. Per-istio-service-identity admission rules. Istio service - # identity spec format: - # spiffe:///ns//sa/ or - # /ns//sa/ - # e.g. spiffe://example.com/ns/test-ns/sa/default - # @!attribute [rw] default_admission_rule - # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] - # Required. Default admission rule for a cluster without a per-cluster, per- - # kubernetes-service-account, or per-istio-service-identity admission rule. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the policy was last updated. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] - class ClusterAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] - class KubernetesNamespaceAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] - class KubernetesServiceAccountAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule] - class IstioServiceIdentityAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module GlobalPolicyEvaluationMode - # Not specified: DISABLE is assumed. - GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0 - - # Enables system policy evaluation. - ENABLE = 1 - - # Disables system policy evaluation. - DISABLE = 2 - end - end - - # An {::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern admission allowlist pattern} exempts images - # from checks by {::Google::Cloud::BinaryAuthorization::V1::AdmissionRule admission rules}. - # @!attribute [rw] name_pattern - # @return [::String] - # An image name pattern to allowlist, in the form `registry/path/to/image`. - # This supports a trailing `*` wildcard, but this is allowed only in - # text after the `registry/` part. This also supports a trailing `**` - # wildcard which matches subdirectories of a given entry. - class AdmissionWhitelistPattern - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An {::Google::Cloud::BinaryAuthorization::V1::AdmissionRule admission rule} specifies either that all container images - # used in a pod creation request must be attested to by one or more - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, that all pod creations will be allowed, or that all - # pod creations will be denied. - # - # Images matching an {::Google::Cloud::BinaryAuthorization::V1::AdmissionWhitelistPattern admission allowlist pattern} - # are exempted from admission rules and will never block a pod creation. - # @!attribute [rw] evaluation_mode - # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule::EvaluationMode] - # Required. How this admission rule will be evaluated. - # @!attribute [rw] require_attestations_by - # @return [::Array<::String>] - # Optional. The resource names of the attestors that must attest to - # a container image, in the format `projects/*/attestors/*`. Each - # attestor must exist before a policy can reference it. To add an attestor - # to a policy the principal issuing the policy change request must be able - # to read the attestor resource. - # - # Note: this field must be non-empty when the evaluation_mode field specifies - # REQUIRE_ATTESTATION, otherwise it must be empty. - # @!attribute [rw] enforcement_mode - # @return [::Google::Cloud::BinaryAuthorization::V1::AdmissionRule::EnforcementMode] - # Required. The action when a pod creation is denied by the admission rule. - class AdmissionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module EvaluationMode - # Do not use. - EVALUATION_MODE_UNSPECIFIED = 0 - - # This rule allows all all pod creations. - ALWAYS_ALLOW = 1 - - # This rule allows a pod creation if all the attestors listed in - # 'require_attestations_by' have valid attestations for all of the - # images in the pod spec. - REQUIRE_ATTESTATION = 2 - - # This rule denies all pod creations. - ALWAYS_DENY = 3 - end - - # Defines the possible actions when a pod creation is denied by an admission - # rule. - module EnforcementMode - # Do not use. - ENFORCEMENT_MODE_UNSPECIFIED = 0 - - # Enforce the admission rule by blocking the pod creation. - ENFORCED_BLOCK_AND_AUDIT_LOG = 1 - - # Dryrun mode: Audit logging only. This will allow the pod creation as if - # the admission request had specified break-glass. - DRYRUN_AUDIT_LOG_ONLY = 2 - end - end - - # An {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} that attests to container image - # artifacts. An existing attestor cannot be modified except where - # indicated. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name, in the format: - # `projects/*/attestors/*`. This field may not be updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A descriptive comment. This field may be updated. - # The field may be displayed in chooser dialogs. - # @!attribute [rw] user_owned_grafeas_note - # @return [::Google::Cloud::BinaryAuthorization::V1::UserOwnedGrafeasNote] - # This specifies how an attestation will be read, and how it will be used - # during policy enforcement. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the attestor was last updated. - class Attestor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An {::Google::Cloud::BinaryAuthorization::V1::UserOwnedGrafeasNote user owned Grafeas note} references a Grafeas - # Attestation.Authority Note created by the user. - # @!attribute [rw] note_reference - # @return [::String] - # Required. The Grafeas resource name of a Attestation.Authority Note, - # created by the user, in the format: `projects/*/notes/*`. This field may - # not be updated. - # - # An attestation by this attestor is stored as a Grafeas - # Attestation.Authority Occurrence that names a container image and that - # links to this Note. Grafeas is an external dependency. - # @!attribute [rw] public_keys - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1::AttestorPublicKey>] - # Optional. Public keys that verify attestations signed by this - # attestor. This field may be updated. - # - # If this field is non-empty, one of the specified public keys must - # verify that an attestation was signed by this attestor for the - # image specified in the admission request. - # - # If this field is empty, this attestor always returns that no - # valid attestations exist. - # @!attribute [r] delegation_service_account_email - # @return [::String] - # Output only. This field will contain the service account email address - # that this Attestor will use as the principal when querying Container - # Analysis. Attestor administrators must grant this service account the - # IAM role needed to read attestations from the [note_reference][Note] in - # Container Analysis (`containeranalysis.notes.occurrences.viewer`). - # - # This email address is fixed for the lifetime of the Attestor, but callers - # should not make any other assumptions about the service account email; - # future versions may use an email based on a different naming pattern. - class UserOwnedGrafeasNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A public key in the PkixPublicKey format (see - # https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). - # Public keys of this type are typically textually encoded using the PEM - # format. - # @!attribute [rw] public_key_pem - # @return [::String] - # A PEM-encoded public key, as described in - # https://tools.ietf.org/html/rfc7468#section-13 - # @!attribute [rw] signature_algorithm - # @return [::Google::Cloud::BinaryAuthorization::V1::PkixPublicKey::SignatureAlgorithm] - # The signature algorithm used to verify a message against a signature using - # this key. - # These signature algorithm must match the structure and any object - # identifiers encoded in `public_key_pem` (i.e. this algorithm must match - # that of the public key). - class PkixPublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a signature algorithm and other information necessary to verify - # signatures with a given public key. - # This is based primarily on the public key types supported by Tink's - # PemKeyType, which is in turn based on KMS's supported signing algorithms. - # See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz - # might support additional public key types independently of Tink and/or KMS. - module SignatureAlgorithm - # Not specified. - SIGNATURE_ALGORITHM_UNSPECIFIED = 0 - - # RSASSA-PSS 2048 bit key with a SHA256 digest. - RSA_PSS_2048_SHA256 = 1 - - # RSASSA-PSS 3072 bit key with a SHA256 digest. - RSA_PSS_3072_SHA256 = 2 - - # RSASSA-PSS 4096 bit key with a SHA256 digest. - RSA_PSS_4096_SHA256 = 3 - - # RSASSA-PSS 4096 bit key with a SHA512 digest. - RSA_PSS_4096_SHA512 = 4 - - # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_2048_SHA256 = 5 - - # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_3072_SHA256 = 6 - - # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_4096_SHA256 = 7 - - # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - RSA_SIGN_PKCS1_4096_SHA512 = 8 - - # ECDSA on the NIST P-256 curve with a SHA256 digest. - ECDSA_P256_SHA256 = 9 - - # ECDSA on the NIST P-256 curve with a SHA256 digest. - EC_SIGN_P256_SHA256 = 9 - - # ECDSA on the NIST P-384 curve with a SHA384 digest. - ECDSA_P384_SHA384 = 10 - - # ECDSA on the NIST P-384 curve with a SHA384 digest. - EC_SIGN_P384_SHA384 = 10 - - # ECDSA on the NIST P-521 curve with a SHA512 digest. - ECDSA_P521_SHA512 = 11 - - # ECDSA on the NIST P-521 curve with a SHA512 digest. - EC_SIGN_P521_SHA512 = 11 - end - end - - # An {::Google::Cloud::BinaryAuthorization::V1::AttestorPublicKey attestor public key} that will be used to verify - # attestations signed by this attestor. - # @!attribute [rw] comment - # @return [::String] - # Optional. A descriptive comment. This field may be updated. - # @!attribute [rw] id - # @return [::String] - # The ID of this public key. - # Signatures verified by BinAuthz must include the ID of the public key that - # can be used to verify them, and that ID must match the contents of this - # field exactly. - # Additional restrictions on this field can be imposed based on which public - # key type is encapsulated. See the documentation on `public_key` cases below - # for details. - # @!attribute [rw] ascii_armored_pgp_public_key - # @return [::String] - # ASCII-armored representation of a PGP public key, as the entire output by - # the command `gpg --export --armor foo@example.com` (either LF or CRLF - # line endings). - # When using this field, `id` should be left blank. The BinAuthz API - # handlers will calculate the ID and fill it in automatically. BinAuthz - # computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - # upper-case hex. If `id` is provided by the caller, it will be - # overwritten by the API-calculated ID. - # - # Note: The following fields are mutually exclusive: `ascii_armored_pgp_public_key`, `pkix_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pkix_public_key - # @return [::Google::Cloud::BinaryAuthorization::V1::PkixPublicKey] - # A raw PKIX SubjectPublicKeyInfo format public key. - # - # NOTE: `id` may be explicitly provided by the caller when using this - # type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - # blank, a default one will be computed based on the digest of the DER - # encoding of the public key. - # - # Note: The following fields are mutually exclusive: `pkix_public_key`, `ascii_armored_pgp_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AttestorPublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb deleted file mode 100644 index 995b068a0e85..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/cloud/binaryauthorization/v1/service.rb +++ /dev/null @@ -1,189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1 - # Request message for [BinauthzManagementService.GetPolicy][]. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Policy policy} to retrieve, - # in the format `projects/*/policy`. - class GetPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.UpdatePolicy][]. - # @!attribute [rw] policy - # @return [::Google::Cloud::BinaryAuthorization::V1::Policy] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. - class UpdatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.CreateAttestor][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor}. - # @!attribute [rw] attestor_id - # @return [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} ID. - # @!attribute [rw] attestor - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. - class CreateAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.GetAttestor][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. - class GetAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.UpdateAttestor][]. - # @!attribute [rw] attestor - # @return [::Google::Cloud::BinaryAuthorization::V1::Attestor] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. - class UpdateAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.ListAttestors][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}, in the format `projects/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. - class ListAttestorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for [BinauthzManagementService.ListAttestors][]. - # @!attribute [rw] attestors - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1::Attestor>] - # The list of {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. Pass this value in the - # {::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} field in the subsequent call to the - # `ListAttestors` method to retrieve the next page of results. - class ListAttestorsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.DeleteAttestor][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. - class DeleteAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to read the current system policy. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - class GetSystemPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for - # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence ValidationHelperV1.ValidateAttestationOccurrence}. - # @!attribute [rw] attestor - # @return [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1::Attestor Attestor} of the - # [occurrence][grafeas.v1.Occurrence], in the format - # `projects/*/attestors/*`. - # @!attribute [rw] attestation - # @return [::Grafeas::V1::AttestationOccurrence] - # Required. An {::Grafeas::V1::AttestationOccurrence AttestationOccurrence} to - # be checked that it can be verified by the Attestor. It does not have to be - # an existing entity in Container Analysis. It must otherwise be a valid - # AttestationOccurrence. - # @!attribute [rw] occurrence_note - # @return [::String] - # Required. The resource name of the [Note][grafeas.v1.Note] to which the - # containing [Occurrence][grafeas.v1.Occurrence] is associated. - # @!attribute [rw] occurrence_resource_uri - # @return [::String] - # Required. The URI of the artifact (e.g. container image) that is the - # subject of the containing [Occurrence][grafeas.v1.Occurrence]. - class ValidateAttestationOccurrenceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for - # {::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence ValidationHelperV1.ValidateAttestationOccurrence}. - # @!attribute [rw] result - # @return [::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse::Result] - # The result of the Attestation validation. - # @!attribute [rw] denial_reason - # @return [::String] - # The reason for denial if the Attestation couldn't be validated. - class ValidateAttestationOccurrenceResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The enum returned in the "result" field. - module Result - # Unspecified. - RESULT_UNSPECIFIED = 0 - - # The Attestation was able to verified by the Attestor. - VERIFIED = 1 - - # The Attestation was not able to verified by the Attestor. - ATTESTATION_NOT_VERIFIABLE = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1/proto_docs/grafeas/v1/attestation.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/attestation.rb deleted file mode 100644 index 23895f01f033..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/attestation.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 Grafeas - module V1 - # Note kind that represents a logical attestation "role" or "authority". For - # example, an organization might have one `Authority` for "QA" and one for - # "build". This note is intended to act strictly as a grouping mechanism for - # the attached occurrences (Attestations). This grouping mechanism also - # provides a security boundary, since IAM ACLs gate the ability for a principle - # to attach an occurrence to a given note. It also provides a single point of - # lookup to find all attached attestation occurrences, even if they don't all - # live in the same project. - # @!attribute [rw] hint - # @return [::Grafeas::V1::AttestationNote::Hint] - # Hint hints at the purpose of the attestation authority. - class AttestationNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This submessage provides human-readable hints about the purpose of the - # authority. Because the name of a note acts as its resource reference, it is - # important to disambiguate the canonical name of the Note (which might be a - # UUID for security purposes) from "readable" names more suitable for debug - # output. Note that these hints should not be used to look up authorities in - # security sensitive contexts, such as when looking up attestations to - # verify. - # @!attribute [rw] human_readable_name - # @return [::String] - # Required. The human readable name of this attestation authority, for - # example "qa". - class Hint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] compact_jwt - # @return [::String] - # The compact encoding of a JWS, which is always three base64 encoded strings - # joined by periods. For details, see: - # https://tools.ietf.org/html/rfc7515.html#section-3.1 - class Jwt - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Occurrence that represents a single "attestation". The authenticity of an - # attestation can be verified using the attached signature. If the verifier - # trusts the public key of the signer, then verifying the signature is - # sufficient to establish trust. In this circumstance, the authority to which - # this attestation is attached is primarily useful for lookup (how to find - # this attestation if you already know the authority and artifact to be - # verified) and intent (for which authority this attestation was intended to - # sign. - # @!attribute [rw] serialized_payload - # @return [::String] - # Required. The serialized payload that is verified by one or more - # `signatures`. - # @!attribute [rw] signatures - # @return [::Array<::Grafeas::V1::Signature>] - # One or more signatures over `serialized_payload`. Verifier implementations - # should consider this attestation message verified if at least one - # `signature` verifies `serialized_payload`. See `Signature` in common.proto - # for more details on signature structure and verification. - # @!attribute [rw] jwts - # @return [::Array<::Grafeas::V1::Jwt>] - # One or more JWTs encoding a self-contained attestation. - # Each JWT encodes the payload that it verifies within the JWT itself. - # Verifier implementation SHOULD ignore the `serialized_payload` field - # when verifying these JWTs. - # If only JWTs are present on this AttestationOccurrence, then the - # `serialized_payload` SHOULD be left empty. - # Each JWT SHOULD encode a claim specific to the `resource_uri` of this - # Occurrence, but this is not validated by Grafeas metadata API - # implementations. The JWT itself is opaque to Grafeas. - class AttestationOccurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb deleted file mode 100644 index eabafd087790..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/proto_docs/grafeas/v1/common.rb +++ /dev/null @@ -1,243 +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 Grafeas - module V1 - # Metadata for any related URL information. - # @!attribute [rw] url - # @return [::String] - # Specific URL associated with the resource. - # @!attribute [rw] label - # @return [::String] - # Label to describe usage of the URL. - class RelatedUrl - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Verifiers (e.g. Kritis implementations) MUST verify signatures - # with respect to the trust anchors defined in policy (e.g. a Kritis policy). - # Typically this means that the verifier has been configured with a map from - # `public_key_id` to public key material (and any required parameters, e.g. - # signing algorithm). - # - # In particular, verification implementations MUST NOT treat the signature - # `public_key_id` as anything more than a key lookup hint. The `public_key_id` - # DOES NOT validate or authenticate a public key; it only provides a mechanism - # for quickly selecting a public key ALREADY CONFIGURED on the verifier through - # a trusted channel. Verification implementations MUST reject signatures in any - # of the following circumstances: - # * The `public_key_id` is not recognized by the verifier. - # * The public key that `public_key_id` refers to does not verify the - # signature with respect to the payload. - # - # The `signature` contents SHOULD NOT be "attached" (where the payload is - # included with the serialized `signature` bytes). Verifiers MUST ignore any - # "attached" payload and only verify signatures with respect to explicitly - # provided payload (e.g. a `payload` field on the proto message that holds - # this Signature, or the canonical serialization of the proto message that - # holds this signature). - # @!attribute [rw] signature - # @return [::String] - # The content of the signature, an opaque bytestring. - # The payload that this signature verifies MUST be unambiguously provided - # with the Signature during verification. A wrapper message might provide - # the payload explicitly. Alternatively, a message might have a canonical - # serialization that can always be unambiguously computed to derive the - # payload. - # @!attribute [rw] public_key_id - # @return [::String] - # The identifier for the public key that verifies this signature. - # * The `public_key_id` is required. - # * The `public_key_id` SHOULD be an RFC3986 conformant URI. - # * When possible, the `public_key_id` SHOULD be an immutable reference, - # such as a cryptographic digest. - # - # Examples of valid `public_key_id`s: - # - # OpenPGP V4 public key fingerprint: - # * "openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA" - # See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more - # details on this scheme. - # - # RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER - # serialization): - # * "ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU" - # * "nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5" - class Signature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MUST match - # https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An - # authenticated message of arbitrary type. - # @!attribute [rw] payload - # @return [::String] - # @!attribute [rw] payload_type - # @return [::String] - # @!attribute [rw] signatures - # @return [::Array<::Grafeas::V1::EnvelopeSignature>] - class Envelope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] sig - # @return [::String] - # @!attribute [rw] keyid - # @return [::String] - class EnvelopeSignature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicates the location at which a package was found. - # @!attribute [rw] file_path - # @return [::String] - # For jars that are contained inside .war files, this filepath - # can indicate the path to war file combined with the path to jar file. - # @!attribute [rw] layer_details - # @return [::Grafeas::V1::LayerDetails] - # Each package found in a file should have its own layer metadata (that is, - # information from the origin layer of the package). - # @!attribute [rw] line_number - # @return [::Integer] - # Line number in the file where the package was found. - # Optional field that only applies to source repository scanning. - class FileLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BaseImage describes a base image of a container image. - # @!attribute [rw] name - # @return [::String] - # The name of the base image. - # @!attribute [rw] repository - # @return [::String] - # The repository name in which the base image is from. - # @!attribute [rw] layer_count - # @return [::Integer] - # The number of layers that the base image is composed of. - # @!attribute [rw] registry - # @return [::String] - # The registry in which the base image is from. - class BaseImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the layer a package was found in. - # @!attribute [rw] index - # @return [::Integer] - # The index of the layer in the container image. - # @!attribute [rw] diff_id - # @return [::String] - # The diff ID (typically a sha256 hash) of the layer in the container image. - # @!attribute [rw] chain_id - # @return [::String] - # The layer chain ID (sha256 hash) of the layer in the container image. - # https://github.com/opencontainers/image-spec/blob/main/config.md#layer-chainid - # @!attribute [rw] command - # @return [::String] - # The layer build command that was used to build the layer. This may not be - # found in all layers depending on how the container image is built. - # @!attribute [rw] base_images - # @return [::Array<::Grafeas::V1::BaseImage>] - # The base images the layer is found within. - class LayerDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # License information. - # @!attribute [rw] expression - # @return [::String] - # Often a single license can be used to represent the licensing terms. - # Sometimes it is necessary to include a choice of one or more licenses - # or some combination of license identifiers. - # Examples: "LGPL-2.1-only OR MIT", "LGPL-2.1-only AND MIT", - # "GPL-2.0-or-later WITH Bison-exception-2.2". - # @!attribute [rw] comments - # @return [::String] - # Comments - class License - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Digest information. - # @!attribute [rw] algo - # @return [::String] - # `SHA1`, `SHA512` etc. - # @!attribute [rw] digest_bytes - # @return [::String] - # Value of the digest. - class Digest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Kind represents the kinds of notes supported. - module NoteKind - # Default value. This value is unused. - NOTE_KIND_UNSPECIFIED = 0 - - # The note and occurrence represent a package vulnerability. - VULNERABILITY = 1 - - # The note and occurrence assert build provenance. - BUILD = 2 - - # This represents an image basis relationship. - IMAGE = 3 - - # This represents a package installed via a package manager. - PACKAGE = 4 - - # The note and occurrence track deployment events. - DEPLOYMENT = 5 - - # The note and occurrence track the initial discovery status of a resource. - DISCOVERY = 6 - - # This represents a logical "role" that can attest to artifacts. - ATTESTATION = 7 - - # This represents an available package upgrade. - UPGRADE = 8 - - # This represents a Compliance Note - COMPLIANCE = 9 - - # This represents a DSSE attestation Note - DSSE_ATTESTATION = 10 - - # This represents a Vulnerability Assessment. - VULNERABILITY_ASSESSMENT = 11 - - # This represents an SBOM Reference. - SBOM_REFERENCE = 12 - - # This represents a secret. - SECRET = 13 - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/Gemfile deleted file mode 100644 index b15f486811b4..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-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-binary_authorization-v1", path: "../" -else - gem "google-cloud-binary_authorization-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-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb deleted file mode 100644 index d3d3d9cfbd30..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/create_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_BinauthzManagementService_CreateAttestor_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the create_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#create_attestor. -# -def create_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new - - # Call the create_attestor method. - result = client.create_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - p result -end -# [END binaryauthorization_v1_generated_BinauthzManagementService_CreateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb deleted file mode 100644 index 3746ae61fee1..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/delete_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_BinauthzManagementService_DeleteAttestor_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the delete_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#delete_attestor. -# -def delete_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new - - # Call the delete_attestor method. - result = client.delete_attestor request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END binaryauthorization_v1_generated_BinauthzManagementService_DeleteAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb deleted file mode 100644 index fc121e0e7a05..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_BinauthzManagementService_GetAttestor_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the get_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_attestor. -# -def get_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new - - # Call the get_attestor method. - result = client.get_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - p result -end -# [END binaryauthorization_v1_generated_BinauthzManagementService_GetAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb deleted file mode 100644 index db65dadfc232..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/get_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_BinauthzManagementService_GetPolicy_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the get_policy call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_policy. -# -def get_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new - - # Call the get_policy method. - result = client.get_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - p result -end -# [END binaryauthorization_v1_generated_BinauthzManagementService_GetPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb deleted file mode 100644 index 50bf5c28142b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/list_attestors.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_BinauthzManagementService_ListAttestors_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the list_attestors call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#list_attestors. -# -def list_attestors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new - - # Call the list_attestors method. - result = client.list_attestors request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BinaryAuthorization::V1::Attestor. - p item - end -end -# [END binaryauthorization_v1_generated_BinauthzManagementService_ListAttestors_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb deleted file mode 100644 index a4228606d221..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_BinauthzManagementService_UpdateAttestor_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the update_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_attestor. -# -def update_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new - - # Call the update_attestor method. - result = client.update_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Attestor. - p result -end -# [END binaryauthorization_v1_generated_BinauthzManagementService_UpdateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb deleted file mode 100644 index c27d96a7f3ce..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/binauthz_management_service/update_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_BinauthzManagementService_UpdatePolicy_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the update_policy call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_policy. -# -def update_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new - - # Call the update_policy method. - result = client.update_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - p result -end -# [END binaryauthorization_v1_generated_BinauthzManagementService_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json deleted file mode 100644 index b74cbd346028..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-binary_authorization-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.binaryauthorization.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_GetPolicy_sync", - "title": "Snippet for the get_policy call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_policy.", - "file": "binauthz_management_service/get_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::Policy", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "GetPolicy", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.GetPolicy", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_UpdatePolicy_sync", - "title": "Snippet for the update_policy call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_policy.", - "file": "binauthz_management_service/update_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::Policy", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "UpdatePolicy", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.UpdatePolicy", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_CreateAttestor_sync", - "title": "Snippet for the create_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#create_attestor.", - "file": "binauthz_management_service/create_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#create_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "CreateAttestor", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.CreateAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_GetAttestor_sync", - "title": "Snippet for the get_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_attestor.", - "file": "binauthz_management_service/get_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#get_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "GetAttestor", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.GetAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_UpdateAttestor_sync", - "title": "Snippet for the update_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_attestor.", - "file": "binauthz_management_service/update_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#update_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "UpdateAttestor", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.UpdateAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_ListAttestors_sync", - "title": "Snippet for the list_attestors call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#list_attestors.", - "file": "binauthz_management_service/list_attestors.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attestors", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#list_attestors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "ListAttestors", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.ListAttestors", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_BinauthzManagementService_DeleteAttestor_sync", - "title": "Snippet for the delete_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#delete_attestor.", - "file": "binauthz_management_service/delete_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client#delete_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "DeleteAttestor", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1.DeleteAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_SystemPolicy_GetSystemPolicy_sync", - "title": "Snippet for the get_system_policy call in the SystemPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client#get_system_policy.", - "file": "system_policy/get_system_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_system_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client#get_system_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::Policy", - "client": { - "short_name": "SystemPolicy::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client" - }, - "method": { - "short_name": "GetSystemPolicy", - "full_name": "google.cloud.binaryauthorization.v1.SystemPolicyV1.GetSystemPolicy", - "service": { - "short_name": "SystemPolicy", - "full_name": "google.cloud.binaryauthorization.v1.SystemPolicyV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1_generated_ValidationHelper_ValidateAttestationOccurrence_sync", - "title": "Snippet for the validate_attestation_occurrence call in the ValidationHelper service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence.", - "file": "validation_helper/validate_attestation_occurrence.rb", - "language": "RUBY", - "client_method": { - "short_name": "validate_attestation_occurrence", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse", - "client": { - "short_name": "ValidationHelper::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client" - }, - "method": { - "short_name": "ValidateAttestationOccurrence", - "full_name": "google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence", - "service": { - "short_name": "ValidationHelper", - "full_name": "google.cloud.binaryauthorization.v1.ValidationHelperV1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb deleted file mode 100644 index 03c084a5d4a3..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/system_policy/get_system_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_SystemPolicy_GetSystemPolicy_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the get_system_policy call in the SystemPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client#get_system_policy. -# -def get_system_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new - - # Call the get_system_policy method. - result = client.get_system_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1::Policy. - p result -end -# [END binaryauthorization_v1_generated_SystemPolicy_GetSystemPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb deleted file mode 100644 index ce37ef22ca28..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/snippets/validation_helper/validate_attestation_occurrence.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1_generated_ValidationHelper_ValidateAttestationOccurrence_sync] -require "google/cloud/binary_authorization/v1" - -## -# Snippet for the validate_attestation_occurrence call in the ValidationHelper service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client#validate_attestation_occurrence. -# -def validate_attestation_occurrence - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new - - # Call the validate_attestation_occurrence method. - result = client.validate_attestation_occurrence request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse. - p result -end -# [END binaryauthorization_v1_generated_ValidationHelper_ValidateAttestationOccurrence_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb deleted file mode 100644 index 021b9dc22a4c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_paths_test.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binary_authorization/v1/binauthz_management_service" - -class ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_attestor_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.attestor_path project: "value0", attestor: "value1" - assert_equal "projects/value0/attestors/value1", path - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path project: "value0" - assert_equal "projects/value0/policy", path - - path = client.policy_path location: "value0" - assert_equal "locations/value0/policy", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb deleted file mode 100644 index b02727df0d99..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_rest_test.rb +++ /dev/null @@ -1,481 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/binauthz_management_service/rest" - - -class ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_policy ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_policy(::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_count - end - end - end - - def test_update_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_policy({ policy: policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_policy policy: policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_policy ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_policy({ policy: policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_policy(::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_count - end - end - end - - def test_create_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attestor_id = "hello world" - attestor = {} - - create_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_create_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_attestor ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_attestor(::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_attestor_client_stub.call_count - end - end - end - - def test_get_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_attestor({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_attestor name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_attestor ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_attestor({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_attestor(::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_attestor_client_stub.call_count - end - end - end - - def test_update_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - attestor = {} - - update_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_attestor({ attestor: attestor }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_attestor attestor: attestor do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_attestor ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_attestor({ attestor: attestor }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_attestor(::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_attestor_client_stub.call_count - end - end - end - - def test_list_attestors - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_attestors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_list_attestors_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attestors_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_attestors ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_attestors(::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_attestors_client_stub.call_count - end - end - end - - def test_delete_attestor - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_delete_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_attestor({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_attestor name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_attestor({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_attestor_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb deleted file mode 100644 index 9c8502cacacf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/binauthz_management_service_test.rb +++ /dev/null @@ -1,523 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/binauthz_management_service" - -class ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_policy ::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_policy(::Google::Cloud::BinaryAuthorization::V1::GetPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_rpc_count - end - end - - def test_update_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1::Policy), request["policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_policy({ policy: policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_policy policy: policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_policy ::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_policy({ policy: policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_policy(::Google::Cloud::BinaryAuthorization::V1::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_rpc_count - end - end - - def test_create_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attestor_id = "hello world" - attestor = {} - - create_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["attestor_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1::Attestor), request["attestor"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_attestor ::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_attestor(::Google::Cloud::BinaryAuthorization::V1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_attestor_client_stub.call_rpc_count - end - end - - def test_get_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_attestor({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_attestor name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_attestor ::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_attestor({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_attestor(::Google::Cloud::BinaryAuthorization::V1::GetAttestorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_attestor_client_stub.call_rpc_count - end - end - - def test_update_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Attestor.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - attestor = {} - - update_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1::Attestor), request["attestor"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_attestor({ attestor: attestor }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_attestor attestor: attestor do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_attestor ::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_attestor({ attestor: attestor }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_attestor(::Google::Cloud::BinaryAuthorization::V1::UpdateAttestorRequest.new(attestor: attestor), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_attestor_client_stub.call_rpc_count - end - end - - def test_list_attestors - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_attestors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attestors, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_attestors_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_attestors ::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_attestors(::Google::Cloud::BinaryAuthorization::V1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_attestors_client_stub.call_rpc_count - end - end - - def test_delete_attestor - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_attestor({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_attestor name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_attestor({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1::DeleteAttestorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_attestor_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::BinauthzManagementService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb deleted file mode 100644 index 627c53badd9f..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_paths_test.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binary_authorization/v1/system_policy" - -class ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path project: "value0" - assert_equal "projects/value0/policy", path - - path = client.policy_path location: "value0" - assert_equal "locations/value0/policy", path - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb deleted file mode 100644 index c945256e19b5..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_rest_test.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/system_policy/rest" - - -class ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_system_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_system_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::ServiceStub.stub :transcode_get_system_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_system_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_system_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_system_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_system_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_system_policy_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb deleted file mode 100644 index bc615fe2637c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/system_policy_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/system_policy" - -class ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_system_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_system_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_system_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_system_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_system_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_system_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_system_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1::GetSystemPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_system_policy_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::SystemPolicy::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb deleted file mode 100644 index bd7846c5fb28..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_rest_test.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/validation_helper/rest" - - -class ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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_validate_attestation_occurrence - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - attestor = "hello world" - attestation = {} - occurrence_note = "hello world" - occurrence_resource_uri = "hello world" - - validate_attestation_occurrence_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::ServiceStub.stub :transcode_validate_attestation_occurrence_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, validate_attestation_occurrence_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.validate_attestation_occurrence attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.validate_attestation_occurrence ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.validate_attestation_occurrence(::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, validate_attestation_occurrence_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb deleted file mode 100644 index 1beca9828985..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/google/cloud/binary_authorization/v1/validation_helper_test.rb +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binaryauthorization/v1/service_pb" -require "google/cloud/binary_authorization/v1/validation_helper" - -class ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::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_validate_attestation_occurrence - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - attestor = "hello world" - attestation = {} - occurrence_note = "hello world" - occurrence_resource_uri = "hello world" - - validate_attestation_occurrence_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :validate_attestation_occurrence, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest, request - assert_equal "hello world", request["attestor"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Grafeas::V1::AttestationOccurrence), request["attestation"] - assert_equal "hello world", request["occurrence_note"] - assert_equal "hello world", request["occurrence_resource_uri"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, validate_attestation_occurrence_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.validate_attestation_occurrence attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.validate_attestation_occurrence ::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.validate_attestation_occurrence({ attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.validate_attestation_occurrence(::Google::Cloud::BinaryAuthorization::V1::ValidateAttestationOccurrenceRequest.new(attestor: attestor, attestation: attestation, occurrence_note: occurrence_note, occurrence_resource_uri: occurrence_resource_uri), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, validate_attestation_occurrence_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1::ValidationHelper::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json deleted file mode 100644 index 4d21ef558c4c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "api_id": "binaryauthorization.googleapis.com", - "api_shortname": "binaryauthorization", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest", - "distribution_name": "google-cloud-binary_authorization-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "binaryauthorization", - "name_pretty": "Binary Authorization V1beta1 API", - "product_documentation": "https://cloud.google.com/binary-authorization/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BINARY_AUTHORIZATION", - "ruby-cloud-product-url": "https://cloud.google.com/binary-authorization/", - "ruby-cloud-service-override": "BinauthzManagementServiceV1Beta1=BinauthzManagementService;SystemPolicyV1Beta1=SystemPolicy", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml deleted file mode 100644 index 7496dd195e5b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-binary_authorization-v1beta1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-binary_authorization-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts deleted file mode 100644 index d1b2fdebca77..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Binary Authorization V1beta1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md deleted file mode 100644 index ab598dfa7e16..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-binary_authorization-v1beta1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-binary_authorization-v1beta1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/binary_authorization/v1beta1" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/binary_authorization/v1beta1" - -::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-binary_authorization-v1beta1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/binary_authorization/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md deleted file mode 100644 index 4972c1e5a1ed..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Binary Authorization V1beta1 API - -The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run. - -Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Binary Authorization V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-binary_authorization](https://rubygems.org/gems/google-cloud-binary_authorization). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-binary_authorization-v1beta1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/binaryauthorization.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/binary_authorization/v1beta1" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new -request = ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new # (request fields as keyword arguments...) -response = client.get_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/binary-authorization/) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/binary_authorization/v1beta1" -require "logger" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.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-binary_authorization`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-binary_authorization-v1beta1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-binary_authorization`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-binary_authorization-v1beta1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile deleted file mode 100644 index 1ce7279d8545..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-binary_authorization-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BINARY_AUTHORIZATION_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BINARY_AUTHORIZATION_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or BINARY_AUTHORIZATION_TEST_PROJECT=test123 BINARY_AUTHORIZATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BINARY_AUTHORIZATION_PROJECT"] = project - ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] = project - ENV["BINARY_AUTHORIZATION_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-binary_authorization-v1beta1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-binary_authorization-v1beta1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-binary_authorization-v1beta1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-binary_authorization-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-binary_authorization-v1beta1" - header "google-cloud-binary_authorization-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-binary_authorization-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-binary_authorization-v1beta1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-binary_authorization-v1beta1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-binary_authorization-v1beta1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json deleted file mode 100644 index b3053a044eb8..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.binaryauthorization.v1beta1", - "libraryPackage": "::Google::Cloud::BinaryAuthorization::V1beta1", - "services": { - "BinauthzManagementServiceV1Beta1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client", - "rpcs": { - "GetPolicy": { - "methods": [ - "get_policy" - ] - }, - "UpdatePolicy": { - "methods": [ - "update_policy" - ] - }, - "CreateAttestor": { - "methods": [ - "create_attestor" - ] - }, - "GetAttestor": { - "methods": [ - "get_attestor" - ] - }, - "UpdateAttestor": { - "methods": [ - "update_attestor" - ] - }, - "ListAttestors": { - "methods": [ - "list_attestors" - ] - }, - "DeleteAttestor": { - "methods": [ - "delete_attestor" - ] - } - } - } - } - }, - "SystemPolicyV1Beta1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client", - "rpcs": { - "GetSystemPolicy": { - "methods": [ - "get_system_policy" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec deleted file mode 100644 index 592de79dce90..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/binary_authorization/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-binary_authorization-v1beta1" - gem.version = Google::Cloud::BinaryAuthorization::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details." - gem.summary = "The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb deleted file mode 100644 index 8a412c54b91b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/binary_authorization/v1beta1" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb deleted file mode 100644 index 1a6abd865063..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" -require "google/cloud/binary_authorization/v1beta1/system_policy" -require "google/cloud/binary_authorization/v1beta1/version" - -module Google - module Cloud - module BinaryAuthorization - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1beta1" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1beta1" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/binary_authorization/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb deleted file mode 100644 index 514a9421da0a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1beta1/version" - -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/client" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module BinauthzManagementService - end - end - end - end -end - -helper_path = ::File.join __dir__, "binauthz_management_service", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb deleted file mode 100644 index efd56785a725..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb +++ /dev/null @@ -1,1108 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1beta1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - ## - # Client for the BinauthzManagementService service. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :binauthz_management_service_stub - - ## - # Configure the BinauthzManagementService Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BinauthzManagementService clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_policy.timeout = 600.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_policy.timeout = 600.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_attestor.timeout = 600.0 - - default_config.rpcs.get_attestor.timeout = 600.0 - default_config.rpcs.get_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_attestor.timeout = 600.0 - default_config.rpcs.update_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_attestors.timeout = 600.0 - default_config.rpcs.list_attestors.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_attestor.timeout = 600.0 - default_config.rpcs.delete_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BinauthzManagementService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @binauthz_management_service_stub.universe_domain - end - - ## - # Create a new BinauthzManagementService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BinauthzManagementService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/binaryauthorization/v1beta1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @binauthz_management_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementServiceV1Beta1::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @binauthz_management_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @binauthz_management_service_stub.logger - end - - # Service calls - - ## - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must attest to - # a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project does not have one. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, - # in the format `projects/*/policy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :get_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a copy of the - # new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def update_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :update_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already exists. - # - # @overload create_attestor(request, options = nil) - # Pass arguments to `create_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) - # Pass arguments to `create_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # @param attestor_id [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. - # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new - # - # # Call the create_attestor method. - # result = client.create_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def create_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :create_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. - # - # @overload get_attestor(request, options = nil) - # Pass arguments to `get_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_attestor(name: nil) - # Pass arguments to `get_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new - # - # # Call the get_attestor method. - # result = client.get_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def get_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :get_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. - # - # @overload update_attestor(request, options = nil) - # Pass arguments to `update_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_attestor(attestor: nil) - # Pass arguments to `update_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new - # - # # Call the update_attestor method. - # result = client.update_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def update_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.attestor&.name - header_params["attestor.name"] = request.attestor.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :update_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. - # Returns INVALID_ARGUMENT if the project does not exist. - # - # @overload list_attestors(request, options = nil) - # Pass arguments to `list_attestors` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attestors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. - # @param page_size [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new - # - # # Call the list_attestors method. - # result = client.list_attestors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p item - # end - # - def list_attestors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_attestors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_attestors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attestors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :list_attestors, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. - # - # @overload delete_attestor(request, options = nil) - # Pass arguments to `delete_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_attestor(name: nil) - # Pass arguments to `delete_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new - # - # # Call the delete_attestor method. - # result = client.delete_attestor request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :delete_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BinauthzManagementService API. - # - # This class represents the configuration for BinauthzManagementService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the BinauthzManagementService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `create_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attestor - ## - # RPC-specific configuration for `get_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attestor - ## - # RPC-specific configuration for `update_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :update_attestor - ## - # RPC-specific configuration for `list_attestors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attestors - ## - # RPC-specific configuration for `delete_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attestor - - # @private - def initialize parent_rpcs = nil - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor - @create_attestor = ::Gapic::Config::Method.new create_attestor_config - get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor - @get_attestor = ::Gapic::Config::Method.new get_attestor_config - update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor - @update_attestor = ::Gapic::Config::Method.new update_attestor_config - list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors - @list_attestors = ::Gapic::Config::Method.new list_attestors_config - delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor - @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb deleted file mode 100644 index 62123b4765a6..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - # Credentials for the BinauthzManagementService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BINARY_AUTHORIZATION_CREDENTIALS", - "BINARY_AUTHORIZATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BINARY_AUTHORIZATION_CREDENTIALS_JSON", - "BINARY_AUTHORIZATION_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb deleted file mode 100644 index 64f9546c9431..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - # Path helper methods for the BinauthzManagementService API. - module Paths - ## - # Create a fully-qualified Attestor resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/attestors/{attestor}` - # - # @param project [String] - # @param attestor [String] - # - # @return [::String] - def attestor_path project:, attestor: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/attestors/#{attestor}" - end - - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/policy` - # - # @param project [String] - # - # @overload policy_path(location:) - # The resource will be in the following format: - # - # `locations/{location}/policy` - # - # @param location [String] - # - # @return [::String] - def policy_path **args - resources = { - "project" => (proc do |project:| - "projects/#{project}/policy" - end), - "location" => (proc do |location:| - "locations/#{location}/policy" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb deleted file mode 100644 index b4f1c2a40ec4..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1beta1/version" - -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module BinauthzManagementService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb deleted file mode 100644 index 74adacfe987d..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb +++ /dev/null @@ -1,1016 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - module Rest - ## - # REST client for the BinauthzManagementService service. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :binauthz_management_service_stub - - ## - # Configure the BinauthzManagementService Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BinauthzManagementService clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_policy.timeout = 600.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_policy.timeout = 600.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_attestor.timeout = 600.0 - - default_config.rpcs.get_attestor.timeout = 600.0 - default_config.rpcs.get_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_attestor.timeout = 600.0 - default_config.rpcs.update_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_attestors.timeout = 600.0 - default_config.rpcs.list_attestors.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_attestor.timeout = 600.0 - default_config.rpcs.delete_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BinauthzManagementService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @binauthz_management_service_stub.universe_domain - end - - ## - # Create a new BinauthzManagementService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BinauthzManagementService client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @binauthz_management_service_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @binauthz_management_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @binauthz_management_service_stub.logger - end - - # Service calls - - ## - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must attest to - # a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project does not have one. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_policy(name: nil) - # Pass arguments to `get_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, - # in the format `projects/*/policy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.get_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a copy of the - # new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def update_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.update_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already exists. - # - # @overload create_attestor(request, options = nil) - # Pass arguments to `create_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) - # Pass arguments to `create_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # @param attestor_id [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. - # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new - # - # # Call the create_attestor method. - # result = client.create_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def create_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.create_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. - # - # @overload get_attestor(request, options = nil) - # Pass arguments to `get_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_attestor(name: nil) - # Pass arguments to `get_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new - # - # # Call the get_attestor method. - # result = client.get_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def get_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.get_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. - # - # @overload update_attestor(request, options = nil) - # Pass arguments to `update_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_attestor(attestor: nil) - # Pass arguments to `update_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new - # - # # Call the update_attestor method. - # result = client.update_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def update_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.update_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. - # Returns INVALID_ARGUMENT if the project does not exist. - # - # @overload list_attestors(request, options = nil) - # Pass arguments to `list_attestors` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_attestors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attestors` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. - # @param page_size [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new - # - # # Call the list_attestors method. - # result = client.list_attestors request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p item - # end - # - def list_attestors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_attestors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_attestors.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attestors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.list_attestors request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, "attestors", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. - # - # @overload delete_attestor(request, options = nil) - # Pass arguments to `delete_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_attestor(name: nil) - # Pass arguments to `delete_attestor` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new - # - # # Call the delete_attestor method. - # result = client.delete_attestor request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_attestor.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.delete_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the BinauthzManagementService REST API. - # - # This class represents the configuration for BinauthzManagementService REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BinauthzManagementService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `create_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attestor - ## - # RPC-specific configuration for `get_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attestor - ## - # RPC-specific configuration for `update_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :update_attestor - ## - # RPC-specific configuration for `list_attestors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attestors - ## - # RPC-specific configuration for `delete_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attestor - - # @private - def initialize parent_rpcs = nil - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor - @create_attestor = ::Gapic::Config::Method.new create_attestor_config - get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor - @get_attestor = ::Gapic::Config::Method.new get_attestor_config - update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor - @update_attestor = ::Gapic::Config::Method.new update_attestor_config - list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors - @list_attestors = ::Gapic::Config::Method.new list_attestors_config - delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor - @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb deleted file mode 100644 index e95cf3599a62..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb +++ /dev/null @@ -1,511 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binaryauthorization/v1beta1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - module Rest - ## - # REST service stub for the BinauthzManagementService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # A result object deserialized from the server's reply - def get_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # A result object deserialized from the server's reply - def update_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # A result object deserialized from the server's reply - def create_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # A result object deserialized from the server's reply - def get_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # A result object deserialized from the server's reply - def update_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_attestors REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse] - # A result object deserialized from the server's reply - def list_attestors request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attestors_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_attestors", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1beta1/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^projects/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/attestors", - body: "attestor", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1beta1/{attestor.name}", - body: "attestor", - matches: [ - ["attestor.name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attestors REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_attestors_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/attestors", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb deleted file mode 100644 index 2edf77a9c5ea..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest" -require "google/cloud/binary_authorization/v1beta1/version" - -module Google - module Cloud - module BinaryAuthorization - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/binary_authorization/v1beta1/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb deleted file mode 100644 index 69c5ebc8bbe2..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1beta1/version" - -require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" -require "google/cloud/binary_authorization/v1beta1/system_policy/paths" -require "google/cloud/binary_authorization/v1beta1/system_policy/client" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # API for working with the system policy. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1beta1/system_policy" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - module SystemPolicy - end - end - end - end -end - -helper_path = ::File.join __dir__, "system_policy", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/system_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb deleted file mode 100644 index eca95db4ad07..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb +++ /dev/null @@ -1,475 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1beta1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - ## - # Client for the SystemPolicy service. - # - # API for working with the system policy. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :system_policy_stub - - ## - # Configure the SystemPolicy Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SystemPolicy clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SystemPolicy Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @system_policy_stub.universe_domain - end - - ## - # Create a new SystemPolicy client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SystemPolicy client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/binaryauthorization/v1beta1/service_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @system_policy_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicyV1Beta1::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @system_policy_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @system_policy_stub.logger - end - - # Service calls - - ## - # Gets the current system policy in the specified location. - # - # @overload get_system_policy(request, options = nil) - # Pass arguments to `get_system_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_system_policy(name: nil) - # Pass arguments to `get_system_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new - # - # # Call the get_system_policy method. - # result = client.get_system_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_system_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_system_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_system_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_system_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @system_policy_stub.call_rpc :get_system_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SystemPolicy API. - # - # This class represents the configuration for SystemPolicy, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_system_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the SystemPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_system_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_system_policy - - # @private - def initialize parent_rpcs = nil - get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy - @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb deleted file mode 100644 index 5086add422bf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - # Credentials for the SystemPolicy API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BINARY_AUTHORIZATION_CREDENTIALS", - "BINARY_AUTHORIZATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BINARY_AUTHORIZATION_CREDENTIALS_JSON", - "BINARY_AUTHORIZATION_KEYFILE_JSON", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb deleted file mode 100644 index acd18465e582..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - # Path helper methods for the SystemPolicy API. - module Paths - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/policy` - # - # @param project [String] - # - # @overload policy_path(location:) - # The resource will be in the following format: - # - # `locations/{location}/policy` - # - # @param location [String] - # - # @return [::String] - def policy_path **args - resources = { - "project" => (proc do |project:| - "projects/#{project}/policy" - end), - "location" => (proc do |location:| - "locations/#{location}/policy" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb deleted file mode 100644 index 4f48e77e210b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1beta1/version" - -require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" -require "google/cloud/binary_authorization/v1beta1/system_policy/paths" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest/client" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # API for working with the system policy. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - module SystemPolicy - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb deleted file mode 100644 index 0423e3495c8e..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb +++ /dev/null @@ -1,425 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - module Rest - ## - # REST client for the SystemPolicy service. - # - # API for working with the system policy. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :system_policy_stub - - ## - # Configure the SystemPolicy Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SystemPolicy clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "BinaryAuthorization", "V1beta1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SystemPolicy Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @system_policy_stub.universe_domain - end - - ## - # Create a new SystemPolicy REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SystemPolicy client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @system_policy_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @system_policy_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @system_policy_stub.logger - end - - # Service calls - - ## - # Gets the current system policy in the specified location. - # - # @overload get_system_policy(request, options = nil) - # Pass arguments to `get_system_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_system_policy(name: nil) - # Pass arguments to `get_system_policy` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new - # - # # Call the get_system_policy method. - # result = client.get_system_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_system_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_system_policy.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_system_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_system_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @system_policy_stub.get_system_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the SystemPolicy REST API. - # - # This class represents the configuration for SystemPolicy REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_system_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SystemPolicy API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_system_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_system_policy - - # @private - def initialize parent_rpcs = nil - get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy - @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb deleted file mode 100644 index 6e02f227b484..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/binaryauthorization/v1beta1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - module Rest - ## - # REST service stub for the SystemPolicy service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_system_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # A result object deserialized from the server's reply - def get_system_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_system_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_system_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_system_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_system_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^locations/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb deleted file mode 100644 index a42a2a29d560..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb deleted file mode 100644 index 051ea7515920..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nLgoogle/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x11\n\x19\x43ontinuousValidationEvent\x12u\n\tpod_event\x18\x01 \x01(\x0b\x32`.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEventH\x00\x12r\n\x12\x63onfig_error_event\x18\x04 \x01(\x0b\x32T.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEventH\x00\x1a\xc5\x0e\n\x1c\x43ontinuousValidationPodEvent\x12\x15\n\rpod_namespace\x18\x07 \x01(\t\x12\x0b\n\x03pod\x18\x01 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x08 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x8a\x01\n\x07verdict\x18\x04 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict\x12}\n\x06images\x18\x05 \x03(\x0b\x32m.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails\x1a\xa3\n\n\x0cImageDetails\x12\r\n\x05image\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\t\x12\x93\x01\n\x0e\x63ontainer_type\x18\x06 \x01(\x0e\x32{.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType\x12\x89\x01\n\x06result\x18\x02 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x90\x01\n\rcheck_results\x18\x04 \x03(\x0b\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult\x1a\xf2\x04\n\x0b\x43heckResult\x12\x17\n\x0f\x63heck_set_index\x18\x01 \x01(\t\x12\x16\n\x0e\x63heck_set_name\x18\x02 \x01(\t\x12\xa1\x01\n\x0f\x63heck_set_scope\x18\x03 \x01(\x0b\x32\x87\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope\x12\x13\n\x0b\x63heck_index\x18\x04 \x01(\t\x12\x12\n\ncheck_name\x18\x05 \x01(\t\x12\x12\n\ncheck_type\x18\x06 \x01(\t\x12\x98\x01\n\x07verdict\x18\x07 \x01(\x0e\x32\x86\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict\x12\x13\n\x0b\x65xplanation\x18\x08 \x01(\t\x1a^\n\rCheckSetScope\x12$\n\x1akubernetes_service_account\x18\x01 \x01(\tH\x00\x12\x1e\n\x14kubernetes_namespace\x18\x02 \x01(\tH\x00\x42\x07\n\x05scope\"A\n\x0c\x43heckVerdict\x12\x1d\n\x19\x43HECK_VERDICT_UNSPECIFIED\x10\x00\x12\x12\n\x0eNON_CONFORMANT\x10\x01\"k\n\rContainerType\x12\x1e\n\x1a\x43ONTAINER_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCONTAINER\x10\x01\x12\x12\n\x0eINIT_CONTAINER\x10\x02\x12\x17\n\x13\x45PHEMERAL_CONTAINER\x10\x03\"@\n\x0b\x41uditResult\x12\x1c\n\x18\x41UDIT_RESULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"[\n\x18PolicyConformanceVerdict\x12*\n&POLICY_CONFORMANCE_VERDICT_UNSPECIFIED\x10\x00\x12\x13\n\x0fVIOLATES_POLICY\x10\x01\x1a\'\n\x10\x43onfigErrorEvent\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x0c\n\nevent_typeB\xb9\x02\n,com.google.cloud.binaryauthorization.v1beta1B ContinuousValidationLoggingProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ContinuousValidationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict").enummodule - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType").enummodule - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult").enummodule - ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict").enummodule - ContinuousValidationEvent::ConfigErrorEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEvent").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb deleted file mode 100644 index 469851b91756..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/v1beta1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/binaryauthorization/v1beta1/resources.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\r\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12w\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32K.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12n\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32\x43.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12q\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32K.google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8a\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32W.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x95\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32\\.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8d\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32X.google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12\\\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1au\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x86\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x82\x01\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xe4\x03\n\rAdmissionRule\x12\x64\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32G.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xbc\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x17user_owned_drydock_note\x18\x03 \x01(\x0b\x32>.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb9\x01\n\x14UserOwnedDrydockNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32;.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc4\x04\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12g\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32J.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm\"\xb1\x03\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x1a\x02\x10\x01\"\xbf\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12R\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\xba\x02\n,com.google.cloud.binaryauthorization.v1beta1B!BinaryAuthorizationResourcesProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy").msgclass - Policy::GlobalPolicyEvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode").enummodule - AdmissionWhitelistPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern").msgclass - AdmissionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule").msgclass - AdmissionRule::EvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode").enummodule - AdmissionRule::EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode").enummodule - Attestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Attestor").msgclass - UserOwnedDrydockNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote").msgclass - PkixPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey").msgclass - PkixPublicKey::SignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm").enummodule - AttestorPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AttestorPublicKey").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb deleted file mode 100644 index 9cb9ff3147e9..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/v1beta1/service.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/binaryauthorization/v1beta1/resources_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n6google/cloud/binaryauthorization/v1beta1/service.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/binaryauthorization/v1beta1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\\\n\x13UpdatePolicyRequest\x12\x45\n\x06policy\x18\x01 \x01(\x0b\x32\x30.google.cloud.binaryauthorization.v1beta1.PolicyB\x03\xe0\x41\x02\"\xc1\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"b\n\x15UpdateAttestorRequest\x12I\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x15ListAttestorsResponse\x12\x45\n\tattestors\x18\x01 \x03(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy2\xcb\x0b\n BinauthzManagementServiceV1Beta1\x12\xab\x01\n\tGetPolicy\x12:.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1beta1/{name=projects/*/policy}\x12\xc2\x01\n\x0cUpdatePolicy\x12=.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"A\xda\x41\x06policy\x82\xd3\xe4\x93\x02\x32\x1a(/v1beta1/{policy.name=projects/*/policy}:\x06policy\x12\xdd\x01\n\x0e\x43reateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"V\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02\x32\"&/v1beta1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xb6\x01\n\x0bGetAttestor\x12<.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{name=projects/*/attestors/*}\x12\xd3\x01\n\x0eUpdateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"L\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02;\x1a//v1beta1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xc9\x01\n\rListAttestors\x12>.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest\x1a?.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{parent=projects/*}/attestors\x12\xa0\x01\n\x0e\x44\x65leteAttestor\x12?.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1beta1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xa8\x02\n\x13SystemPolicyV1Beta1\x12\xb8\x01\n\x0fGetSystemPolicy\x12@.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1beta1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x02\n,com.google.cloud.binaryauthorization.v1beta1B\x1f\x42inaryAuthorizationServiceProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetPolicyRequest").msgclass - UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest").msgclass - CreateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest").msgclass - GetAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetAttestorRequest").msgclass - UpdateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest").msgclass - ListAttestorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest").msgclass - ListAttestorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse").msgclass - DeleteAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest").msgclass - GetSystemPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb deleted file mode 100644 index f5b18afc2228..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb +++ /dev/null @@ -1,98 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/binaryauthorization/v1beta1/service.proto for package 'Google.Cloud.BinaryAuthorization.V1beta1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/binaryauthorization/v1beta1/service_pb' - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementServiceV1Beta1 - # Customer-facing API for Cloud Binary Authorization. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * [Policy][google.cloud.binaryauthorization.v1beta1.Policy] - # * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1' - - # A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to - # a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default - # [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. - rpc :GetPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - # Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the - # new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. - rpc :UpdatePolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - # Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. - rpc :CreateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor - # Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - rpc :GetAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor - # Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - rpc :UpdateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor - # Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns INVALID_ARGUMENT if the project does not exist. - rpc :ListAttestors, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse - # Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - rpc :DeleteAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - module SystemPolicyV1Beta1 - # API for working with the system policy. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1' - - # Gets the current system policy in the specified location. - rpc :GetSystemPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md deleted file mode 100644 index be8531e0c118..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Binary Authorization V1beta1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb deleted file mode 100644 index b6a5fb241fd4..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb +++ /dev/null @@ -1,201 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - # Represents an auditing event from Continuous Validation. - # @!attribute [rw] pod_event - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent] - # Pod event. - # - # Note: The following fields are mutually exclusive: `pod_event`, `config_error_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] config_error_event - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ConfigErrorEvent] - # Config error event. - # - # Note: The following fields are mutually exclusive: `config_error_event`, `pod_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ContinuousValidationEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An auditing event for one Pod. - # @!attribute [rw] pod_namespace - # @return [::String] - # The k8s namespace of the Pod. - # @!attribute [rw] pod - # @return [::String] - # The name of the Pod. - # @!attribute [rw] policy_name - # @return [::String] - # The name of the policy. - # @!attribute [rw] deploy_time - # @return [::Google::Protobuf::Timestamp] - # Deploy time of the Pod from k8s. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Termination time of the Pod from k8s, or nothing if still running. - # @!attribute [rw] verdict - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict] - # Auditing verdict for this Pod. - # @!attribute [rw] images - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails>] - # List of images with auditing details. - class ContinuousValidationPodEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Container image with auditing details. - # @!attribute [rw] image - # @return [::String] - # The name of the image. - # @!attribute [rw] container_name - # @return [::String] - # The name of the container. - # @!attribute [rw] container_type - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType] - # The container type that this image belongs to. - # @!attribute [rw] result - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult] - # The result of the audit for this image. - # @!attribute [rw] description - # @return [::String] - # Description of the above result. - # @!attribute [rw] check_results - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult>] - # List of check results. - class ImageDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] check_set_index - # @return [::String] - # The index of the check set. - # @!attribute [rw] check_set_name - # @return [::String] - # The name of the check set. - # @!attribute [rw] check_set_scope - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope] - # The scope of the check set. - # @!attribute [rw] check_index - # @return [::String] - # The index of the check. - # @!attribute [rw] check_name - # @return [::String] - # The name of the check. - # @!attribute [rw] check_type - # @return [::String] - # The type of the check. - # @!attribute [rw] verdict - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict] - # The verdict of this check. - # @!attribute [rw] explanation - # @return [::String] - # User-friendly explanation of this check result. - class CheckResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A scope specifier for check sets. - # @!attribute [rw] kubernetes_service_account - # @return [::String] - # Matches a single Kubernetes service account, e.g. - # 'my-namespace:my-service-account'. - # `kubernetes_service_account` scope is always more specific than - # `kubernetes_namespace` scope for the same namespace. - # - # Note: The following fields are mutually exclusive: `kubernetes_service_account`, `kubernetes_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kubernetes_namespace - # @return [::String] - # Matches all Kubernetes service accounts in the provided - # namespace, unless a more specific `kubernetes_service_account` - # scope already matched. - # - # Note: The following fields are mutually exclusive: `kubernetes_namespace`, `kubernetes_service_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CheckSetScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result of evaluating one check. - module CheckVerdict - # We should always have a verdict. This is an error. - CHECK_VERDICT_UNSPECIFIED = 0 - - # The check was successfully evaluated and the image did not satisfy - # the check. - NON_CONFORMANT = 1 - end - end - - # The container type. - module ContainerType - # The container type should always be specified. This is an error. - CONTAINER_TYPE_UNSPECIFIED = 0 - - # A regular deployment. - CONTAINER = 1 - - # Init container defined as specified at - # https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - INIT_CONTAINER = 2 - - # Ephemeral container defined as specified at - # https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/ - EPHEMERAL_CONTAINER = 3 - end - - # Result of the audit. - module AuditResult - # Unspecified result. This is an error. - AUDIT_RESULT_UNSPECIFIED = 0 - - # Image is allowed. - ALLOW = 1 - - # Image is denied. - DENY = 2 - end - end - - # Audit time policy conformance verdict. - module PolicyConformanceVerdict - # We should always have a verdict. This is an error. - POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0 - - # The pod violates the policy. - VIOLATES_POLICY = 1 - end - end - - # An event describing a user-actionable configuration issue that prevents CV - # from auditing. - # @!attribute [rw] description - # @return [::String] - # A description of the issue. - class ConfigErrorEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb deleted file mode 100644 index 2fc73b1063fc..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb +++ /dev/null @@ -1,376 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for Binary Authorization. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name, in the format `projects/*/policy`. There is - # at most one policy per project. - # @!attribute [rw] description - # @return [::String] - # Optional. A descriptive comment. - # @!attribute [rw] global_policy_evaluation_mode - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy::GlobalPolicyEvaluationMode] - # Optional. Controls the evaluation of a Google-maintained global admission - # policy for common system-level images. Images not covered by the global - # policy will be subject to the project admission policy. This setting - # has no effect when specified inside a global admission policy. - # @!attribute [rw] admission_whitelist_patterns - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern>] - # Optional. Admission policy allowlisting. A matching admission request will - # always be permitted. This feature is typically used to exclude Google or - # third-party infrastructure images from Binary Authorization policies. - # @!attribute [rw] cluster_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-cluster admission rules. Cluster spec format: - # `location.clusterId`. There can be at most one admission rule per cluster - # spec. - # A `location` is either a compute zone (e.g. us-central1-a) or a region - # (e.g. us-central1). - # For `clusterId` syntax restrictions see - # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - # @!attribute [rw] kubernetes_namespace_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - # `[a-z.-]+`, e.g. `some-namespace` - # @!attribute [rw] kubernetes_service_account_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-kubernetes-service-account admission rules. Service account - # spec format: `namespace:serviceaccount`. e.g. `test-ns:default` - # @!attribute [rw] istio_service_identity_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-istio-service-identity admission rules. Istio service - # identity spec format: - # `spiffe:///ns//sa/` or - # `/ns//sa/` - # e.g. `spiffe://example.com/ns/test-ns/sa/default` - # @!attribute [rw] default_admission_rule - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - # Required. Default admission rule for a cluster without a per-cluster, per- - # kubernetes-service-account, or per-istio-service-identity admission rule. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the policy was last updated. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class ClusterAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class KubernetesNamespaceAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class KubernetesServiceAccountAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class IstioServiceIdentityAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module GlobalPolicyEvaluationMode - # Not specified: DISABLE is assumed. - GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0 - - # Enables system policy evaluation. - ENABLE = 1 - - # Disables system policy evaluation. - DISABLE = 2 - end - end - - # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission allowlist pattern} exempts images - # from checks by {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rules}. - # @!attribute [rw] name_pattern - # @return [::String] - # An image name pattern to allowlist, in the form `registry/path/to/image`. - # This supports a trailing `*` as a wildcard, but this is allowed only in - # text after the `registry/` part. `*` wildcard does not match `/`, i.e., - # `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match - # `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which - # matches subdirectories, i.e., `gcr.io/nginx**` matches - # `gcr.io/nginx/image`. - class AdmissionWhitelistPattern - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} specifies either that all container images - # used in a pod creation request must be attested to by one or more - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod creations will be allowed, or that all - # pod creations will be denied. - # - # Images matching an {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission allowlist pattern} - # are exempted from admission rules and will never block a pod creation. - # @!attribute [rw] evaluation_mode - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EvaluationMode] - # Required. How this admission rule will be evaluated. - # @!attribute [rw] require_attestations_by - # @return [::Array<::String>] - # Optional. The resource names of the attestors that must attest to - # a container image, in the format `projects/*/attestors/*`. Each - # attestor must exist before a policy can reference it. To add an attestor - # to a policy the principal issuing the policy change request must be able - # to read the attestor resource. - # - # Note: this field must be non-empty when the evaluation_mode field specifies - # REQUIRE_ATTESTATION, otherwise it must be empty. - # @!attribute [rw] enforcement_mode - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EnforcementMode] - # Required. The action when a pod creation is denied by the admission rule. - class AdmissionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module EvaluationMode - # Do not use. - EVALUATION_MODE_UNSPECIFIED = 0 - - # This rule allows all all pod creations. - ALWAYS_ALLOW = 1 - - # This rule allows a pod creation if all the attestors listed in - # `require_attestations_by` have valid attestations for all of the - # images in the pod spec. - REQUIRE_ATTESTATION = 2 - - # This rule denies all pod creations. - ALWAYS_DENY = 3 - end - - # Defines the possible actions when a pod creation is denied by an admission - # rule. - module EnforcementMode - # Do not use. - ENFORCEMENT_MODE_UNSPECIFIED = 0 - - # Enforce the admission rule by blocking the pod creation. - ENFORCED_BLOCK_AND_AUDIT_LOG = 1 - - # Dryrun mode: Audit logging only. This will allow the pod creation as if - # the admission request had specified break-glass. - DRYRUN_AUDIT_LOG_ONLY = 2 - end - end - - # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests to container image - # artifacts. An existing attestor cannot be modified except where - # indicated. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name, in the format: - # `projects/*/attestors/*`. This field may not be updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A descriptive comment. This field may be updated. - # The field may be displayed in chooser dialogs. - # @!attribute [rw] user_owned_drydock_note - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote] - # A Drydock ATTESTATION_AUTHORITY Note, created by the user. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the attestor was last updated. - class Attestor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An {::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote user owned drydock note} references a Drydock - # ATTESTATION_AUTHORITY Note created by the user. - # @!attribute [rw] note_reference - # @return [::String] - # Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, - # created by the user, in the format: `projects/*/notes/*` (or the legacy - # `providers/*/notes/*`). This field may not be updated. - # - # An attestation by this attestor is stored as a Drydock - # ATTESTATION_AUTHORITY Occurrence that names a container image and that - # links to this Note. Drydock is an external dependency. - # @!attribute [rw] public_keys - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey>] - # Optional. Public keys that verify attestations signed by this - # attestor. This field may be updated. - # - # If this field is non-empty, one of the specified public keys must - # verify that an attestation was signed by this attestor for the - # image specified in the admission request. - # - # If this field is empty, this attestor always returns that no - # valid attestations exist. - # @!attribute [r] delegation_service_account_email - # @return [::String] - # Output only. This field will contain the service account email address - # that this Attestor will use as the principal when querying Container - # Analysis. Attestor administrators must grant this service account the - # IAM role needed to read attestations from the [note_reference][Note] in - # Container Analysis (`containeranalysis.notes.occurrences.viewer`). - # - # This email address is fixed for the lifetime of the Attestor, but callers - # should not make any other assumptions about the service account email; - # future versions may use an email based on a different naming pattern. - class UserOwnedDrydockNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A public key in the PkixPublicKey format (see - # https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). - # Public keys of this type are typically textually encoded using the PEM - # format. - # @!attribute [rw] public_key_pem - # @return [::String] - # A PEM-encoded public key, as described in - # https://tools.ietf.org/html/rfc7468#section-13 - # @!attribute [rw] signature_algorithm - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey::SignatureAlgorithm] - # The signature algorithm used to verify a message against a signature using - # this key. - # These signature algorithm must match the structure and any object - # identifiers encoded in `public_key_pem` (i.e. this algorithm must match - # that of the public key). - class PkixPublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a signature algorithm and other information necessary to verify - # signatures with a given public key. - # This is based primarily on the public key types supported by Tink's - # PemKeyType, which is in turn based on KMS's supported signing algorithms. - # See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz - # might support additional public key types independently of Tink and/or KMS. - module SignatureAlgorithm - # Not specified. - SIGNATURE_ALGORITHM_UNSPECIFIED = 0 - - # RSASSA-PSS 2048 bit key with a SHA256 digest. - RSA_PSS_2048_SHA256 = 1 - - # RSASSA-PSS 3072 bit key with a SHA256 digest. - RSA_PSS_3072_SHA256 = 2 - - # RSASSA-PSS 4096 bit key with a SHA256 digest. - RSA_PSS_4096_SHA256 = 3 - - # RSASSA-PSS 4096 bit key with a SHA512 digest. - RSA_PSS_4096_SHA512 = 4 - - # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_2048_SHA256 = 5 - - # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_3072_SHA256 = 6 - - # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_4096_SHA256 = 7 - - # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - RSA_SIGN_PKCS1_4096_SHA512 = 8 - - # ECDSA on the NIST P-256 curve with a SHA256 digest. - ECDSA_P256_SHA256 = 9 - - # ECDSA on the NIST P-256 curve with a SHA256 digest. - EC_SIGN_P256_SHA256 = 9 - - # ECDSA on the NIST P-384 curve with a SHA384 digest. - ECDSA_P384_SHA384 = 10 - - # ECDSA on the NIST P-384 curve with a SHA384 digest. - EC_SIGN_P384_SHA384 = 10 - - # ECDSA on the NIST P-521 curve with a SHA512 digest. - ECDSA_P521_SHA512 = 11 - - # ECDSA on the NIST P-521 curve with a SHA512 digest. - EC_SIGN_P521_SHA512 = 11 - end - end - - # An {::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey attestor public key} that will be used to verify - # attestations signed by this attestor. - # @!attribute [rw] comment - # @return [::String] - # Optional. A descriptive comment. This field may be updated. - # @!attribute [rw] id - # @return [::String] - # The ID of this public key. - # Signatures verified by BinAuthz must include the ID of the public key that - # can be used to verify them, and that ID must match the contents of this - # field exactly. - # Additional restrictions on this field can be imposed based on which public - # key type is encapsulated. See the documentation on `public_key` cases below - # for details. - # @!attribute [rw] ascii_armored_pgp_public_key - # @return [::String] - # ASCII-armored representation of a PGP public key, as the entire output by - # the command `gpg --export --armor foo@example.com` (either LF or CRLF - # line endings). - # When using this field, `id` should be left blank. The BinAuthz API - # handlers will calculate the ID and fill it in automatically. BinAuthz - # computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - # upper-case hex. If `id` is provided by the caller, it will be - # overwritten by the API-calculated ID. - # - # Note: The following fields are mutually exclusive: `ascii_armored_pgp_public_key`, `pkix_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pkix_public_key - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey] - # A raw PKIX SubjectPublicKeyInfo format public key. - # - # NOTE: `id` may be explicitly provided by the caller when using this - # type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - # blank, a default one will be computed based on the digest of the DER - # encoding of the public key. - # - # Note: The following fields are mutually exclusive: `pkix_public_key`, `ascii_armored_pgp_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AttestorPublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb deleted file mode 100644 index a06df76e65aa..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb +++ /dev/null @@ -1,138 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - # Request message for [BinauthzManagementService.GetPolicy][]. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, - # in the format `projects/*/policy`. - class GetPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.UpdatePolicy][]. - # @!attribute [rw] policy - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. - class UpdatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.CreateAttestor][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # @!attribute [rw] attestor_id - # @return [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. - # @!attribute [rw] attestor - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. - class CreateAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.GetAttestor][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. - class GetAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.UpdateAttestor][]. - # @!attribute [rw] attestor - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. - class UpdateAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.ListAttestors][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. - class ListAttestorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for [BinauthzManagementService.ListAttestors][]. - # @!attribute [rw] attestors - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # The list of {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. Pass this value in the - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} field in the subsequent call to the - # `ListAttestors` method to retrieve the next page of results. - class ListAttestorsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.DeleteAttestor][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. - class DeleteAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to read the current system policy. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - class GetSystemPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile deleted file mode 100644 index 8f4b3597354e..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-binary_authorization-v1beta1", path: "../" -else - gem "google-cloud-binary_authorization-v1beta1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb deleted file mode 100644 index c46ee14890e1..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the create_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor. -# -def create_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new - - # Call the create_attestor method. - result = client.create_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb deleted file mode 100644 index 51992644d116..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the delete_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor. -# -def delete_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new - - # Call the delete_attestor method. - result = client.delete_attestor request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb deleted file mode 100644 index ef7b221c8b46..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the get_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor. -# -def get_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new - - # Call the get_attestor method. - result = client.get_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb deleted file mode 100644 index dce4e31a50aa..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the get_policy call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy. -# -def get_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new - - # Call the get_policy method. - result = client.get_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb deleted file mode 100644 index c2fbab3a0f9a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the list_attestors call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors. -# -def list_attestors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new - - # Call the list_attestors method. - result = client.list_attestors request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - p item - end -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb deleted file mode 100644 index ff23b5b74d4d..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the update_attestor call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor. -# -def update_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new - - # Call the update_attestor method. - result = client.update_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb deleted file mode 100644 index b802404b7a59..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the update_policy call in the BinauthzManagementService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy. -# -def update_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new - - # Call the update_policy method. - result = client.update_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json deleted file mode 100644 index a14f6813b420..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-binary_authorization-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.binaryauthorization.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync", - "title": "Snippet for the get_policy call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy.", - "file": "binauthz_management_service/get_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "GetPolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetPolicy", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync", - "title": "Snippet for the update_policy call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy.", - "file": "binauthz_management_service/update_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "UpdatePolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdatePolicy", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync", - "title": "Snippet for the create_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor.", - "file": "binauthz_management_service/create_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "CreateAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.CreateAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync", - "title": "Snippet for the get_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor.", - "file": "binauthz_management_service/get_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "GetAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync", - "title": "Snippet for the update_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor.", - "file": "binauthz_management_service/update_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "UpdateAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdateAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync", - "title": "Snippet for the list_attestors call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors.", - "file": "binauthz_management_service/list_attestors.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attestors", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "ListAttestors", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.ListAttestors", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync", - "title": "Snippet for the delete_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor.", - "file": "binauthz_management_service/delete_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "DeleteAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.DeleteAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync", - "title": "Snippet for the get_system_policy call in the SystemPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy.", - "file": "system_policy/get_system_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_system_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", - "client": { - "short_name": "SystemPolicy::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client" - }, - "method": { - "short_name": "GetSystemPolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1.GetSystemPolicy", - "service": { - "short_name": "SystemPolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb deleted file mode 100644 index 3c42be712580..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the get_system_policy call in the SystemPolicy service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy. -# -def get_system_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new - - # Call the get_system_policy method. - result = client.get_system_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - p result -end -# [END binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb deleted file mode 100644 index ab4e972dbb0f..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_attestor_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.attestor_path project: "value0", attestor: "value1" - assert_equal "projects/value0/attestors/value1", path - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path project: "value0" - assert_equal "projects/value0/policy", path - - path = client.policy_path location: "value0" - assert_equal "locations/value0/policy", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb deleted file mode 100644 index 6a1a29cd2c4d..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb +++ /dev/null @@ -1,481 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - - -class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_count - end - end - end - - def test_update_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_policy({ policy: policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_policy policy: policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_policy({ policy: policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_count - end - end - end - - def test_create_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attestor_id = "hello world" - attestor = {} - - create_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_create_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_attestor_client_stub.call_count - end - end - end - - def test_get_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_attestor({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_attestor name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_attestor({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_attestor_client_stub.call_count - end - end - end - - def test_update_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - attestor = {} - - update_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_attestor({ attestor: attestor }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_attestor attestor: attestor do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_attestor({ attestor: attestor }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_attestor_client_stub.call_count - end - end - end - - def test_list_attestors - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_attestors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_list_attestors_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attestors_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_attestors_client_stub.call_count - end - end - end - - def test_delete_attestor - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attestor_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_delete_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_attestor({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_attestor name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_attestor({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_attestor_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb deleted file mode 100644 index 83ef71896c40..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb +++ /dev/null @@ -1,523 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_rpc_count - end - end - - def test_update_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Policy), request["policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_policy({ policy: policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_policy policy: policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_policy({ policy: policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_rpc_count - end - end - - def test_create_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attestor_id = "hello world" - attestor = {} - - create_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["attestor_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_attestor_client_stub.call_rpc_count - end - end - - def test_get_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_attestor({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_attestor name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_attestor({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_attestor_client_stub.call_rpc_count - end - end - - def test_update_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - attestor = {} - - update_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_attestor({ attestor: attestor }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_attestor attestor: attestor do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_attestor({ attestor: attestor }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_attestor_client_stub.call_rpc_count - end - end - - def test_list_attestors - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_attestors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attestors, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_attestors_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_attestors parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_attestors({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_attestors_client_stub.call_rpc_count - end - end - - def test_delete_attestor - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_attestor_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_attestor({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_attestor name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_attestor({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_attestor_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb deleted file mode 100644 index 4133cf9a2fdf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binary_authorization/v1beta1/system_policy" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path project: "value0" - assert_equal "projects/value0/policy", path - - path = client.policy_path location: "value0" - assert_equal "locations/value0/policy", path - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb deleted file mode 100644 index 9e14be6fdc61..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - - -class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_system_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_system_policy_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.stub :transcode_get_system_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_system_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_system_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_system_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_system_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_system_policy_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb deleted file mode 100644 index a869904d380e..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/system_policy" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_system_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_system_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_system_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_system_policy_client_stub do - # Create client - client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_system_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_system_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_system_policy({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_system_policy_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-build-v1/.gitignore b/owl-bot-staging/google-cloud-build-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-build-v1/.repo-metadata.json deleted file mode 100644 index 087909e6953e..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudbuild.googleapis.com", - "api_shortname": "cloudbuild", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest", - "distribution_name": "google-cloud-build-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudbuild", - "name_pretty": "Cloud Build V1 API", - "product_documentation": "https://cloud.google.com/build/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details.", - "ruby-cloud-env-prefix": "CLOUD_BUILD", - "ruby-cloud-product-url": "https://cloud.google.com/build/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-build-v1/.rubocop.yml b/owl-bot-staging/google-cloud-build-v1/.rubocop.yml deleted file mode 100644 index e893f15a343f..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-build-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-build-v1.rb" diff --git a/owl-bot-staging/google-cloud-build-v1/.toys.rb b/owl-bot-staging/google-cloud-build-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/.yardopts b/owl-bot-staging/google-cloud-build-v1/.yardopts deleted file mode 100644 index a71fb2448bf5..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Build 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-build-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-build-v1/AUTHENTICATION.md deleted file mode 100644 index 434fd55ea786..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-build-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-build-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/build/v1" - -client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/build/v1" - -::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Build::V1::CloudBuild::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-build-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/build/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Build::V1::CloudBuild::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-build-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-build-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-build-v1/Gemfile b/owl-bot-staging/google-cloud-build-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-build-v1/LICENSE.md b/owl-bot-staging/google-cloud-build-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/README.md b/owl-bot-staging/google-cloud-build-v1/README.md deleted file mode 100644 index 44c9c2c0f3a7..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Build V1 API - -Creates and manages builds on Google Cloud Platform. - -Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Build V1 API. Most users should consider using -the main client gem, -[google-cloud-build](https://rubygems.org/gems/google-cloud-build). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-build-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/cloudbuild.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/build/v1" - -client = ::Google::Cloud::Build::V1::CloudBuild::Client.new -request = ::Google::Cloud::Build::V1::CreateBuildRequest.new # (request fields as keyword arguments...) -response = client.create_build request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-build-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/build/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/build/v1" -require "logger" - -client = ::Google::Cloud::Build::V1::CloudBuild::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-build`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-build-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-build`. -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-build-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-build-v1/Rakefile b/owl-bot-staging/google-cloud-build-v1/Rakefile deleted file mode 100644 index 0158338fa6fb..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["CLOUD_BUILD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["CLOUD_BUILD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["CLOUD_BUILD_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 CLOUD_BUILD_TEST_PROJECT=test123 CLOUD_BUILD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/build/v1/cloud_build/credentials" - ::Google::Cloud::Build::V1::CloudBuild::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["CLOUD_BUILD_PROJECT"] = project - ENV["CLOUD_BUILD_TEST_PROJECT"] = project - ENV["CLOUD_BUILD_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-build-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-build-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-build-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-build-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-build-v1" - header "google-cloud-build-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-build-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-build-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-build-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-build-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-build-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-build-v1/gapic_metadata.json deleted file mode 100644 index f5807751bfba..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/gapic_metadata.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.devtools.cloudbuild.v1", - "libraryPackage": "::Google::Cloud::Build::V1", - "services": { - "CloudBuild": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Build::V1::CloudBuild::Client", - "rpcs": { - "CreateBuild": { - "methods": [ - "create_build" - ] - }, - "GetBuild": { - "methods": [ - "get_build" - ] - }, - "ListBuilds": { - "methods": [ - "list_builds" - ] - }, - "CancelBuild": { - "methods": [ - "cancel_build" - ] - }, - "RetryBuild": { - "methods": [ - "retry_build" - ] - }, - "ApproveBuild": { - "methods": [ - "approve_build" - ] - }, - "CreateBuildTrigger": { - "methods": [ - "create_build_trigger" - ] - }, - "GetBuildTrigger": { - "methods": [ - "get_build_trigger" - ] - }, - "ListBuildTriggers": { - "methods": [ - "list_build_triggers" - ] - }, - "DeleteBuildTrigger": { - "methods": [ - "delete_build_trigger" - ] - }, - "UpdateBuildTrigger": { - "methods": [ - "update_build_trigger" - ] - }, - "RunBuildTrigger": { - "methods": [ - "run_build_trigger" - ] - }, - "ReceiveTriggerWebhook": { - "methods": [ - "receive_trigger_webhook" - ] - }, - "CreateWorkerPool": { - "methods": [ - "create_worker_pool" - ] - }, - "GetWorkerPool": { - "methods": [ - "get_worker_pool" - ] - }, - "DeleteWorkerPool": { - "methods": [ - "delete_worker_pool" - ] - }, - "UpdateWorkerPool": { - "methods": [ - "update_worker_pool" - ] - }, - "ListWorkerPools": { - "methods": [ - "list_worker_pools" - ] - }, - "GetDefaultServiceAccount": { - "methods": [ - "get_default_service_account" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec b/owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec deleted file mode 100644 index 1f3e775a6bbc..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/google-cloud-build-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/build/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-build-v1" - gem.version = Google::Cloud::Build::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details." - gem.summary = "Creates and manages builds on Google Cloud Platform." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-v1.rb b/owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-v1.rb deleted file mode 100644 index cfc783546de0..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google-cloud-build-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/build/v1" diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1.rb deleted file mode 100644 index 3188280c0763..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/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/build/v1/cloud_build" -require "google/cloud/build/v1/version" - -module Google - module Cloud - module Build - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/build/v1" - # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/build/v1" - # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/build/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb deleted file mode 100644 index af7efb757793..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build.rb +++ /dev/null @@ -1,63 +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/build/v1/version" - -require "google/cloud/build/v1/cloud_build/credentials" -require "google/cloud/build/v1/cloud_build/paths" -require "google/cloud/build/v1/cloud_build/operations" -require "google/cloud/build/v1/cloud_build/client" -require "google/cloud/build/v1/cloud_build/rest" - -module Google - module Cloud - module Build - module V1 - ## - # Creates and manages builds on Google Cloud Platform. - # - # The main concept used by this API is a `Build`, which describes the location - # of the source to build, how to build the source, and where to store the - # built artifacts, if any. - # - # A user can list previously-requested builds or get builds by their ID to - # determine the status of the build. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/build/v1/cloud_build" - # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/build/v1/cloud_build/rest" - # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - module CloudBuild - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_build", "helpers.rb" -require "google/cloud/build/v1/cloud_build/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb deleted file mode 100644 index 0fdb546f38f9..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/client.rb +++ /dev/null @@ -1,2518 +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/devtools/cloudbuild/v1/cloudbuild_pb" - -module Google - module Cloud - module Build - module V1 - module CloudBuild - ## - # Client for the CloudBuild service. - # - # Creates and manages builds on Google Cloud Platform. - # - # The main concept used by this API is a `Build`, which describes the location - # of the source to build, how to build the source, and where to store the - # built artifacts, if any. - # - # A user can list previously-requested builds or get builds by their ID to - # determine the status of the build. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_build_stub - - ## - # Configure the CloudBuild Client class. - # - # See {::Google::Cloud::Build::V1::CloudBuild::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudBuild clients - # ::Google::Cloud::Build::V1::CloudBuild::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", "Build", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_build.timeout = 600.0 - - default_config.rpcs.get_build.timeout = 600.0 - default_config.rpcs.get_build.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_builds.timeout = 600.0 - default_config.rpcs.list_builds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.cancel_build.timeout = 600.0 - - default_config.rpcs.retry_build.timeout = 600.0 - - default_config.rpcs.create_build_trigger.timeout = 600.0 - - default_config.rpcs.get_build_trigger.timeout = 600.0 - default_config.rpcs.get_build_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_build_triggers.timeout = 600.0 - default_config.rpcs.list_build_triggers.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_build_trigger.timeout = 600.0 - default_config.rpcs.delete_build_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_build_trigger.timeout = 600.0 - - default_config.rpcs.run_build_trigger.timeout = 600.0 - - default_config.rpcs.create_worker_pool.timeout = 600.0 - - default_config.rpcs.get_worker_pool.timeout = 600.0 - default_config.rpcs.get_worker_pool.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_worker_pool.timeout = 600.0 - - default_config.rpcs.update_worker_pool.timeout = 600.0 - - default_config.rpcs.list_worker_pools.timeout = 600.0 - default_config.rpcs.list_worker_pools.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudBuild 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::Build::V1::CloudBuild::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_build_stub.universe_domain - end - - ## - # Create a new CloudBuild client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudBuild 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/devtools/cloudbuild/v1/cloudbuild_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 - - @cloud_build_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Build::V1::CloudBuild::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_build_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::Build::V1::CloudBuild::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_build_stub.logger - end - - # Service calls - - ## - # Starts a build with the specified configuration. - # - # This method returns a long-running `Operation`, which includes the build - # ID. Pass the build ID to `GetBuild` to determine the build status (such as - # `SUCCESS` or `FAILURE`). - # - # @overload create_build(request, options = nil) - # Pass arguments to `create_build` via a request object, either of type - # {::Google::Cloud::Build::V1::CreateBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CreateBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build(parent: nil, project_id: nil, build: nil) - # Pass arguments to `create_build` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent resource where this build will be created. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project. - # @param build [::Google::Cloud::Build::V1::Build, ::Hash] - # Required. Build resource 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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CreateBuildRequest.new - # - # # Call the create_build method. - # result = client.create_build 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_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildRequest - - # Converts hash 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_build.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_build.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :create_build, 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 information about a previously requested build. - # - # The `Build` that is returned includes its status (such as `SUCCESS`, - # `FAILURE`, or `WORKING`), and timing information. - # - # @overload get_build(request, options = nil) - # Pass arguments to `get_build` via a request object, either of type - # {::Google::Cloud::Build::V1::GetBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) - # Pass arguments to `get_build` via keyword arguments. Note that at - # least one keyword argument is 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 `Build` to retrieve. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @param project_id [::String] - # Required. ID of the project. - # @param id [::String] - # Required. ID of the build. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::Build] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::Build] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetBuildRequest.new - # - # # Call the get_build method. - # result = client.get_build request - # - # # The returned object is of type Google::Cloud::Build::V1::Build. - # p result - # - def get_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildRequest - - # Converts hash 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_build.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_build.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :get_build, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously requested builds. - # - # Previously requested builds may still be in-progress, or may have finished - # successfully or unsuccessfully. - # - # @overload list_builds(request, options = nil) - # Pass arguments to `list_builds` via a request object, either of type - # {::Google::Cloud::Build::V1::ListBuildsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ListBuildsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_builds(parent: nil, project_id: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_builds` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent of the collection of `Builds`. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project. - # @param page_size [::Integer] - # Number of results to return in the list. - # @param page_token [::String] - # The page token for the next page of Builds. - # - # If unspecified, the first page of results is returned. - # - # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. - # In this case, the token should be discarded, and pagination should be - # restarted from the first page of results. - # - # See https://google.aip.dev/158 for more. - # @param filter [::String] - # The raw filter text to constrain the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::Build>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::Build>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ListBuildsRequest.new - # - # # Call the list_builds method. - # result = client.list_builds 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::Build::V1::Build. - # p item - # end - # - def list_builds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildsRequest - - # Converts hash 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_builds.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_builds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_builds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :list_builds, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_builds, 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 - - ## - # Cancels a build in progress. - # - # @overload cancel_build(request, options = nil) - # Pass arguments to `cancel_build` via a request object, either of type - # {::Google::Cloud::Build::V1::CancelBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CancelBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) - # Pass arguments to `cancel_build` via keyword arguments. Note that at - # least one keyword argument is 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 `Build` to cancel. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @param project_id [::String] - # Required. ID of the project. - # @param id [::String] - # Required. ID of the build. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::Build] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::Build] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CancelBuildRequest.new - # - # # Call the cancel_build method. - # result = client.cancel_build request - # - # # The returned object is of type Google::Cloud::Build::V1::Build. - # p result - # - def cancel_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CancelBuildRequest - - # Converts hash 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_build.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_build.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :cancel_build, 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 build based on the specified build. - # - # This method creates a new build using the original build request, which may - # or may not result in an identical build. - # - # For triggered builds: - # - # * Triggered builds resolve to a precise revision; therefore a retry of a - # triggered build will result in a build that uses the same revision. - # - # For non-triggered builds that specify `RepoSource`: - # - # * If the original build built from the tip of a branch, the retried build - # will build from the tip of that branch, which may not be the same revision - # as the original build. - # * If the original build specified a commit sha or revision ID, the retried - # build will use the identical source. - # - # For builds that specify `StorageSource`: - # - # * If the original build pulled source from Cloud Storage without - # specifying the generation of the object, the new build will use the current - # object, which may be different from the original build source. - # * If the original build pulled source from Cloud Storage and specified the - # generation of the object, the new build will attempt to use the same - # object, which may or may not be available depending on the bucket's - # lifecycle management settings. - # - # @overload retry_build(request, options = nil) - # Pass arguments to `retry_build` via a request object, either of type - # {::Google::Cloud::Build::V1::RetryBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::RetryBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload retry_build(name: nil, project_id: nil, id: nil) - # Pass arguments to `retry_build` via keyword arguments. Note that at - # least one keyword argument is 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 `Build` to retry. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @param project_id [::String] - # Required. ID of the project. - # @param id [::String] - # Required. Build ID of the original build. - # - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::RetryBuildRequest.new - # - # # Call the retry_build method. - # result = client.retry_build 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 retry_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RetryBuildRequest - - # Converts hash 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.retry_build.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.retry_build.timeout, - metadata: metadata, - retry_policy: @config.rpcs.retry_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :retry_build, 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 - - ## - # Approves or rejects a pending build. - # - # If approved, the returned long-running operation (LRO) will be analogous to - # the LRO returned from a CreateBuild call. - # - # If rejected, the returned LRO will be immediately done. - # - # @overload approve_build(request, options = nil) - # Pass arguments to `approve_build` via a request object, either of type - # {::Google::Cloud::Build::V1::ApproveBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ApproveBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload approve_build(name: nil, approval_result: nil) - # Pass arguments to `approve_build` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the target build. - # For example: "projects/\\{$project_id}/builds/\\{$build_id}" - # @param approval_result [::Google::Cloud::Build::V1::ApprovalResult, ::Hash] - # Approval decision and metadata. - # - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ApproveBuildRequest.new - # - # # Call the approve_build method. - # result = client.approve_build 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 approve_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ApproveBuildRequest - - # Converts hash 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.approve_build.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/builds/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.approve_build.timeout, - metadata: metadata, - retry_policy: @config.rpcs.approve_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :approve_build, 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 - - ## - # Creates a new `BuildTrigger`. - # - # @overload create_build_trigger(request, options = nil) - # Pass arguments to `create_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::CreateBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CreateBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(parent: nil, project_id: nil, trigger: nil) - # Pass arguments to `create_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent resource where this trigger will be created. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project for which to configure automatic builds. - # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] - # Required. `BuildTrigger` to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::BuildTrigger] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new - # - # # Call the create_build_trigger method. - # result = client.create_build_trigger request - # - # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - # p result - # - def create_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_build_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :create_build_trigger, 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 - - ## - # Returns information about a `BuildTrigger`. - # - # @overload get_build_trigger(request, options = nil) - # Pass arguments to `get_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::GetBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) - # Pass arguments to `get_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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 `Trigger` to retrieve. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param project_id [::String] - # Required. ID of the project that owns the trigger. - # @param trigger_id [::String] - # Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::BuildTrigger] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new - # - # # Call the get_build_trigger method. - # result = client.get_build_trigger request - # - # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - # p result - # - def get_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_build_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :get_build_trigger, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists existing `BuildTrigger`s. - # - # @overload list_build_triggers(request, options = nil) - # Pass arguments to `list_build_triggers` via a request object, either of type - # {::Google::Cloud::Build::V1::ListBuildTriggersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ListBuildTriggersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_triggers(parent: nil, project_id: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_build_triggers` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent of the collection of `Triggers`. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project for which to list BuildTriggers. - # @param page_size [::Integer] - # Number of results to return in the list. - # @param page_token [::String] - # Token to provide to skip to a particular spot in the list. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new - # - # # Call the list_build_triggers method. - # result = client.list_build_triggers 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::Build::V1::BuildTrigger. - # p item - # end - # - def list_build_triggers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildTriggersRequest - - # Converts hash 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_build_triggers.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_build_triggers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_build_triggers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :list_build_triggers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_build_triggers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a `BuildTrigger` by its project ID and trigger ID. - # - # @overload delete_build_trigger(request, options = nil) - # Pass arguments to `delete_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::DeleteBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) - # Pass arguments to `delete_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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 `Trigger` to delete. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param project_id [::String] - # Required. ID of the project that owns the trigger. - # @param trigger_id [::String] - # Required. ID of the `BuildTrigger` to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new - # - # # Call the delete_build_trigger method. - # result = client.delete_build_trigger request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_build_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :delete_build_trigger, 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 `BuildTrigger` by its project ID and trigger ID. - # - # @overload update_build_trigger(request, options = nil) - # Pass arguments to `update_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::UpdateBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(project_id: nil, trigger_id: nil, trigger: nil, update_mask: nil) - # Pass arguments to `update_build_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the project that owns the trigger. - # @param trigger_id [::String] - # Required. ID of the `BuildTrigger` to update. - # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] - # Required. `BuildTrigger` to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Update mask for the resource. If this is set, - # the server will only update the fields specified in the field mask. - # Otherwise, a full update of the mutable resource fields will be performed. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::BuildTrigger] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new - # - # # Call the update_build_trigger method. - # result = client.update_build_trigger request - # - # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - # p result - # - def update_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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.trigger&.resource_name - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.trigger.resource_name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_build_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :update_build_trigger, 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 - - ## - # Runs a `BuildTrigger` at a particular source revision. - # - # To run a regional or global trigger, use the POST request - # that includes the location endpoint in the path (ex. - # v1/projects/\\{projectId}/locations/\\{region}/triggers/\\{triggerId}:run). The - # POST request that does not include the location endpoint in the path can - # only be used when running global triggers. - # - # @overload run_build_trigger(request, options = nil) - # Pass arguments to `run_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::RunBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload run_build_trigger(name: nil, project_id: nil, trigger_id: nil, source: nil) - # Pass arguments to `run_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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 `Trigger` to run. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param project_id [::String] - # Required. ID of the project. - # @param trigger_id [::String] - # Required. ID of the trigger. - # @param source [::Google::Cloud::Build::V1::RepoSource, ::Hash] - # Source to build against this trigger. - # Branch and tag names cannot consist of regular expressions. - # - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new - # - # # Call the run_build_trigger method. - # result = client.run_build_trigger 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 run_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RunBuildTriggerRequest - - # Converts hash 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.run_build_trigger.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/triggers/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.run_build_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :run_build_trigger, 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 - - ## - # ReceiveTriggerWebhook [Experimental] is called when the API receives a - # webhook request targeted at a specific trigger. - # - # @overload receive_trigger_webhook(request, options = nil) - # Pass arguments to `receive_trigger_webhook` via a request object, either of type - # {::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload receive_trigger_webhook(name: nil, body: nil, project_id: nil, trigger: nil, secret: nil) - # Pass arguments to `receive_trigger_webhook` via keyword arguments. Note that at - # least one keyword argument is 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 `ReceiveTriggerWebhook` to retrieve. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param body [::Google::Api::HttpBody, ::Hash] - # HTTP request body. - # @param project_id [::String] - # Project in which the specified trigger lives - # @param trigger [::String] - # Name of the trigger to run the payload against - # @param secret [::String] - # Secret token used for authorization if an OAuth token isn't provided. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new - # - # # Call the receive_trigger_webhook method. - # result = client.receive_trigger_webhook request - # - # # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse. - # p result - # - def receive_trigger_webhook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest - - # Converts hash 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.receive_trigger_webhook.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::Build::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.project_id - header_params["project_id"] = request.project_id - end - if request.trigger - header_params["trigger"] = request.trigger - 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.receive_trigger_webhook.timeout, - metadata: metadata, - retry_policy: @config.rpcs.receive_trigger_webhook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :receive_trigger_webhook, 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 `WorkerPool`. - # - # @overload create_worker_pool(request, options = nil) - # Pass arguments to `create_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::CreateWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil) - # Pass arguments to `create_worker_pool` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this worker pool will be created. - # Format: `projects/{project}/locations/{location}`. - # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] - # Required. `WorkerPool` resource to create. - # @param worker_pool_id [::String] - # Required. Immutable. The ID to use for the `WorkerPool`, which will become - # the final component of the resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param validate_only [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - # - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new - # - # # Call the create_worker_pool method. - # result = client.create_worker_pool 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_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_worker_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :create_worker_pool, 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 details of a `WorkerPool`. - # - # @overload get_worker_pool(request, options = nil) - # Pass arguments to `get_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::GetWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(name: nil) - # Pass arguments to `get_worker_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `WorkerPool` to retrieve. - # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::WorkerPool] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::WorkerPool] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new - # - # # Call the get_worker_pool method. - # result = client.get_worker_pool request - # - # # The returned object is of type Google::Cloud::Build::V1::WorkerPool. - # p result - # - def get_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/workerPools/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_worker_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :get_worker_pool, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a `WorkerPool`. - # - # @overload delete_worker_pool(request, options = nil) - # Pass arguments to `delete_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::DeleteWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_worker_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `WorkerPool` to delete. - # Format: - # `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # @param etag [::String] - # Optional. If provided, it must match the server's etag on the workerpool - # for the request to be processed. - # @param allow_missing [::Boolean] - # If set to true, and the `WorkerPool` is not found, the request will succeed - # but no action will be taken on the server. - # @param validate_only [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - # - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new - # - # # Call the delete_worker_pool method. - # result = client.delete_worker_pool 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_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/workerPools/[^/]+/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_worker_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :delete_worker_pool, 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 `WorkerPool`. - # - # @overload update_worker_pool(request, options = nil) - # Pass arguments to `update_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::UpdateWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(worker_pool: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_worker_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] - # Required. The `WorkerPool` to update. - # - # The `name` field is used to identify the `WorkerPool` to update. - # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A mask specifying which fields in `worker_pool` to update. - # @param validate_only [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - # - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new - # - # # Call the update_worker_pool method. - # result = client.update_worker_pool 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_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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.worker_pool&.name - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/workerPools/[^/]+/?$}.match request.worker_pool.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_worker_pool.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :update_worker_pool, 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 `WorkerPool`s. - # - # @overload list_worker_pools(request, options = nil) - # Pass arguments to `list_worker_pools` via a request object, either of type - # {::Google::Cloud::Build::V1::ListWorkerPoolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pools(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_worker_pools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of the collection of `WorkerPools`. - # Format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # The maximum number of `WorkerPool`s to return. The service may return - # fewer than this value. If omitted, the server will use a sensible default. - # @param page_token [::String] - # A page token, received from a previous `ListWorkerPools` call. Provide this - # to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new - # - # # Call the list_worker_pools method. - # result = client.list_worker_pools 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::Build::V1::WorkerPool. - # p item - # end - # - def list_worker_pools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListWorkerPoolsRequest - - # Converts hash 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_worker_pools.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/?$}.match request.parent - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_worker_pools.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_worker_pools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :list_worker_pools, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_worker_pools, 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 `DefaultServiceAccount` used by the project. - # - # @overload get_default_service_account(request, options = nil) - # Pass arguments to `get_default_service_account` via a request object, either of type - # {::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_default_service_account(name: nil) - # Pass arguments to `get_default_service_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `DefaultServiceAccount` to retrieve. - # Format: - # `projects/{project}/locations/{location}/defaultServiceAccount` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V1::DefaultServiceAccount] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V1::DefaultServiceAccount] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new - # - # # Call the get_default_service_account method. - # result = client.get_default_service_account request - # - # # The returned object is of type Google::Cloud::Build::V1::DefaultServiceAccount. - # p result - # - def get_default_service_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest - - # Converts hash 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_default_service_account.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::Build::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 - regex_match = %r{^projects/[^/]+/locations/(?[^/]+)/defaultServiceAccount/?$}.match request.name - if regex_match - header_params["location"] = regex_match["location".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_default_service_account.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_default_service_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.call_rpc :get_default_service_account, 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 CloudBuild API. - # - # This class represents the configuration for CloudBuild, - # 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::Build::V1::CloudBuild::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 - # # create_build to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_build.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_build.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::Build::V1::CloudBuild::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 = "cloudbuild.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 CloudBuild 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 `create_build` - # @return [::Gapic::Config::Method] - # - attr_reader :create_build - ## - # RPC-specific configuration for `get_build` - # @return [::Gapic::Config::Method] - # - attr_reader :get_build - ## - # RPC-specific configuration for `list_builds` - # @return [::Gapic::Config::Method] - # - attr_reader :list_builds - ## - # RPC-specific configuration for `cancel_build` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_build - ## - # RPC-specific configuration for `retry_build` - # @return [::Gapic::Config::Method] - # - attr_reader :retry_build - ## - # RPC-specific configuration for `approve_build` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_build - ## - # RPC-specific configuration for `create_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :create_build_trigger - ## - # RPC-specific configuration for `get_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :get_build_trigger - ## - # RPC-specific configuration for `list_build_triggers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_build_triggers - ## - # RPC-specific configuration for `delete_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_build_trigger - ## - # RPC-specific configuration for `update_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :update_build_trigger - ## - # RPC-specific configuration for `run_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :run_build_trigger - ## - # RPC-specific configuration for `receive_trigger_webhook` - # @return [::Gapic::Config::Method] - # - attr_reader :receive_trigger_webhook - ## - # RPC-specific configuration for `create_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :create_worker_pool - ## - # RPC-specific configuration for `get_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_worker_pool - ## - # RPC-specific configuration for `delete_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_worker_pool - ## - # RPC-specific configuration for `update_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_worker_pool - ## - # RPC-specific configuration for `list_worker_pools` - # @return [::Gapic::Config::Method] - # - attr_reader :list_worker_pools - ## - # RPC-specific configuration for `get_default_service_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_default_service_account - - # @private - def initialize parent_rpcs = nil - create_build_config = parent_rpcs.create_build if parent_rpcs.respond_to? :create_build - @create_build = ::Gapic::Config::Method.new create_build_config - get_build_config = parent_rpcs.get_build if parent_rpcs.respond_to? :get_build - @get_build = ::Gapic::Config::Method.new get_build_config - list_builds_config = parent_rpcs.list_builds if parent_rpcs.respond_to? :list_builds - @list_builds = ::Gapic::Config::Method.new list_builds_config - cancel_build_config = parent_rpcs.cancel_build if parent_rpcs.respond_to? :cancel_build - @cancel_build = ::Gapic::Config::Method.new cancel_build_config - retry_build_config = parent_rpcs.retry_build if parent_rpcs.respond_to? :retry_build - @retry_build = ::Gapic::Config::Method.new retry_build_config - approve_build_config = parent_rpcs.approve_build if parent_rpcs.respond_to? :approve_build - @approve_build = ::Gapic::Config::Method.new approve_build_config - create_build_trigger_config = parent_rpcs.create_build_trigger if parent_rpcs.respond_to? :create_build_trigger - @create_build_trigger = ::Gapic::Config::Method.new create_build_trigger_config - get_build_trigger_config = parent_rpcs.get_build_trigger if parent_rpcs.respond_to? :get_build_trigger - @get_build_trigger = ::Gapic::Config::Method.new get_build_trigger_config - list_build_triggers_config = parent_rpcs.list_build_triggers if parent_rpcs.respond_to? :list_build_triggers - @list_build_triggers = ::Gapic::Config::Method.new list_build_triggers_config - delete_build_trigger_config = parent_rpcs.delete_build_trigger if parent_rpcs.respond_to? :delete_build_trigger - @delete_build_trigger = ::Gapic::Config::Method.new delete_build_trigger_config - update_build_trigger_config = parent_rpcs.update_build_trigger if parent_rpcs.respond_to? :update_build_trigger - @update_build_trigger = ::Gapic::Config::Method.new update_build_trigger_config - run_build_trigger_config = parent_rpcs.run_build_trigger if parent_rpcs.respond_to? :run_build_trigger - @run_build_trigger = ::Gapic::Config::Method.new run_build_trigger_config - receive_trigger_webhook_config = parent_rpcs.receive_trigger_webhook if parent_rpcs.respond_to? :receive_trigger_webhook - @receive_trigger_webhook = ::Gapic::Config::Method.new receive_trigger_webhook_config - create_worker_pool_config = parent_rpcs.create_worker_pool if parent_rpcs.respond_to? :create_worker_pool - @create_worker_pool = ::Gapic::Config::Method.new create_worker_pool_config - get_worker_pool_config = parent_rpcs.get_worker_pool if parent_rpcs.respond_to? :get_worker_pool - @get_worker_pool = ::Gapic::Config::Method.new get_worker_pool_config - delete_worker_pool_config = parent_rpcs.delete_worker_pool if parent_rpcs.respond_to? :delete_worker_pool - @delete_worker_pool = ::Gapic::Config::Method.new delete_worker_pool_config - update_worker_pool_config = parent_rpcs.update_worker_pool if parent_rpcs.respond_to? :update_worker_pool - @update_worker_pool = ::Gapic::Config::Method.new update_worker_pool_config - list_worker_pools_config = parent_rpcs.list_worker_pools if parent_rpcs.respond_to? :list_worker_pools - @list_worker_pools = ::Gapic::Config::Method.new list_worker_pools_config - get_default_service_account_config = parent_rpcs.get_default_service_account if parent_rpcs.respond_to? :get_default_service_account - @get_default_service_account = ::Gapic::Config::Method.new get_default_service_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/credentials.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/credentials.rb deleted file mode 100644 index 3eb64de1936a..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/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 Build - module V1 - module CloudBuild - # Credentials for the CloudBuild API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "CLOUD_BUILD_CREDENTIALS", - "CLOUD_BUILD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "CLOUD_BUILD_CREDENTIALS_JSON", - "CLOUD_BUILD_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-build-v1/lib/google/cloud/build/v1/cloud_build/operations.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/operations.rb deleted file mode 100644 index 17b36508fcfc..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/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 Build - module V1 - module CloudBuild - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudBuild 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 CloudBuild 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::Build::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::Build::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::Build::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::Build::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::Build::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 = "cloudbuild.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-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb deleted file mode 100644 index 137a60e829fa..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/paths.rb +++ /dev/null @@ -1,392 +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 Build - module V1 - module CloudBuild - # Path helper methods for the CloudBuild API. - module Paths - ## - # Create a fully-qualified Build resource string. - # - # @overload build_path(project:, build:) - # The resource will be in the following format: - # - # `projects/{project}/builds/{build}` - # - # @param project [String] - # @param build [String] - # - # @overload build_path(project:, location:, build:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/builds/{build}` - # - # @param project [String] - # @param location [String] - # @param build [String] - # - # @return [::String] - def build_path **args - resources = { - "build:project" => (proc do |project:, build:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/builds/#{build}" - end), - "build:location:project" => (proc do |project:, location:, build:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/builds/#{build}" - 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 BuildTrigger resource string. - # - # @overload build_trigger_path(project:, trigger:) - # The resource will be in the following format: - # - # `projects/{project}/triggers/{trigger}` - # - # @param project [String] - # @param trigger [String] - # - # @overload build_trigger_path(project:, location:, trigger:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/triggers/{trigger}` - # - # @param project [String] - # @param location [String] - # @param trigger [String] - # - # @return [::String] - def build_trigger_path **args - resources = { - "project:trigger" => (proc do |project:, trigger:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/triggers/#{trigger}" - end), - "location:project:trigger" => (proc do |project:, location:, trigger:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/triggers/#{trigger}" - 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 CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - # - # @param project [String] - # @param location [String] - # @param keyring [String] - # @param key [String] - # - # @return [::String] - def crypto_key_path project:, location:, keyring:, key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "keyring cannot contain /" if keyring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{keyring}/cryptoKeys/#{key}" - end - - ## - # Create a fully-qualified DefaultServiceAccount resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/defaultServiceAccount` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def default_service_account_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/defaultServiceAccount" - end - - ## - # Create a fully-qualified GitRepositoryLink resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # @param git_repository_link [String] - # - # @return [::String] - def git_repository_link_path project:, location:, connection:, git_repository_link: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}/gitRepositoryLinks/#{git_repository_link}" - end - - ## - # Create a fully-qualified GithubEnterpriseConfig resource string. - # - # @overload github_enterprise_config_path(project:, config:) - # The resource will be in the following format: - # - # `projects/{project}/githubEnterpriseConfigs/{config}` - # - # @param project [String] - # @param config [String] - # - # @overload github_enterprise_config_path(project:, location:, config:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/githubEnterpriseConfigs/{config}` - # - # @param project [String] - # @param location [String] - # @param config [String] - # - # @return [::String] - def github_enterprise_config_path **args - resources = { - "config:project" => (proc do |project:, config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/githubEnterpriseConfigs/#{config}" - end), - "config:location:project" => (proc do |project:, location:, config:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/githubEnterpriseConfigs/#{config}" - 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 Network resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/global/networks/{network}` - # - # @param project [String] - # @param network [String] - # - # @return [::String] - def network_path project:, network: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/global/networks/#{network}" - end - - ## - # Create a fully-qualified NetworkAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` - # - # @param project [String] - # @param region [String] - # @param networkattachment [String] - # - # @return [::String] - def network_attachment_path project:, region:, networkattachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - ## - # Create a fully-qualified Repository resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # @param repository [String] - # - # @return [::String] - def repository_path project:, location:, connection:, repository: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}" - end - - ## - # Create a fully-qualified SecretVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{version}` - # - # @param project [String] - # @param secret [String] - # @param version [String] - # - # @return [::String] - def secret_version_path project:, secret:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{version}" - end - - ## - # Create a fully-qualified ServiceAccount resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/serviceAccounts/{service_account}` - # - # @param project [String] - # @param service_account [String] - # - # @return [::String] - def service_account_path project:, service_account: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/serviceAccounts/#{service_account}" - end - - ## - # Create a fully-qualified Subscription resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/subscriptions/{subscription}` - # - # @param project [String] - # @param subscription [String] - # - # @return [::String] - def subscription_path project:, subscription: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/subscriptions/#{subscription}" - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - ## - # Create a fully-qualified WorkerPool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workerPools/{worker_pool}` - # - # @param project [String] - # @param location [String] - # @param worker_pool [String] - # - # @return [::String] - def worker_pool_path project:, location:, worker_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb deleted file mode 100644 index e0716c3a0646..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest.rb +++ /dev/null @@ -1,60 +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/build/v1/version" - -require "google/cloud/build/v1/cloud_build/credentials" -require "google/cloud/build/v1/cloud_build/paths" -require "google/cloud/build/v1/cloud_build/rest/operations" -require "google/cloud/build/v1/cloud_build/rest/client" - -module Google - module Cloud - module Build - module V1 - ## - # Creates and manages builds on Google Cloud Platform. - # - # The main concept used by this API is a `Build`, which describes the location - # of the source to build, how to build the source, and where to store the - # built artifacts, if any. - # - # A user can list previously-requested builds or get builds by their ID to - # determine the status of the build. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/build/v1/cloud_build/rest" - # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - module CloudBuild - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/build/v1/cloud_build/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb deleted file mode 100644 index 70b1b54fa124..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/client.rb +++ /dev/null @@ -1,2285 +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/devtools/cloudbuild/v1/cloudbuild_pb" -require "google/cloud/build/v1/cloud_build/rest/service_stub" - -module Google - module Cloud - module Build - module V1 - module CloudBuild - module Rest - ## - # REST client for the CloudBuild service. - # - # Creates and manages builds on Google Cloud Platform. - # - # The main concept used by this API is a `Build`, which describes the location - # of the source to build, how to build the source, and where to store the - # built artifacts, if any. - # - # A user can list previously-requested builds or get builds by their ID to - # determine the status of the build. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_build_stub - - ## - # Configure the CloudBuild Client class. - # - # See {::Google::Cloud::Build::V1::CloudBuild::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudBuild clients - # ::Google::Cloud::Build::V1::CloudBuild::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", "Build", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_build.timeout = 600.0 - - default_config.rpcs.get_build.timeout = 600.0 - default_config.rpcs.get_build.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_builds.timeout = 600.0 - default_config.rpcs.list_builds.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.cancel_build.timeout = 600.0 - - default_config.rpcs.retry_build.timeout = 600.0 - - default_config.rpcs.create_build_trigger.timeout = 600.0 - - default_config.rpcs.get_build_trigger.timeout = 600.0 - default_config.rpcs.get_build_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.list_build_triggers.timeout = 600.0 - default_config.rpcs.list_build_triggers.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_build_trigger.timeout = 600.0 - default_config.rpcs.delete_build_trigger.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.update_build_trigger.timeout = 600.0 - - default_config.rpcs.run_build_trigger.timeout = 600.0 - - default_config.rpcs.create_worker_pool.timeout = 600.0 - - default_config.rpcs.get_worker_pool.timeout = 600.0 - default_config.rpcs.get_worker_pool.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_worker_pool.timeout = 600.0 - - default_config.rpcs.update_worker_pool.timeout = 600.0 - - default_config.rpcs.list_worker_pools.timeout = 600.0 - default_config.rpcs.list_worker_pools.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudBuild 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::Build::V1::CloudBuild::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_build_stub.universe_domain - end - - ## - # Create a new CloudBuild REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudBuild 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::Build::V1::CloudBuild::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 - - @cloud_build_stub = ::Google::Cloud::Build::V1::CloudBuild::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_build_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::Build::V1::CloudBuild::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_build_stub.logger - end - - # Service calls - - ## - # Starts a build with the specified configuration. - # - # This method returns a long-running `Operation`, which includes the build - # ID. Pass the build ID to `GetBuild` to determine the build status (such as - # `SUCCESS` or `FAILURE`). - # - # @overload create_build(request, options = nil) - # Pass arguments to `create_build` via a request object, either of type - # {::Google::Cloud::Build::V1::CreateBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CreateBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build(parent: nil, project_id: nil, build: nil) - # Pass arguments to `create_build` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent resource where this build will be created. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project. - # @param build [::Google::Cloud::Build::V1::Build, ::Hash] - # Required. Build resource 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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CreateBuildRequest.new - # - # # Call the create_build method. - # result = client.create_build 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_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildRequest - - # Converts hash 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_build.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::Build::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_build.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.create_build 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 information about a previously requested build. - # - # The `Build` that is returned includes its status (such as `SUCCESS`, - # `FAILURE`, or `WORKING`), and timing information. - # - # @overload get_build(request, options = nil) - # Pass arguments to `get_build` via a request object, either of type - # {::Google::Cloud::Build::V1::GetBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) - # Pass arguments to `get_build` via keyword arguments. Note that at - # least one keyword argument is 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 `Build` to retrieve. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @param project_id [::String] - # Required. ID of the project. - # @param id [::String] - # Required. ID of the build. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::Build] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::Build] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetBuildRequest.new - # - # # Call the get_build method. - # result = client.get_build request - # - # # The returned object is of type Google::Cloud::Build::V1::Build. - # p result - # - def get_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildRequest - - # Converts hash 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_build.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::Build::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_build.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.get_build request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists previously requested builds. - # - # Previously requested builds may still be in-progress, or may have finished - # successfully or unsuccessfully. - # - # @overload list_builds(request, options = nil) - # Pass arguments to `list_builds` via a request object, either of type - # {::Google::Cloud::Build::V1::ListBuildsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ListBuildsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_builds(parent: nil, project_id: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_builds` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent of the collection of `Builds`. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project. - # @param page_size [::Integer] - # Number of results to return in the list. - # @param page_token [::String] - # The page token for the next page of Builds. - # - # If unspecified, the first page of results is returned. - # - # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. - # In this case, the token should be discarded, and pagination should be - # restarted from the first page of results. - # - # See https://google.aip.dev/158 for more. - # @param filter [::String] - # The raw filter text to constrain the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::Build>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::Build>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ListBuildsRequest.new - # - # # Call the list_builds method. - # result = client.list_builds 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::Build::V1::Build. - # p item - # end - # - def list_builds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildsRequest - - # Converts hash 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_builds.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::Build::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_builds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_builds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.list_builds request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_build_stub, :list_builds, "builds", 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 - - ## - # Cancels a build in progress. - # - # @overload cancel_build(request, options = nil) - # Pass arguments to `cancel_build` via a request object, either of type - # {::Google::Cloud::Build::V1::CancelBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CancelBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build(name: nil, project_id: nil, id: nil) - # Pass arguments to `cancel_build` via keyword arguments. Note that at - # least one keyword argument is 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 `Build` to cancel. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @param project_id [::String] - # Required. ID of the project. - # @param id [::String] - # Required. ID of the build. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::Build] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::Build] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CancelBuildRequest.new - # - # # Call the cancel_build method. - # result = client.cancel_build request - # - # # The returned object is of type Google::Cloud::Build::V1::Build. - # p result - # - def cancel_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CancelBuildRequest - - # Converts hash 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_build.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::Build::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_build.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.cancel_build 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 build based on the specified build. - # - # This method creates a new build using the original build request, which may - # or may not result in an identical build. - # - # For triggered builds: - # - # * Triggered builds resolve to a precise revision; therefore a retry of a - # triggered build will result in a build that uses the same revision. - # - # For non-triggered builds that specify `RepoSource`: - # - # * If the original build built from the tip of a branch, the retried build - # will build from the tip of that branch, which may not be the same revision - # as the original build. - # * If the original build specified a commit sha or revision ID, the retried - # build will use the identical source. - # - # For builds that specify `StorageSource`: - # - # * If the original build pulled source from Cloud Storage without - # specifying the generation of the object, the new build will use the current - # object, which may be different from the original build source. - # * If the original build pulled source from Cloud Storage and specified the - # generation of the object, the new build will attempt to use the same - # object, which may or may not be available depending on the bucket's - # lifecycle management settings. - # - # @overload retry_build(request, options = nil) - # Pass arguments to `retry_build` via a request object, either of type - # {::Google::Cloud::Build::V1::RetryBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::RetryBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload retry_build(name: nil, project_id: nil, id: nil) - # Pass arguments to `retry_build` via keyword arguments. Note that at - # least one keyword argument is 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 `Build` to retry. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @param project_id [::String] - # Required. ID of the project. - # @param id [::String] - # Required. Build ID of the original build. - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::RetryBuildRequest.new - # - # # Call the retry_build method. - # result = client.retry_build 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 retry_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RetryBuildRequest - - # Converts hash 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.retry_build.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::Build::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.retry_build.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.retry_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.retry_build 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 - - ## - # Approves or rejects a pending build. - # - # If approved, the returned long-running operation (LRO) will be analogous to - # the LRO returned from a CreateBuild call. - # - # If rejected, the returned LRO will be immediately done. - # - # @overload approve_build(request, options = nil) - # Pass arguments to `approve_build` via a request object, either of type - # {::Google::Cloud::Build::V1::ApproveBuildRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ApproveBuildRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload approve_build(name: nil, approval_result: nil) - # Pass arguments to `approve_build` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the target build. - # For example: "projects/\\{$project_id}/builds/\\{$build_id}" - # @param approval_result [::Google::Cloud::Build::V1::ApprovalResult, ::Hash] - # Approval decision and metadata. - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ApproveBuildRequest.new - # - # # Call the approve_build method. - # result = client.approve_build 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 approve_build request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ApproveBuildRequest - - # Converts hash 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.approve_build.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::Build::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.approve_build.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.approve_build.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.approve_build 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 - - ## - # Creates a new `BuildTrigger`. - # - # @overload create_build_trigger(request, options = nil) - # Pass arguments to `create_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::CreateBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CreateBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(parent: nil, project_id: nil, trigger: nil) - # Pass arguments to `create_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent resource where this trigger will be created. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project for which to configure automatic builds. - # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] - # Required. `BuildTrigger` to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new - # - # # Call the create_build_trigger method. - # result = client.create_build_trigger request - # - # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - # p result - # - def create_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.create_build_trigger 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 - - ## - # Returns information about a `BuildTrigger`. - # - # @overload get_build_trigger(request, options = nil) - # Pass arguments to `get_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::GetBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) - # Pass arguments to `get_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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 `Trigger` to retrieve. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param project_id [::String] - # Required. ID of the project that owns the trigger. - # @param trigger_id [::String] - # Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new - # - # # Call the get_build_trigger method. - # result = client.get_build_trigger request - # - # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - # p result - # - def get_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.get_build_trigger request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists existing `BuildTrigger`s. - # - # @overload list_build_triggers(request, options = nil) - # Pass arguments to `list_build_triggers` via a request object, either of type - # {::Google::Cloud::Build::V1::ListBuildTriggersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ListBuildTriggersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_triggers(parent: nil, project_id: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_build_triggers` via keyword arguments. Note that at - # least one keyword argument is 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] - # The parent of the collection of `Triggers`. - # Format: `projects/{project}/locations/{location}` - # @param project_id [::String] - # Required. ID of the project for which to list BuildTriggers. - # @param page_size [::Integer] - # Number of results to return in the list. - # @param page_token [::String] - # Token to provide to skip to a particular spot in the list. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::BuildTrigger>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new - # - # # Call the list_build_triggers method. - # result = client.list_build_triggers 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::Build::V1::BuildTrigger. - # p item - # end - # - def list_build_triggers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListBuildTriggersRequest - - # Converts hash 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_build_triggers.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::Build::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_build_triggers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_build_triggers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.list_build_triggers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_build_stub, :list_build_triggers, "triggers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a `BuildTrigger` by its project ID and trigger ID. - # - # @overload delete_build_trigger(request, options = nil) - # Pass arguments to `delete_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::DeleteBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(name: nil, project_id: nil, trigger_id: nil) - # Pass arguments to `delete_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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 `Trigger` to delete. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param project_id [::String] - # Required. ID of the project that owns the trigger. - # @param trigger_id [::String] - # Required. ID of the `BuildTrigger` to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new - # - # # Call the delete_build_trigger method. - # result = client.delete_build_trigger request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.delete_build_trigger 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 `BuildTrigger` by its project ID and trigger ID. - # - # @overload update_build_trigger(request, options = nil) - # Pass arguments to `update_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::UpdateBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_build_trigger(project_id: nil, trigger_id: nil, trigger: nil, update_mask: nil) - # Pass arguments to `update_build_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param project_id [::String] - # Required. ID of the project that owns the trigger. - # @param trigger_id [::String] - # Required. ID of the `BuildTrigger` to update. - # @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash] - # Required. `BuildTrigger` to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Update mask for the resource. If this is set, - # the server will only update the fields specified in the field mask. - # Otherwise, a full update of the mutable resource fields will be performed. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new - # - # # Call the update_build_trigger method. - # result = client.update_build_trigger request - # - # # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - # p result - # - def update_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest - - # Converts hash 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_build_trigger.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::Build::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_build_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.update_build_trigger 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 - - ## - # Runs a `BuildTrigger` at a particular source revision. - # - # To run a regional or global trigger, use the POST request - # that includes the location endpoint in the path (ex. - # v1/projects/\\{projectId}/locations/\\{region}/triggers/\\{triggerId}:run). The - # POST request that does not include the location endpoint in the path can - # only be used when running global triggers. - # - # @overload run_build_trigger(request, options = nil) - # Pass arguments to `run_build_trigger` via a request object, either of type - # {::Google::Cloud::Build::V1::RunBuildTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload run_build_trigger(name: nil, project_id: nil, trigger_id: nil, source: nil) - # Pass arguments to `run_build_trigger` via keyword arguments. Note that at - # least one keyword argument is 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 `Trigger` to run. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param project_id [::String] - # Required. ID of the project. - # @param trigger_id [::String] - # Required. ID of the trigger. - # @param source [::Google::Cloud::Build::V1::RepoSource, ::Hash] - # Source to build against this trigger. - # Branch and tag names cannot consist of regular expressions. - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new - # - # # Call the run_build_trigger method. - # result = client.run_build_trigger 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 run_build_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::RunBuildTriggerRequest - - # Converts hash 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.run_build_trigger.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::Build::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.run_build_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_build_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.run_build_trigger 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 - - ## - # ReceiveTriggerWebhook [Experimental] is called when the API receives a - # webhook request targeted at a specific trigger. - # - # @overload receive_trigger_webhook(request, options = nil) - # Pass arguments to `receive_trigger_webhook` via a request object, either of type - # {::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload receive_trigger_webhook(name: nil, body: nil, project_id: nil, trigger: nil, secret: nil) - # Pass arguments to `receive_trigger_webhook` via keyword arguments. Note that at - # least one keyword argument is 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 `ReceiveTriggerWebhook` to retrieve. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @param body [::Google::Api::HttpBody, ::Hash] - # HTTP request body. - # @param project_id [::String] - # Project in which the specified trigger lives - # @param trigger [::String] - # Name of the trigger to run the payload against - # @param secret [::String] - # Secret token used for authorization if an OAuth token isn't provided. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new - # - # # Call the receive_trigger_webhook method. - # result = client.receive_trigger_webhook request - # - # # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse. - # p result - # - def receive_trigger_webhook request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest - - # Converts hash 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.receive_trigger_webhook.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::Build::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.receive_trigger_webhook.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.receive_trigger_webhook.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.receive_trigger_webhook 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 `WorkerPool`. - # - # @overload create_worker_pool(request, options = nil) - # Pass arguments to `create_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::CreateWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil) - # Pass arguments to `create_worker_pool` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this worker pool will be created. - # Format: `projects/{project}/locations/{location}`. - # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] - # Required. `WorkerPool` resource to create. - # @param worker_pool_id [::String] - # Required. Immutable. The ID to use for the `WorkerPool`, which will become - # the final component of the resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param validate_only [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new - # - # # Call the create_worker_pool method. - # result = client.create_worker_pool 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_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::CreateWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.create_worker_pool 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 details of a `WorkerPool`. - # - # @overload get_worker_pool(request, options = nil) - # Pass arguments to `get_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::GetWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(name: nil) - # Pass arguments to `get_worker_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `WorkerPool` to retrieve. - # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::WorkerPool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::WorkerPool] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new - # - # # Call the get_worker_pool method. - # result = client.get_worker_pool request - # - # # The returned object is of type Google::Cloud::Build::V1::WorkerPool. - # p result - # - def get_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.get_worker_pool request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a `WorkerPool`. - # - # @overload delete_worker_pool(request, options = nil) - # Pass arguments to `delete_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::DeleteWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_worker_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `WorkerPool` to delete. - # Format: - # `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # @param etag [::String] - # Optional. If provided, it must match the server's etag on the workerpool - # for the request to be processed. - # @param allow_missing [::Boolean] - # If set to true, and the `WorkerPool` is not found, the request will succeed - # but no action will be taken on the server. - # @param validate_only [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new - # - # # Call the delete_worker_pool method. - # result = client.delete_worker_pool 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_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.delete_worker_pool 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 `WorkerPool`. - # - # @overload update_worker_pool(request, options = nil) - # Pass arguments to `update_worker_pool` via a request object, either of type - # {::Google::Cloud::Build::V1::UpdateWorkerPoolRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pool(worker_pool: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_worker_pool` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash] - # Required. The `WorkerPool` to update. - # - # The `name` field is used to identify the `WorkerPool` to update. - # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. A mask specifying which fields in `worker_pool` to update. - # @param validate_only [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - # @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/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new - # - # # Call the update_worker_pool method. - # result = client.update_worker_pool 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_worker_pool request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest - - # Converts hash 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_worker_pool.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::Build::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_worker_pool.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_worker_pool.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.update_worker_pool 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 `WorkerPool`s. - # - # @overload list_worker_pools(request, options = nil) - # Pass arguments to `list_worker_pools` via a request object, either of type - # {::Google::Cloud::Build::V1::ListWorkerPoolsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_worker_pools(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_worker_pools` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of the collection of `WorkerPools`. - # Format: `projects/{project}/locations/{location}`. - # @param page_size [::Integer] - # The maximum number of `WorkerPool`s to return. The service may return - # fewer than this value. If omitted, the server will use a sensible default. - # @param page_token [::String] - # A page token, received from a previous `ListWorkerPools` call. Provide this - # to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new - # - # # Call the list_worker_pools method. - # result = client.list_worker_pools 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::Build::V1::WorkerPool. - # p item - # end - # - def list_worker_pools request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ListWorkerPoolsRequest - - # Converts hash 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_worker_pools.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::Build::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_worker_pools.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_worker_pools.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.list_worker_pools request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_build_stub, :list_worker_pools, "worker_pools", 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 `DefaultServiceAccount` used by the project. - # - # @overload get_default_service_account(request, options = nil) - # Pass arguments to `get_default_service_account` via a request object, either of type - # {::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_default_service_account(name: nil) - # Pass arguments to `get_default_service_account` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the `DefaultServiceAccount` to retrieve. - # Format: - # `projects/{project}/locations/{location}/defaultServiceAccount` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Build::V1::DefaultServiceAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::DefaultServiceAccount] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/build/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new - # - # # Call the get_default_service_account method. - # result = client.get_default_service_account request - # - # # The returned object is of type Google::Cloud::Build::V1::DefaultServiceAccount. - # p result - # - def get_default_service_account request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest - - # Converts hash 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_default_service_account.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::Build::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_default_service_account.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_default_service_account.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_build_stub.get_default_service_account 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 CloudBuild REST API. - # - # This class represents the configuration for CloudBuild 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::Build::V1::CloudBuild::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 - # # create_build to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_build.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_build.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 = "cloudbuild.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 CloudBuild 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 `create_build` - # @return [::Gapic::Config::Method] - # - attr_reader :create_build - ## - # RPC-specific configuration for `get_build` - # @return [::Gapic::Config::Method] - # - attr_reader :get_build - ## - # RPC-specific configuration for `list_builds` - # @return [::Gapic::Config::Method] - # - attr_reader :list_builds - ## - # RPC-specific configuration for `cancel_build` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_build - ## - # RPC-specific configuration for `retry_build` - # @return [::Gapic::Config::Method] - # - attr_reader :retry_build - ## - # RPC-specific configuration for `approve_build` - # @return [::Gapic::Config::Method] - # - attr_reader :approve_build - ## - # RPC-specific configuration for `create_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :create_build_trigger - ## - # RPC-specific configuration for `get_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :get_build_trigger - ## - # RPC-specific configuration for `list_build_triggers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_build_triggers - ## - # RPC-specific configuration for `delete_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_build_trigger - ## - # RPC-specific configuration for `update_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :update_build_trigger - ## - # RPC-specific configuration for `run_build_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :run_build_trigger - ## - # RPC-specific configuration for `receive_trigger_webhook` - # @return [::Gapic::Config::Method] - # - attr_reader :receive_trigger_webhook - ## - # RPC-specific configuration for `create_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :create_worker_pool - ## - # RPC-specific configuration for `get_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :get_worker_pool - ## - # RPC-specific configuration for `delete_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_worker_pool - ## - # RPC-specific configuration for `update_worker_pool` - # @return [::Gapic::Config::Method] - # - attr_reader :update_worker_pool - ## - # RPC-specific configuration for `list_worker_pools` - # @return [::Gapic::Config::Method] - # - attr_reader :list_worker_pools - ## - # RPC-specific configuration for `get_default_service_account` - # @return [::Gapic::Config::Method] - # - attr_reader :get_default_service_account - - # @private - def initialize parent_rpcs = nil - create_build_config = parent_rpcs.create_build if parent_rpcs.respond_to? :create_build - @create_build = ::Gapic::Config::Method.new create_build_config - get_build_config = parent_rpcs.get_build if parent_rpcs.respond_to? :get_build - @get_build = ::Gapic::Config::Method.new get_build_config - list_builds_config = parent_rpcs.list_builds if parent_rpcs.respond_to? :list_builds - @list_builds = ::Gapic::Config::Method.new list_builds_config - cancel_build_config = parent_rpcs.cancel_build if parent_rpcs.respond_to? :cancel_build - @cancel_build = ::Gapic::Config::Method.new cancel_build_config - retry_build_config = parent_rpcs.retry_build if parent_rpcs.respond_to? :retry_build - @retry_build = ::Gapic::Config::Method.new retry_build_config - approve_build_config = parent_rpcs.approve_build if parent_rpcs.respond_to? :approve_build - @approve_build = ::Gapic::Config::Method.new approve_build_config - create_build_trigger_config = parent_rpcs.create_build_trigger if parent_rpcs.respond_to? :create_build_trigger - @create_build_trigger = ::Gapic::Config::Method.new create_build_trigger_config - get_build_trigger_config = parent_rpcs.get_build_trigger if parent_rpcs.respond_to? :get_build_trigger - @get_build_trigger = ::Gapic::Config::Method.new get_build_trigger_config - list_build_triggers_config = parent_rpcs.list_build_triggers if parent_rpcs.respond_to? :list_build_triggers - @list_build_triggers = ::Gapic::Config::Method.new list_build_triggers_config - delete_build_trigger_config = parent_rpcs.delete_build_trigger if parent_rpcs.respond_to? :delete_build_trigger - @delete_build_trigger = ::Gapic::Config::Method.new delete_build_trigger_config - update_build_trigger_config = parent_rpcs.update_build_trigger if parent_rpcs.respond_to? :update_build_trigger - @update_build_trigger = ::Gapic::Config::Method.new update_build_trigger_config - run_build_trigger_config = parent_rpcs.run_build_trigger if parent_rpcs.respond_to? :run_build_trigger - @run_build_trigger = ::Gapic::Config::Method.new run_build_trigger_config - receive_trigger_webhook_config = parent_rpcs.receive_trigger_webhook if parent_rpcs.respond_to? :receive_trigger_webhook - @receive_trigger_webhook = ::Gapic::Config::Method.new receive_trigger_webhook_config - create_worker_pool_config = parent_rpcs.create_worker_pool if parent_rpcs.respond_to? :create_worker_pool - @create_worker_pool = ::Gapic::Config::Method.new create_worker_pool_config - get_worker_pool_config = parent_rpcs.get_worker_pool if parent_rpcs.respond_to? :get_worker_pool - @get_worker_pool = ::Gapic::Config::Method.new get_worker_pool_config - delete_worker_pool_config = parent_rpcs.delete_worker_pool if parent_rpcs.respond_to? :delete_worker_pool - @delete_worker_pool = ::Gapic::Config::Method.new delete_worker_pool_config - update_worker_pool_config = parent_rpcs.update_worker_pool if parent_rpcs.respond_to? :update_worker_pool - @update_worker_pool = ::Gapic::Config::Method.new update_worker_pool_config - list_worker_pools_config = parent_rpcs.list_worker_pools if parent_rpcs.respond_to? :list_worker_pools - @list_worker_pools = ::Gapic::Config::Method.new list_worker_pools_config - get_default_service_account_config = parent_rpcs.get_default_service_account if parent_rpcs.respond_to? :get_default_service_account - @get_default_service_account = ::Gapic::Config::Method.new get_default_service_account_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb deleted file mode 100644 index a1d812bf164b..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/operations.rb +++ /dev/null @@ -1,940 +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 Build - module V1 - module CloudBuild - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudBuild 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 CloudBuild 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::Build::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::Build::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::Build::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::Build::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 = "cloudbuild.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}", - matches: [ - ["name", %r{^operations/?$}, 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{^operations(?:/.*)?$}, true] - ] - ) - .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{^operations(?:/.*)?$}, true] - ] - ) - 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{^operations(?:/.*)?$}, true] - ] - ) - .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-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb deleted file mode 100644 index 207d7b67a72f..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb +++ /dev/null @@ -1,1357 +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/devtools/cloudbuild/v1/cloudbuild_pb" - -module Google - module Cloud - module Build - module V1 - module CloudBuild - module Rest - ## - # REST service stub for the CloudBuild 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 create_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CreateBuildRequest] - # 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_build request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_build_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_build", - 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_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetBuildRequest] - # 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::Build::V1::Build] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::Build] - # A result object deserialized from the server's reply - def get_build request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_build_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_build", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::Build.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_builds REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ListBuildsRequest] - # 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::Build::V1::ListBuildsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::ListBuildsResponse] - # A result object deserialized from the server's reply - def list_builds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_builds_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_builds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::ListBuildsResponse.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_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CancelBuildRequest] - # 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::Build::V1::Build] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::Build] - # A result object deserialized from the server's reply - def cancel_build request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_build_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_build", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::Build.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the retry_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::RetryBuildRequest] - # 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 retry_build request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_retry_build_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: "retry_build", - 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 approve_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ApproveBuildRequest] - # 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 approve_build request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_approve_build_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: "approve_build", - 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_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CreateBuildTriggerRequest] - # 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::Build::V1::BuildTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # A result object deserialized from the server's reply - def create_build_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_build_trigger_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_build_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::BuildTrigger.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_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetBuildTriggerRequest] - # 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::Build::V1::BuildTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # A result object deserialized from the server's reply - def get_build_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_build_trigger_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_build_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::BuildTrigger.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_build_triggers REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ListBuildTriggersRequest] - # 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::Build::V1::ListBuildTriggersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::ListBuildTriggersResponse] - # A result object deserialized from the server's reply - def list_build_triggers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_build_triggers_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_build_triggers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::ListBuildTriggersResponse.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_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest] - # 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_build_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_build_trigger_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_build_trigger", - 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 update_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest] - # 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::Build::V1::BuildTrigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # A result object deserialized from the server's reply - def update_build_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_build_trigger_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_build_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::BuildTrigger.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the run_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::RunBuildTriggerRequest] - # 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 run_build_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_build_trigger_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: "run_build_trigger", - 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 receive_trigger_webhook REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest] - # 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::Build::V1::ReceiveTriggerWebhookResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse] - # A result object deserialized from the server's reply - def receive_trigger_webhook request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_receive_trigger_webhook_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: "receive_trigger_webhook", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.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_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CreateWorkerPoolRequest] - # 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_worker_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_worker_pool_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_worker_pool", - 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_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetWorkerPoolRequest] - # 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::Build::V1::WorkerPool] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::WorkerPool] - # A result object deserialized from the server's reply - def get_worker_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_worker_pool_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_worker_pool", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::WorkerPool.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_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest] - # 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_worker_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_worker_pool_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_worker_pool", - 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_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest] - # 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_worker_pool request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_worker_pool_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_worker_pool", - 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_worker_pools REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ListWorkerPoolsRequest] - # 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::Build::V1::ListWorkerPoolsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::ListWorkerPoolsResponse] - # A result object deserialized from the server's reply - def list_worker_pools request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_worker_pools_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_worker_pools", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::ListWorkerPoolsResponse.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_default_service_account REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest] - # 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::Build::V1::DefaultServiceAccount] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Build::V1::DefaultServiceAccount] - # A result object deserialized from the server's reply - def get_default_service_account request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_default_service_account_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_default_service_account", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Build::V1::DefaultServiceAccount.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_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CreateBuildRequest] - # 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_build_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/projects/{project_id}/builds", - body: "build", - matches: [ - ["project_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/builds", - body: "build", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetBuildRequest] - # 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_build_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/projects/{project_id}/builds/{id}", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_builds REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ListBuildsRequest] - # 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_builds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/projects/{project_id}/builds", - matches: [ - ["project_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/builds", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CancelBuildRequest] - # 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_build_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/projects/{project_id}/builds/{id}:cancel", - body: "*", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the retry_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::RetryBuildRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_retry_build_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/projects/{project_id}/builds/{id}:retry", - body: "*", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:retry", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the approve_build REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ApproveBuildRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_approve_build_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:approve", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/builds/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:approve", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CreateBuildTriggerRequest] - # 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_build_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/projects/{project_id}/triggers", - body: "trigger", - matches: [ - ["project_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/triggers", - body: "trigger", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetBuildTriggerRequest] - # 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_build_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["trigger_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_build_triggers REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ListBuildTriggersRequest] - # 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_build_triggers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/projects/{project_id}/triggers", - matches: [ - ["project_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/triggers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest] - # 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_build_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["trigger_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest] - # 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_build_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}", - body: "trigger", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["trigger_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{trigger.resource_name}", - body: "trigger", - matches: [ - ["trigger.resource_name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_build_trigger REST call - # - # @param request_pb [::Google::Cloud::Build::V1::RunBuildTriggerRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_run_build_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}:run", - body: "source", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["trigger_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:run", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the receive_trigger_webhook REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_receive_trigger_webhook_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/projects/{project_id}/triggers/{trigger}:webhook", - body: "body", - matches: [ - ["project_id", %r{^[^/]+/?$}, false], - ["trigger", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:webhook", - body: "body", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::CreateWorkerPoolRequest] - # 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_worker_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workerPools", - body: "worker_pool", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetWorkerPoolRequest] - # 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_worker_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest] - # 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_worker_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_worker_pool REST call - # - # @param request_pb [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest] - # 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_worker_pool_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{worker_pool.name}", - body: "worker_pool", - matches: [ - ["worker_pool.name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_worker_pools REST call - # - # @param request_pb [::Google::Cloud::Build::V1::ListWorkerPoolsRequest] - # 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_worker_pools_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workerPools", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_default_service_account REST call - # - # @param request_pb [::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest] - # 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_default_service_account_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/defaultServiceAccount/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/rest.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/rest.rb deleted file mode 100644 index 94c380db385c..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/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/build/v1/cloud_build/rest" -require "google/cloud/build/v1/version" - -module Google - module Cloud - module Build - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/build/v1/rest" - # client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/v1/version.rb deleted file mode 100644 index 8018b64452d1..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/cloud/build/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 Build - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb deleted file mode 100644 index 85a7c8d4ad8c..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb +++ /dev/null @@ -1,138 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/cloudbuild/v1/cloudbuild.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/httpbody_pb' -require 'google/api/resource_pb' -require 'google/api/routing_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/devtools/cloudbuild/v1/cloudbuild.proto\x12\x1dgoogle.devtools.cloudbuild.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"h\n\x1fGetDefaultServiceAccountRequest\x12\x45\n\x04name\x18\x01 \x01(\tB7\xe0\x41\x02\xfa\x41\x31\n/cloudbuild.googleapis.com/DefaultServiceAccount\"\x82\x02\n\x15\x44\x65\x66\x61ultServiceAccount\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12H\n\x15service_account_email\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!iam.googleapis.com/ServiceAccount:\x8b\x01\xea\x41\x87\x01\n/cloudbuild.googleapis.com/DefaultServiceAccount\x12=projects/{project}/locations/{location}/defaultServiceAccount2\x15\x64\x65\x66\x61ultServiceAccount\"q\n\x11RetryBuildRequest\x12\x32\n\x04name\x18\x03 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc0\x01\n\x16RunBuildTriggerRequest\x12\x39\n\x04name\x18\x04 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x06source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\"\xf4\x01\n\rStorageSource\x12\x0e\n\x06\x62ucket\x18\x01 \x01(\t\x12\x13\n\x06object\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ngeneration\x18\x03 \x01(\x03\x42\x03\xe0\x41\x01\x12W\n\x0esource_fetcher\x18\x05 \x01(\x0e\x32:.google.devtools.cloudbuild.v1.StorageSource.SourceFetcherB\x03\xe0\x41\x01\"L\n\rSourceFetcher\x12\x1e\n\x1aSOURCE_FETCHER_UNSPECIFIED\x10\x00\x12\n\n\x06GSUTIL\x10\x01\x12\x0f\n\x0bGCS_FETCHER\x10\x02\"F\n\tGitSource\x12\x10\n\x03url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03\x64ir\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08revision\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xc7\x02\n\nRepoSource\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\trepo_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x0b\x62ranch_name\x18\x03 \x01(\tH\x00\x12\x12\n\x08tag_name\x18\x04 \x01(\tH\x00\x12\x14\n\ncommit_sha\x18\x05 \x01(\tH\x00\x12\x10\n\x03\x64ir\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0cinvert_regex\x18\x08 \x01(\x08\x42\x03\xe0\x41\x01\x12X\n\rsubstitutions\x18\t \x03(\x0b\x32<.google.devtools.cloudbuild.v1.RepoSource.SubstitutionsEntryB\x03\xe0\x41\x01\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\n\n\x08revision\"U\n\x15StorageSourceManifest\x12\x13\n\x06\x62ucket\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06object\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\ngeneration\x18\x03 \x01(\x03\"\x80\x01\n\x13\x43onnectedRepository\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x10\n\x03\x64ir\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08revision\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x8e\x03\n\x06Source\x12\x46\n\x0estorage_source\x18\x02 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSourceH\x00\x12@\n\x0brepo_source\x18\x03 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSourceH\x00\x12>\n\ngit_source\x18\x05 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitSourceH\x00\x12W\n\x17storage_source_manifest\x18\x08 \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifestH\x00\x12W\n\x14\x63onnected_repository\x18\t \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.ConnectedRepositoryB\x03\xe0\x41\x01H\x00\x42\x08\n\x06source\"\x95\x01\n\nBuiltImage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x64igest\x18\x03 \x01(\t\x12\x41\n\x0bpush_timing\x18\x04 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x05 \x01(\tB\x03\xe0\x41\x03\"\xcf\x01\n\x15UploadedPythonPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xcf\x01\n\x15UploadedMavenArtifact\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xca\x01\n\x10UploadedGoModule\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x04 \x01(\tB\x03\xe0\x41\x03\"\xcc\x01\n\x12UploadedNpmPackage\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12>\n\x0b\x66ile_hashes\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\x12\x41\n\x0bpush_timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12&\n\x19\x61rtifact_registry_package\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xc5\x04\n\tBuildStep\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0b\n\x03\x65nv\x18\x02 \x03(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x0b\n\x03\x64ir\x18\x04 \x01(\t\x12\n\n\x02id\x18\x05 \x01(\t\x12\x10\n\x08wait_for\x18\x06 \x03(\t\x12\x12\n\nentrypoint\x18\x07 \x01(\t\x12\x12\n\nsecret_env\x18\x08 \x03(\t\x12\x36\n\x07volumes\x18\t \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12<\n\x06timing\x18\n \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12\x41\n\x0bpull_timing\x18\r \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.Duration\x12@\n\x06status\x18\x0c \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x15\n\rallow_failure\x18\x0e \x01(\x08\x12\x16\n\texit_code\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x18\n\x10\x61llow_exit_codes\x18\x12 \x03(\x05\x12\x0e\n\x06script\x18\x13 \x01(\t\x12\"\n\x15\x61utomap_substitutions\x18\x14 \x01(\x08H\x00\x88\x01\x01\x42\x18\n\x16_automap_substitutions\"$\n\x06Volume\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\xa0\x04\n\x07Results\x12\x39\n\x06images\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.BuiltImage\x12\x19\n\x11\x62uild_step_images\x18\x03 \x03(\t\x12\x19\n\x11\x61rtifact_manifest\x18\x04 \x01(\t\x12\x15\n\rnum_artifacts\x18\x05 \x01(\x03\x12\x1a\n\x12\x62uild_step_outputs\x18\x06 \x03(\x0c\x12@\n\x0f\x61rtifact_timing\x18\x07 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan\x12M\n\x0fpython_packages\x18\x08 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedPythonPackage\x12M\n\x0fmaven_artifacts\x18\t \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.UploadedMavenArtifact\x12H\n\ngo_modules\x18\n \x03(\x0b\x32/.google.devtools.cloudbuild.v1.UploadedGoModuleB\x03\xe0\x41\x01\x12G\n\x0cnpm_packages\x18\x0c \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.UploadedNpmPackage\"`\n\x0e\x41rtifactResult\x12\x10\n\x08location\x18\x01 \x01(\t\x12<\n\tfile_hash\x18\x02 \x03(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes\"\xbf\x13\n\x05\x42uild\x12\x11\n\x04name\x18- \x01(\tB\x03\xe0\x41\x03\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nproject_id\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12@\n\x06status\x18\x02 \x01(\x0e\x32+.google.devtools.cloudbuild.v1.Build.StatusB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x18 \x01(\tB\x03\xe0\x41\x03\x12:\n\x06source\x18\x03 \x01(\x0b\x32%.google.devtools.cloudbuild.v1.SourceB\x03\xe0\x41\x01\x12\x37\n\x05steps\x18\x0b \x03(\x0b\x32(.google.devtools.cloudbuild.v1.BuildStep\x12<\n\x07results\x18\n \x01(\x0b\x32&.google.devtools.cloudbuild.v1.ResultsB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x66inish_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x07timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0e\n\x06images\x18\r \x03(\t\x12,\n\tqueue_ttl\x18( \x01(\x0b\x32\x19.google.protobuf.Duration\x12;\n\tartifacts\x18% \x01(\x0b\x32(.google.devtools.cloudbuild.v1.Artifacts\x12\x13\n\x0blogs_bucket\x18\x13 \x01(\t\x12O\n\x11source_provenance\x18\x15 \x01(\x0b\x32/.google.devtools.cloudbuild.v1.SourceProvenanceB\x03\xe0\x41\x03\x12\x1d\n\x10\x62uild_trigger_id\x18\x16 \x01(\tB\x03\xe0\x41\x03\x12<\n\x07options\x18\x17 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildOptions\x12\x14\n\x07log_url\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12N\n\rsubstitutions\x18\x1d \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.Build.SubstitutionsEntry\x12\x0c\n\x04tags\x18\x1f \x03(\t\x12\x36\n\x07secrets\x18 \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Secret\x12\x45\n\x06timing\x18! \x03(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.TimingEntryB\x03\xe0\x41\x03\x12\x43\n\x08\x61pproval\x18, \x01(\x0b\x32,.google.devtools.cloudbuild.v1.BuildApprovalB\x03\xe0\x41\x03\x12?\n\x0fservice_account\x18* \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x41\n\x11\x61vailable_secrets\x18/ \x01(\x0b\x32&.google.devtools.cloudbuild.v1.Secrets\x12\x43\n\x08warnings\x18\x31 \x03(\x0b\x32,.google.devtools.cloudbuild.v1.Build.WarningB\x03\xe0\x41\x03\x12\x41\n\ngit_config\x18\x30 \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitConfigB\x03\xe0\x41\x01\x12K\n\x0c\x66\x61ilure_info\x18\x33 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.Build.FailureInfoB\x03\xe0\x41\x03\x12\x44\n\x0c\x64\x65pendencies\x18\x38 \x03(\x0b\x32).google.devtools.cloudbuild.v1.DependencyB\x03\xe0\x41\x01\x1a\xa8\x01\n\x07Warning\x12\x0c\n\x04text\x18\x01 \x01(\t\x12G\n\x08priority\x18\x02 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.Build.Warning.Priority\"F\n\x08Priority\x12\x18\n\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x41LERT\x10\x03\x1a\x9e\x02\n\x0b\x46\x61ilureInfo\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xb2\x01\n\x0b\x46\x61ilureType\x12\x1c\n\x18\x46\x41ILURE_TYPE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPUSH_FAILED\x10\x01\x12\x18\n\x14PUSH_IMAGE_NOT_FOUND\x10\x02\x12\x17\n\x13PUSH_NOT_AUTHORIZED\x10\x03\x12\x13\n\x0fLOGGING_FAILURE\x10\x04\x12\x13\n\x0fUSER_BUILD_STEP\x10\x05\x12\x17\n\x13\x46\x45TCH_SOURCE_FAILED\x10\x06\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aV\n\x0bTimingEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpan:\x02\x38\x01\"\x99\x01\n\x06Status\x12\x12\n\x0eSTATUS_UNKNOWN\x10\x00\x12\x0b\n\x07PENDING\x10\n\x12\n\n\x06QUEUED\x10\x01\x12\x0b\n\x07WORKING\x10\x02\x12\x0b\n\x07SUCCESS\x10\x03\x12\x0b\n\x07\x46\x41ILURE\x10\x04\x12\x12\n\x0eINTERNAL_ERROR\x10\x05\x12\x0b\n\x07TIMEOUT\x10\x06\x12\r\n\tCANCELLED\x10\x07\x12\x0b\n\x07\x45XPIRED\x10\t:\x8f\x01\xea\x41\x8b\x01\n\x1f\x63loudbuild.googleapis.com/Build\x12!projects/{project}/builds/{build}\x12\x36projects/{project}/locations/{location}/builds/{build}*\x06\x62uilds2\x05\x62uild\"\xd5\x03\n\nDependency\x12\x0f\n\x05\x65mpty\x18\x01 \x01(\x08H\x00\x12S\n\ngit_source\x18\x02 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceDependencyH\x00\x1a\xd1\x01\n\x13GitSourceDependency\x12V\n\nrepository\x18\x01 \x01(\x0b\x32=.google.devtools.cloudbuild.v1.Dependency.GitSourceRepositoryB\x03\xe0\x41\x02\x12\x15\n\x08revision\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12recurse_submodules\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x12\n\x05\x64\x65pth\x18\x04 \x01(\x03\x42\x03\xe0\x41\x01\x12\x16\n\tdest_path\x18\x05 \x01(\tB\x03\xe0\x41\x02\x1a\x85\x01\n\x13GitSourceRepository\x12\r\n\x03url\x18\x01 \x01(\tH\x00\x12S\n\x11\x64\x65veloper_connect\x18\x02 \x01(\tB6\xfa\x41\x33\n1developerconnect.googleapis.com/GitRepositoryLinkH\x00\x42\n\n\x08repotypeB\x05\n\x03\x64\x65p\"\xb0\x01\n\tGitConfig\x12\x41\n\x04http\x18\x01 \x01(\x0b\x32\x33.google.devtools.cloudbuild.v1.GitConfig.HttpConfig\x1a`\n\nHttpConfig\x12R\n\x19proxy_secret_version_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\xb4\x07\n\tArtifacts\x12\x0e\n\x06images\x18\x01 \x03(\t\x12I\n\x07objects\x18\x02 \x01(\x0b\x32\x38.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects\x12O\n\x0fmaven_artifacts\x18\x03 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact\x12J\n\ngo_modules\x18\x04 \x03(\x0b\x32\x31.google.devtools.cloudbuild.v1.Artifacts.GoModuleB\x03\xe0\x41\x01\x12O\n\x0fpython_packages\x18\x05 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v1.Artifacts.PythonPackage\x12I\n\x0cnpm_packages\x18\x06 \x03(\x0b\x32\x33.google.devtools.cloudbuild.v1.Artifacts.NpmPackage\x1ap\n\x0f\x41rtifactObjects\x12\x10\n\x08location\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x12<\n\x06timing\x18\x03 \x01(\x0b\x32\'.google.devtools.cloudbuild.v1.TimeSpanB\x03\xe0\x41\x03\x1an\n\rMavenArtifact\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x11\n\x04path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x0b\x61rtifact_id\x18\x03 \x01(\t\x12\x10\n\x08group_id\x18\x04 \x01(\t\x12\x0f\n\x07version\x18\x05 \x01(\t\x1a\xbf\x01\n\x08GoModule\x12\x1c\n\x0frepository_name\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12 \n\x13repository_location\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\"\n\x15repository_project_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bsource_path\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bmodule_path\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0emodule_version\x18\x06 \x01(\tB\x03\xe0\x41\x01\x1a\x32\n\rPythonPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\r\n\x05paths\x18\x02 \x03(\t\x1a;\n\nNpmPackage\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x19\n\x0cpackage_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\"h\n\x08TimeSpan\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"M\n\x16\x42uildOperationMetadata\x12\x33\n\x05\x62uild\x18\x01 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.Build\"\xef\x04\n\x10SourceProvenance\x12M\n\x17resolved_storage_source\x18\x03 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.StorageSource\x12G\n\x14resolved_repo_source\x18\x06 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12^\n resolved_storage_source_manifest\x18\t \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.StorageSourceManifest\x12^\n\x1dresolved_connected_repository\x18\n \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.ConnectedRepositoryB\x03\xe0\x41\x03\x12J\n\x13resolved_git_source\x18\x0b \x01(\x0b\x32(.google.devtools.cloudbuild.v1.GitSourceB\x03\xe0\x41\x03\x12Y\n\x0b\x66ile_hashes\x18\x04 \x03(\x0b\x32?.google.devtools.cloudbuild.v1.SourceProvenance.FileHashesEntryB\x03\xe0\x41\x03\x1a\\\n\x0f\x46ileHashesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.FileHashes:\x02\x38\x01\"D\n\nFileHashes\x12\x36\n\tfile_hash\x18\x01 \x03(\x0b\x32#.google.devtools.cloudbuild.v1.Hash\"\x9a\x01\n\x04Hash\x12:\n\x04type\x18\x01 \x01(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12\r\n\x05value\x18\x02 \x01(\x0c\"G\n\x08HashType\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06SHA256\x10\x01\x12\x07\n\x03MD5\x10\x02\x12\x10\n\x0cGO_MODULE_H1\x10\x03\x12\n\n\x06SHA512\x10\x04\"\x92\x01\n\x07Secrets\x12J\n\x0esecret_manager\x18\x01 \x03(\x0b\x32\x32.google.devtools.cloudbuild.v1.SecretManagerSecret\x12;\n\x06inline\x18\x02 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.InlineSecret\"\xc5\x01\n\x0cInlineSecret\x12<\n\x0ckms_key_name\x18\x01 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12H\n\x07\x65nv_map\x18\x02 \x03(\x0b\x32\x37.google.devtools.cloudbuild.v1.InlineSecret.EnvMapEntry\x1a-\n\x0b\x45nvMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"i\n\x13SecretManagerSecret\x12\x45\n\x0cversion_name\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x0b\n\x03\x65nv\x18\x02 \x01(\t\"\x9a\x01\n\x06Secret\x12\x14\n\x0ckms_key_name\x18\x01 \x01(\t\x12H\n\nsecret_env\x18\x03 \x03(\x0b\x32\x34.google.devtools.cloudbuild.v1.Secret.SecretEnvEntry\x1a\x30\n\x0eSecretEnvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c:\x02\x38\x01\"\x9d\x01\n\x12\x43reateBuildRequest\x12\x34\n\x06parent\x18\x04 \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x05\x62uild\x18\x02 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildB\x03\xe0\x41\x02\"o\n\x0fGetBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x99\x01\n\x11ListBuildsRequest\x12\x34\n\x06parent\x18\t \x01(\tB$\xfa\x41!\x12\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x08 \x01(\t\"c\n\x12ListBuildsResponse\x12\x34\n\x06\x62uilds\x18\x01 \x03(\x0b\x32$.google.devtools.cloudbuild.v1.Build\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"r\n\x12\x43\x61ncelBuildRequest\x12\x32\n\x04name\x18\x04 \x01(\tB$\xfa\x41!\n\x1f\x63loudbuild.googleapis.com/Build\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x02id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"p\n\x13\x41pproveBuildRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x0f\x61pproval_result\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResult\"\xb7\x02\n\rBuildApproval\x12\x46\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.BuildApproval.StateB\x03\xe0\x41\x03\x12\x42\n\x06\x63onfig\x18\x02 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalConfigB\x03\xe0\x41\x03\x12\x42\n\x06result\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v1.ApprovalResultB\x03\xe0\x41\x03\"V\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0c\n\x08\x41PPROVED\x10\x02\x12\x0c\n\x08REJECTED\x10\x03\x12\r\n\tCANCELLED\x10\x05\"+\n\x0e\x41pprovalConfig\x12\x19\n\x11\x61pproval_required\x18\x01 \x01(\x08\"\xa0\x02\n\x0e\x41pprovalResult\x12\x1d\n\x10\x61pprover_account\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rapproval_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x08\x64\x65\x63ision\x18\x04 \x01(\x0e\x32\x36.google.devtools.cloudbuild.v1.ApprovalResult.DecisionB\x03\xe0\x41\x02\x12\x14\n\x07\x63omment\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03url\x18\x06 \x01(\tB\x03\xe0\x41\x01\"@\n\x08\x44\x65\x63ision\x12\x18\n\x14\x44\x45\x43ISION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x41PPROVED\x10\x01\x12\x0c\n\x08REJECTED\x10\x02\"\xae\x02\n\rGitRepoSource\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12?\n\nrepository\x18\x06 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12\x0b\n\x03ref\x18\x02 \x01(\t\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12Y\n\x18github_enterprise_config\x18\x04 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xa7\x03\n\rGitFileSource\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12?\n\nrepository\x18\x07 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/RepositoryH\x00\x12H\n\trepo_type\x18\x03 \x01(\x0e\x32\x35.google.devtools.cloudbuild.v1.GitFileSource.RepoType\x12\x10\n\x08revision\x18\x04 \x01(\t\x12Y\n\x18github_enterprise_config\x18\x05 \x01(\tB5\xfa\x41\x32\n0cloudbuild.googleapis.com/GithubEnterpriseConfigH\x01\"d\n\x08RepoType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x1d\n\x19\x43LOUD_SOURCE_REPOSITORIES\x10\x01\x12\n\n\x06GITHUB\x10\x02\x12\x14\n\x10\x42ITBUCKET_SERVER\x10\x03\x12\n\n\x06GITLAB\x10\x04\x42\x08\n\x06sourceB\x13\n\x11\x65nterprise_config\"\xd2\t\n\x0c\x42uildTrigger\x12\x15\n\rresource_name\x18\" \x01(\t\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\n \x01(\t\x12\x0c\n\x04name\x18\x15 \x01(\t\x12\x0c\n\x04tags\x18\x13 \x03(\t\x12\x43\n\x10trigger_template\x18\x07 \x01(\x0b\x32).google.devtools.cloudbuild.v1.RepoSource\x12\x41\n\x06github\x18\r \x01(\x0b\x32\x31.google.devtools.cloudbuild.v1.GitHubEventsConfig\x12\x42\n\rpubsub_config\x18\x1d \x01(\x0b\x32+.google.devtools.cloudbuild.v1.PubsubConfig\x12\x44\n\x0ewebhook_config\x18\x1f \x01(\x0b\x32,.google.devtools.cloudbuild.v1.WebhookConfig\x12\x14\n\nautodetect\x18\x12 \x01(\x08H\x00\x12\x35\n\x05\x62uild\x18\x04 \x01(\x0b\x32$.google.devtools.cloudbuild.v1.BuildH\x00\x12\x12\n\x08\x66ilename\x18\x08 \x01(\tH\x00\x12G\n\x0fgit_file_source\x18\x18 \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitFileSourceH\x00\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12U\n\rsubstitutions\x18\x0b \x03(\x0b\x32>.google.devtools.cloudbuild.v1.BuildTrigger.SubstitutionsEntry\x12\x15\n\rignored_files\x18\x0f \x03(\t\x12\x16\n\x0eincluded_files\x18\x10 \x03(\t\x12\x13\n\x06\x66ilter\x18\x1e \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x0fsource_to_build\x18\x1a \x01(\x0b\x32,.google.devtools.cloudbuild.v1.GitRepoSource\x12?\n\x0fservice_account\x18! \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12U\n\x17repository_event_config\x18\' \x01(\x0b\x32\x34.google.devtools.cloudbuild.v1.RepositoryEventConfig\x1a\x34\n\x12SubstitutionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa2\x01\xea\x41\x9e\x01\n&cloudbuild.googleapis.com/BuildTrigger\x12%projects/{project}/triggers/{trigger}\x12:projects/{project}/locations/{location}/triggers/{trigger}*\x08triggers2\x07triggerB\x10\n\x0e\x62uild_template\"\xb5\x03\n\x15RepositoryEventConfig\x12=\n\nrepository\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x61\n\x0frepository_type\x18\x02 \x01(\x0e\x32\x43.google.devtools.cloudbuild.v1.RepositoryEventConfig.RepositoryTypeB\x03\xe0\x41\x03\x12H\n\x0cpull_request\x18\x03 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x04 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\"k\n\x0eRepositoryType\x12\x1f\n\x1bREPOSITORY_TYPE_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\x01\x12\x15\n\x11GITHUB_ENTERPRISE\x10\x02\x12\x15\n\x11GITLAB_ENTERPRISE\x10\x03\x42\x08\n\x06\x66ilter\"\xdc\x01\n\x12GitHubEventsConfig\x12\x1b\n\x0finstallation_id\x18\x01 \x01(\x03\x42\x02\x18\x01\x12\r\n\x05owner\x18\x06 \x01(\t\x12\x0c\n\x04name\x18\x07 \x01(\t\x12H\n\x0cpull_request\x18\x04 \x01(\x0b\x32\x30.google.devtools.cloudbuild.v1.PullRequestFilterH\x00\x12\x39\n\x04push\x18\x05 \x01(\x0b\x32).google.devtools.cloudbuild.v1.PushFilterH\x00\x42\x07\n\x05\x65vent\"\x82\x03\n\x0cPubsubConfig\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"pubsub.googleapis.com/Subscription\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x45\n\x15service_account_email\x18\x03 \x01(\tB&\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12@\n\x05state\x18\x04 \x01(\x0e\x32\x31.google.devtools.cloudbuild.v1.PubsubConfig.State\"s\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x18\n\x14SUBSCRIPTION_DELETED\x10\x02\x12\x11\n\rTOPIC_DELETED\x10\x03\x12\x1e\n\x1aSUBSCRIPTION_MISCONFIGURED\x10\x04\"\xe3\x01\n\rWebhookConfig\x12\x44\n\x06secret\x18\x03 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersionH\x00\x12\x41\n\x05state\x18\x04 \x01(\x0e\x32\x32.google.devtools.cloudbuild.v1.WebhookConfig.State\":\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x12\n\x0eSECRET_DELETED\x10\x02\x42\r\n\x0b\x61uth_method\"\x94\x02\n\x11PullRequestFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12X\n\x0f\x63omment_control\x18\x05 \x01(\x0e\x32?.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl\x12\x14\n\x0cinvert_regex\x18\x06 \x01(\x08\"r\n\x0e\x43ommentControl\x12\x15\n\x11\x43OMMENTS_DISABLED\x10\x00\x12\x14\n\x10\x43OMMENTS_ENABLED\x10\x01\x12\x33\n/COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY\x10\x02\x42\t\n\x07git_ref\"N\n\nPushFilter\x12\x10\n\x06\x62ranch\x18\x02 \x01(\tH\x00\x12\r\n\x03tag\x18\x03 \x01(\tH\x00\x12\x14\n\x0cinvert_regex\x18\x04 \x01(\x08\x42\t\n\x07git_ref\"\xb4\x01\n\x19\x43reateBuildTriggerRequest\x12;\n\x06parent\x18\x03 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x02 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\"\x85\x01\n\x16GetBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\x97\x01\n\x18ListBuildTriggersRequest\x12;\n\x06parent\x18\x04 \x01(\tB+\xfa\x41(\x12&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x19ListBuildTriggersResponse\x12=\n\x08triggers\x18\x01 \x03(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTrigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x88\x01\n\x19\x44\x65leteBuildTriggerRequest\x12\x39\n\x04name\x18\x03 \x01(\tB+\xfa\x41(\n&cloudbuild.googleapis.com/BuildTrigger\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\"\xc1\x01\n\x19UpdateBuildTriggerRequest\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x41\n\x07trigger\x18\x03 \x01(\x0b\x32+.google.devtools.cloudbuild.v1.BuildTriggerB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa2\x0c\n\x0c\x42uildOptions\x12L\n\x16source_provenance_hash\x18\x01 \x03(\x0e\x32,.google.devtools.cloudbuild.v1.Hash.HashType\x12Y\n\x17requested_verify_option\x18\x02 \x01(\x0e\x32\x38.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption\x12M\n\x0cmachine_type\x18\x03 \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.MachineType\x12\x14\n\x0c\x64isk_size_gb\x18\x06 \x01(\x03\x12[\n\x13substitution_option\x18\x04 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption\x12\x1d\n\x15\x64ynamic_substitutions\x18\x11 \x01(\x08\x12\x1d\n\x15\x61utomap_substitutions\x18\x16 \x01(\x08\x12\\\n\x14log_streaming_option\x18\x05 \x01(\x0e\x32>.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption\x12\x17\n\x0bworker_pool\x18\x07 \x01(\tB\x02\x18\x01\x12I\n\x04pool\x18\x13 \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.BuildOptions.PoolOptionB\x03\xe0\x41\x01\x12H\n\x07logging\x18\x0b \x01(\x0e\x32\x37.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode\x12\x0b\n\x03\x65nv\x18\x0c \x03(\t\x12\x12\n\nsecret_env\x18\r \x03(\t\x12\x36\n\x07volumes\x18\x0e \x03(\x0b\x32%.google.devtools.cloudbuild.v1.Volume\x12p\n\x1c\x64\x65\x66\x61ult_logs_bucket_behavior\x18\x15 \x01(\x0e\x32\x45.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehaviorB\x03\xe0\x41\x01\x12&\n\x19\x65nable_structured_logging\x18\x17 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x45\n\nPoolOption\x12\x37\n\x04name\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\".\n\x0cVerifyOption\x12\x10\n\x0cNOT_VERIFIED\x10\x00\x12\x0c\n\x08VERIFIED\x10\x01\"w\n\x0bMachineType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cN1_HIGHCPU_8\x10\x01\x12\x11\n\rN1_HIGHCPU_32\x10\x02\x12\x10\n\x0c\x45\x32_HIGHCPU_8\x10\x05\x12\x11\n\rE2_HIGHCPU_32\x10\x06\x12\r\n\tE2_MEDIUM\x10\x07\"5\n\x12SubstitutionOption\x12\x0e\n\nMUST_MATCH\x10\x00\x12\x0f\n\x0b\x41LLOW_LOOSE\x10\x01\"G\n\x12LogStreamingOption\x12\x12\n\x0eSTREAM_DEFAULT\x10\x00\x12\r\n\tSTREAM_ON\x10\x01\x12\x0e\n\nSTREAM_OFF\x10\x02\"|\n\x0bLoggingMode\x12\x17\n\x13LOGGING_UNSPECIFIED\x10\x00\x12\n\n\x06LEGACY\x10\x01\x12\x0c\n\x08GCS_ONLY\x10\x02\x12\x18\n\x10STACKDRIVER_ONLY\x10\x03\x1a\x02\x08\x01\x12\x16\n\x12\x43LOUD_LOGGING_ONLY\x10\x05\x12\x08\n\x04NONE\x10\x04\"|\n\x19\x44\x65\x66\x61ultLogsBucketBehavior\x12,\n(DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x1e\n\x1aREGIONAL_USER_OWNED_BUCKET\x10\x01\x12\x11\n\rLEGACY_BUCKET\x10\x02\"\x85\x01\n\x1cReceiveTriggerWebhookRequest\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\"\n\x04\x62ody\x18\x01 \x01(\x0b\x32\x14.google.api.HttpBody\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0f\n\x07trigger\x18\x03 \x01(\t\x12\x0e\n\x06secret\x18\x04 \x01(\t\"\x1f\n\x1dReceiveTriggerWebhookResponse\"\x8e\x04\n\x16GitHubEnterpriseConfig\x12\x0c\n\x04name\x18\x07 \x01(\t\x12\x10\n\x08host_url\x18\x03 \x01(\t\x12\x13\n\x06\x61pp_id\x18\x04 \x01(\x03\x42\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0bwebhook_key\x18\x08 \x01(\t\x12>\n\x0epeered_network\x18\t \x01(\tB&\xe0\x41\x01\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12L\n\x07secrets\x18\n \x01(\x0b\x32\x36.google.devtools.cloudbuild.v1.GitHubEnterpriseSecretsB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x0b \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06ssl_ca\x18\x0c \x01(\tB\x03\xe0\x41\x01:\xb5\x01\xea\x41\xb1\x01\n0cloudbuild.googleapis.com/GithubEnterpriseConfig\x12\x33projects/{project}/githubEnterpriseConfigs/{config}\x12Hprojects/{project}/locations/{location}/githubEnterpriseConfigs/{config}\"\xed\x02\n\x17GitHubEnterpriseSecrets\x12Q\n\x18private_key_version_name\x18\x05 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12T\n\x1bwebhook_secret_version_name\x18\x06 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12R\n\x19oauth_secret_version_name\x18\x07 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12U\n\x1coauth_client_id_version_name\x18\x08 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\"\x96\x06\n\nWorkerPool\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32:.google.devtools.cloudbuild.v1.WorkerPool.AnnotationsEntry\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\x12\x43\n\x05state\x18\x08 \x01(\x0e\x32/.google.devtools.cloudbuild.v1.WorkerPool.StateB\x03\xe0\x41\x03\x12T\n\x16private_pool_v1_config\x18\x0c \x01(\x0b\x32\x32.google.devtools.cloudbuild.v1.PrivatePoolV1ConfigH\x00\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"b\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0b\n\x07RUNNING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0b\n\x07\x44\x45LETED\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:\x89\x01\xea\x41\x85\x01\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}*\x0bworkerPools2\nworkerPoolR\x01\x01\x42\x08\n\x06\x63onfig\"\xba\x07\n\x13PrivatePoolV1Config\x12V\n\rworker_config\x18\x01 \x01(\x0b\x32?.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig\x12X\n\x0enetwork_config\x18\x02 \x01(\x0b\x32@.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig\x12n\n\x17private_service_connect\x18\x05 \x01(\x0b\x32H.google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnectB\x03\xe0\x41\x05\x1a\x90\x01\n\x0cWorkerConfig\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x0c\x64isk_size_gb\x18\x02 \x01(\x03\x12.\n\x1c\x65nable_nested_virtualization\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x42\x1f\n\x1d_enable_nested_virtualization\x1a\xb6\x02\n\rNetworkConfig\x12\x41\n\x0epeered_network\x18\x01 \x01(\tB)\xe0\x41\x05\xe0\x41\x02\xfa\x41 \n\x1e\x63ompute.googleapis.com/Network\x12\x64\n\regress_option\x18\x02 \x01(\x0e\x32M.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption\x12$\n\x17peered_network_ip_range\x18\x03 \x01(\tB\x03\xe0\x41\x05\"V\n\x0c\x45gressOption\x12\x1d\n\x19\x45GRESS_OPTION_UNSPECIFIED\x10\x00\x12\x14\n\x10NO_PUBLIC_EGRESS\x10\x01\x12\x11\n\rPUBLIC_EGRESS\x10\x02\x1a\xb4\x01\n\x15PrivateServiceConnect\x12O\n\x12network_attachment\x18\x01 \x01(\tB3\xe0\x41\x05\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\x12*\n\x1apublic_ip_address_disabled\x18\x02 \x01(\x08\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x1e\n\x11route_all_traffic\x18\x03 \x01(\x08\x42\x03\xe0\x41\x05\"\xd0\x01\n\x17\x43reateWorkerPoolRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x43\n\x0bworker_pool\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12\x1e\n\x0eworker_pool_id\x18\x03 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"R\n\x14GetWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\"\x96\x01\n\x17\x44\x65leteWorkerPoolRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xab\x01\n\x17UpdateWorkerPoolRequest\x12\x43\n\x0bworker_pool\x18\x01 \x01(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPoolB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"z\n\x16ListWorkerPoolsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"s\n\x17ListWorkerPoolsResponse\x12?\n\x0cworker_pools\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v1.WorkerPool\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc7\x01\n!CreateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!UpdateWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc7\x01\n!DeleteWorkerPoolOperationMetadata\x12>\n\x0bworker_pool\x18\x01 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x31\n\rcomplete_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp2\xf9-\n\nCloudBuild\x12\xb7\x02\n\x0b\x43reateBuild\x12\x31.google.devtools.cloudbuild.v1.CreateBuildRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x10project_id,build\xda\x41\x06parent\x82\xd3\xe4\x93\x02^\" /v1/projects/{project_id}/builds:\x05\x62uildZ3\"*/v1/{parent=projects/*/locations/*}/builds:\x05\x62uild\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\x8f\x02\n\x08GetBuild\x12..google.devtools.cloudbuild.v1.GetBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xac\x01\xda\x41\rproject_id,id\xda\x41\x04name\x82\xd3\xe4\x93\x02U\x12%/v1/projects/{project_id}/builds/{id}Z,\x12*/v1/{name=projects/*/locations/*/builds/*}\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\x91\x02\n\nListBuilds\x12\x30.google.devtools.cloudbuild.v1.ListBuildsRequest\x1a\x31.google.devtools.cloudbuild.v1.ListBuildsResponse\"\x9d\x01\xda\x41\x11project_id,filter\x82\xd3\xe4\x93\x02P\x12 /v1/projects/{project_id}/buildsZ,\x12*/v1/{parent=projects/*/locations/*}/builds\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa9\x02\n\x0b\x43\x61ncelBuild\x12\x31.google.devtools.cloudbuild.v1.CancelBuildRequest\x1a$.google.devtools.cloudbuild.v1.Build\"\xc0\x01\xda\x41\rproject_id,id\xda\x41\x04name\x82\xd3\xe4\x93\x02i\",/v1/projects/{project_id}/builds/{id}:cancel:\x01*Z6\"1/v1/{name=projects/*/locations/*/builds/*}:cancel:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xc0\x02\n\nRetryBuild\x12\x30.google.devtools.cloudbuild.v1.RetryBuildRequest\x1a\x1d.google.longrunning.Operation\"\xe0\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\rproject_id,id\xda\x41\x04name\x82\xd3\xe4\x93\x02g\"+/v1/projects/{project_id}/builds/{id}:retry:\x01*Z5\"0/v1/{name=projects/*/locations/*/builds/*}:retry:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xc1\x02\n\x0c\x41pproveBuild\x12\x32.google.devtools.cloudbuild.v1.ApproveBuildRequest\x1a\x1d.google.longrunning.Operation\"\xdd\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x14name,approval_result\x82\xd3\xe4\x93\x02\x64\"&/v1/{name=projects/*/builds/*}:approve:\x01*Z7\"2/v1/{name=projects/*/locations/*/builds/*}:approve:\x01*\x8a\xd3\xe4\x93\x02\x34\x12\x32\n\x04name\x12*projects/*/locations/{location=*}/builds/*\x12\xbb\x02\n\x12\x43reateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xbd\x01\xda\x41\x12project_id,trigger\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x66\"\"/v1/projects/{project_id}/triggers:\x07triggerZ7\",/v1/{parent=projects/*/locations/*}/triggers:\x07trigger\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xba\x02\n\x0fGetBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.GetBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xc2\x01\xda\x41\x15project_id,trigger_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61\x12//v1/projects/{project_id}/triggers/{trigger_id}Z.\x12,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xa3\x02\n\x11ListBuildTriggers\x12\x37.google.devtools.cloudbuild.v1.ListBuildTriggersRequest\x1a\x38.google.devtools.cloudbuild.v1.ListBuildTriggersResponse\"\x9a\x01\xda\x41\nproject_id\x82\xd3\xe4\x93\x02T\x12\"/v1/projects/{project_id}/triggersZ.\x12,/v1/{parent=projects/*/locations/*}/triggers\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xab\x02\n\x12\x44\x65leteBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest\x1a\x16.google.protobuf.Empty\"\xc2\x01\xda\x41\x15project_id,trigger_id\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61*//v1/projects/{project_id}/triggers/{trigger_id}Z.*,/v1/{name=projects/*/locations/*/triggers/*}\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\xf6\x02\n\x12UpdateBuildTrigger\x12\x38.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest\x1a+.google.devtools.cloudbuild.v1.BuildTrigger\"\xf8\x01\xda\x41\x1dproject_id,trigger_id,trigger\x82\xd3\xe4\x93\x02\x84\x01\x32//v1/projects/{project_id}/triggers/{trigger_id}:\x07triggerZH2=/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}:\x07trigger\x8a\xd3\xe4\x93\x02G\x12\x45\n\x15trigger.resource_name\x12,projects/*/locations/{location=*}/triggers/*\x12\xe1\x02\n\x0fRunBuildTrigger\x12\x35.google.devtools.cloudbuild.v1.RunBuildTriggerRequest\x1a\x1d.google.longrunning.Operation\"\xf7\x01\xca\x41\x1f\n\x05\x42uild\x12\x16\x42uildOperationMetadata\xda\x41\x1cproject_id,trigger_id,source\x82\xd3\xe4\x93\x02t\"3/v1/projects/{project_id}/triggers/{trigger_id}:run:\x06sourceZ5\"0/v1/{name=projects/*/locations/*/triggers/*}:run:\x01*\x8a\xd3\xe4\x93\x02\x36\x12\x34\n\x04name\x12,projects/*/locations/{location=*}/triggers/*\x12\x95\x02\n\x15ReceiveTriggerWebhook\x12;.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest\x1a<.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse\"\x80\x01\x82\xd3\xe4\x93\x02z\"4/v1/projects/{project_id}/triggers/{trigger}:webhook:\x04\x62odyZ<\"4/v1/{name=projects/*/locations/*/triggers/*}:webhook:\x04\x62ody\x12\xb9\x02\n\x10\x43reateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xcd\x01\xca\x41/\n\nWorkerPool\x12!CreateWorkerPoolOperationMetadata\xda\x41!parent,worker_pool,worker_pool_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/workerPools:\x0bworker_pool\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xee\x01\n\rGetWorkerPool\x12\x33.google.devtools.cloudbuild.v1.GetWorkerPoolRequest\x1a).google.devtools.cloudbuild.v1.WorkerPool\"}\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xa6\x02\n\x10\x44\x65leteWorkerPool\x12\x36.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xba\x01\xca\x41:\n\x15google.protobuf.Empty\x12!DeleteWorkerPoolOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/workerPools/*}\x8a\xd3\xe4\x93\x02\x39\x12\x37\n\x04name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xd3\x02\n\x10UpdateWorkerPool\x12\x36.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest\x1a\x1d.google.longrunning.Operation\"\xe7\x01\xca\x41/\n\nWorkerPool\x12!UpdateWorkerPoolOperationMetadata\xda\x41\x17worker_pool,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{worker_pool.name=projects/*/locations/*/workerPools/*}:\x0bworker_pool\x8a\xd3\xe4\x93\x02\x45\x12\x43\n\x10worker_pool.name\x12/projects/*/locations/{location=*}/workerPools/*\x12\xf5\x01\n\x0fListWorkerPools\x12\x35.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest\x1a\x36.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse\"s\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/workerPools\x8a\xd3\xe4\x93\x02-\x12+\n\x06parent\x12!projects/*/locations/{location=*}\x12\xa0\x02\n\x18GetDefaultServiceAccount\x12>.google.devtools.cloudbuild.v1.GetDefaultServiceAccountRequest\x1a\x34.google.devtools.cloudbuild.v1.DefaultServiceAccount\"\x8d\x01\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/defaultServiceAccount}\x8a\xd3\xe4\x93\x02\x41\x12?\n\x04name\x12\x37projects/*/locations/{location=*}/defaultServiceAccount\x1aM\xca\x41\x19\x63loudbuild.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\n\n\x18\x63om.google.cloudbuild.v1P\x01ZAcloud.google.com/go/cloudbuild/apiv1/v2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V1\xca\x02\x15Google\\Cloud\\Build\\V1\xea\x02\x18Google::Cloud::Build::V1\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41\x66\n gkehub.googleapis.com/Membership\x12\x42projects/{project}/locations/{location}/memberships/{cluster_name}\xea\x41p\n!cloudkms.googleapis.com/CryptoKey\x12Kprojects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}\xea\x41U\n\"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41v\n(compute.googleapis.com/NetworkAttachment\x12Jprojects/{project}/regions/{region}/networkAttachments/{networkattachment}\xea\x41\x9e\x01\n1developerconnect.googleapis.com/GitRepositoryLink\x12iprojects/{project}/locations/{location}/connections/{connection}/gitRepositoryLinks/{git_repository_link}\xea\x41\x82\x01\n$cloudbuild.googleapis.com/Repository\x12Zprojects/{project}/locations/{location}/connections/{connection}/repositories/{repository}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Build - module V1 - GetDefaultServiceAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetDefaultServiceAccountRequest").msgclass - DefaultServiceAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DefaultServiceAccount").msgclass - RetryBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RetryBuildRequest").msgclass - RunBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RunBuildTriggerRequest").msgclass - StorageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSource").msgclass - StorageSource::SourceFetcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSource.SourceFetcher").enummodule - GitSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitSource").msgclass - RepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RepoSource").msgclass - StorageSourceManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.StorageSourceManifest").msgclass - ConnectedRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ConnectedRepository").msgclass - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Source").msgclass - BuiltImage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuiltImage").msgclass - UploadedPythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedPythonPackage").msgclass - UploadedMavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedMavenArtifact").msgclass - UploadedGoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedGoModule").msgclass - UploadedNpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UploadedNpmPackage").msgclass - BuildStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildStep").msgclass - Volume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Volume").msgclass - Results = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Results").msgclass - ArtifactResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ArtifactResult").msgclass - Build = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build").msgclass - Build::Warning = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.Warning").msgclass - Build::Warning::Priority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.Warning.Priority").enummodule - Build::FailureInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.FailureInfo").msgclass - Build::FailureInfo::FailureType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType").enummodule - Build::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Build.Status").enummodule - Dependency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Dependency").msgclass - Dependency::GitSourceDependency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Dependency.GitSourceDependency").msgclass - Dependency::GitSourceRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Dependency.GitSourceRepository").msgclass - GitConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitConfig").msgclass - GitConfig::HttpConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitConfig.HttpConfig").msgclass - Artifacts = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts").msgclass - Artifacts::ArtifactObjects = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects").msgclass - Artifacts::MavenArtifact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.MavenArtifact").msgclass - Artifacts::GoModule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.GoModule").msgclass - Artifacts::PythonPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.PythonPackage").msgclass - Artifacts::NpmPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Artifacts.NpmPackage").msgclass - TimeSpan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.TimeSpan").msgclass - BuildOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOperationMetadata").msgclass - SourceProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.SourceProvenance").msgclass - FileHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.FileHashes").msgclass - Hash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash").msgclass - Hash::HashType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Hash.HashType").enummodule - Secrets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secrets").msgclass - InlineSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.InlineSecret").msgclass - SecretManagerSecret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.SecretManagerSecret").msgclass - Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.Secret").msgclass - CreateBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateBuildRequest").msgclass - GetBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetBuildRequest").msgclass - ListBuildsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildsRequest").msgclass - ListBuildsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildsResponse").msgclass - CancelBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CancelBuildRequest").msgclass - ApproveBuildRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApproveBuildRequest").msgclass - BuildApproval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildApproval").msgclass - BuildApproval::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildApproval.State").enummodule - ApprovalConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApprovalConfig").msgclass - ApprovalResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApprovalResult").msgclass - ApprovalResult::Decision = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ApprovalResult.Decision").enummodule - GitRepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitRepoSource").msgclass - GitFileSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitFileSource").msgclass - GitFileSource::RepoType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitFileSource.RepoType").enummodule - BuildTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildTrigger").msgclass - RepositoryEventConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RepositoryEventConfig").msgclass - RepositoryEventConfig::RepositoryType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.RepositoryEventConfig.RepositoryType").enummodule - GitHubEventsConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEventsConfig").msgclass - PubsubConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig").msgclass - PubsubConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PubsubConfig.State").enummodule - WebhookConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WebhookConfig").msgclass - WebhookConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WebhookConfig.State").enummodule - PullRequestFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter").msgclass - PullRequestFilter::CommentControl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl").enummodule - PushFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PushFilter").msgclass - CreateBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateBuildTriggerRequest").msgclass - GetBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetBuildTriggerRequest").msgclass - ListBuildTriggersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildTriggersRequest").msgclass - ListBuildTriggersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListBuildTriggersResponse").msgclass - DeleteBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest").msgclass - UpdateBuildTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest").msgclass - BuildOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions").msgclass - BuildOptions::PoolOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.PoolOption").msgclass - BuildOptions::VerifyOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.VerifyOption").enummodule - BuildOptions::MachineType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.MachineType").enummodule - BuildOptions::SubstitutionOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption").enummodule - BuildOptions::LogStreamingOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption").enummodule - BuildOptions::LoggingMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.LoggingMode").enummodule - BuildOptions::DefaultLogsBucketBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior").enummodule - ReceiveTriggerWebhookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest").msgclass - ReceiveTriggerWebhookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse").msgclass - GitHubEnterpriseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEnterpriseConfig").msgclass - GitHubEnterpriseSecrets = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GitHubEnterpriseSecrets").msgclass - WorkerPool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool").msgclass - WorkerPool::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.WorkerPool.State").enummodule - PrivatePoolV1Config = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config").msgclass - PrivatePoolV1Config::WorkerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig").msgclass - PrivatePoolV1Config::NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig").msgclass - PrivatePoolV1Config::NetworkConfig::EgressOption = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption").enummodule - PrivatePoolV1Config::PrivateServiceConnect = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.PrivatePoolV1Config.PrivateServiceConnect").msgclass - CreateWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateWorkerPoolRequest").msgclass - GetWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.GetWorkerPoolRequest").msgclass - DeleteWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest").msgclass - UpdateWorkerPoolRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest").msgclass - ListWorkerPoolsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListWorkerPoolsRequest").msgclass - ListWorkerPoolsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.ListWorkerPoolsResponse").msgclass - CreateWorkerPoolOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata").msgclass - UpdateWorkerPoolOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata").msgclass - DeleteWorkerPoolOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb b/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb deleted file mode 100644 index 5e7f0d45e06b..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb +++ /dev/null @@ -1,136 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/cloudbuild/v1/cloudbuild.proto for package 'Google.Cloud.Build.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/devtools/cloudbuild/v1/cloudbuild_pb' - -module Google - module Cloud - module Build - module V1 - module CloudBuild - # Creates and manages builds on Google Cloud Platform. - # - # The main concept used by this API is a `Build`, which describes the location - # of the source to build, how to build the source, and where to store the - # built artifacts, if any. - # - # A user can list previously-requested builds or get builds by their ID to - # determine the status of the build. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.cloudbuild.v1.CloudBuild' - - # Starts a build with the specified configuration. - # - # This method returns a long-running `Operation`, which includes the build - # ID. Pass the build ID to `GetBuild` to determine the build status (such as - # `SUCCESS` or `FAILURE`). - rpc :CreateBuild, ::Google::Cloud::Build::V1::CreateBuildRequest, ::Google::Longrunning::Operation - # Returns information about a previously requested build. - # - # The `Build` that is returned includes its status (such as `SUCCESS`, - # `FAILURE`, or `WORKING`), and timing information. - rpc :GetBuild, ::Google::Cloud::Build::V1::GetBuildRequest, ::Google::Cloud::Build::V1::Build - # Lists previously requested builds. - # - # Previously requested builds may still be in-progress, or may have finished - # successfully or unsuccessfully. - rpc :ListBuilds, ::Google::Cloud::Build::V1::ListBuildsRequest, ::Google::Cloud::Build::V1::ListBuildsResponse - # Cancels a build in progress. - rpc :CancelBuild, ::Google::Cloud::Build::V1::CancelBuildRequest, ::Google::Cloud::Build::V1::Build - # Creates a new build based on the specified build. - # - # This method creates a new build using the original build request, which may - # or may not result in an identical build. - # - # For triggered builds: - # - # * Triggered builds resolve to a precise revision; therefore a retry of a - # triggered build will result in a build that uses the same revision. - # - # For non-triggered builds that specify `RepoSource`: - # - # * If the original build built from the tip of a branch, the retried build - # will build from the tip of that branch, which may not be the same revision - # as the original build. - # * If the original build specified a commit sha or revision ID, the retried - # build will use the identical source. - # - # For builds that specify `StorageSource`: - # - # * If the original build pulled source from Cloud Storage without - # specifying the generation of the object, the new build will use the current - # object, which may be different from the original build source. - # * If the original build pulled source from Cloud Storage and specified the - # generation of the object, the new build will attempt to use the same - # object, which may or may not be available depending on the bucket's - # lifecycle management settings. - rpc :RetryBuild, ::Google::Cloud::Build::V1::RetryBuildRequest, ::Google::Longrunning::Operation - # Approves or rejects a pending build. - # - # If approved, the returned long-running operation (LRO) will be analogous to - # the LRO returned from a CreateBuild call. - # - # If rejected, the returned LRO will be immediately done. - rpc :ApproveBuild, ::Google::Cloud::Build::V1::ApproveBuildRequest, ::Google::Longrunning::Operation - # Creates a new `BuildTrigger`. - rpc :CreateBuildTrigger, ::Google::Cloud::Build::V1::CreateBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger - # Returns information about a `BuildTrigger`. - rpc :GetBuildTrigger, ::Google::Cloud::Build::V1::GetBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger - # Lists existing `BuildTrigger`s. - rpc :ListBuildTriggers, ::Google::Cloud::Build::V1::ListBuildTriggersRequest, ::Google::Cloud::Build::V1::ListBuildTriggersResponse - # Deletes a `BuildTrigger` by its project ID and trigger ID. - rpc :DeleteBuildTrigger, ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, ::Google::Protobuf::Empty - # Updates a `BuildTrigger` by its project ID and trigger ID. - rpc :UpdateBuildTrigger, ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, ::Google::Cloud::Build::V1::BuildTrigger - # Runs a `BuildTrigger` at a particular source revision. - # - # To run a regional or global trigger, use the POST request - # that includes the location endpoint in the path (ex. - # v1/projects/{projectId}/locations/{region}/triggers/{triggerId}:run). The - # POST request that does not include the location endpoint in the path can - # only be used when running global triggers. - rpc :RunBuildTrigger, ::Google::Cloud::Build::V1::RunBuildTriggerRequest, ::Google::Longrunning::Operation - # ReceiveTriggerWebhook [Experimental] is called when the API receives a - # webhook request targeted at a specific trigger. - rpc :ReceiveTriggerWebhook, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse - # Creates a `WorkerPool`. - rpc :CreateWorkerPool, ::Google::Cloud::Build::V1::CreateWorkerPoolRequest, ::Google::Longrunning::Operation - # Returns details of a `WorkerPool`. - rpc :GetWorkerPool, ::Google::Cloud::Build::V1::GetWorkerPoolRequest, ::Google::Cloud::Build::V1::WorkerPool - # Deletes a `WorkerPool`. - rpc :DeleteWorkerPool, ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, ::Google::Longrunning::Operation - # Updates a `WorkerPool`. - rpc :UpdateWorkerPool, ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, ::Google::Longrunning::Operation - # Lists `WorkerPool`s. - rpc :ListWorkerPools, ::Google::Cloud::Build::V1::ListWorkerPoolsRequest, ::Google::Cloud::Build::V1::ListWorkerPoolsResponse - # Returns the `DefaultServiceAccount` used by the project. - rpc :GetDefaultServiceAccount, ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, ::Google::Cloud::Build::V1::DefaultServiceAccount - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-build-v1/proto_docs/README.md deleted file mode 100644 index 6b09ae66a7cc..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Build 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-build-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/httpbody.rb deleted file mode 100644 index 938f7ac6b2fd..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/httpbody.rb +++ /dev/null @@ -1,80 +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 - # Message that represents an arbitrary HTTP body. It should only be used for - # payload formats that can't be represented as JSON, such as raw binary or - # an HTML page. - # - # - # This message can be used both in streaming and non-streaming API methods in - # the request as well as the response. - # - # It can be used as a top-level request field, which is convenient if one - # wants to extract parameters from either the URL or HTTP template into the - # request fields and also want access to the raw HTTP body. - # - # Example: - # - # message GetResourceRequest { - # // A unique request id. - # string request_id = 1; - # - # // The raw HTTP body is bound to this field. - # google.api.HttpBody http_body = 2; - # - # } - # - # service ResourceService { - # rpc GetResource(GetResourceRequest) - # returns (google.api.HttpBody); - # rpc UpdateResource(google.api.HttpBody) - # returns (google.protobuf.Empty); - # - # } - # - # Example with streaming methods: - # - # service CaldavService { - # rpc GetCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # rpc UpdateCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # - # } - # - # Use of this type only changes how the request and response bodies are - # handled, all other features will continue to work unchanged. - # @!attribute [rw] content_type - # @return [::String] - # The HTTP Content-Type header value specifying the content type of the body. - # @!attribute [rw] data - # @return [::String] - # The HTTP request/response body as raw binary. - # @!attribute [rw] extensions - # @return [::Array<::Google::Protobuf::Any>] - # Application specific response metadata. Must be set in the first response - # for streaming APIs. - class HttpBody - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index 6d71a9430253..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,463 +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 - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. The order of - # the key-value pairs is undefined, the order of the `routing_parameters` in - # the `RoutingRule` only matters for the evaluation order of the path - # templates when `field` is the same. See the examples below for more details. - # - # Every key and value in the routing header must be percent-encoded, - # and joined together in the following format: `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb deleted file mode 100644 index 076561275d87..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +++ /dev/null @@ -1,2751 +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 Build - module V1 - # Returns the default service account that will be used for `Builds`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `DefaultServiceAccount` to retrieve. - # Format: - # `projects/{project}/locations/{location}/defaultServiceAccount` - class GetDefaultServiceAccountRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The default service account used for `Builds`. - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `projects/{project}/locations/{location}/defaultServiceAccount` - # @!attribute [r] service_account_email - # @return [::String] - # Output only. The email address of the service account identity that will be - # used for a build by default. - # - # This is returned in the format - # `projects/{project}/serviceAccounts/{service_account}` where - # `{service_account}` could be the legacy Cloud Build SA, in the format - # [PROJECT_NUMBER]@cloudbuild.gserviceaccount.com or the Compute SA, in the - # format [PROJECT_NUMBER]-compute@developer.gserviceaccount.com. - # - # If no service account will be used by default, this will be empty. - class DefaultServiceAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a build to retry. - # @!attribute [rw] name - # @return [::String] - # The name of the `Build` to retry. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project. - # @!attribute [rw] id - # @return [::String] - # Required. Build ID of the original build. - class RetryBuildRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies a build trigger to run and the source to use. - # @!attribute [rw] name - # @return [::String] - # The name of the `Trigger` to run. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project. - # @!attribute [rw] trigger_id - # @return [::String] - # Required. ID of the trigger. - # @!attribute [rw] source - # @return [::Google::Cloud::Build::V1::RepoSource] - # Source to build against this trigger. - # Branch and tag names cannot consist of regular expressions. - class RunBuildTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of the source in an archive file in Cloud Storage. - # @!attribute [rw] bucket - # @return [::String] - # Cloud Storage bucket containing the source (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - # @!attribute [rw] object - # @return [::String] - # Required. Cloud Storage object containing the source. - # - # This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) - # containing source to build. - # @!attribute [rw] generation - # @return [::Integer] - # Optional. Cloud Storage generation for the object. If the generation is - # omitted, the latest generation will be used. - # @!attribute [rw] source_fetcher - # @return [::Google::Cloud::Build::V1::StorageSource::SourceFetcher] - # Optional. Option to specify the tool to fetch the source file for the - # build. - class StorageSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the tool to fetch the source file for the build. - module SourceFetcher - # Unspecified defaults to GSUTIL. - SOURCE_FETCHER_UNSPECIFIED = 0 - - # Use the "gsutil" tool to download the source file. - GSUTIL = 1 - - # Use the Cloud Storage Fetcher tool to download the source file. - GCS_FETCHER = 2 - end - end - - # Location of the source in any accessible Git repository. - # @!attribute [rw] url - # @return [::String] - # Required. Location of the Git repo to build. - # - # This will be used as a `git remote`, see - # https://git-scm.com/docs/git-remote. - # @!attribute [rw] dir - # @return [::String] - # Optional. Directory, relative to the source root, in which to run the - # build. - # - # This must be a relative path. If a step's `dir` is specified and is an - # absolute path, this value is ignored for that step's execution. - # @!attribute [rw] revision - # @return [::String] - # Optional. The revision to fetch from the Git repository such as a branch, a - # tag, a commit SHA, or any Git ref. - # - # Cloud Build uses `git fetch` to fetch the revision from the Git - # repository; therefore make sure that the string you provide for `revision` - # is parsable by the command. For information on string values accepted by - # `git fetch`, see - # https://git-scm.com/docs/gitrevisions#_specifying_revisions. For - # information on `git fetch`, see https://git-scm.com/docs/git-fetch. - class GitSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of the source in a Google Cloud Source Repository. - # @!attribute [rw] project_id - # @return [::String] - # Optional. ID of the project that owns the Cloud Source Repository. If - # omitted, the project ID requesting the build is assumed. - # @!attribute [rw] repo_name - # @return [::String] - # Required. Name of the Cloud Source Repository. - # @!attribute [rw] branch_name - # @return [::String] - # Regex matching branches to build. - # - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `branch_name`, `tag_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tag_name - # @return [::String] - # Regex matching tags to build. - # - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `tag_name`, `branch_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] commit_sha - # @return [::String] - # Explicit commit SHA to build. - # - # Note: The following fields are mutually exclusive: `commit_sha`, `branch_name`, `tag_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] dir - # @return [::String] - # Optional. Directory, relative to the source root, in which to run the - # build. - # - # This must be a relative path. If a step's `dir` is specified and is an - # absolute path, this value is ignored for that step's execution. - # @!attribute [rw] invert_regex - # @return [::Boolean] - # Optional. Only trigger a build if the revision regex does NOT match the - # revision regex. - # @!attribute [rw] substitutions - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Substitutions to use in a triggered build. - # Should only be used with RunBuildTrigger - class RepoSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SubstitutionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Location of the source manifest in Cloud Storage. - # This feature is in Preview; see description - # [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). - # @!attribute [rw] bucket - # @return [::String] - # Required. Cloud Storage bucket containing the source manifest (see [Bucket - # Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - # @!attribute [rw] object - # @return [::String] - # Required. Cloud Storage object containing the source manifest. - # - # This object must be a JSON file. - # @!attribute [rw] generation - # @return [::Integer] - # Cloud Storage generation for the object. If the generation is - # omitted, the latest generation will be used. - class StorageSourceManifest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of the source in a 2nd-gen Google Cloud Build repository resource. - # @!attribute [rw] repository - # @return [::String] - # Required. Name of the Google Cloud Build repository, formatted as - # `projects/*/locations/*/connections/*/repositories/*`. - # @!attribute [rw] dir - # @return [::String] - # Optional. Directory, relative to the source root, in which to run the - # build. - # @!attribute [rw] revision - # @return [::String] - # Required. The revision to fetch from the Git repository such as a branch, a - # tag, a commit SHA, or any Git ref. - class ConnectedRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of the source in a supported storage service. - # @!attribute [rw] storage_source - # @return [::Google::Cloud::Build::V1::StorageSource] - # If provided, get the source from this location in Cloud Storage. - # - # Note: The following fields are mutually exclusive: `storage_source`, `repo_source`, `git_source`, `storage_source_manifest`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] repo_source - # @return [::Google::Cloud::Build::V1::RepoSource] - # If provided, get the source from this location in a Cloud Source - # Repository. - # - # Note: The following fields are mutually exclusive: `repo_source`, `storage_source`, `git_source`, `storage_source_manifest`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] git_source - # @return [::Google::Cloud::Build::V1::GitSource] - # If provided, get the source from this Git repository. - # - # Note: The following fields are mutually exclusive: `git_source`, `storage_source`, `repo_source`, `storage_source_manifest`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] storage_source_manifest - # @return [::Google::Cloud::Build::V1::StorageSourceManifest] - # If provided, get the source from this manifest in Cloud Storage. - # This feature is in Preview; see description - # [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). - # - # Note: The following fields are mutually exclusive: `storage_source_manifest`, `storage_source`, `repo_source`, `git_source`, `connected_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] connected_repository - # @return [::Google::Cloud::Build::V1::ConnectedRepository] - # Optional. If provided, get the source from this 2nd-gen Google Cloud - # Build repository resource. - # - # Note: The following fields are mutually exclusive: `connected_repository`, `storage_source`, `repo_source`, `git_source`, `storage_source_manifest`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Source - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An image built by the pipeline. - # @!attribute [rw] name - # @return [::String] - # Name used to push the container image to Google Container Registry, as - # presented to `docker push`. - # @!attribute [rw] digest - # @return [::String] - # Docker Registry 2.0 digest. - # @!attribute [r] push_timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for pushing the specified image. - # @!attribute [r] artifact_registry_package - # @return [::String] - # Output only. Path to the artifact in Artifact Registry. - class BuiltImage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Artifact uploaded using the PythonPackage directive. - # @!attribute [rw] uri - # @return [::String] - # URI of the uploaded artifact. - # @!attribute [rw] file_hashes - # @return [::Google::Cloud::Build::V1::FileHashes] - # Hash types and values of the Python Artifact. - # @!attribute [r] push_timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for pushing the specified artifact. - # @!attribute [r] artifact_registry_package - # @return [::String] - # Output only. Path to the artifact in Artifact Registry. - class UploadedPythonPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Maven artifact uploaded using the MavenArtifact directive. - # @!attribute [rw] uri - # @return [::String] - # URI of the uploaded artifact. - # @!attribute [rw] file_hashes - # @return [::Google::Cloud::Build::V1::FileHashes] - # Hash types and values of the Maven Artifact. - # @!attribute [r] push_timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for pushing the specified artifact. - # @!attribute [r] artifact_registry_package - # @return [::String] - # Output only. Path to the artifact in Artifact Registry. - class UploadedMavenArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Go module artifact uploaded to Artifact Registry using the GoModule - # directive. - # @!attribute [rw] uri - # @return [::String] - # URI of the uploaded artifact. - # @!attribute [rw] file_hashes - # @return [::Google::Cloud::Build::V1::FileHashes] - # Hash types and values of the Go Module Artifact. - # @!attribute [r] push_timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for pushing the specified artifact. - # @!attribute [r] artifact_registry_package - # @return [::String] - # Output only. Path to the artifact in Artifact Registry. - class UploadedGoModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An npm package uploaded to Artifact Registry using the NpmPackage - # directive. - # @!attribute [rw] uri - # @return [::String] - # URI of the uploaded npm package. - # @!attribute [rw] file_hashes - # @return [::Google::Cloud::Build::V1::FileHashes] - # Hash types and values of the npm package. - # @!attribute [r] push_timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for pushing the specified artifact. - # @!attribute [r] artifact_registry_package - # @return [::String] - # Output only. Path to the artifact in Artifact Registry. - class UploadedNpmPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A step in the build pipeline. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the container image that will run this particular - # build step. - # - # If the image is available in the host's Docker daemon's cache, it - # will be run directly. If not, the host will attempt to pull the image - # first, using the builder service account's credentials if necessary. - # - # The Docker daemon's cache will already have the latest versions of all of - # the officially supported build steps - # ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). - # The Docker daemon will also have cached many of the layers for some popular - # images, like "ubuntu", "debian", but they will be refreshed at the time you - # attempt to use them. - # - # If you built an image in a previous build step, it will be stored in the - # host's Docker daemon's cache and is available to use as the name for a - # later build step. - # @!attribute [rw] env - # @return [::Array<::String>] - # A list of environment variable definitions to be used when running a step. - # - # The elements are of the form "KEY=VALUE" for the environment variable "KEY" - # being given the value "VALUE". - # @!attribute [rw] args - # @return [::Array<::String>] - # A list of arguments that will be presented to the step when it is started. - # - # If the image used to run the step's container has an entrypoint, the `args` - # are used as arguments to that entrypoint. If the image does not define - # an entrypoint, the first element in args is used as the entrypoint, - # and the remainder will be used as arguments. - # @!attribute [rw] dir - # @return [::String] - # Working directory to use when running this step's container. - # - # If this value is a relative path, it is relative to the build's working - # directory. If this value is absolute, it may be outside the build's working - # directory, in which case the contents of the path may not be persisted - # across build step executions, unless a `volume` for that path is specified. - # - # If the build specifies a `RepoSource` with `dir` and a step with a `dir`, - # which specifies an absolute path, the `RepoSource` `dir` is ignored for - # the step's execution. - # @!attribute [rw] id - # @return [::String] - # Unique identifier for this build step, used in `wait_for` to - # reference this build step as a dependency. - # @!attribute [rw] wait_for - # @return [::Array<::String>] - # The ID(s) of the step(s) that this build step depends on. - # This build step will not start until all the build steps in `wait_for` - # have completed successfully. If `wait_for` is empty, this build step will - # start when all previous build steps in the `Build.Steps` list have - # completed successfully. - # @!attribute [rw] entrypoint - # @return [::String] - # Entrypoint to be used instead of the build step image's default entrypoint. - # If unset, the image's default entrypoint is used. - # @!attribute [rw] secret_env - # @return [::Array<::String>] - # A list of environment variables which are encrypted using a Cloud Key - # Management Service crypto key. These values must be specified in the - # build's `Secret`. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::Build::V1::Volume>] - # List of volumes to mount into the build step. - # - # Each volume is created as an empty volume prior to execution of the - # build step. Upon completion of the build, volumes and their contents are - # discarded. - # - # Using a named volume in only one step is not valid as it is indicative - # of a build request with an incorrect configuration. - # @!attribute [r] timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for executing this build step. - # @!attribute [r] pull_timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for pulling this build step's - # builder image only. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Time limit for executing this build step. If not defined, the step has no - # time limit and will be allowed to continue to run until either it completes - # or the build itself times out. - # @!attribute [r] status - # @return [::Google::Cloud::Build::V1::Build::Status] - # Output only. Status of the build step. At this time, build step status is - # only updated on build completion; step status is not updated in real-time - # as the build progresses. - # @!attribute [rw] allow_failure - # @return [::Boolean] - # Allow this build step to fail without failing the entire build. - # - # If false, the entire build will fail if this step fails. Otherwise, the - # build will succeed, but this step will still have a failure status. - # Error information will be reported in the failure_detail field. - # @!attribute [r] exit_code - # @return [::Integer] - # Output only. Return code from running the step. - # @!attribute [rw] allow_exit_codes - # @return [::Array<::Integer>] - # Allow this build step to fail without failing the entire build if and - # only if the exit code is one of the specified codes. If allow_failure - # is also specified, this field will take precedence. - # @!attribute [rw] script - # @return [::String] - # A shell script to be executed in the step. - # - # When script is provided, the user cannot specify the entrypoint or args. - # @!attribute [rw] automap_substitutions - # @return [::Boolean] - # Option to include built-in and custom substitutions as env variables - # for this build step. This option will override the global option - # in BuildOption. - class BuildStep - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Volume describes a Docker container volume which is mounted into build steps - # in order to persist files across build step execution. - # @!attribute [rw] name - # @return [::String] - # Name of the volume to mount. - # - # Volume names must be unique per build step and must be valid names for - # Docker volumes. Each named volume must be used by at least two build steps. - # @!attribute [rw] path - # @return [::String] - # Path at which to mount the volume. - # - # Paths must be absolute and cannot conflict with other volume paths on the - # same build step or with certain reserved volume paths. - class Volume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Artifacts created by the build pipeline. - # @!attribute [rw] images - # @return [::Array<::Google::Cloud::Build::V1::BuiltImage>] - # Container images that were built as a part of the build. - # @!attribute [rw] build_step_images - # @return [::Array<::String>] - # List of build step digests, in the order corresponding to build step - # indices. - # @!attribute [rw] artifact_manifest - # @return [::String] - # Path to the artifact manifest for non-container artifacts uploaded to Cloud - # Storage. Only populated when artifacts are uploaded to Cloud Storage. - # @!attribute [rw] num_artifacts - # @return [::Integer] - # Number of non-container artifacts uploaded to Cloud Storage. Only populated - # when artifacts are uploaded to Cloud Storage. - # @!attribute [rw] build_step_outputs - # @return [::Array<::String>] - # List of build step outputs, produced by builder images, in the order - # corresponding to build step indices. - # - # [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) - # can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the - # first 50KB of data is stored. Note that the `$BUILDER_OUTPUT` variable is - # read-only and can't be substituted. - # @!attribute [rw] artifact_timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Time to push all non-container artifacts to Cloud Storage. - # @!attribute [rw] python_packages - # @return [::Array<::Google::Cloud::Build::V1::UploadedPythonPackage>] - # Python artifacts uploaded to Artifact Registry at the end of the build. - # @!attribute [rw] maven_artifacts - # @return [::Array<::Google::Cloud::Build::V1::UploadedMavenArtifact>] - # Maven artifacts uploaded to Artifact Registry at the end of the build. - # @!attribute [rw] go_modules - # @return [::Array<::Google::Cloud::Build::V1::UploadedGoModule>] - # Optional. Go module artifacts uploaded to Artifact Registry at the end of - # the build. - # @!attribute [rw] npm_packages - # @return [::Array<::Google::Cloud::Build::V1::UploadedNpmPackage>] - # Npm packages uploaded to Artifact Registry at the end of the build. - class Results - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An artifact that was uploaded during a build. This - # is a single record in the artifact manifest JSON file. - # @!attribute [rw] location - # @return [::String] - # The path of an artifact in a Cloud Storage bucket, with the - # generation number. For example, - # `gs://mybucket/path/to/output.jar#generation`. - # @!attribute [rw] file_hash - # @return [::Array<::Google::Cloud::Build::V1::FileHashes>] - # The file hash of the artifact. - class ArtifactResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A build resource in the Cloud Build API. - # - # At a high level, a `Build` describes where to find source code, how to build - # it (for example, the builder image to run on the source), and where to store - # the built artifacts. - # - # Fields can include the following variables, which will be expanded when the - # build is created: - # - # - $PROJECT_ID: the project ID of the build. - # - $PROJECT_NUMBER: the project number of the build. - # - $LOCATION: the location/region of the build. - # - $BUILD_ID: the autogenerated ID of the build. - # - $REPO_NAME: the source repository name specified by RepoSource. - # - $BRANCH_NAME: the branch name specified by RepoSource. - # - $TAG_NAME: the tag name specified by RepoSource. - # - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - # resolved from the specified branch or tag. - # - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. - # @!attribute [r] name - # @return [::String] - # Output only. The 'Build' name with format: - # `projects/{project}/locations/{location}/builds/{build}`, where \\{build} - # is a unique identifier generated by the service. - # @!attribute [r] id - # @return [::String] - # Output only. Unique identifier of the build. - # @!attribute [r] project_id - # @return [::String] - # Output only. ID of the project. - # @!attribute [r] status - # @return [::Google::Cloud::Build::V1::Build::Status] - # Output only. Status of the build. - # @!attribute [r] status_detail - # @return [::String] - # Output only. Customer-readable message about the current status. - # @!attribute [rw] source - # @return [::Google::Cloud::Build::V1::Source] - # Optional. The location of the source files to build. - # @!attribute [rw] steps - # @return [::Array<::Google::Cloud::Build::V1::BuildStep>] - # Required. The operations to be performed on the workspace. - # @!attribute [r] results - # @return [::Google::Cloud::Build::V1::Results] - # Output only. Results of the build. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which the request to create the build was received. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which execution of the build was started. - # @!attribute [r] finish_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which execution of the build was finished. - # - # The difference between finish_time and start_time is the duration of the - # build's execution. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # Amount of time that this build should be allowed to run, to second - # granularity. If this amount of time elapses, work on the build will cease - # and the build status will be `TIMEOUT`. - # - # `timeout` starts ticking from `startTime`. - # - # Default time is 60 minutes. - # @!attribute [rw] images - # @return [::Array<::String>] - # A list of images to be pushed upon the successful completion of all build - # steps. - # - # The images are pushed using the builder service account's credentials. - # - # The digests of the pushed images will be stored in the `Build` resource's - # results field. - # - # If any of the images fail to be pushed, the build status is marked - # `FAILURE`. - # @!attribute [rw] queue_ttl - # @return [::Google::Protobuf::Duration] - # TTL in queue for this build. If provided and the build is enqueued longer - # than this value, the build will expire and the build status will be - # `EXPIRED`. - # - # The TTL starts ticking from create_time. - # @!attribute [rw] artifacts - # @return [::Google::Cloud::Build::V1::Artifacts] - # Artifacts produced by the build that should be uploaded upon - # successful completion of all build steps. - # @!attribute [rw] logs_bucket - # @return [::String] - # Cloud Storage bucket where logs should be written (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - # Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. - # @!attribute [r] source_provenance - # @return [::Google::Cloud::Build::V1::SourceProvenance] - # Output only. A permanent fixed identifier for source. - # @!attribute [r] build_trigger_id - # @return [::String] - # Output only. The ID of the `BuildTrigger` that triggered this build, if it - # was triggered automatically. - # @!attribute [rw] options - # @return [::Google::Cloud::Build::V1::BuildOptions] - # Special options for this build. - # @!attribute [r] log_url - # @return [::String] - # Output only. URL to logs for this build in Google Cloud Console. - # @!attribute [rw] substitutions - # @return [::Google::Protobuf::Map{::String => ::String}] - # Substitutions data for `Build` resource. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Tags for annotation of a `Build`. These are not docker tags. - # @!attribute [rw] secrets - # @return [::Array<::Google::Cloud::Build::V1::Secret>] - # Secrets to decrypt using Cloud Key Management Service. - # Note: Secret Manager is the recommended technique - # for managing sensitive data with Cloud Build. Use `available_secrets` to - # configure builds to access secrets from Secret Manager. For instructions, - # see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets - # @!attribute [r] timing - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::TimeSpan}] - # Output only. Stores timing information for phases of the build. Valid keys - # are: - # - # * BUILD: time to execute all build steps. - # * PUSH: time to push all artifacts including docker images and non docker - # artifacts. - # * FETCHSOURCE: time to fetch source. - # * SETUPBUILD: time to set up build. - # - # If the build does not specify source or images, - # these keys will not be included. - # @!attribute [r] approval - # @return [::Google::Cloud::Build::V1::BuildApproval] - # Output only. Describes this build's approval configuration, status, - # and result. - # @!attribute [rw] service_account - # @return [::String] - # IAM service account whose credentials will be used at build runtime. - # Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. - # ACCOUNT can be email address or uniqueId of the service account. - # @!attribute [rw] available_secrets - # @return [::Google::Cloud::Build::V1::Secrets] - # Secrets and secret environment variables. - # @!attribute [r] warnings - # @return [::Array<::Google::Cloud::Build::V1::Build::Warning>] - # Output only. Non-fatal problems encountered during the execution of the - # build. - # @!attribute [rw] git_config - # @return [::Google::Cloud::Build::V1::GitConfig] - # Optional. Configuration for git operations. - # @!attribute [r] failure_info - # @return [::Google::Cloud::Build::V1::Build::FailureInfo] - # Output only. Contains information about the build when status=FAILURE. - # @!attribute [rw] dependencies - # @return [::Array<::Google::Cloud::Build::V1::Dependency>] - # Optional. Dependencies that the Cloud Build worker will fetch before - # executing user steps. - class Build - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A non-fatal problem encountered during the execution of the build. - # @!attribute [rw] text - # @return [::String] - # Explanation of the warning generated. - # @!attribute [rw] priority - # @return [::Google::Cloud::Build::V1::Build::Warning::Priority] - # The priority for this warning. - class Warning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The relative importance of this warning. - module Priority - # Should not be used. - PRIORITY_UNSPECIFIED = 0 - - # e.g. deprecation warnings and alternative feature highlights. - INFO = 1 - - # e.g. automated detection of possible issues with the build. - WARNING = 2 - - # e.g. alerts that a feature used in the build is pending removal - ALERT = 3 - end - end - - # A fatal problem encountered during the execution of the build. - # @!attribute [rw] type - # @return [::Google::Cloud::Build::V1::Build::FailureInfo::FailureType] - # The name of the failure. - # @!attribute [rw] detail - # @return [::String] - # Explains the failure issue in more detail using hard-coded text. - class FailureInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The name of a fatal problem encountered during the execution of the - # build. - module FailureType - # Type unspecified - FAILURE_TYPE_UNSPECIFIED = 0 - - # Unable to push the image to the repository. - PUSH_FAILED = 1 - - # Final image not found. - PUSH_IMAGE_NOT_FOUND = 2 - - # Unauthorized push of the final image. - PUSH_NOT_AUTHORIZED = 3 - - # Backend logging failures. Should retry. - LOGGING_FAILURE = 4 - - # A build step has failed. - USER_BUILD_STEP = 5 - - # The source fetching has failed. - FETCH_SOURCE_FAILED = 6 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SubstitutionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Build::V1::TimeSpan] - class TimingEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Possible status of a build or build step. - module Status - # Status of the build is unknown. - STATUS_UNKNOWN = 0 - - # Build has been created and is pending execution and queuing. It has not - # been queued. - PENDING = 10 - - # Build or step is queued; work has not yet begun. - QUEUED = 1 - - # Build or step is being executed. - WORKING = 2 - - # Build or step finished successfully. - SUCCESS = 3 - - # Build or step failed to complete successfully. - FAILURE = 4 - - # Build or step failed due to an internal cause. - INTERNAL_ERROR = 5 - - # Build or step took longer than was allowed. - TIMEOUT = 6 - - # Build or step was canceled by a user. - CANCELLED = 7 - - # Build was enqueued for longer than the value of `queue_ttl`. - EXPIRED = 9 - end - end - - # A dependency that the Cloud Build worker will fetch before executing user - # steps. - # @!attribute [rw] empty - # @return [::Boolean] - # If set to true disable all dependency fetching (ignoring the default - # source as well). - # - # Note: The following fields are mutually exclusive: `empty`, `git_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] git_source - # @return [::Google::Cloud::Build::V1::Dependency::GitSourceDependency] - # Represents a git repository as a build dependency. - # - # Note: The following fields are mutually exclusive: `git_source`, `empty`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Dependency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a git repository as a build dependency. - # @!attribute [rw] repository - # @return [::Google::Cloud::Build::V1::Dependency::GitSourceRepository] - # Required. The kind of repo (url or dev connect). - # @!attribute [rw] revision - # @return [::String] - # Required. The revision that we will fetch the repo at. - # @!attribute [rw] recurse_submodules - # @return [::Boolean] - # Optional. True if submodules should be fetched too (default false). - # @!attribute [rw] depth - # @return [::Integer] - # Optional. How much history should be fetched for the build (default 1, -1 - # for all history). - # @!attribute [rw] dest_path - # @return [::String] - # Required. Where should the files be placed on the worker. - class GitSourceDependency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A repository for a git source. - # @!attribute [rw] url - # @return [::String] - # Location of the Git repository. - # - # Note: The following fields are mutually exclusive: `url`, `developer_connect`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] developer_connect - # @return [::String] - # The Developer Connect Git repository link formatted as - # `projects/*/locations/*/connections/*/gitRepositoryLink/*` - # - # Note: The following fields are mutually exclusive: `developer_connect`, `url`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class GitSourceRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # GitConfig is a configuration for git operations. - # @!attribute [rw] http - # @return [::Google::Cloud::Build::V1::GitConfig::HttpConfig] - # Configuration for HTTP related git operations. - class GitConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # HttpConfig is a configuration for HTTP related git operations. - # @!attribute [rw] proxy_secret_version_name - # @return [::String] - # SecretVersion resource of the HTTP proxy URL. The Service Account used in - # the build (either the default Service Account or - # user-specified Service Account) should have - # `secretmanager.versions.access` permissions on this secret. The proxy URL - # should be in format `[protocol://][user[:password]@]proxyhost[:port]`. - class HttpConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Artifacts produced by a build that should be uploaded upon - # successful completion of all build steps. - # @!attribute [rw] images - # @return [::Array<::String>] - # A list of images to be pushed upon the successful completion of all build - # steps. - # - # The images will be pushed using the builder service account's credentials. - # - # The digests of the pushed images will be stored in the Build resource's - # results field. - # - # If any of the images fail to be pushed, the build is marked FAILURE. - # @!attribute [rw] objects - # @return [::Google::Cloud::Build::V1::Artifacts::ArtifactObjects] - # A list of objects to be uploaded to Cloud Storage upon successful - # completion of all build steps. - # - # Files in the workspace matching specified paths globs will be uploaded to - # the specified Cloud Storage location using the builder service account's - # credentials. - # - # The location and generation of the uploaded objects will be stored in the - # Build resource's results field. - # - # If any objects fail to be pushed, the build is marked FAILURE. - # @!attribute [rw] maven_artifacts - # @return [::Array<::Google::Cloud::Build::V1::Artifacts::MavenArtifact>] - # A list of Maven artifacts to be uploaded to Artifact Registry upon - # successful completion of all build steps. - # - # Artifacts in the workspace matching specified paths globs will be uploaded - # to the specified Artifact Registry repository using the builder service - # account's credentials. - # - # If any artifacts fail to be pushed, the build is marked FAILURE. - # @!attribute [rw] go_modules - # @return [::Array<::Google::Cloud::Build::V1::Artifacts::GoModule>] - # Optional. A list of Go modules to be uploaded to Artifact Registry upon - # successful completion of all build steps. - # - # If any objects fail to be pushed, the build is marked FAILURE. - # @!attribute [rw] python_packages - # @return [::Array<::Google::Cloud::Build::V1::Artifacts::PythonPackage>] - # A list of Python packages to be uploaded to Artifact Registry upon - # successful completion of all build steps. - # - # The build service account credentials will be used to perform the upload. - # - # If any objects fail to be pushed, the build is marked FAILURE. - # @!attribute [rw] npm_packages - # @return [::Array<::Google::Cloud::Build::V1::Artifacts::NpmPackage>] - # A list of npm packages to be uploaded to Artifact Registry upon - # successful completion of all build steps. - # - # Npm packages in the specified paths will be uploaded - # to the specified Artifact Registry repository using the builder service - # account's credentials. - # - # If any packages fail to be pushed, the build is marked FAILURE. - class Artifacts - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Files in the workspace to upload to Cloud Storage upon successful - # completion of all build steps. - # @!attribute [rw] location - # @return [::String] - # Cloud Storage bucket and optional object path, in the form - # "gs://bucket/path/to/somewhere/". (see [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - # - # Files in the workspace matching any path pattern will be uploaded to - # Cloud Storage with this location as a prefix. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Path globs used to match files in the build's workspace. - # @!attribute [r] timing - # @return [::Google::Cloud::Build::V1::TimeSpan] - # Output only. Stores timing information for pushing all artifact objects. - class ArtifactObjects - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Maven artifact to upload to Artifact Registry upon successful completion - # of all build steps. - # @!attribute [rw] repository - # @return [::String] - # Artifact Registry repository, in the form - # "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" - # - # Artifact in the workspace specified by path will be uploaded to - # Artifact Registry with this location as a prefix. - # @!attribute [rw] path - # @return [::String] - # Optional. Path to an artifact in the build's workspace to be uploaded to - # Artifact Registry. - # This can be either an absolute path, - # e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar - # or a relative path from /workspace, - # e.g. my-app/target/my-app-1.0.SNAPSHOT.jar. - # @!attribute [rw] artifact_id - # @return [::String] - # Maven `artifactId` value used when uploading the artifact to Artifact - # Registry. - # @!attribute [rw] group_id - # @return [::String] - # Maven `groupId` value used when uploading the artifact to Artifact - # Registry. - # @!attribute [rw] version - # @return [::String] - # Maven `version` value used when uploading the artifact to Artifact - # Registry. - class MavenArtifact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Go module to upload to Artifact Registry upon successful completion of all - # build steps. A module refers to all dependencies in a go.mod file. - # @!attribute [rw] repository_name - # @return [::String] - # Optional. Artifact Registry repository name. - # - # Specified Go modules will be zipped and uploaded to Artifact Registry - # with this location as a prefix. - # e.g. my-go-repo - # @!attribute [rw] repository_location - # @return [::String] - # Optional. Location of the Artifact Registry repository. i.e. us-east1 - # Defaults to the build’s location. - # @!attribute [rw] repository_project_id - # @return [::String] - # Optional. Project ID of the Artifact Registry repository. - # Defaults to the build project. - # @!attribute [rw] source_path - # @return [::String] - # Optional. Source path of the go.mod file in the build's workspace. If not - # specified, this will default to the current directory. - # e.g. ~/code/go/mypackage - # @!attribute [rw] module_path - # @return [::String] - # Optional. The Go module's "module path". - # e.g. example.com/foo/v2 - # @!attribute [rw] module_version - # @return [::String] - # Optional. The Go module's semantic version in the form vX.Y.Z. e.g. - # v0.1.1 Pre-release identifiers can also be added by appending a dash and - # dot separated ASCII alphanumeric characters and hyphens. - # e.g. v0.2.3-alpha.x.12m.5 - class GoModule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Python package to upload to Artifact Registry upon successful completion - # of all build steps. A package can encapsulate multiple objects to be - # uploaded to a single repository. - # @!attribute [rw] repository - # @return [::String] - # Artifact Registry repository, in the form - # "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" - # - # Files in the workspace matching any path pattern will be uploaded to - # Artifact Registry with this location as a prefix. - # @!attribute [rw] paths - # @return [::Array<::String>] - # Path globs used to match files in the build's workspace. For Python/ - # Twine, this is usually `dist/*`, and sometimes additionally an `.asc` - # file. - class PythonPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Npm package to upload to Artifact Registry upon successful completion - # of all build steps. - # @!attribute [rw] repository - # @return [::String] - # Artifact Registry repository, in the form - # "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" - # - # Npm package in the workspace specified by path will be zipped and - # uploaded to Artifact Registry with this location as a prefix. - # @!attribute [rw] package_path - # @return [::String] - # Optional. Path to the package.json. - # e.g. workspace/path/to/package - # - # Only one of `archive` or `package_path` can be specified. - class NpmPackage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Start and end times for a build execution phase. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start of time span. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End of time span. - class TimeSpan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for build operations. - # @!attribute [rw] build - # @return [::Google::Cloud::Build::V1::Build] - # The build that the operation is tracking. - class BuildOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provenance of the source. Ways to find the original source, or verify that - # some source was used for this build. - # @!attribute [rw] resolved_storage_source - # @return [::Google::Cloud::Build::V1::StorageSource] - # A copy of the build's `source.storage_source`, if exists, with any - # generations resolved. - # @!attribute [rw] resolved_repo_source - # @return [::Google::Cloud::Build::V1::RepoSource] - # A copy of the build's `source.repo_source`, if exists, with any - # revisions resolved. - # @!attribute [rw] resolved_storage_source_manifest - # @return [::Google::Cloud::Build::V1::StorageSourceManifest] - # A copy of the build's `source.storage_source_manifest`, if exists, with any - # revisions resolved. - # This feature is in Preview. - # @!attribute [r] resolved_connected_repository - # @return [::Google::Cloud::Build::V1::ConnectedRepository] - # Output only. A copy of the build's `source.connected_repository`, if - # exists, with any revisions resolved. - # @!attribute [r] resolved_git_source - # @return [::Google::Cloud::Build::V1::GitSource] - # Output only. A copy of the build's `source.git_source`, if exists, with any - # revisions resolved. - # @!attribute [r] file_hashes - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Build::V1::FileHashes}] - # Output only. Hash(es) of the build source, which can be used to verify that - # the original source integrity was maintained in the build. Note that - # `FileHashes` will only be populated if `BuildOptions` has requested a - # `SourceProvenanceHash`. - # - # The keys to this map are file paths used as build source and the values - # contain the hash values for those files. - # - # If the build source came in a single package such as a gzipped tarfile - # (`.tar.gz`), the `FileHash` will be for the single path to that file. - class SourceProvenance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Build::V1::FileHashes] - class FileHashesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Container message for hashes of byte content of files, used in - # SourceProvenance messages to verify integrity of source input to the build. - # @!attribute [rw] file_hash - # @return [::Array<::Google::Cloud::Build::V1::Hash>] - # Collection of file hashes. - class FileHashes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container message for hash values. - # @!attribute [rw] type - # @return [::Google::Cloud::Build::V1::Hash::HashType] - # The type of hash that was performed. - # @!attribute [rw] value - # @return [::String] - # The hash value. - class Hash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the hash algorithm, if any. - module HashType - # No hash requested. - NONE = 0 - - # Use a sha256 hash. - SHA256 = 1 - - # Use a md5 hash. - MD5 = 2 - - # Dirhash of a Go module's source code which is then hex-encoded. - GO_MODULE_H1 = 3 - - # Use a sha512 hash. - SHA512 = 4 - end - end - - # Secrets and secret environment variables. - # @!attribute [rw] secret_manager - # @return [::Array<::Google::Cloud::Build::V1::SecretManagerSecret>] - # Secrets in Secret Manager and associated secret environment variable. - # @!attribute [rw] inline - # @return [::Array<::Google::Cloud::Build::V1::InlineSecret>] - # Secrets encrypted with KMS key and the associated secret environment - # variable. - class Secrets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Pairs a set of secret environment variables mapped to encrypted - # values with the Cloud KMS key to use to decrypt the value. - # @!attribute [rw] kms_key_name - # @return [::String] - # Resource name of Cloud KMS crypto key to decrypt the encrypted value. - # In format: projects/*/locations/*/keyRings/*/cryptoKeys/* - # @!attribute [rw] env_map - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of environment variable name to its encrypted value. - # - # Secret environment variables must be unique across all of a build's - # secrets, and must be used by at least one build step. Values can be at most - # 64 KB in size. There can be at most 100 secret values across all of a - # build's secrets. - class InlineSecret - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvMapEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Pairs a secret environment variable with a SecretVersion in Secret Manager. - # @!attribute [rw] version_name - # @return [::String] - # Resource name of the SecretVersion. In format: - # projects/*/secrets/*/versions/* - # @!attribute [rw] env - # @return [::String] - # Environment variable name to associate with the secret. - # Secret environment variables must be unique across all of a build's - # secrets, and must be used by at least one build step. - class SecretManagerSecret - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Pairs a set of secret environment variables containing encrypted - # values with the Cloud KMS key to use to decrypt the value. - # Note: Use `kmsKeyName` with `available_secrets` instead of using - # `kmsKeyName` with `secret`. For instructions see: - # https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials. - # @!attribute [rw] kms_key_name - # @return [::String] - # Cloud KMS key name to use to decrypt these envs. - # @!attribute [rw] secret_env - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of environment variable name to its encrypted value. - # - # Secret environment variables must be unique across all of a build's - # secrets, and must be used by at least one build step. Values can be at most - # 64 KB in size. There can be at most 100 secret values across all of a - # build's secrets. - class Secret - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SecretEnvEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request to create a new build. - # @!attribute [rw] parent - # @return [::String] - # The parent resource where this build will be created. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project. - # @!attribute [rw] build - # @return [::Google::Cloud::Build::V1::Build] - # Required. Build resource to create. - class CreateBuildRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a build. - # @!attribute [rw] name - # @return [::String] - # The name of the `Build` to retrieve. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project. - # @!attribute [rw] id - # @return [::String] - # Required. ID of the build. - class GetBuildRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list builds. - # @!attribute [rw] parent - # @return [::String] - # The parent of the collection of `Builds`. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of results to return in the list. - # @!attribute [rw] page_token - # @return [::String] - # The page token for the next page of Builds. - # - # If unspecified, the first page of results is returned. - # - # If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. - # In this case, the token should be discarded, and pagination should be - # restarted from the first page of results. - # - # See https://google.aip.dev/158 for more. - # @!attribute [rw] filter - # @return [::String] - # The raw filter text to constrain the results. - class ListBuildsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response including listed builds. - # @!attribute [rw] builds - # @return [::Array<::Google::Cloud::Build::V1::Build>] - # Builds will be sorted by `create_time`, descending. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to receive the next page of results. - # This will be absent if the end of the response list has been reached. - class ListBuildsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to cancel an ongoing build. - # @!attribute [rw] name - # @return [::String] - # The name of the `Build` to cancel. - # Format: `projects/{project}/locations/{location}/builds/{build}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project. - # @!attribute [rw] id - # @return [::String] - # Required. ID of the build. - class CancelBuildRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to approve or reject a pending build. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the target build. - # For example: "projects/\\{$project_id}/builds/\\{$build_id}" - # @!attribute [rw] approval_result - # @return [::Google::Cloud::Build::V1::ApprovalResult] - # Approval decision and metadata. - class ApproveBuildRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BuildApproval describes a build's approval configuration, state, and - # result. - # @!attribute [r] state - # @return [::Google::Cloud::Build::V1::BuildApproval::State] - # Output only. The state of this build's approval. - # @!attribute [r] config - # @return [::Google::Cloud::Build::V1::ApprovalConfig] - # Output only. Configuration for manual approval of this build. - # @!attribute [r] result - # @return [::Google::Cloud::Build::V1::ApprovalResult] - # Output only. Result of manual approval for this Build. - class BuildApproval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies the current state of a build's approval. - module State - # Default enum type. This should not be used. - STATE_UNSPECIFIED = 0 - - # Build approval is pending. - PENDING = 1 - - # Build approval has been approved. - APPROVED = 2 - - # Build approval has been rejected. - REJECTED = 3 - - # Build was cancelled while it was still pending approval. - CANCELLED = 5 - end - end - - # ApprovalConfig describes configuration for manual approval of a build. - # @!attribute [rw] approval_required - # @return [::Boolean] - # Whether or not approval is needed. If this is set on a build, it will - # become pending when created, and will need to be explicitly approved - # to start. - class ApprovalConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ApprovalResult describes the decision and associated metadata of a manual - # approval of a build. - # @!attribute [r] approver_account - # @return [::String] - # Output only. Email of the user that called the ApproveBuild API to - # approve or reject a build at the time that the API was called. - # @!attribute [r] approval_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the approval decision was made. - # @!attribute [rw] decision - # @return [::Google::Cloud::Build::V1::ApprovalResult::Decision] - # Required. The decision of this manual approval. - # @!attribute [rw] comment - # @return [::String] - # Optional. An optional comment for this manual approval result. - # @!attribute [rw] url - # @return [::String] - # Optional. An optional URL tied to this manual approval result. This field - # is essentially the same as comment, except that it will be rendered by the - # UI differently. An example use case is a link to an external job that - # approved this Build. - class ApprovalResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies whether or not this manual approval result is to approve - # or reject a build. - module Decision - # Default enum type. This should not be used. - DECISION_UNSPECIFIED = 0 - - # Build is approved. - APPROVED = 1 - - # Build is rejected. - REJECTED = 2 - end - end - - # GitRepoSource describes a repo and ref of a code repository. - # @!attribute [rw] uri - # @return [::String] - # The URI of the repo (e.g. https://github.com/user/repo.git). - # Either `uri` or `repository` can be specified and is required. - # @!attribute [rw] repository - # @return [::String] - # The connected repository resource name, in the format - # `projects/*/locations/*/connections/*/repositories/*`. Either `uri` or - # `repository` can be specified and is required. - # @!attribute [rw] ref - # @return [::String] - # The branch or tag to use. Must start with "refs/" (required). - # @!attribute [rw] repo_type - # @return [::Google::Cloud::Build::V1::GitFileSource::RepoType] - # See RepoType below. - # @!attribute [rw] github_enterprise_config - # @return [::String] - # The full resource name of the github enterprise config. - # Format: - # `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`. - # `projects/{project}/githubEnterpriseConfigs/{id}`. - class GitRepoSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GitFileSource describes a file within a (possibly remote) code repository. - # @!attribute [rw] path - # @return [::String] - # The path of the file, with the repo root as the root of the path. - # @!attribute [rw] uri - # @return [::String] - # The URI of the repo. - # Either uri or repository can be specified. - # If unspecified, the repo from which the trigger invocation originated is - # assumed to be the repo from which to read the specified path. - # @!attribute [rw] repository - # @return [::String] - # The fully qualified resource name of the Repos API repository. - # Either URI or repository can be specified. - # If unspecified, the repo from which the trigger invocation originated is - # assumed to be the repo from which to read the specified path. - # @!attribute [rw] repo_type - # @return [::Google::Cloud::Build::V1::GitFileSource::RepoType] - # See RepoType above. - # @!attribute [rw] revision - # @return [::String] - # The branch, tag, arbitrary ref, or SHA version of the repo to use when - # resolving the filename (optional). - # This field respects the same syntax/resolution as described here: - # https://git-scm.com/docs/gitrevisions - # If unspecified, the revision from which the trigger invocation originated - # is assumed to be the revision from which to read the specified path. - # @!attribute [rw] github_enterprise_config - # @return [::String] - # The full resource name of the github enterprise config. - # Format: - # `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}`. - # `projects/{project}/githubEnterpriseConfigs/{id}`. - class GitFileSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the repo, since it may not be explicit from the `repo` field - # (e.g from a URL). - module RepoType - # The default, unknown repo type. Don't use it, instead use one of - # the other repo types. - UNKNOWN = 0 - - # A Google Cloud Source Repositories-hosted repo. - CLOUD_SOURCE_REPOSITORIES = 1 - - # A GitHub-hosted repo not necessarily on "github.com" (i.e. GitHub - # Enterprise). - GITHUB = 2 - - # A Bitbucket Server-hosted repo. - BITBUCKET_SERVER = 3 - - # A GitLab-hosted repo. - GITLAB = 4 - end - end - - # Configuration for an automated build in response to source repository - # changes. - # @!attribute [rw] resource_name - # @return [::String] - # The `Trigger` name with format: - # `projects/{project}/locations/{location}/triggers/{trigger}`, where - # \\{trigger} is a unique identifier generated by the service. - # @!attribute [r] id - # @return [::String] - # Output only. Unique identifier of the trigger. - # @!attribute [rw] description - # @return [::String] - # Human-readable description of this trigger. - # @!attribute [rw] name - # @return [::String] - # User-assigned name of the trigger. Must be unique within the project. - # Trigger names must meet the following requirements: - # - # + They must contain only alphanumeric characters and dashes. - # + They can be 1-64 characters long. - # + They must begin and end with an alphanumeric character. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Tags for annotation of a `BuildTrigger` - # @!attribute [rw] trigger_template - # @return [::Google::Cloud::Build::V1::RepoSource] - # Template describing the types of source changes to trigger a build. - # - # Branch and tag names in trigger templates are interpreted as regular - # expressions. Any branch or tag change that matches that regular expression - # will trigger a build. - # - # Mutually exclusive with `github`. - # @!attribute [rw] github - # @return [::Google::Cloud::Build::V1::GitHubEventsConfig] - # GitHubEventsConfig describes the configuration of a trigger that creates - # a build whenever a GitHub event is received. - # - # Mutually exclusive with `trigger_template`. - # @!attribute [rw] pubsub_config - # @return [::Google::Cloud::Build::V1::PubsubConfig] - # PubsubConfig describes the configuration of a trigger that - # creates a build whenever a Pub/Sub message is published. - # @!attribute [rw] webhook_config - # @return [::Google::Cloud::Build::V1::WebhookConfig] - # WebhookConfig describes the configuration of a trigger that - # creates a build whenever a webhook is sent to a trigger's webhook URL. - # @!attribute [rw] autodetect - # @return [::Boolean] - # Autodetect build configuration. The following precedence is used (case - # insensitive): - # - # 1. cloudbuild.yaml - # 2. cloudbuild.yml - # 3. cloudbuild.json - # 4. Dockerfile - # - # Currently only available for GitHub App Triggers. - # - # Note: The following fields are mutually exclusive: `autodetect`, `build`, `filename`, `git_file_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] build - # @return [::Google::Cloud::Build::V1::Build] - # Contents of the build template. - # - # Note: The following fields are mutually exclusive: `build`, `autodetect`, `filename`, `git_file_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] filename - # @return [::String] - # Path, from the source root, to the build configuration file - # (i.e. cloudbuild.yaml). - # - # Note: The following fields are mutually exclusive: `filename`, `autodetect`, `build`, `git_file_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] git_file_source - # @return [::Google::Cloud::Build::V1::GitFileSource] - # The file source describing the local or remote Build template. - # - # Note: The following fields are mutually exclusive: `git_file_source`, `autodetect`, `build`, `filename`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the trigger was created. - # @!attribute [rw] disabled - # @return [::Boolean] - # If true, the trigger will never automatically execute a build. - # @!attribute [rw] substitutions - # @return [::Google::Protobuf::Map{::String => ::String}] - # Substitutions for Build resource. The keys must match the following - # regular expression: `^_[A-Z0-9_]+$`. - # @!attribute [rw] ignored_files - # @return [::Array<::String>] - # ignored_files and included_files are file glob matches using - # https://golang.org/pkg/path/filepath/#Match extended with support for "**". - # - # If ignored_files and changed files are both empty, then they are - # not used to determine whether or not to trigger a build. - # - # If ignored_files is not empty, then we ignore any files that match - # any of the ignored_file globs. If the change has no files that are - # outside of the ignored_files globs, then we do not trigger a build. - # @!attribute [rw] included_files - # @return [::Array<::String>] - # If any of the files altered in the commit pass the ignored_files - # filter and included_files is empty, then as far as this filter is - # concerned, we should trigger the build. - # - # If any of the files altered in the commit pass the ignored_files - # filter and included_files is not empty, then we make sure that at - # least one of those files matches a included_files glob. If not, - # then we do not trigger a build. - # @!attribute [rw] filter - # @return [::String] - # Optional. A Common Expression Language string. - # @!attribute [rw] source_to_build - # @return [::Google::Cloud::Build::V1::GitRepoSource] - # The repo and ref of the repository from which to build. This field - # is used only for those triggers that do not respond to SCM events. - # Triggers that respond to such events build source at whatever commit - # caused the event. - # This field is currently only used by Webhook, Pub/Sub, Manual, and Cron - # triggers. - # @!attribute [rw] service_account - # @return [::String] - # The service account used for all user-controlled operations including - # UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. - # If no service account is set and the legacy Cloud Build service account - # (`[PROJECT_NUM]@cloudbuild.gserviceaccount.com`) is the default for the - # project then it will be used instead. - # Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` - # @!attribute [rw] repository_event_config - # @return [::Google::Cloud::Build::V1::RepositoryEventConfig] - # The configuration of a trigger that creates a build whenever an event from - # Repo API is received. - class BuildTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class SubstitutionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The configuration of a trigger that creates a build whenever an event from - # Repo API is received. - # @!attribute [rw] repository - # @return [::String] - # The resource name of the Repo API resource. - # @!attribute [r] repository_type - # @return [::Google::Cloud::Build::V1::RepositoryEventConfig::RepositoryType] - # Output only. The type of the SCM vendor the repository points to. - # @!attribute [rw] pull_request - # @return [::Google::Cloud::Build::V1::PullRequestFilter] - # Filter to match changes in pull requests. - # - # Note: The following fields are mutually exclusive: `pull_request`, `push`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] push - # @return [::Google::Cloud::Build::V1::PushFilter] - # Filter to match changes in refs like branches, tags. - # - # Note: The following fields are mutually exclusive: `push`, `pull_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class RepositoryEventConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # All possible SCM repo types from Repo API. - module RepositoryType - # If unspecified, RepositoryType defaults to GITHUB. - REPOSITORY_TYPE_UNSPECIFIED = 0 - - # The SCM repo is GITHUB. - GITHUB = 1 - - # The SCM repo is GITHUB Enterprise. - GITHUB_ENTERPRISE = 2 - - # The SCM repo is GITLAB Enterprise. - GITLAB_ENTERPRISE = 3 - end - end - - # GitHubEventsConfig describes the configuration of a trigger that creates a - # build whenever a GitHub event is received. - # @!attribute [rw] installation_id - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Integer] - # The installationID that emits the GitHub event. - # @!attribute [rw] owner - # @return [::String] - # Owner of the repository. For example: The owner for - # https://github.com/googlecloudplatform/cloud-builders is - # "googlecloudplatform". - # @!attribute [rw] name - # @return [::String] - # Name of the repository. For example: The name for - # https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". - # @!attribute [rw] pull_request - # @return [::Google::Cloud::Build::V1::PullRequestFilter] - # filter to match changes in pull requests. - # - # Note: The following fields are mutually exclusive: `pull_request`, `push`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] push - # @return [::Google::Cloud::Build::V1::PushFilter] - # filter to match changes in refs like branches, tags. - # - # Note: The following fields are mutually exclusive: `push`, `pull_request`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class GitHubEventsConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PubsubConfig describes the configuration of a trigger that - # creates a build whenever a Pub/Sub message is published. - # @!attribute [r] subscription - # @return [::String] - # Output only. Name of the subscription. Format is - # `projects/{project}/subscriptions/{subscription}`. - # @!attribute [rw] topic - # @return [::String] - # Optional. The name of the topic from which this subscription is receiving - # messages. Format is `projects/{project}/topics/{topic}`. - # @!attribute [rw] service_account_email - # @return [::String] - # Service account that will make the push request. - # @!attribute [rw] state - # @return [::Google::Cloud::Build::V1::PubsubConfig::State] - # Potential issues with the underlying Pub/Sub subscription configuration. - # Only populated on get requests. - class PubsubConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enumerates potential issues with the underlying Pub/Sub subscription - # configuration. - module State - # The subscription configuration has not been checked. - STATE_UNSPECIFIED = 0 - - # The Pub/Sub subscription is properly configured. - OK = 1 - - # The subscription has been deleted. - SUBSCRIPTION_DELETED = 2 - - # The topic has been deleted. - TOPIC_DELETED = 3 - - # Some of the subscription's field are misconfigured. - SUBSCRIPTION_MISCONFIGURED = 4 - end - end - - # WebhookConfig describes the configuration of a trigger that - # creates a build whenever a webhook is sent to a trigger's webhook URL. - # @!attribute [rw] secret - # @return [::String] - # Required. Resource name for the secret required as a URL parameter. - # @!attribute [rw] state - # @return [::Google::Cloud::Build::V1::WebhookConfig::State] - # Potential issues with the underlying Pub/Sub subscription configuration. - # Only populated on get requests. - class WebhookConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enumerates potential issues with the Secret Manager secret provided by the - # user. - module State - # The webhook auth configuration not been checked. - STATE_UNSPECIFIED = 0 - - # The auth configuration is properly setup. - OK = 1 - - # The secret provided in auth_method has been deleted. - SECRET_DELETED = 2 - end - end - - # PullRequestFilter contains filter properties for matching GitHub Pull - # Requests. - # @!attribute [rw] branch - # @return [::String] - # Regex of branches to match. - # - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # @!attribute [rw] comment_control - # @return [::Google::Cloud::Build::V1::PullRequestFilter::CommentControl] - # If CommentControl is enabled, depending on the setting, builds may not - # fire until a repository writer comments `/gcbrun` on a pull - # request or `/gcbrun` is in the pull request description. - # Only PR comments that contain `/gcbrun` will trigger builds. - # - # If CommentControl is set to disabled, comments with `/gcbrun` from a user - # with repository write permission or above will - # still trigger builds to run. - # @!attribute [rw] invert_regex - # @return [::Boolean] - # If true, branches that do NOT match the git_ref will trigger a build. - class PullRequestFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Controls whether or not a `/gcbrun` comment is required from a user with - # repository write permission or above in order to - # trigger Build runs for pull requests. Pull Request update events differ - # between repo types. - # Check repo specific guides - # ([GitHub](https://cloud.google.com/build/docs/automating-builds/github/build-repos-from-github-enterprise#creating_a_github_enterprise_trigger), - # [Bitbucket](https://cloud.google.com/build/docs/automating-builds/bitbucket/build-repos-from-bitbucket-server#creating_a_bitbucket_server_trigger), - # [GitLab](https://cloud.google.com/build/docs/automating-builds/gitlab/build-repos-from-gitlab#creating_a_gitlab_trigger) - # for details. - module CommentControl - # Do not require `/gcbrun` comments from a user with repository write - # permission or above on pull requests before builds are triggered. - # Comments that contain `/gcbrun` will still fire builds so this should - # be thought of as comments not required. - COMMENTS_DISABLED = 0 - - # Builds will only fire in response to pull requests if: - # 1. The pull request author has repository write permission or above and - # `/gcbrun` is in the PR description. - # 2. A user with repository writer permissions or above comments `/gcbrun` - # on a pull request authored by any user. - COMMENTS_ENABLED = 1 - - # Builds will only fire in response to pull requests if: - # 1. The pull request author is a repository writer or above. - # 2. If the author does not have write permissions, a user with write - # permissions or above must comment `/gcbrun` in order to fire a build. - COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2 - end - end - - # Push contains filter properties for matching GitHub git pushes. - # @!attribute [rw] branch - # @return [::String] - # Regexes matching branches to build. - # - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `branch`, `tag`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tag - # @return [::String] - # Regexes matching tags to build. - # - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `tag`, `branch`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] invert_regex - # @return [::Boolean] - # When true, only trigger a build if the revision regex does NOT match the - # git_ref regex. - class PushFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a new `BuildTrigger`. - # @!attribute [rw] parent - # @return [::String] - # The parent resource where this trigger will be created. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project for which to configure automatic builds. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # Required. `BuildTrigger` to create. - class CreateBuildTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Returns the `BuildTrigger` with the specified ID. - # @!attribute [rw] name - # @return [::String] - # The name of the `Trigger` to retrieve. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project that owns the trigger. - # @!attribute [rw] trigger_id - # @return [::String] - # Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. - class GetBuildTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list existing `BuildTriggers`. - # @!attribute [rw] parent - # @return [::String] - # The parent of the collection of `Triggers`. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project for which to list BuildTriggers. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of results to return in the list. - # @!attribute [rw] page_token - # @return [::String] - # Token to provide to skip to a particular spot in the list. - class ListBuildTriggersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response containing existing `BuildTriggers`. - # @!attribute [rw] triggers - # @return [::Array<::Google::Cloud::Build::V1::BuildTrigger>] - # `BuildTriggers` for the project, sorted by `create_time` descending. - # @!attribute [rw] next_page_token - # @return [::String] - # Token to receive the next page of results. - class ListBuildTriggersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a `BuildTrigger`. - # @!attribute [rw] name - # @return [::String] - # The name of the `Trigger` to delete. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project that owns the trigger. - # @!attribute [rw] trigger_id - # @return [::String] - # Required. ID of the `BuildTrigger` to delete. - class DeleteBuildTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update an existing `BuildTrigger`. - # @!attribute [rw] project_id - # @return [::String] - # Required. ID of the project that owns the trigger. - # @!attribute [rw] trigger_id - # @return [::String] - # Required. ID of the `BuildTrigger` to update. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Build::V1::BuildTrigger] - # Required. `BuildTrigger` to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Update mask for the resource. If this is set, - # the server will only update the fields specified in the field mask. - # Otherwise, a full update of the mutable resource fields will be performed. - class UpdateBuildTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Optional arguments to enable specific features of builds. - # @!attribute [rw] source_provenance_hash - # @return [::Array<::Google::Cloud::Build::V1::Hash::HashType>] - # Requested hash for SourceProvenance. - # @!attribute [rw] requested_verify_option - # @return [::Google::Cloud::Build::V1::BuildOptions::VerifyOption] - # Requested verifiability options. - # @!attribute [rw] machine_type - # @return [::Google::Cloud::Build::V1::BuildOptions::MachineType] - # Compute Engine machine type on which to run the build. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Requested disk size for the VM that runs the build. Note that this is *NOT* - # "disk free"; some of the space will be used by the operating system and - # build utilities. Also note that this is the minimum disk size that will be - # allocated for the build -- the build may run with a larger disk than - # requested. At present, the maximum disk size is 4000GB; builds that request - # more than the maximum are rejected with an error. - # @!attribute [rw] substitution_option - # @return [::Google::Cloud::Build::V1::BuildOptions::SubstitutionOption] - # Option to specify behavior when there is an error in the substitution - # checks. - # - # NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot - # be overridden in the build configuration file. - # @!attribute [rw] dynamic_substitutions - # @return [::Boolean] - # Option to specify whether or not to apply bash style string - # operations to the substitutions. - # - # NOTE: this is always enabled for triggered builds and cannot be - # overridden in the build configuration file. - # @!attribute [rw] automap_substitutions - # @return [::Boolean] - # Option to include built-in and custom substitutions as env variables - # for all build steps. - # @!attribute [rw] log_streaming_option - # @return [::Google::Cloud::Build::V1::BuildOptions::LogStreamingOption] - # Option to define build log streaming behavior to Cloud - # Storage. - # @!attribute [rw] worker_pool - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # This field deprecated; please use `pool.name` instead. - # @!attribute [rw] pool - # @return [::Google::Cloud::Build::V1::BuildOptions::PoolOption] - # Optional. Specification for execution on a `WorkerPool`. - # - # See [running builds in a private - # pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) - # for more information. - # @!attribute [rw] logging - # @return [::Google::Cloud::Build::V1::BuildOptions::LoggingMode] - # Option to specify the logging mode, which determines if and where build - # logs are stored. - # @!attribute [rw] env - # @return [::Array<::String>] - # A list of global environment variable definitions that will exist for all - # build steps in this build. If a variable is defined in both globally and in - # a build step, the variable will use the build step value. - # - # The elements are of the form "KEY=VALUE" for the environment variable "KEY" - # being given the value "VALUE". - # @!attribute [rw] secret_env - # @return [::Array<::String>] - # A list of global environment variables, which are encrypted using a Cloud - # Key Management Service crypto key. These values must be specified in the - # build's `Secret`. These variables will be available to all build steps - # in this build. - # @!attribute [rw] volumes - # @return [::Array<::Google::Cloud::Build::V1::Volume>] - # Global list of volumes to mount for ALL build steps - # - # Each volume is created as an empty volume prior to starting the build - # process. Upon completion of the build, volumes and their contents are - # discarded. Global volume names and paths cannot conflict with the volumes - # defined a build step. - # - # Using a global volume in a build with only one step is not valid as - # it is indicative of a build request with an incorrect configuration. - # @!attribute [rw] default_logs_bucket_behavior - # @return [::Google::Cloud::Build::V1::BuildOptions::DefaultLogsBucketBehavior] - # Optional. Option to specify how default logs buckets are setup. - # @!attribute [rw] enable_structured_logging - # @return [::Boolean] - # Optional. Option to specify whether structured logging is enabled. - # - # If true, JSON-formatted logs are parsed as structured logs. - class BuildOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Details about how a build should be executed on a `WorkerPool`. - # - # See [running builds in a private - # pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) - # for more information. - # @!attribute [rw] name - # @return [::String] - # The `WorkerPool` resource to execute the build on. - # You must have `cloudbuild.workerpools.use` on the project hosting the - # WorkerPool. - # - # Format projects/\\{project}/locations/\\{location}/workerPools/\\{workerPoolId} - class PoolOption - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specifies the manner in which the build should be verified, if at all. - # - # If a verified build is requested, and any part of the process to generate - # and upload provenance fails, the build will also fail. - # - # If the build does not request verification then that process may occur, but - # is not guaranteed to. If it does occur and fails, the build will not fail. - # - # For more information, see [Viewing Build - # Provenance](https://cloud.google.com/build/docs/securing-builds/view-build-provenance). - module VerifyOption - # Not a verifiable build (the default). - NOT_VERIFIED = 0 - - # Build must be verified. - VERIFIED = 1 - end - - # Supported Compute Engine machine types. - # For more information, see [Machine - # types](https://cloud.google.com/compute/docs/machine-types). - module MachineType - # Standard machine type. - UNSPECIFIED = 0 - - # Highcpu machine with 8 CPUs. - N1_HIGHCPU_8 = 1 - - # Highcpu machine with 32 CPUs. - N1_HIGHCPU_32 = 2 - - # Highcpu e2 machine with 8 CPUs. - E2_HIGHCPU_8 = 5 - - # Highcpu e2 machine with 32 CPUs. - E2_HIGHCPU_32 = 6 - - # E2 machine with 1 CPU. - E2_MEDIUM = 7 - end - - # Specifies the behavior when there is an error in the substitution checks. - module SubstitutionOption - # Fails the build if error in substitutions checks, like missing - # a substitution in the template or in the map. - MUST_MATCH = 0 - - # Do not fail the build if error in substitutions checks. - ALLOW_LOOSE = 1 - end - - # Specifies the behavior when writing build logs to Cloud Storage. - module LogStreamingOption - # Service may automatically determine build log streaming behavior. - STREAM_DEFAULT = 0 - - # Build logs should be streamed to Cloud Storage. - STREAM_ON = 1 - - # Build logs should not be streamed to Cloud Storage; they will be - # written when the build is completed. - STREAM_OFF = 2 - end - - # Specifies the logging mode. - module LoggingMode - # The service determines the logging mode. The default is `LEGACY`. Do not - # rely on the default logging behavior as it may change in the future. - LOGGING_UNSPECIFIED = 0 - - # Build logs are stored in Cloud Logging and Cloud Storage. - LEGACY = 1 - - # Build logs are stored in Cloud Storage. - GCS_ONLY = 2 - - # This option is the same as CLOUD_LOGGING_ONLY. - STACKDRIVER_ONLY = 3 - - # Build logs are stored in Cloud Logging. Selecting this option will not - # allow [logs - # streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). - CLOUD_LOGGING_ONLY = 5 - - # Turn off all logging. No build logs will be captured. - NONE = 4 - end - - # Default Cloud Storage log bucket behavior options. - module DefaultLogsBucketBehavior - # Unspecified. - DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED = 0 - - # Bucket is located in user-owned project in the same region as the - # build. The builder service account must have access to create and write - # to Cloud Storage buckets in the build project. - REGIONAL_USER_OWNED_BUCKET = 1 - - # Bucket is located in a Google-owned project and is not regionalized. - LEGACY_BUCKET = 2 - end - end - - # ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by - # the ReceiveTriggerWebhook method. - # @!attribute [rw] name - # @return [::String] - # The name of the `ReceiveTriggerWebhook` to retrieve. - # Format: `projects/{project}/locations/{location}/triggers/{trigger}` - # @!attribute [rw] body - # @return [::Google::Api::HttpBody] - # HTTP request body. - # @!attribute [rw] project_id - # @return [::String] - # Project in which the specified trigger lives - # @!attribute [rw] trigger - # @return [::String] - # Name of the trigger to run the payload against - # @!attribute [rw] secret - # @return [::String] - # Secret token used for authorization if an OAuth token isn't provided. - class ReceiveTriggerWebhookRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReceiveTriggerWebhookResponse [Experimental] is the response object for the - # ReceiveTriggerWebhook method. - class ReceiveTriggerWebhookResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GitHubEnterpriseConfig represents a configuration for a GitHub Enterprise - # server. - # @!attribute [rw] name - # @return [::String] - # The full resource name for the GitHubEnterpriseConfig - # For example: - # "projects/\\{$project_id}/locations/\\{$location_id}/githubEnterpriseConfigs/\\{$config_id}" - # @!attribute [rw] host_url - # @return [::String] - # The URL of the github enterprise host the configuration is for. - # @!attribute [rw] app_id - # @return [::Integer] - # Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise - # server. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the installation was associated with the project. - # @!attribute [rw] webhook_key - # @return [::String] - # The key that should be attached to webhook calls to the ReceiveWebhook - # endpoint. - # @!attribute [rw] peered_network - # @return [::String] - # Optional. The network to be used when reaching out to the GitHub - # Enterprise server. The VPC network must be enabled for private - # service connection. This should be set if the GitHub Enterprise server is - # hosted on-premises and not reachable by public internet. - # If this field is left empty, no network peering will occur and calls to - # the GitHub Enterprise server will be made over the public internet. - # Must be in the format - # `projects/{project}/global/networks/{network}`, where \\{project} - # is a project number or id and \\{network} is the name of a - # VPC network in the project. - # @!attribute [rw] secrets - # @return [::Google::Cloud::Build::V1::GitHubEnterpriseSecrets] - # Optional. Names of secrets in Secret Manager. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Name to display for this config. - # @!attribute [rw] ssl_ca - # @return [::String] - # Optional. SSL certificate to use for requests to GitHub Enterprise. - class GitHubEnterpriseConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GitHubEnterpriseSecrets represents the names of all necessary secrets in - # Secret Manager for a GitHub Enterprise server. - # Format is: projects//secrets/. - # @!attribute [rw] private_key_version_name - # @return [::String] - # The resource name for the private key secret version. - # @!attribute [rw] webhook_secret_version_name - # @return [::String] - # The resource name for the webhook secret secret version in Secret Manager. - # @!attribute [rw] oauth_secret_version_name - # @return [::String] - # The resource name for the OAuth secret secret version in Secret Manager. - # @!attribute [rw] oauth_client_id_version_name - # @return [::String] - # The resource name for the OAuth client ID secret version in Secret Manager. - class GitHubEnterpriseSecrets - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a `WorkerPool`. - # - # Cloud Build owns and maintains a pool of workers for general use and have no - # access to a project's private network. By default, builds submitted to - # Cloud Build will use a worker from this pool. - # - # If your build needs access to resources on a private network, - # create and use a `WorkerPool` to run your builds. Private `WorkerPool`s give - # your builds access to any single VPC network that you - # administer, including any on-prem resources connected to that VPC - # network. For an overview of private pools, see - # [Private pools - # overview](https://cloud.google.com/build/docs/private-pools/private-pools-overview). - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the `WorkerPool`, with format - # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. - # The value of `{worker_pool}` is provided by `worker_pool_id` in - # `CreateWorkerPool` request and the value of `{location}` is determined by - # the endpoint accessed. - # @!attribute [rw] display_name - # @return [::String] - # A user-specified, human-readable name for the `WorkerPool`. If provided, - # this value must be 1-63 characters. - # @!attribute [r] uid - # @return [::String] - # Output only. A unique identifier for the `WorkerPool`. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # User specified annotations. See https://google.aip.dev/128#annotations - # for more details such as format and size limitations. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which the request to create the `WorkerPool` was - # received. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which the request to update the `WorkerPool` was - # received. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time at which the request to delete the `WorkerPool` was - # received. - # @!attribute [r] state - # @return [::Google::Cloud::Build::V1::WorkerPool::State] - # Output only. `WorkerPool` state. - # @!attribute [rw] private_pool_v1_config - # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config] - # Private Pool configuration. - # @!attribute [r] etag - # @return [::String] - # Output only. Checksum computed by the server. May be sent on update and - # delete requests to ensure that the client has an up-to-date value before - # proceeding. - class WorkerPool - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of the `WorkerPool`. - module State - # State of the `WorkerPool` is unknown. - STATE_UNSPECIFIED = 0 - - # `WorkerPool` is being created. - CREATING = 1 - - # `WorkerPool` is running. - RUNNING = 2 - - # `WorkerPool` is being deleted: cancelling builds and draining workers. - DELETING = 3 - - # `WorkerPool` is deleted. - DELETED = 4 - - # `WorkerPool` is being updated; new builds cannot be run. - UPDATING = 5 - end - end - - # Configuration for a V1 `PrivatePool`. - # @!attribute [rw] worker_config - # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::WorkerConfig] - # Machine configuration for the workers in the pool. - # @!attribute [rw] network_config - # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::NetworkConfig] - # Network configuration for the pool. - # @!attribute [rw] private_service_connect - # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::PrivateServiceConnect] - # Immutable. Private Service Connect(PSC) Network configuration for the pool. - class PrivatePoolV1Config - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the configuration to be used for creating workers in - # the pool. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. Machine type of a worker, such as `e2-medium`. - # See [Worker pool config - # file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). - # If left blank, Cloud Build will use a sensible default. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Size of the disk attached to the worker, in GB. - # See [Worker pool config - # file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). - # Specify a value of up to 4000. If `0` is specified, Cloud Build will use - # a standard disk size. - # @!attribute [rw] enable_nested_virtualization - # @return [::Boolean] - # Optional. Enable nested virtualization on the worker, if supported by the - # machine type. By default, nested virtualization is disabled. - class WorkerConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the network configuration for the pool. - # @!attribute [rw] peered_network - # @return [::String] - # Required. Immutable. The network definition that the workers are peered - # to. If this section is left empty, the workers will be peered to - # `WorkerPool.project_id` on the service producer network. Must be in the - # format `projects/{project}/global/networks/{network}`, where `{project}` - # is a project number, such as `12345`, and `{network}` is the name of a - # VPC network in the project. See - # [Understanding network configuration - # options](https://cloud.google.com/build/docs/private-pools/set-up-private-pool-environment) - # @!attribute [rw] egress_option - # @return [::Google::Cloud::Build::V1::PrivatePoolV1Config::NetworkConfig::EgressOption] - # Option to configure network egress for the workers. - # @!attribute [rw] peered_network_ip_range - # @return [::String] - # Immutable. Subnet IP range within the peered network. This is specified - # in CIDR notation with a slash and the subnet prefix size. You can - # optionally specify an IP address before the subnet prefix value. e.g. - # `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a - # prefix size of 29 bits. - # `/16` would specify a prefix size of 16 bits, with an automatically - # determined IP within the peered VPC. - # If unspecified, a value of `/24` will be used. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the egress option for the pool. - module EgressOption - # If set, defaults to PUBLIC_EGRESS. - EGRESS_OPTION_UNSPECIFIED = 0 - - # If set, workers are created without any public address, which prevents - # network egress to public IPs unless a network proxy is configured. - NO_PUBLIC_EGRESS = 1 - - # If set, workers are created with a public address which allows for - # public internet egress. - PUBLIC_EGRESS = 2 - end - end - - # Defines the Private Service Connect network configuration for the pool. - # @!attribute [rw] network_attachment - # @return [::String] - # Required. Immutable. The network attachment that the worker network - # interface is peered to. Must be in the format - # `projects/{project}/regions/{region}/networkAttachments/{networkAttachment}`. - # The region of network attachment must be the same as the worker pool. - # See [Network - # Attachments](https://cloud.google.com/vpc/docs/about-network-attachments) - # @!attribute [rw] public_ip_address_disabled - # @return [::Boolean] - # Required. Immutable. Disable public IP on the primary network interface. - # - # If true, workers are created without any public address, which prevents - # network egress to public IPs unless a network proxy is configured. - # If false, workers are created with a public address which allows for - # public internet egress. The public address only applies to traffic - # through the primary network interface. - # If `route_all_traffic` is set to true, all traffic will go through the - # non-primary network interface, this boolean has no effect. - # @!attribute [rw] route_all_traffic - # @return [::Boolean] - # Immutable. Route all traffic through PSC interface. Enable this if you - # want full control of traffic in the private pool. Configure Cloud NAT for - # the subnet of network attachment if you need to access public Internet. - # - # If false, Only route RFC 1918 (10.0.0.0/8, 172.16.0.0/12, and - # 192.168.0.0/16) and RFC 6598 (100.64.0.0/10) through PSC interface. - class PrivateServiceConnect - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request to create a new `WorkerPool`. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this worker pool will be created. - # Format: `projects/{project}/locations/{location}`. - # @!attribute [rw] worker_pool - # @return [::Google::Cloud::Build::V1::WorkerPool] - # Required. `WorkerPool` resource to create. - # @!attribute [rw] worker_pool_id - # @return [::String] - # Required. Immutable. The ID to use for the `WorkerPool`, which will become - # the final component of the resource name. - # - # This value should be 1-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @!attribute [rw] validate_only - # @return [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - class CreateWorkerPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a `WorkerPool` with the specified name. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `WorkerPool` to retrieve. - # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - class GetWorkerPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a `WorkerPool`. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the `WorkerPool` to delete. - # Format: - # `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, it must match the server's etag on the workerpool - # for the request to be processed. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the `WorkerPool` is not found, the request will succeed - # but no action will be taken on the server. - # @!attribute [rw] validate_only - # @return [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - class DeleteWorkerPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a `WorkerPool`. - # @!attribute [rw] worker_pool - # @return [::Google::Cloud::Build::V1::WorkerPool] - # Required. The `WorkerPool` to update. - # - # The `name` field is used to identify the `WorkerPool` to update. - # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. A mask specifying which fields in `worker_pool` to update. - # @!attribute [rw] validate_only - # @return [::Boolean] - # If set, validate the request and preview the response, but do not actually - # post it. - class UpdateWorkerPoolRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list `WorkerPool`s. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the collection of `WorkerPools`. - # Format: `projects/{project}/locations/{location}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of `WorkerPool`s to return. The service may return - # fewer than this value. If omitted, the server will use a sensible default. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListWorkerPools` call. Provide this - # to retrieve the subsequent page. - class ListWorkerPoolsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response containing existing `WorkerPools`. - # @!attribute [rw] worker_pools - # @return [::Array<::Google::Cloud::Build::V1::WorkerPool>] - # `WorkerPools` for the specified project. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token used to page through large result sets. Provide this - # value in a subsequent ListWorkerPoolsRequest to return the next page of - # results. - class ListWorkerPoolsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the `CreateWorkerPool` operation. - # @!attribute [rw] worker_pool - # @return [::String] - # The resource name of the `WorkerPool` to create. - # Format: - # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time the operation was created. - # @!attribute [rw] complete_time - # @return [::Google::Protobuf::Timestamp] - # Time the operation was completed. - class CreateWorkerPoolOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the `UpdateWorkerPool` operation. - # @!attribute [rw] worker_pool - # @return [::String] - # The resource name of the `WorkerPool` being updated. - # Format: - # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time the operation was created. - # @!attribute [rw] complete_time - # @return [::Google::Protobuf::Timestamp] - # Time the operation was completed. - class UpdateWorkerPoolOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the `DeleteWorkerPool` operation. - # @!attribute [rw] worker_pool - # @return [::String] - # The resource name of the `WorkerPool` being deleted. - # Format: - # `projects/{project}/locations/{location}/workerPools/{worker_pool}`. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Time the operation was created. - # @!attribute [rw] complete_time - # @return [::Google::Protobuf::Timestamp] - # Time the operation was completed. - class DeleteWorkerPoolOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-build-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-build-v1/snippets/Gemfile deleted file mode 100644 index c6bb4e58985f..000000000000 --- a/owl-bot-staging/google-cloud-build-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-build-v1", path: "../" -else - gem "google-cloud-build-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-build-v1/snippets/cloud_build/approve_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/approve_build.rb deleted file mode 100644 index e424de0c8959..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/approve_build.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 cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync] -require "google/cloud/build/v1" - -## -# Snippet for the approve_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#approve_build. -# -def approve_build - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::ApproveBuildRequest.new - - # Call the approve_build method. - result = client.approve_build 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 cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.rb deleted file mode 100644 index ec06123f2425..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/cancel_build.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 cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] -require "google/cloud/build/v1" - -## -# Snippet for the cancel_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#cancel_build. -# -def cancel_build - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::CancelBuildRequest.new - - # Call the cancel_build method. - result = client.cancel_build request - - # The returned object is of type Google::Cloud::Build::V1::Build. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_CancelBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.rb deleted file mode 100644 index 2eae7c35b4c8..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build.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 cloudbuild_v1_generated_CloudBuild_CreateBuild_sync] -require "google/cloud/build/v1" - -## -# Snippet for the create_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#create_build. -# -def create_build - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::CreateBuildRequest.new - - # Call the create_build method. - result = client.create_build 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 cloudbuild_v1_generated_CloudBuild_CreateBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.rb deleted file mode 100644 index 57fe32267861..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_build_trigger.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 cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync] -require "google/cloud/build/v1" - -## -# Snippet for the create_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#create_build_trigger. -# -def create_build_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::CreateBuildTriggerRequest.new - - # Call the create_build_trigger method. - result = client.create_build_trigger request - - # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.rb deleted file mode 100644 index 5cefef7e72b9..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/create_worker_pool.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 cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync] -require "google/cloud/build/v1" - -## -# Snippet for the create_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#create_worker_pool. -# -def create_worker_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::CreateWorkerPoolRequest.new - - # Call the create_worker_pool method. - result = client.create_worker_pool 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 cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.rb deleted file mode 100644 index 4eea1a67c9b3..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_build_trigger.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 cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync] -require "google/cloud/build/v1" - -## -# Snippet for the delete_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#delete_build_trigger. -# -def delete_build_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new - - # Call the delete_build_trigger method. - result = client.delete_build_trigger request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.rb deleted file mode 100644 index d470ab6dad08..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/delete_worker_pool.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 cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync] -require "google/cloud/build/v1" - -## -# Snippet for the delete_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#delete_worker_pool. -# -def delete_worker_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new - - # Call the delete_worker_pool method. - result = client.delete_worker_pool 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 cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.rb deleted file mode 100644 index c121d027634c..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build.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 cloudbuild_v1_generated_CloudBuild_GetBuild_sync] -require "google/cloud/build/v1" - -## -# Snippet for the get_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_build. -# -def get_build - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::GetBuildRequest.new - - # Call the get_build method. - result = client.get_build request - - # The returned object is of type Google::Cloud::Build::V1::Build. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_GetBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.rb deleted file mode 100644 index 23b6faad3724..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_build_trigger.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 cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync] -require "google/cloud/build/v1" - -## -# Snippet for the get_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_build_trigger. -# -def get_build_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::GetBuildTriggerRequest.new - - # Call the get_build_trigger method. - result = client.get_build_trigger request - - # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.rb deleted file mode 100644 index 688cd61210ea..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_default_service_account.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 cloudbuild_v1_generated_CloudBuild_GetDefaultServiceAccount_sync] -require "google/cloud/build/v1" - -## -# Snippet for the get_default_service_account call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_default_service_account. -# -def get_default_service_account - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new - - # Call the get_default_service_account method. - result = client.get_default_service_account request - - # The returned object is of type Google::Cloud::Build::V1::DefaultServiceAccount. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_GetDefaultServiceAccount_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.rb deleted file mode 100644 index dad3ab613da1..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/get_worker_pool.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 cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync] -require "google/cloud/build/v1" - -## -# Snippet for the get_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#get_worker_pool. -# -def get_worker_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::GetWorkerPoolRequest.new - - # Call the get_worker_pool method. - result = client.get_worker_pool request - - # The returned object is of type Google::Cloud::Build::V1::WorkerPool. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.rb deleted file mode 100644 index d4d1c611ee07..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_build_triggers.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 cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync] -require "google/cloud/build/v1" - -## -# Snippet for the list_build_triggers call in the CloudBuild 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::Build::V1::CloudBuild::Client#list_build_triggers. -# -def list_build_triggers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::ListBuildTriggersRequest.new - - # Call the list_build_triggers method. - result = client.list_build_triggers 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::Build::V1::BuildTrigger. - p item - end -end -# [END cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.rb deleted file mode 100644 index 10cec68dc051..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_builds.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 cloudbuild_v1_generated_CloudBuild_ListBuilds_sync] -require "google/cloud/build/v1" - -## -# Snippet for the list_builds call in the CloudBuild 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::Build::V1::CloudBuild::Client#list_builds. -# -def list_builds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::ListBuildsRequest.new - - # Call the list_builds method. - result = client.list_builds 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::Build::V1::Build. - p item - end -end -# [END cloudbuild_v1_generated_CloudBuild_ListBuilds_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.rb deleted file mode 100644 index 243a645bf8eb..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/list_worker_pools.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 cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync] -require "google/cloud/build/v1" - -## -# Snippet for the list_worker_pools call in the CloudBuild 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::Build::V1::CloudBuild::Client#list_worker_pools. -# -def list_worker_pools - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::ListWorkerPoolsRequest.new - - # Call the list_worker_pools method. - result = client.list_worker_pools 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::Build::V1::WorkerPool. - p item - end -end -# [END cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.rb deleted file mode 100644 index b62cfe9b3528..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/receive_trigger_webhook.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 cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync] -require "google/cloud/build/v1" - -## -# Snippet for the receive_trigger_webhook call in the CloudBuild 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::Build::V1::CloudBuild::Client#receive_trigger_webhook. -# -def receive_trigger_webhook - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new - - # Call the receive_trigger_webhook method. - result = client.receive_trigger_webhook request - - # The returned object is of type Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.rb deleted file mode 100644 index e3f76d14a6cc..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/retry_build.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 cloudbuild_v1_generated_CloudBuild_RetryBuild_sync] -require "google/cloud/build/v1" - -## -# Snippet for the retry_build call in the CloudBuild 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::Build::V1::CloudBuild::Client#retry_build. -# -def retry_build - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::RetryBuildRequest.new - - # Call the retry_build method. - result = client.retry_build 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 cloudbuild_v1_generated_CloudBuild_RetryBuild_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.rb deleted file mode 100644 index d5ed514267df..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/run_build_trigger.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 cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync] -require "google/cloud/build/v1" - -## -# Snippet for the run_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#run_build_trigger. -# -def run_build_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::RunBuildTriggerRequest.new - - # Call the run_build_trigger method. - result = client.run_build_trigger 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 cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.rb deleted file mode 100644 index 726721e34492..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_build_trigger.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 cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync] -require "google/cloud/build/v1" - -## -# Snippet for the update_build_trigger call in the CloudBuild 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::Build::V1::CloudBuild::Client#update_build_trigger. -# -def update_build_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new - - # Call the update_build_trigger method. - result = client.update_build_trigger request - - # The returned object is of type Google::Cloud::Build::V1::BuildTrigger. - p result -end -# [END cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.rb b/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.rb deleted file mode 100644 index 2ec501e5019d..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/cloud_build/update_worker_pool.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 cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync] -require "google/cloud/build/v1" - -## -# Snippet for the update_worker_pool call in the CloudBuild 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::Build::V1::CloudBuild::Client#update_worker_pool. -# -def update_worker_pool - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V1::CloudBuild::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new - - # Call the update_worker_pool method. - result = client.update_worker_pool 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 cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync] diff --git a/owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json b/owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json deleted file mode 100644 index 0d23f6edb197..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/snippets/snippet_metadata_google.devtools.cloudbuild.v1.json +++ /dev/null @@ -1,775 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-build-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.cloudbuild.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_CreateBuild_sync", - "title": "Snippet for the create_build call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#create_build.", - "file": "cloud_build/create_build.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_build", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#create_build", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::CreateBuildRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "CreateBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_GetBuild_sync", - "title": "Snippet for the get_build call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_build.", - "file": "cloud_build/get_build.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_build", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_build", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::GetBuildRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::Build", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "GetBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_ListBuilds_sync", - "title": "Snippet for the list_builds call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#list_builds.", - "file": "cloud_build/list_builds.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_builds", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#list_builds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::ListBuildsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::ListBuildsResponse", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "ListBuilds", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_CancelBuild_sync", - "title": "Snippet for the cancel_build call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#cancel_build.", - "file": "cloud_build/cancel_build.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_build", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#cancel_build", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::CancelBuildRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::Build", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "CancelBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_RetryBuild_sync", - "title": "Snippet for the retry_build call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#retry_build.", - "file": "cloud_build/retry_build.rb", - "language": "RUBY", - "client_method": { - "short_name": "retry_build", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#retry_build", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::RetryBuildRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "RetryBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_ApproveBuild_sync", - "title": "Snippet for the approve_build call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#approve_build.", - "file": "cloud_build/approve_build.rb", - "language": "RUBY", - "client_method": { - "short_name": "approve_build", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#approve_build", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::ApproveBuildRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "ApproveBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_sync", - "title": "Snippet for the create_build_trigger call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#create_build_trigger.", - "file": "cloud_build/create_build_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_build_trigger", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#create_build_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::CreateBuildTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::BuildTrigger", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "CreateBuildTrigger", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_sync", - "title": "Snippet for the get_build_trigger call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_build_trigger.", - "file": "cloud_build/get_build_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_build_trigger", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_build_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::GetBuildTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::BuildTrigger", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "GetBuildTrigger", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_sync", - "title": "Snippet for the list_build_triggers call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#list_build_triggers.", - "file": "cloud_build/list_build_triggers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_build_triggers", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#list_build_triggers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::ListBuildTriggersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::ListBuildTriggersResponse", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "ListBuildTriggers", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_sync", - "title": "Snippet for the delete_build_trigger call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#delete_build_trigger.", - "file": "cloud_build/delete_build_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_build_trigger", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#delete_build_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::DeleteBuildTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "DeleteBuildTrigger", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_sync", - "title": "Snippet for the update_build_trigger call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#update_build_trigger.", - "file": "cloud_build/update_build_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_build_trigger", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#update_build_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::UpdateBuildTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::BuildTrigger", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "UpdateBuildTrigger", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_sync", - "title": "Snippet for the run_build_trigger call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#run_build_trigger.", - "file": "cloud_build/run_build_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_build_trigger", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#run_build_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::RunBuildTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "RunBuildTrigger", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_sync", - "title": "Snippet for the receive_trigger_webhook call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#receive_trigger_webhook.", - "file": "cloud_build/receive_trigger_webhook.rb", - "language": "RUBY", - "client_method": { - "short_name": "receive_trigger_webhook", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#receive_trigger_webhook", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "ReceiveTriggerWebhook", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_sync", - "title": "Snippet for the create_worker_pool call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#create_worker_pool.", - "file": "cloud_build/create_worker_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_worker_pool", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#create_worker_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::CreateWorkerPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "CreateWorkerPool", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_GetWorkerPool_sync", - "title": "Snippet for the get_worker_pool call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_worker_pool.", - "file": "cloud_build/get_worker_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_worker_pool", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_worker_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::GetWorkerPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::WorkerPool", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "GetWorkerPool", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_sync", - "title": "Snippet for the delete_worker_pool call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#delete_worker_pool.", - "file": "cloud_build/delete_worker_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_worker_pool", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#delete_worker_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::DeleteWorkerPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "DeleteWorkerPool", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_sync", - "title": "Snippet for the update_worker_pool call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#update_worker_pool.", - "file": "cloud_build/update_worker_pool.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_worker_pool", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#update_worker_pool", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::UpdateWorkerPoolRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "UpdateWorkerPool", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_ListWorkerPools_sync", - "title": "Snippet for the list_worker_pools call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#list_worker_pools.", - "file": "cloud_build/list_worker_pools.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_worker_pools", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#list_worker_pools", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::ListWorkerPoolsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::ListWorkerPoolsResponse", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "ListWorkerPools", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v1_generated_CloudBuild_GetDefaultServiceAccount_sync", - "title": "Snippet for the get_default_service_account call in the CloudBuild service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V1::CloudBuild::Client#get_default_service_account.", - "file": "cloud_build/get_default_service_account.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_default_service_account", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client#get_default_service_account", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V1::DefaultServiceAccount", - "client": { - "short_name": "CloudBuild::Client", - "full_name": "::Google::Cloud::Build::V1::CloudBuild::Client" - }, - "method": { - "short_name": "GetDefaultServiceAccount", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild.GetDefaultServiceAccount", - "service": { - "short_name": "CloudBuild", - "full_name": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - }, - "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-build-v1/test/google/cloud/build/v1/cloud_build_operations_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_operations_test.rb deleted file mode 100644 index 2950d7bfdae9..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_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/devtools/cloudbuild/v1/cloudbuild_pb" -require "google/devtools/cloudbuild/v1/cloudbuild_services_pb" -require "google/cloud/build/v1/cloud_build" - -class ::Google::Cloud::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb deleted file mode 100644 index 23103029b01b..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_paths_test.rb +++ /dev/null @@ -1,244 +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/build/v1/cloud_build" - -class ::Google::Cloud::Build::V1::CloudBuild::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_build_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.build_path project: "value0", build: "value1" - assert_equal "projects/value0/builds/value1", path - - path = client.build_path project: "value0", location: "value1", build: "value2" - assert_equal "projects/value0/locations/value1/builds/value2", path - end - end - - def test_build_trigger_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.build_trigger_path project: "value0", trigger: "value1" - assert_equal "projects/value0/triggers/value1", path - - path = client.build_trigger_path project: "value0", location: "value1", trigger: "value2" - assert_equal "projects/value0/locations/value1/triggers/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", keyring: "value2", key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_default_service_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.default_service_account_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/defaultServiceAccount", path - end - end - - def test_git_repository_link_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.git_repository_link_path project: "value0", location: "value1", connection: "value2", git_repository_link: "value3" - assert_equal "projects/value0/locations/value1/connections/value2/gitRepositoryLinks/value3", path - end - end - - def test_github_enterprise_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.github_enterprise_config_path project: "value0", config: "value1" - assert_equal "projects/value0/githubEnterpriseConfigs/value1", path - - path = client.github_enterprise_config_path project: "value0", location: "value1", config: "value2" - assert_equal "projects/value0/locations/value1/githubEnterpriseConfigs/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::Build::V1::CloudBuild::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_network_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_path project: "value0", network: "value1" - assert_equal "projects/value0/global/networks/value1", path - end - end - - def test_network_attachment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" - assert_equal "projects/value0/regions/value1/networkAttachments/value2", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_repository_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.repository_path project: "value0", location: "value1", connection: "value2", repository: "value3" - assert_equal "projects/value0/locations/value1/connections/value2/repositories/value3", path - end - end - - def test_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - end - end - - def test_service_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_account_path project: "value0", service_account: "value1" - assert_equal "projects/value0/serviceAccounts/value1", path - end - end - - def test_subscription_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.subscription_path project: "value0", subscription: "value1" - assert_equal "projects/value0/subscriptions/value1", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end - - def test_worker_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.worker_pool_path project: "value0", location: "value1", worker_pool: "value2" - assert_equal "projects/value0/locations/value1/workerPools/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb deleted file mode 100644 index e61bb210e750..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_rest_test.rb +++ /dev/null @@ -1,1167 +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/devtools/cloudbuild/v1/cloudbuild_pb" -require "google/cloud/build/v1/cloud_build/rest" - - -class ::Google::Cloud::Build::V1::CloudBuild::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_create_build - # 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" - project_id = "hello world" - build = {} - - create_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_create_build_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_build({ parent: parent, project_id: project_id, build: build }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_build parent: parent, project_id: project_id, build: build do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_build ::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_build({ parent: parent, project_id: project_id, build: build }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_build(::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_build_client_stub.call_count - end - end - end - - def test_get_build - # Create test objects. - client_result = ::Google::Cloud::Build::V1::Build.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - project_id = "hello world" - id = "hello world" - - get_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_build_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_build({ name: name, project_id: project_id, id: id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_build name: name, project_id: project_id, id: id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_build ::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_build({ name: name, project_id: project_id, id: id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_build(::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_build_client_stub.call_count - end - end - end - - def test_list_builds - # Create test objects. - client_result = ::Google::Cloud::Build::V1::ListBuildsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - project_id = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_builds_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_list_builds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_builds_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_builds({ parent: parent, project_id: project_id, 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_builds parent: parent, project_id: project_id, 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_builds ::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds({ parent: parent, project_id: project_id, 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_builds(::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds_client_stub.call_count - end - end - end - - def test_cancel_build - # Create test objects. - client_result = ::Google::Cloud::Build::V1::Build.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - project_id = "hello world" - id = "hello world" - - cancel_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_cancel_build_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_build({ name: name, project_id: project_id, id: id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_build name: name, project_id: project_id, id: id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_build ::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_build({ name: name, project_id: project_id, id: id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_build(::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_build_client_stub.call_count - end - end - end - - def test_retry_build - # 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" - project_id = "hello world" - id = "hello world" - - retry_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_retry_build_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, retry_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.retry_build({ name: name, project_id: project_id, id: id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.retry_build name: name, project_id: project_id, id: id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.retry_build ::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.retry_build({ name: name, project_id: project_id, id: id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.retry_build(::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, retry_build_client_stub.call_count - end - end - end - - def test_approve_build - # 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" - approval_result = {} - - approve_build_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_approve_build_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, approve_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.approve_build({ name: name, approval_result: approval_result }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.approve_build name: name, approval_result: approval_result do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.approve_build ::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.approve_build({ name: name, approval_result: approval_result }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.approve_build(::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, approve_build_client_stub.call_count - end - end - end - - def test_create_build_trigger - # Create test objects. - client_result = ::Google::Cloud::Build::V1::BuildTrigger.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - project_id = "hello world" - trigger = {} - - create_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_create_build_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_build_trigger parent: parent, project_id: project_id, trigger: trigger do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_build_trigger ::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_build_trigger(::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_build_trigger_client_stub.call_count - end - end - end - - def test_get_build_trigger - # Create test objects. - client_result = ::Google::Cloud::Build::V1::BuildTrigger.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - project_id = "hello world" - trigger_id = "hello world" - - get_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_build_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_build_trigger ::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_build_trigger(::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_build_trigger_client_stub.call_count - end - end - end - - def test_list_build_triggers - # Create test objects. - client_result = ::Google::Cloud::Build::V1::ListBuildTriggersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - project_id = "hello world" - page_size = 42 - page_token = "hello world" - - list_build_triggers_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_list_build_triggers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_build_triggers_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_build_triggers({ parent: parent, project_id: project_id, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_build_triggers parent: parent, project_id: project_id, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_build_triggers ::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers({ parent: parent, project_id: project_id, 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_build_triggers(::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers_client_stub.call_count - end - end - end - - def test_delete_build_trigger - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - project_id = "hello world" - trigger_id = "hello world" - - delete_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_delete_build_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_build_trigger ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_build_trigger(::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_build_trigger_client_stub.call_count - end - end - end - - def test_update_build_trigger - # Create test objects. - client_result = ::Google::Cloud::Build::V1::BuildTrigger.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - project_id = "hello world" - trigger_id = "hello world" - trigger = {} - update_mask = {} - - update_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_update_build_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_build_trigger project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_build_trigger ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_build_trigger(::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_build_trigger_client_stub.call_count - end - end - end - - def test_run_build_trigger - # 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" - project_id = "hello world" - trigger_id = "hello world" - source = {} - - run_build_trigger_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_run_build_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.run_build_trigger name: name, project_id: project_id, trigger_id: trigger_id, source: source do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.run_build_trigger ::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.run_build_trigger(::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, run_build_trigger_client_stub.call_count - end - end - end - - def test_receive_trigger_webhook - # Create test objects. - client_result = ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - body = {} - project_id = "hello world" - trigger = "hello world" - secret = "hello world" - - receive_trigger_webhook_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_receive_trigger_webhook_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, receive_trigger_webhook_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.receive_trigger_webhook name: name, body: body, project_id: project_id, trigger: trigger, secret: secret do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.receive_trigger_webhook ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.receive_trigger_webhook(::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, receive_trigger_webhook_client_stub.call_count - end - end - end - - def test_create_worker_pool - # 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" - worker_pool = {} - worker_pool_id = "hello world" - validate_only = true - - create_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_create_worker_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_worker_pool parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_worker_pool ::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_worker_pool(::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_worker_pool_client_stub.call_count - end - end - end - - def test_get_worker_pool - # Create test objects. - client_result = ::Google::Cloud::Build::V1::WorkerPool.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_worker_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_worker_pool({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_worker_pool name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_worker_pool ::Google::Cloud::Build::V1::GetWorkerPoolRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_worker_pool({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_worker_pool(::Google::Cloud::Build::V1::GetWorkerPoolRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_worker_pool_client_stub.call_count - end - end - end - - def test_delete_worker_pool - # 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" - etag = "hello world" - allow_missing = true - validate_only = true - - delete_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_delete_worker_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_worker_pool name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_worker_pool ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_worker_pool(::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_worker_pool_client_stub.call_count - end - end - end - - def test_update_worker_pool - # 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. - worker_pool = {} - update_mask = {} - validate_only = true - - update_worker_pool_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_update_worker_pool_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_worker_pool worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_worker_pool ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_worker_pool(::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_worker_pool_client_stub.call_count - end - end - end - - def test_list_worker_pools - # Create test objects. - client_result = ::Google::Cloud::Build::V1::ListWorkerPoolsResponse.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_worker_pools_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_list_worker_pools_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_worker_pools_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_worker_pools({ 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_worker_pools 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_worker_pools ::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools({ 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_worker_pools(::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools_client_stub.call_count - end - end - end - - def test_get_default_service_account - # Create test objects. - client_result = ::Google::Cloud::Build::V1::DefaultServiceAccount.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_default_service_account_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::Build::V1::CloudBuild::Rest::ServiceStub.stub :transcode_get_default_service_account_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_default_service_account_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_default_service_account({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_default_service_account name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_default_service_account ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_default_service_account({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_default_service_account(::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_default_service_account_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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb b/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb deleted file mode 100644 index feba90a1c9de..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/test/google/cloud/build/v1/cloud_build_test.rb +++ /dev/null @@ -1,1354 +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/devtools/cloudbuild/v1/cloudbuild_pb" -require "google/cloud/build/v1/cloud_build" - -class ::Google::Cloud::Build::V1::CloudBuild::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_create_build - # 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" - project_id = "hello world" - build = {} - - create_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_build, name - assert_kind_of ::Google::Cloud::Build::V1::CreateBuildRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["project_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::Build), request["build"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_build({ parent: parent, project_id: project_id, build: build }) 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_build parent: parent, project_id: project_id, build: build 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_build ::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build) 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_build({ parent: parent, project_id: project_id, build: build }, 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_build(::Google::Cloud::Build::V1::CreateBuildRequest.new(parent: parent, project_id: project_id, build: build), 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_build_client_stub.call_rpc_count - end - end - - def test_get_build - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::Build.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" - project_id = "hello world" - id = "hello world" - - get_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_build, name - assert_kind_of ::Google::Cloud::Build::V1::GetBuildRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_build({ name: name, project_id: project_id, id: id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_build name: name, project_id: project_id, id: id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_build ::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_build({ name: name, project_id: project_id, id: id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_build(::Google::Cloud::Build::V1::GetBuildRequest.new(name: name, project_id: project_id, id: id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_build_client_stub.call_rpc_count - end - end - - def test_list_builds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::ListBuildsResponse.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" - project_id = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_builds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_builds, name - assert_kind_of ::Google::Cloud::Build::V1::ListBuildsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["project_id"] - 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_builds_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_builds({ parent: parent, project_id: project_id, 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_builds parent: parent, project_id: project_id, 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_builds ::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds({ parent: parent, project_id: project_id, 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_builds(::Google::Cloud::Build::V1::ListBuildsRequest.new(parent: parent, project_id: project_id, 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_builds_client_stub.call_rpc_count - end - end - - def test_cancel_build - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::Build.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" - project_id = "hello world" - id = "hello world" - - cancel_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_build, name - assert_kind_of ::Google::Cloud::Build::V1::CancelBuildRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_build({ name: name, project_id: project_id, id: id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_build name: name, project_id: project_id, id: id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_build ::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_build({ name: name, project_id: project_id, id: id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_build(::Google::Cloud::Build::V1::CancelBuildRequest.new(name: name, project_id: project_id, id: id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_build_client_stub.call_rpc_count - end - end - - def test_retry_build - # 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" - project_id = "hello world" - id = "hello world" - - retry_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :retry_build, name - assert_kind_of ::Google::Cloud::Build::V1::RetryBuildRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, retry_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.retry_build({ name: name, project_id: project_id, id: 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.retry_build name: name, project_id: project_id, id: 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.retry_build ::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: 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.retry_build({ name: name, project_id: project_id, id: 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.retry_build(::Google::Cloud::Build::V1::RetryBuildRequest.new(name: name, project_id: project_id, id: 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, retry_build_client_stub.call_rpc_count - end - end - - def test_approve_build - # 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" - approval_result = {} - - approve_build_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :approve_build, name - assert_kind_of ::Google::Cloud::Build::V1::ApproveBuildRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::ApprovalResult), request["approval_result"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, approve_build_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.approve_build({ name: name, approval_result: approval_result }) 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.approve_build name: name, approval_result: approval_result 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.approve_build ::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result) 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.approve_build({ name: name, approval_result: approval_result }, 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.approve_build(::Google::Cloud::Build::V1::ApproveBuildRequest.new(name: name, approval_result: approval_result), 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, approve_build_client_stub.call_rpc_count - end - end - - def test_create_build_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::BuildTrigger.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" - project_id = "hello world" - trigger = {} - - create_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_build_trigger, name - assert_kind_of ::Google::Cloud::Build::V1::CreateBuildTriggerRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["project_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::BuildTrigger), request["trigger"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_build_trigger parent: parent, project_id: project_id, trigger: trigger do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_build_trigger ::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_build_trigger({ parent: parent, project_id: project_id, trigger: trigger }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_build_trigger(::Google::Cloud::Build::V1::CreateBuildTriggerRequest.new(parent: parent, project_id: project_id, trigger: trigger), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_build_trigger_client_stub.call_rpc_count - end - end - - def test_get_build_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::BuildTrigger.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" - project_id = "hello world" - trigger_id = "hello world" - - get_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_build_trigger, name - assert_kind_of ::Google::Cloud::Build::V1::GetBuildTriggerRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["trigger_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_build_trigger ::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_build_trigger(::Google::Cloud::Build::V1::GetBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_build_trigger_client_stub.call_rpc_count - end - end - - def test_list_build_triggers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::ListBuildTriggersResponse.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" - project_id = "hello world" - page_size = 42 - page_token = "hello world" - - list_build_triggers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_build_triggers, name - assert_kind_of ::Google::Cloud::Build::V1::ListBuildTriggersRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["project_id"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_build_triggers_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_build_triggers({ parent: parent, project_id: project_id, 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_build_triggers parent: parent, project_id: project_id, 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_build_triggers ::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers({ parent: parent, project_id: project_id, 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_build_triggers(::Google::Cloud::Build::V1::ListBuildTriggersRequest.new(parent: parent, project_id: project_id, 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_build_triggers_client_stub.call_rpc_count - end - end - - def test_delete_build_trigger - # 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" - project_id = "hello world" - trigger_id = "hello world" - - delete_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_build_trigger, name - assert_kind_of ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["trigger_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_build_trigger name: name, project_id: project_id, trigger_id: trigger_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_build_trigger ::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_build_trigger(::Google::Cloud::Build::V1::DeleteBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_build_trigger_client_stub.call_rpc_count - end - end - - def test_update_build_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::BuildTrigger.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. - project_id = "hello world" - trigger_id = "hello world" - trigger = {} - update_mask = {} - - update_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_build_trigger, name - assert_kind_of ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest, request - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["trigger_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::BuildTrigger), request["trigger"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_build_trigger project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_build_trigger ::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_build_trigger({ project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_build_trigger(::Google::Cloud::Build::V1::UpdateBuildTriggerRequest.new(project_id: project_id, trigger_id: trigger_id, trigger: trigger, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_build_trigger_client_stub.call_rpc_count - end - end - - def test_run_build_trigger - # 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" - project_id = "hello world" - trigger_id = "hello world" - source = {} - - run_build_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :run_build_trigger, name - assert_kind_of ::Google::Cloud::Build::V1::RunBuildTriggerRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["trigger_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::RepoSource), request["source"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_build_trigger_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }) 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.run_build_trigger name: name, project_id: project_id, trigger_id: trigger_id, source: source 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.run_build_trigger ::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source) 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.run_build_trigger({ name: name, project_id: project_id, trigger_id: trigger_id, source: source }, 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.run_build_trigger(::Google::Cloud::Build::V1::RunBuildTriggerRequest.new(name: name, project_id: project_id, trigger_id: trigger_id, source: source), 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, run_build_trigger_client_stub.call_rpc_count - end - end - - def test_receive_trigger_webhook - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.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" - body = {} - project_id = "hello world" - trigger = "hello world" - secret = "hello world" - - receive_trigger_webhook_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :receive_trigger_webhook, name - assert_kind_of ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Api::HttpBody), request["body"] - assert_equal "hello world", request["project_id"] - assert_equal "hello world", request["trigger"] - assert_equal "hello world", request["secret"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, receive_trigger_webhook_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.receive_trigger_webhook name: name, body: body, project_id: project_id, trigger: trigger, secret: secret do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.receive_trigger_webhook ::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.receive_trigger_webhook({ name: name, body: body, project_id: project_id, trigger: trigger, secret: secret }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.receive_trigger_webhook(::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest.new(name: name, body: body, project_id: project_id, trigger: trigger, secret: secret), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, receive_trigger_webhook_client_stub.call_rpc_count - end - end - - def test_create_worker_pool - # 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" - worker_pool = {} - worker_pool_id = "hello world" - validate_only = true - - create_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_worker_pool, name - assert_kind_of ::Google::Cloud::Build::V1::CreateWorkerPoolRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::WorkerPool), request["worker_pool"] - assert_equal "hello world", request["worker_pool_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }) 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_worker_pool parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only 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_worker_pool ::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only) 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_worker_pool({ parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only }, 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_worker_pool(::Google::Cloud::Build::V1::CreateWorkerPoolRequest.new(parent: parent, worker_pool: worker_pool, worker_pool_id: worker_pool_id, validate_only: validate_only), 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_worker_pool_client_stub.call_rpc_count - end - end - - def test_get_worker_pool - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::WorkerPool.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_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_worker_pool, name - assert_kind_of ::Google::Cloud::Build::V1::GetWorkerPoolRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_worker_pool({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_worker_pool name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_worker_pool ::Google::Cloud::Build::V1::GetWorkerPoolRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_worker_pool({ 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_worker_pool(::Google::Cloud::Build::V1::GetWorkerPoolRequest.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_worker_pool_client_stub.call_rpc_count - end - end - - def test_delete_worker_pool - # 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" - etag = "hello world" - allow_missing = true - validate_only = true - - delete_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_worker_pool, name - assert_kind_of ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) 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_worker_pool name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only 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_worker_pool ::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) 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_worker_pool({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, 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_worker_pool(::Google::Cloud::Build::V1::DeleteWorkerPoolRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), 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_worker_pool_client_stub.call_rpc_count - end - end - - def test_update_worker_pool - # 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. - worker_pool = {} - update_mask = {} - validate_only = true - - update_worker_pool_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_worker_pool, name - assert_kind_of ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V1::WorkerPool), request["worker_pool"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_worker_pool_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }) 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_worker_pool worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only 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_worker_pool ::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only) 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_worker_pool({ worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only }, 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_worker_pool(::Google::Cloud::Build::V1::UpdateWorkerPoolRequest.new(worker_pool: worker_pool, update_mask: update_mask, validate_only: validate_only), 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_worker_pool_client_stub.call_rpc_count - end - end - - def test_list_worker_pools - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::ListWorkerPoolsResponse.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_worker_pools_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_worker_pools, name - assert_kind_of ::Google::Cloud::Build::V1::ListWorkerPoolsRequest, 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_worker_pools_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_worker_pools({ 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_worker_pools 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_worker_pools ::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools({ 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_worker_pools(::Google::Cloud::Build::V1::ListWorkerPoolsRequest.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_worker_pools_client_stub.call_rpc_count - end - end - - def test_get_default_service_account - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V1::DefaultServiceAccount.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_default_service_account_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_default_service_account, name - assert_kind_of ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_default_service_account_client_stub do - # Create client - client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_default_service_account({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_default_service_account name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_default_service_account ::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_default_service_account({ 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_default_service_account(::Google::Cloud::Build::V1::GetDefaultServiceAccountRequest.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_default_service_account_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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Build::V1::CloudBuild::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::Build::V1::CloudBuild::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Build::V1::CloudBuild::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-build-v1/test/helper.rb b/owl-bot-staging/google-cloud-build-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-build-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-build-v2/.gitignore b/owl-bot-staging/google-cloud-build-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/.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-build-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-build-v2/.repo-metadata.json deleted file mode 100644 index 11c06d24fb0c..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudbuild.googleapis.com", - "api_shortname": "cloudbuild", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-build-v2/latest", - "distribution_name": "google-cloud-build-v2", - "is_cloud": true, - "language": "ruby", - "name": "cloudbuild", - "name_pretty": "Cloud Build V2 API", - "product_documentation": "https://cloud.google.com/build/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details.", - "ruby-cloud-env-prefix": "CLOUD_BUILD", - "ruby-cloud-product-url": "https://cloud.google.com/build/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-build-v2/.rubocop.yml b/owl-bot-staging/google-cloud-build-v2/.rubocop.yml deleted file mode 100644 index e407577f8bf3..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-build-v2.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-build-v2.rb" diff --git a/owl-bot-staging/google-cloud-build-v2/.toys.rb b/owl-bot-staging/google-cloud-build-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/.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-build-v2/.yardopts b/owl-bot-staging/google-cloud-build-v2/.yardopts deleted file mode 100644 index db7e74f770c5..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Build V2 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-build-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-build-v2/AUTHENTICATION.md deleted file mode 100644 index aea53e98f922..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-build-v2 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-build-v2 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/build/v2" - -client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/build/v2" - -::Google::Cloud::Build::V2::RepositoryManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Build::V2::RepositoryManager::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-build-v2 -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/build/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Build::V2::RepositoryManager::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-build-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-build-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-build-v2/Gemfile b/owl-bot-staging/google-cloud-build-v2/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-build-v2/LICENSE.md b/owl-bot-staging/google-cloud-build-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/README.md b/owl-bot-staging/google-cloud-build-v2/README.md deleted file mode 100644 index 63b551c1e2f6..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Build V2 API - -Creates and manages builds on Google Cloud Platform. - -Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Build V2 API. Most users should consider using -the main client gem, -[google-cloud-build](https://rubygems.org/gems/google-cloud-build). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-build-v2 -``` - -## 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/cloudbuild.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/build/v2" - -client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new -request = ::Google::Cloud::Build::V2::CreateConnectionRequest.new # (request fields as keyword arguments...) -response = client.create_connection request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-build-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/build/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/build/v2" -require "logger" - -client = ::Google::Cloud::Build::V2::RepositoryManager::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-build`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-build-v2`. -_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-build`. -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-build-v2`. - -### 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-build-v2/Rakefile b/owl-bot-staging/google-cloud-build-v2/Rakefile deleted file mode 100644 index ca4692088f7a..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["CLOUD_BUILD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["CLOUD_BUILD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["CLOUD_BUILD_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 CLOUD_BUILD_TEST_PROJECT=test123 CLOUD_BUILD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/build/v2/repository_manager/credentials" - ::Google::Cloud::Build::V2::RepositoryManager::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["CLOUD_BUILD_PROJECT"] = project - ENV["CLOUD_BUILD_TEST_PROJECT"] = project - ENV["CLOUD_BUILD_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-build-v2 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-build-v2 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-build-v2 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-build-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-build-v2" - header "google-cloud-build-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-build-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-build-v2 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-build-v2 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-build-v2 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-build-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-build-v2/gapic_metadata.json deleted file mode 100644 index 3428c1b72d41..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/gapic_metadata.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.devtools.cloudbuild.v2", - "libraryPackage": "::Google::Cloud::Build::V2", - "services": { - "RepositoryManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Build::V2::RepositoryManager::Client", - "rpcs": { - "CreateConnection": { - "methods": [ - "create_connection" - ] - }, - "GetConnection": { - "methods": [ - "get_connection" - ] - }, - "ListConnections": { - "methods": [ - "list_connections" - ] - }, - "UpdateConnection": { - "methods": [ - "update_connection" - ] - }, - "DeleteConnection": { - "methods": [ - "delete_connection" - ] - }, - "CreateRepository": { - "methods": [ - "create_repository" - ] - }, - "BatchCreateRepositories": { - "methods": [ - "batch_create_repositories" - ] - }, - "GetRepository": { - "methods": [ - "get_repository" - ] - }, - "ListRepositories": { - "methods": [ - "list_repositories" - ] - }, - "DeleteRepository": { - "methods": [ - "delete_repository" - ] - }, - "FetchReadWriteToken": { - "methods": [ - "fetch_read_write_token" - ] - }, - "FetchReadToken": { - "methods": [ - "fetch_read_token" - ] - }, - "FetchLinkableRepositories": { - "methods": [ - "fetch_linkable_repositories" - ] - }, - "FetchGitRefs": { - "methods": [ - "fetch_git_refs" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec b/owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec deleted file mode 100644 index c658c1ce0fe2..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/google-cloud-build-v2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/build/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-build-v2" - gem.version = Google::Cloud::Build::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Build is a service that executes your builds on Google Cloud Platform infrastructure. Cloud Build can import source code from Google Cloud Storage, Cloud Source Repositories, GitHub, or Bitbucket, execute a build to your specifications, and produce artifacts such as Docker containers or Java archives. Note that google-cloud-build-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-build instead. See the readme for more details." - gem.summary = "Creates and manages builds on Google Cloud Platform." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.rb b/owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.rb deleted file mode 100644 index 4fe9d0c129b1..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google-cloud-build-v2.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/build/v2" diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb deleted file mode 100644 index 39c4f83973b9..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/build/v2/repository_manager" -require "google/cloud/build/v2/version" - -module Google - module Cloud - module Build - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/build/v2" - # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/build/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb deleted file mode 100644 index 0080bb409f2e..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/build/v2/version" - -require "google/cloud/build/v2/repository_manager/credentials" -require "google/cloud/build/v2/repository_manager/paths" -require "google/cloud/build/v2/repository_manager/operations" -require "google/cloud/build/v2/repository_manager/client" - -module Google - module Cloud - module Build - module V2 - ## - # Manages connections to source code repositories. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/build/v2/repository_manager" - # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new - # - module RepositoryManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "repository_manager", "helpers.rb" -require "google/cloud/build/v2/repository_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb deleted file mode 100644 index 1df019e81342..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/client.rb +++ /dev/null @@ -1,1909 +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/devtools/cloudbuild/v2/repositories_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Build - module V2 - module RepositoryManager - ## - # Client for the RepositoryManager service. - # - # Manages connections to source code repositories. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :repository_manager_stub - - ## - # Configure the RepositoryManager Client class. - # - # See {::Google::Cloud::Build::V2::RepositoryManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RepositoryManager clients - # ::Google::Cloud::Build::V2::RepositoryManager::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", "Build", "V2"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_connection.timeout = 60.0 - - default_config.rpcs.get_connection.timeout = 60.0 - default_config.rpcs.get_connection.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_connections.timeout = 60.0 - default_config.rpcs.list_connections.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_connection.timeout = 60.0 - - default_config.rpcs.delete_connection.timeout = 60.0 - - default_config.rpcs.create_repository.timeout = 60.0 - - default_config.rpcs.get_repository.timeout = 60.0 - default_config.rpcs.get_repository.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_repositories.timeout = 60.0 - default_config.rpcs.list_repositories.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_repository.timeout = 60.0 - - default_config.rpcs.fetch_read_write_token.timeout = 60.0 - default_config.rpcs.fetch_read_write_token.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_read_token.timeout = 60.0 - default_config.rpcs.fetch_read_token.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.fetch_linkable_repositories.timeout = 60.0 - default_config.rpcs.fetch_linkable_repositories.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 RepositoryManager 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::Build::V2::RepositoryManager::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 - @repository_manager_stub.universe_domain - end - - ## - # Create a new RepositoryManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RepositoryManager 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/devtools/cloudbuild/v2/repositories_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 - - @repository_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Build::V2::RepositoryManager::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 - ) - - @repository_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @repository_manager_stub.endpoint - config.universe_domain = @repository_manager_stub.universe_domain - config.logger = @repository_manager_stub.logger if config.respond_to? :logger= - end - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @repository_manager_stub.endpoint - config.universe_domain = @repository_manager_stub.universe_domain - config.logger = @repository_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Build::V2::RepositoryManager::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @repository_manager_stub.logger - end - - # Service calls - - ## - # Creates a Connection. - # - # @overload create_connection(request, options = nil) - # Pass arguments to `create_connection` via a request object, either of type - # {::Google::Cloud::Build::V2::CreateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::CreateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_connection(parent: nil, connection: nil, connection_id: nil) - # Pass arguments to `create_connection` via keyword arguments. Note that at - # least one keyword argument is 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. Project and location where the connection will be created. - # Format: `projects/*/locations/*`. - # @param connection [::Google::Cloud::Build::V2::Connection, ::Hash] - # Required. The Connection to create. - # @param connection_id [::String] - # Required. The ID to use for the Connection, which will become the final - # component of the Connection's resource name. Names must be unique - # per-project per-location. Allows alphanumeric characters and any of - # -._~%!$&'()*+,;=@. - # - # @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/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::CreateConnectionRequest.new - # - # # Call the create_connection method. - # result = client.create_connection 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_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::CreateConnectionRequest - - # Converts hash 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_connection.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::Build::V2::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_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :create_connection, 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 - - ## - # Gets details of a single connection. - # - # @overload get_connection(request, options = nil) - # Pass arguments to `get_connection` via a request object, either of type - # {::Google::Cloud::Build::V2::GetConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::GetConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_connection(name: nil) - # Pass arguments to `get_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Connection to retrieve. - # Format: `projects/*/locations/*/connections/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V2::Connection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V2::Connection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::GetConnectionRequest.new - # - # # Call the get_connection method. - # result = client.get_connection request - # - # # The returned object is of type Google::Cloud::Build::V2::Connection. - # p result - # - def get_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::GetConnectionRequest - - # Converts hash 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_connection.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::Build::V2::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_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :get_connection, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Connections in a given project and location. - # - # @overload list_connections(request, options = nil) - # Pass arguments to `list_connections` via a request object, either of type - # {::Google::Cloud::Build::V2::ListConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::ListConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_connections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_connections` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of Connections. - # Format: `projects/*/locations/*`. - # @param page_size [::Integer] - # Number of results to return in the list. - # @param page_token [::String] - # Page start. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Connection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::ListConnectionsRequest.new - # - # # Call the list_connections method. - # result = client.list_connections 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::Build::V2::Connection. - # p item - # end - # - def list_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::ListConnectionsRequest - - # Converts hash 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_connections.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::Build::V2::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_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :list_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @repository_manager_stub, :list_connections, 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 - - ## - # Updates a single connection. - # - # @overload update_connection(request, options = nil) - # Pass arguments to `update_connection` via a request object, either of type - # {::Google::Cloud::Build::V2::UpdateConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::UpdateConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_connection(connection: nil, update_mask: nil, allow_missing: nil, etag: nil) - # Pass arguments to `update_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param connection [::Google::Cloud::Build::V2::Connection, ::Hash] - # Required. The Connection to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # @param allow_missing [::Boolean] - # If set to true, and the connection is not found a new connection - # will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input connection has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @param etag [::String] - # The current etag of the connection. - # If an etag is provided and does not match the current etag of the - # connection, update will be blocked and an ABORTED error will be returned. - # - # @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/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::UpdateConnectionRequest.new - # - # # Call the update_connection method. - # result = client.update_connection 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_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::UpdateConnectionRequest - - # Converts hash 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_connection.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::Build::V2::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.connection&.name - header_params["connection.name"] = request.connection.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_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :update_connection, 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 single connection. - # - # @overload delete_connection(request, options = nil) - # Pass arguments to `delete_connection` via a request object, either of type - # {::Google::Cloud::Build::V2::DeleteConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::DeleteConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_connection(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Connection to delete. - # Format: `projects/*/locations/*/connections/*`. - # @param etag [::String] - # The current etag of the connection. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked and an ABORTED error will be returned. - # @param validate_only [::Boolean] - # If set, validate the request, but do not actually post it. - # - # @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/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::DeleteConnectionRequest.new - # - # # Call the delete_connection method. - # result = client.delete_connection 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_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::DeleteConnectionRequest - - # Converts hash 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_connection.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::Build::V2::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_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :delete_connection, 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 - - ## - # Creates a Repository. - # - # @overload create_repository(request, options = nil) - # Pass arguments to `create_repository` via a request object, either of type - # {::Google::Cloud::Build::V2::CreateRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_repository(parent: nil, repository: nil, repository_id: nil) - # Pass arguments to `create_repository` via keyword arguments. Note that at - # least one keyword argument is 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 connection to contain the repository. If the request is part - # of a BatchCreateRepositoriesRequest, this field should be empty or match - # the parent specified there. - # @param repository [::Google::Cloud::Build::V2::Repository, ::Hash] - # Required. The repository to create. - # @param repository_id [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This ID should be unique in - # the connection. Allows alphanumeric characters and any of - # -._~%!$&'()*+,;=@. - # - # @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/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::CreateRepositoryRequest.new - # - # # Call the create_repository method. - # result = client.create_repository 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_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::CreateRepositoryRequest - - # Converts hash 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_repository.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::Build::V2::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_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :create_repository, 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 - - ## - # Creates multiple repositories inside a connection. - # - # @overload batch_create_repositories(request, options = nil) - # Pass arguments to `batch_create_repositories` via a request object, either of type - # {::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_create_repositories(parent: nil, requests: nil) - # Pass arguments to `batch_create_repositories` via keyword arguments. Note that at - # least one keyword argument is 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 connection to contain all the repositories being created. - # Format: projects/*/locations/*/connections/* - # The parent field in the CreateRepositoryRequest messages - # must either be empty or match this field. - # @param requests [::Array<::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Hash>] - # Required. The request messages specifying the repositories 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/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new - # - # # Call the batch_create_repositories method. - # result = client.batch_create_repositories 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 batch_create_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest - - # Converts hash 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.batch_create_repositories.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::Build::V2::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.batch_create_repositories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_create_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :batch_create_repositories, 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 - - ## - # Gets details of a single repository. - # - # @overload get_repository(request, options = nil) - # Pass arguments to `get_repository` via a request object, either of type - # {::Google::Cloud::Build::V2::GetRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::GetRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_repository(name: nil) - # Pass arguments to `get_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Repository to retrieve. - # Format: `projects/*/locations/*/connections/*/repositories/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V2::Repository] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V2::Repository] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::GetRepositoryRequest.new - # - # # Call the get_repository method. - # result = client.get_repository request - # - # # The returned object is of type Google::Cloud::Build::V2::Repository. - # p result - # - def get_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::GetRepositoryRequest - - # Converts hash 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_repository.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::Build::V2::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_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :get_repository, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Repositories in a given connection. - # - # @overload list_repositories(request, options = nil) - # Pass arguments to `list_repositories` via a request object, either of type - # {::Google::Cloud::Build::V2::ListRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::ListRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_repositories(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_repositories` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of Repositories. - # Format: `projects/*/locations/*/connections/*`. - # @param page_size [::Integer] - # Number of results to return in the list. - # @param page_token [::String] - # Page start. - # @param filter [::String] - # A filter expression that filters resources listed in the response. - # Expressions must follow API improvement proposal - # [AIP-160](https://google.aip.dev/160). e.g. - # `remote_uri:"https://github.com*"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::ListRepositoriesRequest.new - # - # # Call the list_repositories method. - # result = client.list_repositories 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::Build::V2::Repository. - # p item - # end - # - def list_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::ListRepositoriesRequest - - # Converts hash 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_repositories.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::Build::V2::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_repositories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :list_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @repository_manager_stub, :list_repositories, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a single repository. - # - # @overload delete_repository(request, options = nil) - # Pass arguments to `delete_repository` via a request object, either of type - # {::Google::Cloud::Build::V2::DeleteRepositoryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::DeleteRepositoryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_repository(name: nil, etag: nil, validate_only: nil) - # Pass arguments to `delete_repository` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the Repository to delete. - # Format: `projects/*/locations/*/connections/*/repositories/*`. - # @param etag [::String] - # The current etag of the repository. - # If an etag is provided and does not match the current etag of the - # repository, deletion will be blocked and an ABORTED error will be returned. - # @param validate_only [::Boolean] - # If set, validate the request, but do not actually post it. - # - # @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/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::DeleteRepositoryRequest.new - # - # # Call the delete_repository method. - # result = client.delete_repository 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_repository request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::DeleteRepositoryRequest - - # Converts hash 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_repository.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::Build::V2::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_repository.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_repository.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :delete_repository, 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 - - ## - # Fetches read/write token of a given repository. - # - # @overload fetch_read_write_token(request, options = nil) - # Pass arguments to `fetch_read_write_token` via a request object, either of type - # {::Google::Cloud::Build::V2::FetchReadWriteTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::FetchReadWriteTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_read_write_token(repository: nil) - # Pass arguments to `fetch_read_write_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::String] - # Required. The resource name of the repository in the format - # `projects/*/locations/*/connections/*/repositories/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V2::FetchReadWriteTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V2::FetchReadWriteTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new - # - # # Call the fetch_read_write_token method. - # result = client.fetch_read_write_token request - # - # # The returned object is of type Google::Cloud::Build::V2::FetchReadWriteTokenResponse. - # p result - # - def fetch_read_write_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest - - # Converts hash 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.fetch_read_write_token.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::Build::V2::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.repository - header_params["repository"] = request.repository - 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.fetch_read_write_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_read_write_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :fetch_read_write_token, 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 - - ## - # Fetches read token of a given repository. - # - # @overload fetch_read_token(request, options = nil) - # Pass arguments to `fetch_read_token` via a request object, either of type - # {::Google::Cloud::Build::V2::FetchReadTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::FetchReadTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_read_token(repository: nil) - # Pass arguments to `fetch_read_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::String] - # Required. The resource name of the repository in the format - # `projects/*/locations/*/connections/*/repositories/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V2::FetchReadTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V2::FetchReadTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::FetchReadTokenRequest.new - # - # # Call the fetch_read_token method. - # result = client.fetch_read_token request - # - # # The returned object is of type Google::Cloud::Build::V2::FetchReadTokenResponse. - # p result - # - def fetch_read_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchReadTokenRequest - - # Converts hash 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.fetch_read_token.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::Build::V2::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.repository - header_params["repository"] = request.repository - 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.fetch_read_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_read_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :fetch_read_token, 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 - - ## - # FetchLinkableRepositories get repositories from SCM that are - # accessible and could be added to the connection. - # - # @overload fetch_linkable_repositories(request, options = nil) - # Pass arguments to `fetch_linkable_repositories` via a request object, either of type - # {::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_linkable_repositories(connection: nil, page_size: nil, page_token: nil) - # Pass arguments to `fetch_linkable_repositories` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param connection [::String] - # Required. The name of the Connection. - # Format: `projects/*/locations/*/connections/*`. - # @param page_size [::Integer] - # Number of results to return in the list. Default to 20. - # @param page_token [::String] - # Page start. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V2::Repository>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new - # - # # Call the fetch_linkable_repositories method. - # result = client.fetch_linkable_repositories 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::Build::V2::Repository. - # p item - # end - # - def fetch_linkable_repositories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest - - # Converts hash 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.fetch_linkable_repositories.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::Build::V2::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.connection - header_params["connection"] = request.connection - 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.fetch_linkable_repositories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_linkable_repositories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :fetch_linkable_repositories, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @repository_manager_stub, :fetch_linkable_repositories, 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 - - ## - # Fetch the list of branches or tags for a given repository. - # - # @overload fetch_git_refs(request, options = nil) - # Pass arguments to `fetch_git_refs` via a request object, either of type - # {::Google::Cloud::Build::V2::FetchGitRefsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Build::V2::FetchGitRefsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload fetch_git_refs(repository: nil, ref_type: nil) - # Pass arguments to `fetch_git_refs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param repository [::String] - # Required. The resource name of the repository in the format - # `projects/*/locations/*/connections/*/repositories/*`. - # @param ref_type [::Google::Cloud::Build::V2::FetchGitRefsRequest::RefType] - # Type of refs to fetch - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Build::V2::FetchGitRefsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Build::V2::FetchGitRefsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/build/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Build::V2::RepositoryManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Build::V2::FetchGitRefsRequest.new - # - # # Call the fetch_git_refs method. - # result = client.fetch_git_refs request - # - # # The returned object is of type Google::Cloud::Build::V2::FetchGitRefsResponse. - # p result - # - def fetch_git_refs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V2::FetchGitRefsRequest - - # Converts hash 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.fetch_git_refs.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::Build::V2::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.repository - header_params["repository"] = request.repository - 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.fetch_git_refs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.fetch_git_refs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @repository_manager_stub.call_rpc :fetch_git_refs, 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 RepositoryManager API. - # - # This class represents the configuration for RepositoryManager, - # 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::Build::V2::RepositoryManager::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 - # # create_connection to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Build::V2::RepositoryManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_connection.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_connection.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::Build::V2::RepositoryManager::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 = "cloudbuild.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 RepositoryManager 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 `create_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connection - ## - # RPC-specific configuration for `get_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connection - ## - # RPC-specific configuration for `list_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connections - ## - # RPC-specific configuration for `update_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :update_connection - ## - # RPC-specific configuration for `delete_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connection - ## - # RPC-specific configuration for `create_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :create_repository - ## - # RPC-specific configuration for `batch_create_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_create_repositories - ## - # RPC-specific configuration for `get_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :get_repository - ## - # RPC-specific configuration for `list_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :list_repositories - ## - # RPC-specific configuration for `delete_repository` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_repository - ## - # RPC-specific configuration for `fetch_read_write_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_read_write_token - ## - # RPC-specific configuration for `fetch_read_token` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_read_token - ## - # RPC-specific configuration for `fetch_linkable_repositories` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_linkable_repositories - ## - # RPC-specific configuration for `fetch_git_refs` - # @return [::Gapic::Config::Method] - # - attr_reader :fetch_git_refs - - # @private - def initialize parent_rpcs = nil - create_connection_config = parent_rpcs.create_connection if parent_rpcs.respond_to? :create_connection - @create_connection = ::Gapic::Config::Method.new create_connection_config - get_connection_config = parent_rpcs.get_connection if parent_rpcs.respond_to? :get_connection - @get_connection = ::Gapic::Config::Method.new get_connection_config - list_connections_config = parent_rpcs.list_connections if parent_rpcs.respond_to? :list_connections - @list_connections = ::Gapic::Config::Method.new list_connections_config - update_connection_config = parent_rpcs.update_connection if parent_rpcs.respond_to? :update_connection - @update_connection = ::Gapic::Config::Method.new update_connection_config - delete_connection_config = parent_rpcs.delete_connection if parent_rpcs.respond_to? :delete_connection - @delete_connection = ::Gapic::Config::Method.new delete_connection_config - create_repository_config = parent_rpcs.create_repository if parent_rpcs.respond_to? :create_repository - @create_repository = ::Gapic::Config::Method.new create_repository_config - batch_create_repositories_config = parent_rpcs.batch_create_repositories if parent_rpcs.respond_to? :batch_create_repositories - @batch_create_repositories = ::Gapic::Config::Method.new batch_create_repositories_config - get_repository_config = parent_rpcs.get_repository if parent_rpcs.respond_to? :get_repository - @get_repository = ::Gapic::Config::Method.new get_repository_config - list_repositories_config = parent_rpcs.list_repositories if parent_rpcs.respond_to? :list_repositories - @list_repositories = ::Gapic::Config::Method.new list_repositories_config - delete_repository_config = parent_rpcs.delete_repository if parent_rpcs.respond_to? :delete_repository - @delete_repository = ::Gapic::Config::Method.new delete_repository_config - fetch_read_write_token_config = parent_rpcs.fetch_read_write_token if parent_rpcs.respond_to? :fetch_read_write_token - @fetch_read_write_token = ::Gapic::Config::Method.new fetch_read_write_token_config - fetch_read_token_config = parent_rpcs.fetch_read_token if parent_rpcs.respond_to? :fetch_read_token - @fetch_read_token = ::Gapic::Config::Method.new fetch_read_token_config - fetch_linkable_repositories_config = parent_rpcs.fetch_linkable_repositories if parent_rpcs.respond_to? :fetch_linkable_repositories - @fetch_linkable_repositories = ::Gapic::Config::Method.new fetch_linkable_repositories_config - fetch_git_refs_config = parent_rpcs.fetch_git_refs if parent_rpcs.respond_to? :fetch_git_refs - @fetch_git_refs = ::Gapic::Config::Method.new fetch_git_refs_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/credentials.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/credentials.rb deleted file mode 100644 index b1699b2a504f..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/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 Build - module V2 - module RepositoryManager - # Credentials for the RepositoryManager API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "CLOUD_BUILD_CREDENTIALS", - "CLOUD_BUILD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "CLOUD_BUILD_CREDENTIALS_JSON", - "CLOUD_BUILD_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-build-v2/lib/google/cloud/build/v2/repository_manager/operations.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/operations.rb deleted file mode 100644 index 31248dd814a8..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/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 Build - module V2 - module RepositoryManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudbuild.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the RepositoryManager 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 RepositoryManager 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::Build::V2::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::Build::V2::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::Build::V2::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::Build::V2::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::Build::V2::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 = "cloudbuild.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-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb deleted file mode 100644 index 25ea6dd0f83a..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/repository_manager/paths.rb +++ /dev/null @@ -1,130 +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 Build - module V2 - module RepositoryManager - # Path helper methods for the RepositoryManager API. - module Paths - ## - # Create a fully-qualified Connection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # - # @return [::String] - def connection_path project:, location:, connection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}" - 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 Repository resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}` - # - # @param project [String] - # @param location [String] - # @param connection [String] - # @param repository [String] - # - # @return [::String] - def repository_path project:, location:, connection:, repository: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "connection cannot contain /" if connection.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connections/#{connection}/repositories/#{repository}" - end - - ## - # Create a fully-qualified SecretVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/secrets/{secret}/versions/{version}` - # - # @param project [String] - # @param secret [String] - # @param version [String] - # - # @return [::String] - def secret_version_path project:, secret:, version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "secret cannot contain /" if secret.to_s.include? "/" - - "projects/#{project}/secrets/#{secret}/versions/#{version}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param namespace [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, namespace:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "namespace cannot contain /" if namespace.to_s.include? "/" - - "projects/#{project}/locations/#{location}/namespaces/#{namespace}/services/#{service}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/version.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/version.rb deleted file mode 100644 index eb34d4813441..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/cloud/build/v2/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 Build - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb deleted file mode 100644 index 15a4ee1344fc..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/cloudbuild_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/cloudbuild/v2/cloudbuild.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/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/devtools/cloudbuild/v2/cloudbuild.proto\x12\x1dgoogle.devtools.cloudbuild.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\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\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\x92\x02\n\"RunWorkflowCustomOperationMetadata\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\x11\n\x04verb\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x0fpipeline_run_id\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\xa3\x05\n\x18\x63om.google.cloudbuild.v2B\x0f\x43loudBuildProtoP\x01Z>cloud.google.com/go/cloudbuild/apiv2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V2\xca\x02\x15Google\\Cloud\\Build\\V2\xea\x02\x18Google::Cloud::Build::V2\xea\x41N\n\x1e\x63ompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}\xea\x41J\n#secretmanager.googleapis.com/Secret\x12#projects/{project}/secrets/{secret}\xea\x41\x64\n*secretmanager.googleapis.com/SecretVersion\x12\x36projects/{project}/secrets/{secret}/versions/{version}\xea\x41|\n0cloudbuild.googleapis.com/githubEnterpriseConfig\x12Hprojects/{project}/locations/{location}/githubEnterpriseConfigs/{config}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Build - module V2 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.OperationMetadata").msgclass - RunWorkflowCustomOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.RunWorkflowCustomOperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb deleted file mode 100644 index 3ab0bc3787cb..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/devtools/cloudbuild/v2/repositories.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/httpbody_pb' -require 'google/api/resource_pb' -require 'google/devtools/cloudbuild/v2/cloudbuild_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/devtools/cloudbuild/v2/repositories.proto\x12\x1dgoogle.devtools.cloudbuild.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a.google/devtools/cloudbuild/v2/cloudbuild.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xdd\x07\n\nConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\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\x44\n\rgithub_config\x18\x05 \x01(\x0b\x32+.google.devtools.cloudbuild.v2.GitHubConfigH\x00\x12Y\n\x18github_enterprise_config\x18\x06 \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.GitHubEnterpriseConfigH\x00\x12\x44\n\rgitlab_config\x18\x07 \x01(\x0b\x32+.google.devtools.cloudbuild.v2.GitLabConfigH\x00\x12`\n\x1c\x62itbucket_data_center_config\x18\x08 \x01(\x0b\x32\x38.google.devtools.cloudbuild.v2.BitbucketDataCenterConfigH\x00\x12U\n\x16\x62itbucket_cloud_config\x18\t \x01(\x0b\x32\x33.google.devtools.cloudbuild.v2.BitbucketCloudConfigH\x00\x12Q\n\x12installation_state\x18\x0c \x01(\x0b\x32\x30.google.devtools.cloudbuild.v2.InstallationStateB\x03\xe0\x41\x03\x12\x10\n\x08\x64isabled\x18\r \x01(\x08\x12\x18\n\x0breconciling\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x0f \x03(\x0b\x32:.google.devtools.cloudbuild.v2.Connection.AnnotationsEntry\x12\x0c\n\x04\x65tag\x18\x10 \x01(\t\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x88\x01\xea\x41\x84\x01\n$cloudbuild.googleapis.com/Connection\x12@projects/{project}/locations/{location}/connections/{connection}*\x0b\x63onnections2\nconnectionR\x01\x01\x42\x13\n\x11\x63onnection_config\"\x85\x02\n\x11InstallationState\x12J\n\x05stage\x18\x01 \x01(\x0e\x32\x36.google.devtools.cloudbuild.v2.InstallationState.StageB\x03\xe0\x41\x03\x12\x14\n\x07message\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\naction_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"u\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x16\n\x12PENDING_CREATE_APP\x10\x01\x12\x16\n\x12PENDING_USER_OAUTH\x10\x02\x12\x17\n\x13PENDING_INSTALL_APP\x10\x03\x12\x0c\n\x08\x43OMPLETE\x10\n\"\x8b\x01\n FetchLinkableRepositoriesRequest\x12@\n\nconnection\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"}\n!FetchLinkableRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"z\n\x0cGitHubConfig\x12M\n\x15\x61uthorizer_credential\x18\x01 \x01(\x0b\x32..google.devtools.cloudbuild.v2.OAuthCredential\x12\x1b\n\x13\x61pp_installation_id\x18\x02 \x01(\x03\"\xb7\x03\n\x16GitHubEnterpriseConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x61pi_key\x18\x0c \x01(\tB\x03\xe0\x41\x02\x12\x0e\n\x06\x61pp_id\x18\x02 \x01(\x03\x12\x10\n\x08\x61pp_slug\x18\r \x01(\t\x12S\n\x1aprivate_key_secret_version\x18\x04 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1dwebhook_secret_secret_version\x18\x05 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x1b\n\x13\x61pp_installation_id\x18\t \x01(\x03\x12W\n\x18service_directory_config\x18\n \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.ServiceDirectoryConfig\x12\x0e\n\x06ssl_ca\x18\x0b \x01(\t\x12\x1b\n\x0eserver_version\x18\x0e \x01(\tB\x03\xe0\x41\x03\"\xaf\x03\n\x0cGitLabConfig\x12\x10\n\x08host_uri\x18\x01 \x01(\t\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12Q\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12W\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.ServiceDirectoryConfig\x12\x0e\n\x06ssl_ca\x18\x06 \x01(\t\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xcb\x03\n\x19\x42itbucketDataCenterConfig\x12\x15\n\x08host_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\\\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB5\xe0\x41\x02\xe0\x41\x05\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12Q\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12\\\n\x18service_directory_config\x18\x05 \x01(\x0b\x32\x35.google.devtools.cloudbuild.v2.ServiceDirectoryConfigB\x03\xe0\x41\x01\x12\x13\n\x06ssl_ca\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x1b\n\x0eserver_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\"\xb4\x02\n\x14\x42itbucketCloudConfig\x12\x16\n\tworkspace\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12Y\n\x1dwebhook_secret_secret_version\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12V\n\x1aread_authorizer_credential\x18\x03 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\x12Q\n\x15\x61uthorizer_credential\x18\x04 \x01(\x0b\x32-.google.devtools.cloudbuild.v2.UserCredentialB\x03\xe0\x41\x02\"Z\n\x16ServiceDirectoryConfig\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'servicedirectory.googleapis.com/Service\"\xf6\x03\n\nRepository\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x17\n\nremote_uri\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12O\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32:.google.devtools.cloudbuild.v2.Repository.AnnotationsEntry\x12\x0c\n\x04\x65tag\x18\x07 \x01(\t\x12\x17\n\nwebhook_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xa3\x01\xea\x41\x9f\x01\n$cloudbuild.googleapis.com/Repository\x12Zprojects/{project}/locations/{location}/connections/{connection}/repositories/{repository}*\x0crepositories2\nrepositoryR\x01\x01\"}\n\x0fOAuthCredential\x12S\n\x1aoauth_token_secret_version\x18\x01 \x01(\tB/\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"~\n\x0eUserCredential\x12U\n\x19user_token_secret_version\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*secretmanager.googleapis.com/SecretVersion\x12\x15\n\x08username\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xb7\x01\n\x17\x43reateConnectionRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Connection\x12\x42\n\nconnection\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v2.ConnectionB\x03\xe0\x41\x02\x12\x1a\n\rconnection_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"R\n\x14GetConnectionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\"}\n\x16ListConnectionsRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Connection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"r\n\x17ListConnectionsResponse\x12>\n\x0b\x63onnections\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Connection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xb3\x01\n\x17UpdateConnectionRequest\x12\x42\n\nconnection\x18\x01 \x01(\x0b\x32).google.devtools.cloudbuild.v2.ConnectionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x0c\n\x04\x65tag\x18\x04 \x01(\t\"z\n\x17\x44\x65leteConnectionRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"\xb7\x01\n\x17\x43reateRepositoryRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12\x42\n\nrepository\x18\x02 \x01(\x0b\x32).google.devtools.cloudbuild.v2.RepositoryB\x03\xe0\x41\x02\x12\x1a\n\rrepository_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xad\x01\n\x1e\x42\x61tchCreateRepositoriesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Connection\x12M\n\x08requests\x18\x02 \x03(\x0b\x32\x36.google.devtools.cloudbuild.v2.CreateRepositoryRequestB\x03\xe0\x41\x02\"b\n\x1f\x42\x61tchCreateRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Repository\"R\n\x14GetRepositoryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\"\x8e\x01\n\x17ListRepositoriesRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Repository\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\"t\n\x18ListRepositoriesResponse\x12?\n\x0crepositories\x18\x01 \x03(\x0b\x32).google.devtools.cloudbuild.v2.Repository\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"z\n\x17\x44\x65leteRepositoryRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rvalidate_only\x18\x03 \x01(\x08\"^\n\x1a\x46\x65tchReadWriteTokenRequest\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\"Y\n\x15\x46\x65tchReadTokenRequest\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\"\\\n\x16\x46\x65tchReadTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"a\n\x1b\x46\x65tchReadWriteTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x33\n\x0f\x65xpiration_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8e\x01\n\x15ProcessWebhookRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\x12$cloudbuild.googleapis.com/Connection\x12\"\n\x04\x62ody\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\x12\x13\n\x0bwebhook_key\x18\x03 \x01(\t\"\xdf\x01\n\x13\x46\x65tchGitRefsRequest\x12@\n\nrepository\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$cloudbuild.googleapis.com/Repository\x12L\n\x08ref_type\x18\x02 \x01(\x0e\x32:.google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType\"8\n\x07RefType\x12\x18\n\x14REF_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03TAG\x10\x01\x12\n\n\x06\x42RANCH\x10\x02\")\n\x14\x46\x65tchGitRefsResponse\x12\x11\n\tref_names\x18\x01 \x03(\t2\xc2\x1b\n\x11RepositoryManager\x12\x91\x02\n\x10\x43reateConnection\x12\x36.google.devtools.cloudbuild.v2.CreateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa5\x01\xca\x41=\n\nConnection\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x1fparent,connection,connection_id\x82\xd3\xe4\x93\x02=\"//v2/{parent=projects/*/locations/*}/connections:\nconnection\x12\xaf\x01\n\rGetConnection\x12\x33.google.devtools.cloudbuild.v2.GetConnectionRequest\x1a).google.devtools.cloudbuild.v2.Connection\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v2/{name=projects/*/locations/*/connections/*}\x12\xc2\x01\n\x0fListConnections\x12\x35.google.devtools.cloudbuild.v2.ListConnectionsRequest\x1a\x36.google.devtools.cloudbuild.v2.ListConnectionsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v2/{parent=projects/*/locations/*}/connections\x12\x93\x02\n\x10UpdateConnection\x12\x36.google.devtools.cloudbuild.v2.UpdateConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41=\n\nConnection\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x16\x63onnection,update_mask\x82\xd3\xe4\x93\x02H2:/v2/{connection.name=projects/*/locations/*/connections/*}:\nconnection\x12\xf5\x01\n\x10\x44\x65leteConnection\x12\x36.google.devtools.cloudbuild.v2.DeleteConnectionRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41H\n\x15google.protobuf.Empty\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v2/{name=projects/*/locations/*/connections/*}\x12\xa0\x02\n\x10\x43reateRepository\x12\x36.google.devtools.cloudbuild.v2.CreateRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41=\n\nRepository\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x1fparent,repository,repository_id\x82\xd3\xe4\x93\x02L\">/v2/{parent=projects/*/locations/*/connections/*}/repositories:\nrepository\x12\xb6\x02\n\x17\x42\x61tchCreateRepositories\x12=.google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest\x1a\x1d.google.longrunning.Operation\"\xbc\x01\xca\x41R\n\x1f\x42\x61tchCreateRepositoriesResponse\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x0fparent,requests\x82\xd3\xe4\x93\x02O\"J/v2/{parent=projects/*/locations/*/connections/*}/repositories:batchCreate:\x01*\x12\xbe\x01\n\rGetRepository\x12\x33.google.devtools.cloudbuild.v2.GetRepositoryRequest\x1a).google.devtools.cloudbuild.v2.Repository\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v2/{name=projects/*/locations/*/connections/*/repositories/*}\x12\xd4\x01\n\x10ListRepositories\x12\x36.google.devtools.cloudbuild.v2.ListRepositoriesRequest\x1a\x37.google.devtools.cloudbuild.v2.ListRepositoriesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v2/{parent=projects/*/locations/*/connections/*}/repositories\x12\x84\x02\n\x10\x44\x65leteRepository\x12\x36.google.devtools.cloudbuild.v2.DeleteRepositoryRequest\x1a\x1d.google.longrunning.Operation\"\x98\x01\xca\x41H\n\x15google.protobuf.Empty\x12/google.devtools.cloudbuild.v2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v2/{name=projects/*/locations/*/connections/*/repositories/*}\x12\xff\x01\n\x13\x46\x65tchReadWriteToken\x12\x39.google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest\x1a:.google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse\"q\xda\x41\nrepository\x82\xd3\xe4\x93\x02^\"Y/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadWriteToken:\x01*\x12\xeb\x01\n\x0e\x46\x65tchReadToken\x12\x34.google.devtools.cloudbuild.v2.FetchReadTokenRequest\x1a\x35.google.devtools.cloudbuild.v2.FetchReadTokenResponse\"l\xda\x41\nrepository\x82\xd3\xe4\x93\x02Y\"T/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:accessReadToken:\x01*\x12\xf7\x01\n\x19\x46\x65tchLinkableRepositories\x12?.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest\x1a@.google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse\"W\x82\xd3\xe4\x93\x02Q\x12O/v2/{connection=projects/*/locations/*/connections/*}:fetchLinkableRepositories\x12\xdf\x01\n\x0c\x46\x65tchGitRefs\x12\x32.google.devtools.cloudbuild.v2.FetchGitRefsRequest\x1a\x33.google.devtools.cloudbuild.v2.FetchGitRefsResponse\"f\xda\x41\nrepository\x82\xd3\xe4\x93\x02S\x12Q/v2/{repository=projects/*/locations/*/connections/*/repositories/*}:fetchGitRefs\x1aM\xca\x41\x19\x63loudbuild.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x02\n\x18\x63om.google.cloudbuild.v2B\x16RepositoryManagerProtoP\x01Z>cloud.google.com/go/cloudbuild/apiv2/cloudbuildpb;cloudbuildpb\xa2\x02\x03GCB\xaa\x02\x1aGoogle.Cloud.CloudBuild.V2\xca\x02\x15Google\\Cloud\\Build\\V2\xea\x02\x18Google::Cloud::Build::V2\xea\x41|\n\'servicedirectory.googleapis.com/Service\x12Qprojects/{project}/locations/{location}/namespaces/{namespace}/services/{service}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Build - module V2 - Connection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.Connection").msgclass - InstallationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.InstallationState").msgclass - InstallationState::Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.InstallationState.Stage").enummodule - FetchLinkableRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchLinkableRepositoriesRequest").msgclass - FetchLinkableRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchLinkableRepositoriesResponse").msgclass - GitHubConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GitHubConfig").msgclass - GitHubEnterpriseConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GitHubEnterpriseConfig").msgclass - GitLabConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GitLabConfig").msgclass - BitbucketDataCenterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BitbucketDataCenterConfig").msgclass - BitbucketCloudConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BitbucketCloudConfig").msgclass - ServiceDirectoryConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ServiceDirectoryConfig").msgclass - Repository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.Repository").msgclass - OAuthCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.OAuthCredential").msgclass - UserCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.UserCredential").msgclass - CreateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.CreateConnectionRequest").msgclass - GetConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GetConnectionRequest").msgclass - ListConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListConnectionsRequest").msgclass - ListConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListConnectionsResponse").msgclass - UpdateConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.UpdateConnectionRequest").msgclass - DeleteConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.DeleteConnectionRequest").msgclass - CreateRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.CreateRepositoryRequest").msgclass - BatchCreateRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BatchCreateRepositoriesRequest").msgclass - BatchCreateRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.BatchCreateRepositoriesResponse").msgclass - GetRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.GetRepositoryRequest").msgclass - ListRepositoriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListRepositoriesRequest").msgclass - ListRepositoriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ListRepositoriesResponse").msgclass - DeleteRepositoryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.DeleteRepositoryRequest").msgclass - FetchReadWriteTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadWriteTokenRequest").msgclass - FetchReadTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadTokenRequest").msgclass - FetchReadTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadTokenResponse").msgclass - FetchReadWriteTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchReadWriteTokenResponse").msgclass - ProcessWebhookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.ProcessWebhookRequest").msgclass - FetchGitRefsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchGitRefsRequest").msgclass - FetchGitRefsRequest::RefType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchGitRefsRequest.RefType").enummodule - FetchGitRefsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.devtools.cloudbuild.v2.FetchGitRefsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb b/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb deleted file mode 100644 index 12d74525ede6..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/lib/google/devtools/cloudbuild/v2/repositories_services_pb.rb +++ /dev/null @@ -1,72 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/devtools/cloudbuild/v2/repositories.proto for package 'Google.Cloud.Build.V2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/devtools/cloudbuild/v2/repositories_pb' - -module Google - module Cloud - module Build - module V2 - module RepositoryManager - # Manages connections to source code repositories. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.devtools.cloudbuild.v2.RepositoryManager' - - # Creates a Connection. - rpc :CreateConnection, ::Google::Cloud::Build::V2::CreateConnectionRequest, ::Google::Longrunning::Operation - # Gets details of a single connection. - rpc :GetConnection, ::Google::Cloud::Build::V2::GetConnectionRequest, ::Google::Cloud::Build::V2::Connection - # Lists Connections in a given project and location. - rpc :ListConnections, ::Google::Cloud::Build::V2::ListConnectionsRequest, ::Google::Cloud::Build::V2::ListConnectionsResponse - # Updates a single connection. - rpc :UpdateConnection, ::Google::Cloud::Build::V2::UpdateConnectionRequest, ::Google::Longrunning::Operation - # Deletes a single connection. - rpc :DeleteConnection, ::Google::Cloud::Build::V2::DeleteConnectionRequest, ::Google::Longrunning::Operation - # Creates a Repository. - rpc :CreateRepository, ::Google::Cloud::Build::V2::CreateRepositoryRequest, ::Google::Longrunning::Operation - # Creates multiple repositories inside a connection. - rpc :BatchCreateRepositories, ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest, ::Google::Longrunning::Operation - # Gets details of a single repository. - rpc :GetRepository, ::Google::Cloud::Build::V2::GetRepositoryRequest, ::Google::Cloud::Build::V2::Repository - # Lists Repositories in a given connection. - rpc :ListRepositories, ::Google::Cloud::Build::V2::ListRepositoriesRequest, ::Google::Cloud::Build::V2::ListRepositoriesResponse - # Deletes a single repository. - rpc :DeleteRepository, ::Google::Cloud::Build::V2::DeleteRepositoryRequest, ::Google::Longrunning::Operation - # Fetches read/write token of a given repository. - rpc :FetchReadWriteToken, ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest, ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse - # Fetches read token of a given repository. - rpc :FetchReadToken, ::Google::Cloud::Build::V2::FetchReadTokenRequest, ::Google::Cloud::Build::V2::FetchReadTokenResponse - # FetchLinkableRepositories get repositories from SCM that are - # accessible and could be added to the connection. - rpc :FetchLinkableRepositories, ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest, ::Google::Cloud::Build::V2::FetchLinkableRepositoriesResponse - # Fetch the list of branches or tags for a given repository. - rpc :FetchGitRefs, ::Google::Cloud::Build::V2::FetchGitRefsRequest, ::Google::Cloud::Build::V2::FetchGitRefsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-build-v2/proto_docs/README.md deleted file mode 100644 index 8de62a92aeae..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Build V2 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-build-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/api/httpbody.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/httpbody.rb deleted file mode 100644 index 938f7ac6b2fd..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/httpbody.rb +++ /dev/null @@ -1,80 +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 - # Message that represents an arbitrary HTTP body. It should only be used for - # payload formats that can't be represented as JSON, such as raw binary or - # an HTML page. - # - # - # This message can be used both in streaming and non-streaming API methods in - # the request as well as the response. - # - # It can be used as a top-level request field, which is convenient if one - # wants to extract parameters from either the URL or HTTP template into the - # request fields and also want access to the raw HTTP body. - # - # Example: - # - # message GetResourceRequest { - # // A unique request id. - # string request_id = 1; - # - # // The raw HTTP body is bound to this field. - # google.api.HttpBody http_body = 2; - # - # } - # - # service ResourceService { - # rpc GetResource(GetResourceRequest) - # returns (google.api.HttpBody); - # rpc UpdateResource(google.api.HttpBody) - # returns (google.protobuf.Empty); - # - # } - # - # Example with streaming methods: - # - # service CaldavService { - # rpc GetCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # rpc UpdateCalendar(stream google.api.HttpBody) - # returns (stream google.api.HttpBody); - # - # } - # - # Use of this type only changes how the request and response bodies are - # handled, all other features will continue to work unchanged. - # @!attribute [rw] content_type - # @return [::String] - # The HTTP Content-Type header value specifying the content type of the body. - # @!attribute [rw] data - # @return [::String] - # The HTTP request/response body as raw binary. - # @!attribute [rw] extensions - # @return [::Array<::Google::Protobuf::Any>] - # Application specific response metadata. Must be set in the first response - # for streaming APIs. - class HttpBody - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb deleted file mode 100644 index d7498cede886..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/cloudbuild.rb +++ /dev/null @@ -1,88 +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 Build - module V2 - # 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_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @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`. - # @!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 - - # Represents the custom metadata of the RunWorkflow 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] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] requested_cancellation - # @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`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] pipeline_run_id - # @return [::String] - # Output only. ID of the pipeline run created by RunWorkflow. - class RunWorkflowCustomOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb deleted file mode 100644 index a361ac6a7358..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/devtools/cloudbuild/v2/repositories.rb +++ /dev/null @@ -1,697 +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 Build - module V2 - # A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket Data Center, - # Bitbucket Cloud or GitLab. - # @!attribute [rw] name - # @return [::String] - # Immutable. The resource name of the connection, in the format - # `projects/{project}/locations/{location}/connections/{connection_id}`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Server assigned timestamp for when the connection was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Server assigned timestamp for when the connection was updated. - # @!attribute [rw] github_config - # @return [::Google::Cloud::Build::V2::GitHubConfig] - # Configuration for connections to github.com. - # - # Note: The following fields are mutually exclusive: `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] github_enterprise_config - # @return [::Google::Cloud::Build::V2::GitHubEnterpriseConfig] - # Configuration for connections to an instance of GitHub Enterprise. - # - # Note: The following fields are mutually exclusive: `github_enterprise_config`, `github_config`, `gitlab_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gitlab_config - # @return [::Google::Cloud::Build::V2::GitLabConfig] - # Configuration for connections to gitlab.com or an instance of GitLab - # Enterprise. - # - # Note: The following fields are mutually exclusive: `gitlab_config`, `github_config`, `github_enterprise_config`, `bitbucket_data_center_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bitbucket_data_center_config - # @return [::Google::Cloud::Build::V2::BitbucketDataCenterConfig] - # Configuration for connections to Bitbucket Data Center. - # - # Note: The following fields are mutually exclusive: `bitbucket_data_center_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_cloud_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bitbucket_cloud_config - # @return [::Google::Cloud::Build::V2::BitbucketCloudConfig] - # Configuration for connections to Bitbucket Cloud. - # - # Note: The following fields are mutually exclusive: `bitbucket_cloud_config`, `github_config`, `github_enterprise_config`, `gitlab_config`, `bitbucket_data_center_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] installation_state - # @return [::Google::Cloud::Build::V2::InstallationState] - # Output only. Installation state of the Connection. - # @!attribute [rw] disabled - # @return [::Boolean] - # If disabled is set to true, functionality is disabled for this connection. - # Repository based API methods and webhooks processing for repositories in - # this connection will be disabled. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Set to true when the connection is being set up or updated in - # the background. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Allows clients to store small amounts of arbitrary data. - # @!attribute [rw] etag - # @return [::String] - # This checksum is computed by the server based on the value of other - # fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - class Connection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes stage and necessary actions to be taken by the - # user to complete the installation. Used for GitHub and GitHub Enterprise - # based connections. - # @!attribute [r] stage - # @return [::Google::Cloud::Build::V2::InstallationState::Stage] - # Output only. Current step of the installation process. - # @!attribute [r] message - # @return [::String] - # Output only. Message of what the user should do next to continue the - # installation. Empty string if the installation is already complete. - # @!attribute [r] action_uri - # @return [::String] - # Output only. Link to follow for next action. Empty string if the - # installation is already complete. - class InstallationState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Stage of the installation process. - module Stage - # No stage specified. - STAGE_UNSPECIFIED = 0 - - # Only for GitHub Enterprise. An App creation has been requested. - # The user needs to confirm the creation in their GitHub enterprise host. - PENDING_CREATE_APP = 1 - - # User needs to authorize the GitHub (or Enterprise) App via OAuth. - PENDING_USER_OAUTH = 2 - - # User needs to follow the link to install the GitHub (or Enterprise) App. - PENDING_INSTALL_APP = 3 - - # Installation process has been completed. - COMPLETE = 10 - end - end - - # Request message for FetchLinkableRepositories. - # @!attribute [rw] connection - # @return [::String] - # Required. The name of the Connection. - # Format: `projects/*/locations/*/connections/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of results to return in the list. Default to 20. - # @!attribute [rw] page_token - # @return [::String] - # Page start. - class FetchLinkableRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for FetchLinkableRepositories. - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::Build::V2::Repository>] - # repositories ready to be created. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class FetchLinkableRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to github.com. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::Build::V2::OAuthCredential] - # OAuth credential of the account that authorized the Cloud Build GitHub App. - # It is recommended to use a robot account instead of a human user account. - # The OAuth token must be tied to the Cloud Build GitHub App. - # @!attribute [rw] app_installation_id - # @return [::Integer] - # GitHub App installation id. - class GitHubConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to an instance of GitHub Enterprise. - # @!attribute [rw] host_uri - # @return [::String] - # Required. The URI of the GitHub Enterprise host this connection is for. - # @!attribute [rw] api_key - # @return [::String] - # Required. API Key used for authentication of webhook events. - # @!attribute [rw] app_id - # @return [::Integer] - # Id of the GitHub App created from the manifest. - # @!attribute [rw] app_slug - # @return [::String] - # The URL-friendly name of the GitHub App. - # @!attribute [rw] private_key_secret_version - # @return [::String] - # SecretManager resource containing the private key of the GitHub App, - # formatted as `projects/*/secrets/*/versions/*`. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # SecretManager resource containing the webhook secret of the GitHub App, - # formatted as `projects/*/secrets/*/versions/*`. - # @!attribute [rw] app_installation_id - # @return [::Integer] - # ID of the installation of the GitHub App. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Build::V2::ServiceDirectoryConfig] - # Configuration for using Service Directory to privately connect to a GitHub - # Enterprise server. This should only be set if the GitHub Enterprise server - # is hosted on-premises and not reachable by public internet. If this field - # is left empty, calls to the GitHub Enterprise server will be made over the - # public internet. - # @!attribute [rw] ssl_ca - # @return [::String] - # SSL certificate to use for requests to GitHub Enterprise. - # @!attribute [r] server_version - # @return [::String] - # Output only. GitHub Enterprise version installed at the host_uri. - class GitHubEnterpriseConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to gitlab.com or an instance of GitLab - # Enterprise. - # @!attribute [rw] host_uri - # @return [::String] - # The URI of the GitLab Enterprise host this connection is for. - # If not specified, the default value is https://gitlab.com. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Required. Immutable. SecretManager resource containing the webhook secret - # of a GitLab Enterprise project, formatted as - # `projects/*/secrets/*/versions/*`. - # @!attribute [rw] read_authorizer_credential - # @return [::Google::Cloud::Build::V2::UserCredential] - # Required. A GitLab personal access token with the minimum `read_api` scope - # access. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::Build::V2::UserCredential] - # Required. A GitLab personal access token with the `api` scope access. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Build::V2::ServiceDirectoryConfig] - # Configuration for using Service Directory to privately connect to a GitLab - # Enterprise server. This should only be set if the GitLab Enterprise server - # is hosted on-premises and not reachable by public internet. If this field - # is left empty, calls to the GitLab Enterprise server will be made over the - # public internet. - # @!attribute [rw] ssl_ca - # @return [::String] - # SSL certificate to use for requests to GitLab Enterprise. - # @!attribute [r] server_version - # @return [::String] - # Output only. Version of the GitLab Enterprise server running on the - # `host_uri`. - class GitLabConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to Bitbucket Data Center. - # @!attribute [rw] host_uri - # @return [::String] - # Required. The URI of the Bitbucket Data Center instance or cluster this - # connection is for. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Required. Immutable. SecretManager resource containing the webhook secret - # used to verify webhook events, formatted as - # `projects/*/secrets/*/versions/*`. - # @!attribute [rw] read_authorizer_credential - # @return [::Google::Cloud::Build::V2::UserCredential] - # Required. A http access token with the `REPO_READ` access. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::Build::V2::UserCredential] - # Required. A http access token with the `REPO_ADMIN` scope access. - # @!attribute [rw] service_directory_config - # @return [::Google::Cloud::Build::V2::ServiceDirectoryConfig] - # Optional. Configuration for using Service Directory to privately connect to - # a Bitbucket Data Center. This should only be set if the Bitbucket Data - # Center is hosted on-premises and not reachable by public internet. If this - # field is left empty, calls to the Bitbucket Data Center will be made over - # the public internet. - # @!attribute [rw] ssl_ca - # @return [::String] - # Optional. SSL certificate to use for requests to the Bitbucket Data Center. - # @!attribute [r] server_version - # @return [::String] - # Output only. Version of the Bitbucket Data Center running on the - # `host_uri`. - class BitbucketDataCenterConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for connections to Bitbucket Cloud. - # @!attribute [rw] workspace - # @return [::String] - # Required. The Bitbucket Cloud Workspace ID to be connected to Google Cloud - # Platform. - # @!attribute [rw] webhook_secret_secret_version - # @return [::String] - # Required. SecretManager resource containing the webhook secret used to - # verify webhook events, formatted as `projects/*/secrets/*/versions/*`. - # @!attribute [rw] read_authorizer_credential - # @return [::Google::Cloud::Build::V2::UserCredential] - # Required. An access token with the `repository` access. It can be either a - # workspace, project or repository access token. It's recommended to use a - # system account to generate the credentials. - # @!attribute [rw] authorizer_credential - # @return [::Google::Cloud::Build::V2::UserCredential] - # Required. An access token with the `webhook`, `repository`, - # `repository:admin` and `pullrequest` scope access. It can be either a - # workspace, project or repository access token. It's recommended to use a - # system account to generate these credentials. - class BitbucketCloudConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ServiceDirectoryConfig represents Service Directory configuration for a - # connection. - # @!attribute [rw] service - # @return [::String] - # Required. The Service Directory service name. - # Format: - # projects/\\{project}/locations/\\{location}/namespaces/\\{namespace}/services/\\{service}. - class ServiceDirectoryConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A repository associated to a parent connection. - # @!attribute [rw] name - # @return [::String] - # Immutable. Resource name of the repository, in the format - # `projects/*/locations/*/connections/*/repositories/*`. - # @!attribute [rw] remote_uri - # @return [::String] - # Required. Git Clone HTTPS URI. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Server assigned timestamp for when the connection was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Server assigned timestamp for when the connection was updated. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Allows clients to store small amounts of arbitrary data. - # @!attribute [rw] etag - # @return [::String] - # This checksum is computed by the server based on the value of other - # fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [r] webhook_id - # @return [::String] - # Output only. External ID of the webhook created for the repository. - class Repository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents an OAuth token of the account that authorized the Connection, - # and associated metadata. - # @!attribute [rw] oauth_token_secret_version - # @return [::String] - # A SecretManager resource containing the OAuth token that authorizes - # the Cloud Build connection. Format: `projects/*/secrets/*/versions/*`. - # @!attribute [r] username - # @return [::String] - # Output only. The username associated to this token. - class OAuthCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a personal access token that authorized the Connection, - # and associated metadata. - # @!attribute [rw] user_token_secret_version - # @return [::String] - # Required. A SecretManager resource containing the user token that - # authorizes the Cloud Build connection. Format: - # `projects/*/secrets/*/versions/*`. - # @!attribute [r] username - # @return [::String] - # Output only. The username associated to this token. - class UserCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a Connection - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location where the connection will be created. - # Format: `projects/*/locations/*`. - # @!attribute [rw] connection - # @return [::Google::Cloud::Build::V2::Connection] - # Required. The Connection to create. - # @!attribute [rw] connection_id - # @return [::String] - # Required. The ID to use for the Connection, which will become the final - # component of the Connection's resource name. Names must be unique - # per-project per-location. Allows alphanumeric characters and any of - # -._~%!$&'()*+,;=@. - class CreateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting the details of a Connection. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Connection to retrieve. - # Format: `projects/*/locations/*/connections/*`. - class GetConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of Connections. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of Connections. - # Format: `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of results to return in the list. - # @!attribute [rw] page_token - # @return [::String] - # Page start. - class ListConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing Connections. - # @!attribute [rw] connections - # @return [::Array<::Google::Cloud::Build::V2::Connection>] - # The list of Connections. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a Connection. - # @!attribute [rw] connection - # @return [::Google::Cloud::Build::V2::Connection] - # Required. The Connection to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the connection is not found a new connection - # will be created. In this situation `update_mask` is ignored. - # The creation will succeed only if the input connection has all the - # necessary information (e.g a github_config with both user_oauth_token and - # installation_id properties). - # @!attribute [rw] etag - # @return [::String] - # The current etag of the connection. - # If an etag is provided and does not match the current etag of the - # connection, update will be blocked and an ABORTED error will be returned. - class UpdateConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a Connection. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Connection to delete. - # Format: `projects/*/locations/*/connections/*`. - # @!attribute [rw] etag - # @return [::String] - # The current etag of the connection. - # If an etag is provided and does not match the current etag of the - # connection, deletion will be blocked and an ABORTED error will be returned. - # @!attribute [rw] validate_only - # @return [::Boolean] - # If set, validate the request, but do not actually post it. - class DeleteConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a Repository. - # @!attribute [rw] parent - # @return [::String] - # Required. The connection to contain the repository. If the request is part - # of a BatchCreateRepositoriesRequest, this field should be empty or match - # the parent specified there. - # @!attribute [rw] repository - # @return [::Google::Cloud::Build::V2::Repository] - # Required. The repository to create. - # @!attribute [rw] repository_id - # @return [::String] - # Required. The ID to use for the repository, which will become the final - # component of the repository's resource name. This ID should be unique in - # the connection. Allows alphanumeric characters and any of - # -._~%!$&'()*+,;=@. - class CreateRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating repositoritories in batch. - # @!attribute [rw] parent - # @return [::String] - # Required. The connection to contain all the repositories being created. - # Format: projects/*/locations/*/connections/* - # The parent field in the CreateRepositoryRequest messages - # must either be empty or match this field. - # @!attribute [rw] requests - # @return [::Array<::Google::Cloud::Build::V2::CreateRepositoryRequest>] - # Required. The request messages specifying the repositories to create. - class BatchCreateRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response of creating repositories in batch. - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::Build::V2::Repository>] - # Repository resources created. - class BatchCreateRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting the details of a Repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Repository to retrieve. - # Format: `projects/*/locations/*/connections/*/repositories/*`. - class GetRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of Repositories. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of Repositories. - # Format: `projects/*/locations/*/connections/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Number of results to return in the list. - # @!attribute [rw] page_token - # @return [::String] - # Page start. - # @!attribute [rw] filter - # @return [::String] - # A filter expression that filters resources listed in the response. - # Expressions must follow API improvement proposal - # [AIP-160](https://google.aip.dev/160). e.g. - # `remote_uri:"https://github.com*"`. - class ListRepositoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing Repositories. - # @!attribute [rw] repositories - # @return [::Array<::Google::Cloud::Build::V2::Repository>] - # The list of Repositories. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - class ListRepositoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a Repository. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Repository to delete. - # Format: `projects/*/locations/*/connections/*/repositories/*`. - # @!attribute [rw] etag - # @return [::String] - # The current etag of the repository. - # If an etag is provided and does not match the current etag of the - # repository, deletion will be blocked and an ABORTED error will be returned. - # @!attribute [rw] validate_only - # @return [::Boolean] - # If set, validate the request, but do not actually post it. - class DeleteRepositoryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for fetching SCM read/write token. - # @!attribute [rw] repository - # @return [::String] - # Required. The resource name of the repository in the format - # `projects/*/locations/*/connections/*/repositories/*`. - class FetchReadWriteTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for fetching SCM read token. - # @!attribute [rw] repository - # @return [::String] - # Required. The resource name of the repository in the format - # `projects/*/locations/*/connections/*/repositories/*`. - class FetchReadTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for responding to get read token. - # @!attribute [rw] token - # @return [::String] - # The token content. - # @!attribute [rw] expiration_time - # @return [::Google::Protobuf::Timestamp] - # Expiration timestamp. Can be empty if unknown or non-expiring. - class FetchReadTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for responding to get read/write token. - # @!attribute [rw] token - # @return [::String] - # The token content. - # @!attribute [rw] expiration_time - # @return [::Google::Protobuf::Timestamp] - # Expiration timestamp. Can be empty if unknown or non-expiring. - class FetchReadWriteTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RPC request object accepted by the ProcessWebhook RPC method. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location where the webhook will be received. - # Format: `projects/*/locations/*`. - # @!attribute [rw] body - # @return [::Google::Api::HttpBody] - # HTTP request body. - # @!attribute [rw] webhook_key - # @return [::String] - # Arbitrary additional key to find the maching repository for a webhook event - # if needed. - class ProcessWebhookRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for fetching git refs - # @!attribute [rw] repository - # @return [::String] - # Required. The resource name of the repository in the format - # `projects/*/locations/*/connections/*/repositories/*`. - # @!attribute [rw] ref_type - # @return [::Google::Cloud::Build::V2::FetchGitRefsRequest::RefType] - # Type of refs to fetch - class FetchGitRefsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of refs - module RefType - # No type specified. - REF_TYPE_UNSPECIFIED = 0 - - # To fetch tags. - TAG = 1 - - # To fetch branches. - BRANCH = 2 - end - end - - # Response for fetching git refs - # @!attribute [rw] ref_names - # @return [::Array<::String>] - # Name of the refs fetched. - class FetchGitRefsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-build-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/proto_docs/google/type/expr.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a textual expression in the Common Expression Language (CEL) - # syntax. CEL is a C-like expression language. The syntax and semantics of CEL - # are documented at https://github.com/google/cel-spec. - # - # Example (Comparison): - # - # title: "Summary size limit" - # description: "Determines if a summary is less than 100 chars" - # expression: "document.summary.size() < 100" - # - # Example (Equality): - # - # title: "Requestor is owner" - # description: "Determines if requestor is the document owner" - # expression: "document.owner == request.auth.claims.email" - # - # Example (Logic): - # - # title: "Public documents" - # description: "Determine whether the document should be publicly visible" - # expression: "document.type != 'private' && document.type != 'internal'" - # - # Example (Data Manipulation): - # - # title: "Notification string" - # description: "Create a notification string with a timestamp." - # expression: "'New message received at ' + string(document.create_time)" - # - # The exact variables and functions that may be referenced within an expression - # are determined by the service that evaluates it. See the service - # documentation for additional information. - # @!attribute [rw] expression - # @return [::String] - # Textual representation of an expression in Common Expression Language - # syntax. - # @!attribute [rw] title - # @return [::String] - # Optional. Title for the expression, i.e. a short string describing - # its purpose. This can be used e.g. in UIs which allow to enter the - # expression. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the expression. This is a longer text which - # describes the expression, e.g. when hovered over it in a UI. - # @!attribute [rw] location - # @return [::String] - # Optional. String indicating the location of the expression for error - # reporting, e.g. a file name and a position in the file. - class Expr - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-build-v2/snippets/Gemfile deleted file mode 100644 index 30861e09dd7f..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/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-build-v2", path: "../" -else - gem "google-cloud-build-v2" -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-build-v2/snippets/repository_manager/batch_create_repositories.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/batch_create_repositories.rb deleted file mode 100644 index 28a6e3545aca..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/batch_create_repositories.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 cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_sync] -require "google/cloud/build/v2" - -## -# Snippet for the batch_create_repositories call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#batch_create_repositories. -# -def batch_create_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new - - # Call the batch_create_repositories method. - result = client.batch_create_repositories 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 cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.rb deleted file mode 100644 index 15718d8c525b..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_connection.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 cloudbuild_v2_generated_RepositoryManager_CreateConnection_sync] -require "google/cloud/build/v2" - -## -# Snippet for the create_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#create_connection. -# -def create_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::CreateConnectionRequest.new - - # Call the create_connection method. - result = client.create_connection 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 cloudbuild_v2_generated_RepositoryManager_CreateConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.rb deleted file mode 100644 index de9264226874..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/create_repository.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 cloudbuild_v2_generated_RepositoryManager_CreateRepository_sync] -require "google/cloud/build/v2" - -## -# Snippet for the create_repository call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#create_repository. -# -def create_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::CreateRepositoryRequest.new - - # Call the create_repository method. - result = client.create_repository 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 cloudbuild_v2_generated_RepositoryManager_CreateRepository_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.rb deleted file mode 100644 index 55cde02e5910..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_connection.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 cloudbuild_v2_generated_RepositoryManager_DeleteConnection_sync] -require "google/cloud/build/v2" - -## -# Snippet for the delete_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#delete_connection. -# -def delete_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::DeleteConnectionRequest.new - - # Call the delete_connection method. - result = client.delete_connection 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 cloudbuild_v2_generated_RepositoryManager_DeleteConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.rb deleted file mode 100644 index 58f8738bceb1..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/delete_repository.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 cloudbuild_v2_generated_RepositoryManager_DeleteRepository_sync] -require "google/cloud/build/v2" - -## -# Snippet for the delete_repository call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#delete_repository. -# -def delete_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::DeleteRepositoryRequest.new - - # Call the delete_repository method. - result = client.delete_repository 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 cloudbuild_v2_generated_RepositoryManager_DeleteRepository_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.rb deleted file mode 100644 index 8a82ee99bfb9..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_git_refs.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 cloudbuild_v2_generated_RepositoryManager_FetchGitRefs_sync] -require "google/cloud/build/v2" - -## -# Snippet for the fetch_git_refs call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_git_refs. -# -def fetch_git_refs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::FetchGitRefsRequest.new - - # Call the fetch_git_refs method. - result = client.fetch_git_refs request - - # The returned object is of type Google::Cloud::Build::V2::FetchGitRefsResponse. - p result -end -# [END cloudbuild_v2_generated_RepositoryManager_FetchGitRefs_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.rb deleted file mode 100644 index 1e4fc8e2d17e..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_linkable_repositories.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 cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_sync] -require "google/cloud/build/v2" - -## -# Snippet for the fetch_linkable_repositories call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_linkable_repositories. -# -def fetch_linkable_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new - - # Call the fetch_linkable_repositories method. - result = client.fetch_linkable_repositories 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::Build::V2::Repository. - p item - end -end -# [END cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.rb deleted file mode 100644 index fb7191aee0d6..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_token.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 cloudbuild_v2_generated_RepositoryManager_FetchReadToken_sync] -require "google/cloud/build/v2" - -## -# Snippet for the fetch_read_token call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_read_token. -# -def fetch_read_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::FetchReadTokenRequest.new - - # Call the fetch_read_token method. - result = client.fetch_read_token request - - # The returned object is of type Google::Cloud::Build::V2::FetchReadTokenResponse. - p result -end -# [END cloudbuild_v2_generated_RepositoryManager_FetchReadToken_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.rb deleted file mode 100644 index 936bfb83d48a..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/fetch_read_write_token.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 cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_sync] -require "google/cloud/build/v2" - -## -# Snippet for the fetch_read_write_token call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#fetch_read_write_token. -# -def fetch_read_write_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new - - # Call the fetch_read_write_token method. - result = client.fetch_read_write_token request - - # The returned object is of type Google::Cloud::Build::V2::FetchReadWriteTokenResponse. - p result -end -# [END cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.rb deleted file mode 100644 index 043b941a166e..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_connection.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 cloudbuild_v2_generated_RepositoryManager_GetConnection_sync] -require "google/cloud/build/v2" - -## -# Snippet for the get_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#get_connection. -# -def get_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::GetConnectionRequest.new - - # Call the get_connection method. - result = client.get_connection request - - # The returned object is of type Google::Cloud::Build::V2::Connection. - p result -end -# [END cloudbuild_v2_generated_RepositoryManager_GetConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.rb deleted file mode 100644 index 53c1dc350fcd..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/get_repository.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 cloudbuild_v2_generated_RepositoryManager_GetRepository_sync] -require "google/cloud/build/v2" - -## -# Snippet for the get_repository call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#get_repository. -# -def get_repository - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::GetRepositoryRequest.new - - # Call the get_repository method. - result = client.get_repository request - - # The returned object is of type Google::Cloud::Build::V2::Repository. - p result -end -# [END cloudbuild_v2_generated_RepositoryManager_GetRepository_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.rb deleted file mode 100644 index 546b5a054689..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_connections.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 cloudbuild_v2_generated_RepositoryManager_ListConnections_sync] -require "google/cloud/build/v2" - -## -# Snippet for the list_connections call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#list_connections. -# -def list_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::ListConnectionsRequest.new - - # Call the list_connections method. - result = client.list_connections 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::Build::V2::Connection. - p item - end -end -# [END cloudbuild_v2_generated_RepositoryManager_ListConnections_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.rb deleted file mode 100644 index cb85e5e02018..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/list_repositories.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 cloudbuild_v2_generated_RepositoryManager_ListRepositories_sync] -require "google/cloud/build/v2" - -## -# Snippet for the list_repositories call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#list_repositories. -# -def list_repositories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::ListRepositoriesRequest.new - - # Call the list_repositories method. - result = client.list_repositories 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::Build::V2::Repository. - p item - end -end -# [END cloudbuild_v2_generated_RepositoryManager_ListRepositories_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.rb b/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.rb deleted file mode 100644 index a96fda832e9c..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/repository_manager/update_connection.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 cloudbuild_v2_generated_RepositoryManager_UpdateConnection_sync] -require "google/cloud/build/v2" - -## -# Snippet for the update_connection call in the RepositoryManager 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::Build::V2::RepositoryManager::Client#update_connection. -# -def update_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Build::V2::RepositoryManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Build::V2::UpdateConnectionRequest.new - - # Call the update_connection method. - result = client.update_connection 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 cloudbuild_v2_generated_RepositoryManager_UpdateConnection_sync] diff --git a/owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json b/owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json deleted file mode 100644 index 81c546b62e6a..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/snippets/snippet_metadata_google.devtools.cloudbuild.v2.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-build-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.devtools.cloudbuild.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_CreateConnection_sync", - "title": "Snippet for the create_connection call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#create_connection.", - "file": "repository_manager/create_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_connection", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#create_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::CreateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "CreateConnection", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.CreateConnection", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_GetConnection_sync", - "title": "Snippet for the get_connection call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#get_connection.", - "file": "repository_manager/get_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_connection", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#get_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::GetConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::Connection", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "GetConnection", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.GetConnection", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_ListConnections_sync", - "title": "Snippet for the list_connections call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#list_connections.", - "file": "repository_manager/list_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_connections", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#list_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::ListConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::ListConnectionsResponse", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "ListConnections", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.ListConnections", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_UpdateConnection_sync", - "title": "Snippet for the update_connection call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#update_connection.", - "file": "repository_manager/update_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_connection", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#update_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::UpdateConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "UpdateConnection", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.UpdateConnection", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_DeleteConnection_sync", - "title": "Snippet for the delete_connection call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#delete_connection.", - "file": "repository_manager/delete_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_connection", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#delete_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::DeleteConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "DeleteConnection", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteConnection", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_CreateRepository_sync", - "title": "Snippet for the create_repository call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#create_repository.", - "file": "repository_manager/create_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_repository", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#create_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::CreateRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "CreateRepository", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.CreateRepository", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_BatchCreateRepositories_sync", - "title": "Snippet for the batch_create_repositories call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#batch_create_repositories.", - "file": "repository_manager/batch_create_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_create_repositories", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#batch_create_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "BatchCreateRepositories", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.BatchCreateRepositories", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_GetRepository_sync", - "title": "Snippet for the get_repository call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#get_repository.", - "file": "repository_manager/get_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_repository", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#get_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::GetRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::Repository", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "GetRepository", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.GetRepository", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_ListRepositories_sync", - "title": "Snippet for the list_repositories call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#list_repositories.", - "file": "repository_manager/list_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_repositories", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#list_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::ListRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::ListRepositoriesResponse", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "ListRepositories", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.ListRepositories", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_DeleteRepository_sync", - "title": "Snippet for the delete_repository call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#delete_repository.", - "file": "repository_manager/delete_repository.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_repository", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#delete_repository", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::DeleteRepositoryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "DeleteRepository", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.DeleteRepository", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchReadWriteToken_sync", - "title": "Snippet for the fetch_read_write_token call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_write_token.", - "file": "repository_manager/fetch_read_write_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_read_write_token", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_write_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::FetchReadWriteTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::FetchReadWriteTokenResponse", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "FetchReadWriteToken", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadWriteToken", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchReadToken_sync", - "title": "Snippet for the fetch_read_token call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_token.", - "file": "repository_manager/fetch_read_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_read_token", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_read_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::FetchReadTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::FetchReadTokenResponse", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "FetchReadToken", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchReadToken", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchLinkableRepositories_sync", - "title": "Snippet for the fetch_linkable_repositories call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_linkable_repositories.", - "file": "repository_manager/fetch_linkable_repositories.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_linkable_repositories", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_linkable_repositories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::FetchLinkableRepositoriesResponse", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "FetchLinkableRepositories", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchLinkableRepositories", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudbuild_v2_generated_RepositoryManager_FetchGitRefs_sync", - "title": "Snippet for the fetch_git_refs call in the RepositoryManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Build::V2::RepositoryManager::Client#fetch_git_refs.", - "file": "repository_manager/fetch_git_refs.rb", - "language": "RUBY", - "client_method": { - "short_name": "fetch_git_refs", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client#fetch_git_refs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Build::V2::FetchGitRefsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Build::V2::FetchGitRefsResponse", - "client": { - "short_name": "RepositoryManager::Client", - "full_name": "::Google::Cloud::Build::V2::RepositoryManager::Client" - }, - "method": { - "short_name": "FetchGitRefs", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager.FetchGitRefs", - "service": { - "short_name": "RepositoryManager", - "full_name": "google.devtools.cloudbuild.v2.RepositoryManager" - } - } - }, - "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-build-v2/test/google/cloud/build/v2/repository_manager_operations_test.rb b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_operations_test.rb deleted file mode 100644 index 1cc010d62f14..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_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/devtools/cloudbuild/v2/repositories_pb" -require "google/devtools/cloudbuild/v2/repositories_services_pb" -require "google/cloud/build/v2/repository_manager" - -class ::Google::Cloud::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb deleted file mode 100644 index 2ebac5a14766..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_paths_test.rb +++ /dev/null @@ -1,103 +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/build/v2/repository_manager" - -class ::Google::Cloud::Build::V2::RepositoryManager::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_connection_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connection_path project: "value0", location: "value1", connection: "value2" - assert_equal "projects/value0/locations/value1/connections/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::Build::V2::RepositoryManager::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_repository_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.repository_path project: "value0", location: "value1", connection: "value2", repository: "value3" - assert_equal "projects/value0/locations/value1/connections/value2/repositories/value3", path - end - end - - def test_secret_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.secret_version_path project: "value0", secret: "value1", version: "value2" - assert_equal "projects/value0/secrets/value1/versions/value2", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", namespace: "value2", service: "value3" - assert_equal "projects/value0/locations/value1/namespaces/value2/services/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb b/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb deleted file mode 100644 index 9e0ff25af10e..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/test/google/cloud/build/v2/repository_manager_test.rb +++ /dev/null @@ -1,1015 +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/devtools/cloudbuild/v2/repositories_pb" -require "google/cloud/build/v2/repository_manager" - -class ::Google::Cloud::Build::V2::RepositoryManager::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_create_connection - # 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" - connection = {} - connection_id = "hello world" - - create_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_connection, name - assert_kind_of ::Google::Cloud::Build::V2::CreateConnectionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V2::Connection), request["connection"] - assert_equal "hello world", request["connection_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_connection_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_connection({ parent: parent, connection: connection, connection_id: connection_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_connection parent: parent, connection: connection, connection_id: connection_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_connection ::Google::Cloud::Build::V2::CreateConnectionRequest.new(parent: parent, connection: connection, connection_id: connection_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_connection({ parent: parent, connection: connection, connection_id: connection_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_connection(::Google::Cloud::Build::V2::CreateConnectionRequest.new(parent: parent, connection: connection, connection_id: connection_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_connection_client_stub.call_rpc_count - end - end - - def test_get_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::Connection.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_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_connection, name - assert_kind_of ::Google::Cloud::Build::V2::GetConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_connection_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_connection ::Google::Cloud::Build::V2::GetConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_connection({ 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_connection(::Google::Cloud::Build::V2::GetConnectionRequest.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_connection_client_stub.call_rpc_count - end - end - - def test_list_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::ListConnectionsResponse.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_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_connections, name - assert_kind_of ::Google::Cloud::Build::V2::ListConnectionsRequest, 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_connections_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_connections({ 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_connections 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_connections ::Google::Cloud::Build::V2::ListConnectionsRequest.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_connections({ 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_connections(::Google::Cloud::Build::V2::ListConnectionsRequest.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_connections_client_stub.call_rpc_count - end - end - - def test_update_connection - # 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. - connection = {} - update_mask = {} - allow_missing = true - etag = "hello world" - - update_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_connection, name - assert_kind_of ::Google::Cloud::Build::V2::UpdateConnectionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V2::Connection), request["connection"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_connection_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_connection({ connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag }) 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_connection connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag 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_connection ::Google::Cloud::Build::V2::UpdateConnectionRequest.new(connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag) 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_connection({ connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag }, 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_connection(::Google::Cloud::Build::V2::UpdateConnectionRequest.new(connection: connection, update_mask: update_mask, allow_missing: allow_missing, etag: etag), 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_connection_client_stub.call_rpc_count - end - end - - def test_delete_connection - # 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" - etag = "hello world" - validate_only = true - - delete_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_connection, name - assert_kind_of ::Google::Cloud::Build::V2::DeleteConnectionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_connection_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_connection({ name: name, etag: etag, validate_only: validate_only }) 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_connection name: name, etag: etag, validate_only: validate_only 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_connection ::Google::Cloud::Build::V2::DeleteConnectionRequest.new(name: name, etag: etag, validate_only: validate_only) 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_connection({ name: name, etag: etag, validate_only: validate_only }, 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_connection(::Google::Cloud::Build::V2::DeleteConnectionRequest.new(name: name, etag: etag, validate_only: validate_only), 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_connection_client_stub.call_rpc_count - end - end - - def test_create_repository - # 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" - repository = {} - repository_id = "hello world" - - create_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_repository, name - assert_kind_of ::Google::Cloud::Build::V2::CreateRepositoryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Build::V2::Repository), request["repository"] - assert_equal "hello world", request["repository_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_repository_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_repository({ parent: parent, repository: repository, repository_id: repository_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_repository parent: parent, repository: repository, repository_id: repository_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_repository ::Google::Cloud::Build::V2::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_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_repository({ parent: parent, repository: repository, repository_id: repository_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_repository(::Google::Cloud::Build::V2::CreateRepositoryRequest.new(parent: parent, repository: repository, repository_id: repository_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_repository_client_stub.call_rpc_count - end - end - - def test_batch_create_repositories - # 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" - requests = [{}] - - batch_create_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_create_repositories, name - assert_kind_of ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest, request - assert_equal "hello world", request["parent"] - assert_kind_of ::Google::Cloud::Build::V2::CreateRepositoryRequest, request["requests"].first - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_create_repositories_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_create_repositories({ parent: parent, requests: requests }) 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.batch_create_repositories parent: parent, requests: requests 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.batch_create_repositories ::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new(parent: parent, requests: requests) 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.batch_create_repositories({ parent: parent, requests: requests }, 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.batch_create_repositories(::Google::Cloud::Build::V2::BatchCreateRepositoriesRequest.new(parent: parent, requests: requests), 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, batch_create_repositories_client_stub.call_rpc_count - end - end - - def test_get_repository - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::Repository.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_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_repository, name - assert_kind_of ::Google::Cloud::Build::V2::GetRepositoryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_repository_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_repository({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_repository name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_repository ::Google::Cloud::Build::V2::GetRepositoryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_repository({ 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_repository(::Google::Cloud::Build::V2::GetRepositoryRequest.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_repository_client_stub.call_rpc_count - end - end - - def test_list_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::ListRepositoriesResponse.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_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_repositories, name - assert_kind_of ::Google::Cloud::Build::V2::ListRepositoriesRequest, 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_repositories_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_repositories({ 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_repositories 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_repositories ::Google::Cloud::Build::V2::ListRepositoriesRequest.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_repositories({ 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_repositories(::Google::Cloud::Build::V2::ListRepositoriesRequest.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_repositories_client_stub.call_rpc_count - end - end - - def test_delete_repository - # 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" - etag = "hello world" - validate_only = true - - delete_repository_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_repository, name - assert_kind_of ::Google::Cloud::Build::V2::DeleteRepositoryRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_repository_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_repository({ name: name, etag: etag, validate_only: validate_only }) 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_repository name: name, etag: etag, validate_only: validate_only 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_repository ::Google::Cloud::Build::V2::DeleteRepositoryRequest.new(name: name, etag: etag, validate_only: validate_only) 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_repository({ name: name, etag: etag, validate_only: validate_only }, 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_repository(::Google::Cloud::Build::V2::DeleteRepositoryRequest.new(name: name, etag: etag, validate_only: validate_only), 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_repository_client_stub.call_rpc_count - end - end - - def test_fetch_read_write_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::FetchReadWriteTokenResponse.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. - repository = "hello world" - - fetch_read_write_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_read_write_token, name - assert_kind_of ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest, request - assert_equal "hello world", request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_read_write_token_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_read_write_token({ repository: repository }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_read_write_token repository: repository do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_read_write_token ::Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new(repository: repository) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_read_write_token({ repository: repository }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_read_write_token(::Google::Cloud::Build::V2::FetchReadWriteTokenRequest.new(repository: repository), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_read_write_token_client_stub.call_rpc_count - end - end - - def test_fetch_read_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::FetchReadTokenResponse.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. - repository = "hello world" - - fetch_read_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_read_token, name - assert_kind_of ::Google::Cloud::Build::V2::FetchReadTokenRequest, request - assert_equal "hello world", request["repository"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_read_token_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_read_token({ repository: repository }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_read_token repository: repository do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_read_token ::Google::Cloud::Build::V2::FetchReadTokenRequest.new(repository: repository) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_read_token({ repository: repository }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_read_token(::Google::Cloud::Build::V2::FetchReadTokenRequest.new(repository: repository), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_read_token_client_stub.call_rpc_count - end - end - - def test_fetch_linkable_repositories - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::FetchLinkableRepositoriesResponse.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. - connection = "hello world" - page_size = 42 - page_token = "hello world" - - fetch_linkable_repositories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_linkable_repositories, name - assert_kind_of ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest, request - assert_equal "hello world", request["connection"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_linkable_repositories_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_linkable_repositories({ connection: connection, 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.fetch_linkable_repositories connection: connection, 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.fetch_linkable_repositories ::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new(connection: connection, 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.fetch_linkable_repositories({ connection: connection, 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.fetch_linkable_repositories(::Google::Cloud::Build::V2::FetchLinkableRepositoriesRequest.new(connection: connection, 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, fetch_linkable_repositories_client_stub.call_rpc_count - end - end - - def test_fetch_git_refs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Build::V2::FetchGitRefsResponse.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. - repository = "hello world" - ref_type = :REF_TYPE_UNSPECIFIED - - fetch_git_refs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :fetch_git_refs, name - assert_kind_of ::Google::Cloud::Build::V2::FetchGitRefsRequest, request - assert_equal "hello world", request["repository"] - assert_equal :REF_TYPE_UNSPECIFIED, request["ref_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, fetch_git_refs_client_stub do - # Create client - client = ::Google::Cloud::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.fetch_git_refs({ repository: repository, ref_type: ref_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.fetch_git_refs repository: repository, ref_type: ref_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.fetch_git_refs ::Google::Cloud::Build::V2::FetchGitRefsRequest.new(repository: repository, ref_type: ref_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.fetch_git_refs({ repository: repository, ref_type: ref_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.fetch_git_refs(::Google::Cloud::Build::V2::FetchGitRefsRequest.new(repository: repository, ref_type: ref_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, fetch_git_refs_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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Build::V2::RepositoryManager::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::Build::V2::RepositoryManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Build::V2::RepositoryManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-build-v2/test/helper.rb b/owl-bot-staging/google-cloud-build-v2/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-build-v2/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.gitignore b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.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-capacity_planner-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.repo-metadata.json deleted file mode 100644 index 3a03738d3f47..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "capacityplanner.googleapis.com", - "api_shortname": "capacityplanner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest", - "distribution_name": "google-cloud-capacity_planner-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "capacityplanner", - "name_pretty": "Capacity Planner V1BETA API", - "product_documentation": "https://cloud.google.com/capacity-planner/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Provides programmatic access to Capacity Planner features. Note that google-cloud-capacity_planner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-capacity_planner instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/capacity-planner/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml deleted file mode 100644 index 6b6282d3d7ec..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-capacity_planner-v1beta.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-capacity_planner-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts b/owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts deleted file mode 100644 index 88faa0dc86f8..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Capacity Planner V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md deleted file mode 100644 index 836a733fc22f..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-capacity_planner-v1beta library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-capacity_planner-v1beta library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/capacity_planner/v1beta" - -client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/capacity_planner/v1beta" - -::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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-capacity_planner-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/capacity_planner/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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-capacity_planner-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile b/owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md b/owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md deleted file mode 100644 index 2cf86faff5a2..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Capacity Planner V1BETA API - -Provides programmatic access to Capacity Planner features. - - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Capacity Planner V1BETA API. Most users should consider using -the main client gem, -[google-cloud-capacity_planner](https://rubygems.org/gems/google-cloud-capacity_planner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-capacity_planner-v1beta -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/capacityplanner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/capacity_planner/v1beta" - -client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new -request = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new # (request fields as keyword arguments...) -response = client.query_usage_histories request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-capacity_planner-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/capacity-planner/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/capacity_planner/v1beta" -require "logger" - -client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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-capacity_planner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-capacity_planner-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-capacity_planner`. -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-capacity_planner-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile b/owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile deleted file mode 100644 index deb10fb857f7..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-capacity_planner-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/capacity_planner/v1beta/usage_service/credentials" - ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-capacity_planner-v1beta gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-capacity_planner-v1beta gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-capacity_planner-v1beta gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-capacity_planner-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-capacity_planner-v1beta" - header "google-cloud-capacity_planner-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-capacity_planner-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-capacity_planner-v1beta test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-capacity_planner-v1beta smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-capacity_planner-v1beta acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json deleted file mode 100644 index a1330da49c4c..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/gapic_metadata.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.capacityplanner.v1beta", - "libraryPackage": "::Google::Cloud::CapacityPlanner::V1beta", - "services": { - "UsageService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client", - "rpcs": { - "QueryUsageHistories": { - "methods": [ - "query_usage_histories" - ] - }, - "QueryForecasts": { - "methods": [ - "query_forecasts" - ] - }, - "QueryReservations": { - "methods": [ - "query_reservations" - ] - }, - "ExportUsageHistories": { - "methods": [ - "export_usage_histories" - ] - }, - "ExportForecasts": { - "methods": [ - "export_forecasts" - ] - }, - "ExportReservationsUsage": { - "methods": [ - "export_reservations_usage" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec b/owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec deleted file mode 100644 index 1f753214cac8..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/google-cloud-capacity_planner-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/capacity_planner/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-capacity_planner-v1beta" - gem.version = Google::Cloud::CapacityPlanner::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Provides programmatic access to Capacity Planner features. Note that google-cloud-capacity_planner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-capacity_planner instead. See the readme for more details." - gem.summary = "Provides programmatic access to Capacity Planner features." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb deleted file mode 100644 index 259df08043a4..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google-cloud-capacity_planner-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/capacity_planner/v1beta" diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb deleted file mode 100644 index 8e565c563f5a..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/capacity_planner/v1beta/usage_service" -require "google/cloud/capacity_planner/v1beta/version" - -module Google - module Cloud - module CapacityPlanner - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/capacity_planner/v1beta" - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/capacity_planner/v1beta" - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/capacity_planner/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/rest.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/rest.rb deleted file mode 100644 index b3f214c3645c..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/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/capacity_planner/v1beta/usage_service/rest" -require "google/cloud/capacity_planner/v1beta/version" - -module Google - module Cloud - module CapacityPlanner - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/capacity_planner/v1beta/rest" - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb deleted file mode 100644 index 820d8a6c4028..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/capacity_planner/v1beta/version" - -require "google/cloud/capacity_planner/v1beta/usage_service/credentials" -require "google/cloud/capacity_planner/v1beta/usage_service/paths" -require "google/cloud/capacity_planner/v1beta/usage_service/operations" -require "google/cloud/capacity_planner/v1beta/usage_service/client" -require "google/cloud/capacity_planner/v1beta/usage_service/rest" - -module Google - module Cloud - module CapacityPlanner - module V1beta - ## - # Provides access to historical and forecasted usage data. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/capacity_planner/v1beta/usage_service" - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/capacity_planner/v1beta/usage_service/rest" - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - module UsageService - end - end - end - end -end - -helper_path = ::File.join __dir__, "usage_service", "helpers.rb" -require "google/cloud/capacity_planner/v1beta/usage_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb deleted file mode 100644 index cffeda4412bb..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/client.rb +++ /dev/null @@ -1,1231 +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/capacityplanner/v1beta/usage_service_pb" - -module Google - module Cloud - module CapacityPlanner - module V1beta - module UsageService - ## - # Client for the UsageService service. - # - # Provides access to historical and forecasted usage data. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :usage_service_stub - - ## - # Configure the UsageService Client class. - # - # See {::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UsageService clients - # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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", "CapacityPlanner", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4, 13] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UsageService 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::CapacityPlanner::V1beta::UsageService::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 - @usage_service_stub.universe_domain - end - - ## - # Create a new UsageService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UsageService 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/capacityplanner/v1beta/usage_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 - - @usage_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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 - ) - - @usage_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @usage_service_stub.logger - end - - # Service calls - - ## - # Returns a list of the usage histories that are in the parent parameter - # and match your specified filters. - # - # @overload query_usage_histories(request, options = nil) - # Pass arguments to `query_usage_histories` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload query_usage_histories(parent: nil, location_level: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil) - # Pass arguments to `query_usage_histories` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # - # projects/{project}/locations/{location} or - # organizations/{organization}/locations/{location} or - # folders/{folder}/locations/{location} - # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @param is_spot [::Boolean] - # Optional. The is_spot flag is used to fetch the usage data for preemptible - # Resources. - # @param machine_family [::String] - # The machine family for the `UsageHistory` values to return. Possible values - # include "n1", and "n2d". See - # https://cloud.google.com/compute/docs/machine-types for more examples. - # Empty machine_family will return results matching all machine families. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the `UsageHistory` values to return. - # @param disk_type [::String] - # Optional. The disk_type for the `UsageHistory` values to return request - # with persistent-disk cloud_resource_type. Empty disk_type will return - # results matching all disk types. - # @param confidential_mode [::Boolean] - # Optional. Whether the persistent disk is in confidential mode. - # @param gpu_type [::String] - # Optional. The GPU type for the `UsageHistory` values to return. Sample - # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `UsageHistory` values to return. Empty - # tpu_type will return results matching all TPUs. - # @param cloud_resource_type [::String] - # Required. The resource for the `UsageHistory` values to return. Possible - # values include "gce-vcpus", "gce-ram", "gce-local-ssd", - # "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type - # will return results matching all resources. - # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # The method that should be used to convert sampled usage data to daily - # usage values. - # AGGREGATION_METHOD_UNSPECIFIED will return results matching all the - # aggregation methods. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of reservations usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of reservations usage. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new - # - # # Call the query_usage_histories method. - # result = client.query_usage_histories request - # - # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse. - # p result - # - def query_usage_histories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest - - # Converts hash 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.query_usage_histories.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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.query_usage_histories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.query_usage_histories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.call_rpc :query_usage_histories, 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 - - ## - # Returns a list of the forecasts that are in the parent parameter - # and match your specified filters. - # - # @overload query_forecasts(request, options = nil) - # Pass arguments to `query_forecasts` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload query_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, forecast_type: nil, prediction_interval: nil, aggregation_method: nil) - # Pass arguments to `query_forecasts` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param machine_family [::String] - # The machine family to use to select the `Forecast` values to return. - # Possible values include "n1", and "n2d". - # Empty machine_family will return results matching all machine families. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the time series values to return. - # @param disk_type [::String] - # Optional. The disk_type for the `Forecast` values to return with request - # persistent-disk cloud_resource_type. - # Empty disk_type will return results matching all disk types. - # @param confidential_mode [::Boolean] - # Optional. Whether the persistent disk is in confidential mode. - # @param gpu_type [::String] - # Optional. The GPU type for the `Forecast` values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type - # will return results matching all TPUs. - # @param cloud_resource_type [::String] - # Required. The resource for the `Forecast` values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", - # "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results - # matching all resources. - # @param forecast_type [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] - # The type of forecast to use to select the `Forecast` values to return. - # FORECAST_TYPE_UNSPECIFIED will return results matching all the forecast - # types. - # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] - # The prediction interval to use to select the `Forecast` values to return. - # PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction - # intervals. - # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Aggregation Method of the historical usage for which the forecast is - # generated - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new - # - # # Call the query_forecasts method. - # result = client.query_forecasts request - # - # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse. - # p result - # - def query_forecasts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest - - # Converts hash 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.query_forecasts.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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.query_forecasts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.query_forecasts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.call_rpc :query_forecasts, 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 - - ## - # Returns a list of the reservations that are in the parent parameter - # and match your specified filters. - # - # @overload query_reservations(request, options = nil) - # Pass arguments to `query_reservations` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload query_reservations(parent: nil, location_level: nil, machine_family: nil, machine_shape: nil, gpu_type: nil, cloud_resource_type: nil, reservation_type: nil, share_type: nil, ownership_type: nil, reservation_data_level: nil, include_unapproved_reservations: nil, aggregation_method: nil, start_date: nil, end_date: nil) - # Pass arguments to `query_reservations` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @param machine_family [::String] - # Optional. The machine family to use to select the aggregate reserved values - # to return. Possible values include "n1", and "n2d" etc. Empty - # machine_family will return results matching all machine families. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine_shape as a filter to select matching reservations. - # @param gpu_type [::String] - # Optional. The GPU type for the reserved values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param cloud_resource_type [::String] - # Required. The resource for the reserved values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm". - # @param reservation_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationType] - # Required. The Reservation type for example, future reservation request and - # allocation. If unspecified, all types are - # included. - # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ShareType] - # Optional. Types of share settings to filter reservations in response. If - # unspecified, all types are included. - # @param ownership_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::OwnershipType] - # Optional. Types of ownerships to filter reservations based on. - # In case of OWNED, it filters reservations which are owned by selected - # parent project/folder/organization. If unspecified, all types are - # included. - # @param reservation_data_level [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationDataLevel] - # Required. Reservations output data format. - # @param include_unapproved_reservations [::Boolean] - # Optional. Whether to include pending for approval reservations in the - # response. This field is only applicable for future reservations. - # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. Aggregation Method of the historical reservation usage - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of reservations usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of reservations usage. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new - # - # # Call the query_reservations method. - # result = client.query_reservations request - # - # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse. - # p result - # - def query_reservations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest - - # Converts hash 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.query_reservations.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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.query_reservations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.query_reservations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.call_rpc :query_reservations, 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 - - ## - # Exports historical usage data requested by user into either an existing - # Cloud Storage bucket or a BigQuery table. - # - # @overload export_usage_histories(request, options = nil) - # Pass arguments to `export_usage_histories` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_usage_histories(parent: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) - # Pass arguments to `export_usage_histories` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param is_spot [::Boolean] - # Optional. Set true to export usage for spot resources. - # @param machine_family [::String] - # Optional. The machine family for the `UsageHistory` values to return. - # Possible values include "n1", and "n2d". See - # https://cloud.google.com/compute/docs/machine-types for more examples. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the time series values to export. - # @param disk_type [::String] - # Optional. The disk_type for the `UsageHistory` values to return request - # with persistent-disk resource_type. Possible values include "pd-ssd", - # "pd-standard", "pd-balanced", and "pd-extreme". - # @param gpu_type [::String] - # Optional. The GPU type for the `UsageHistory` values to return. Sample - # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `UsageHistory` values to return. Empty - # tpu_type will return results matching all TPUs. - # @param resource_type [::String] - # Required. The resource for the `UsageHistory` values to return. Possible - # values include "gce-vcpus", "gce-ram", "gce-local-ssd", - # "gce-persistent-disk", "gce-gpu" and "gce-tpu". - # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. The method that should be used to convert sampled usage data to - # daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results - # matching all the aggregation methods. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of usage. - # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # - # @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/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new - # - # # Call the export_usage_histories method. - # result = client.export_usage_histories 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 export_usage_histories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest - - # Converts hash 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.export_usage_histories.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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_usage_histories.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_usage_histories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.call_rpc :export_usage_histories, 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 - - ## - # Exports forecasted usage data requested by user into either an existing - # Cloud Storage bucket or a BigQuery table. - # - # @overload export_forecasts(request, options = nil) - # Pass arguments to `export_forecasts` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, prediction_interval: nil, aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) - # Pass arguments to `export_forecasts` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param machine_family [::String] - # Optional. The machine family to use to select the `Forecast` values to - # return. Possible values include "n1", and "n2d". - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the time series values to export. - # @param disk_type [::String] - # Optional. The disk_type for the `Forecast` values to return with request - # persistent-disk resource_type. - # @param gpu_type [::String] - # Optional. The GPU type for the `Forecast` values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type - # will return results matching all TPUs. - # @param resource_type [::String] - # Required. The resource for the `Forecast` values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", - # "gce-gpu" and "gce-tpu". - # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] - # Optional. The prediction interval to use to select the `Forecast` values to - # return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all - # prediction intervals. - # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. Aggregation Method of the historical usage for which the forecast - # is generated. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of forecasts. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of forecasts. - # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # - # @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/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new - # - # # Call the export_forecasts method. - # result = client.export_forecasts 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 export_forecasts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest - - # Converts hash 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.export_forecasts.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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_forecasts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_forecasts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.call_rpc :export_forecasts, 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 - - ## - # Exports reservations usage data requested by user into either an existing - # Cloud Storage bucket or a new/existing BigQuery table. - # - # @overload export_reservations_usage(request, options = nil) - # Pass arguments to `export_reservations_usage` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_reservations_usage(machine_family: nil, machine_shape: nil, gpu_type: nil, parent: nil, location_level: nil, cloud_resource_type: nil, usage_aggregation_method: nil, share_type: nil, start_date: nil, end_date: nil, output_config: nil) - # Pass arguments to `export_reservations_usage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param machine_family [::String] - # Optional. The machine family to query reservations and usage by. For - # example: n1, n2d. - # - # Note: The following parameters are mutually exclusive: `machine_family`, `machine_shape`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine_shape as a filter to select matching reservations - # and its usage. - # - # Note: The following parameters are mutually exclusive: `machine_shape`, `machine_family`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param gpu_type [::String] - # Optional. The GPU type to query reservations and usage by. For example: - # NVIDIA T4. - # - # Note: The following parameters are mutually exclusive: `gpu_type`, `machine_family`, `machine_shape`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The compute engine resource and location of the - # reservationsusage. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @param cloud_resource_type [::String] - # Required. The resource for the `ReservationsUsage` values to return. - # Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and - # "gce-gpu". - # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Required. The method that should be used to convert sampled reservations - # data to daily usage values. - # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest::ShareType] - # Optional. Type of share settings to filter reservations in response. If - # unspecified, all types are included. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of reservations usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of reservations usage. - # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # - # @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/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new - # - # # Call the export_reservations_usage method. - # result = client.export_reservations_usage 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 export_reservations_usage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest - - # Converts hash 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.export_reservations_usage.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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_reservations_usage.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_reservations_usage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.call_rpc :export_reservations_usage, 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 UsageService API. - # - # This class represents the configuration for UsageService, - # 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::CapacityPlanner::V1beta::UsageService::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 - # # query_usage_histories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.query_usage_histories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.query_usage_histories.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::CapacityPlanner::V1beta::UsageService::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 = "capacityplanner.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 UsageService 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 `query_usage_histories` - # @return [::Gapic::Config::Method] - # - attr_reader :query_usage_histories - ## - # RPC-specific configuration for `query_forecasts` - # @return [::Gapic::Config::Method] - # - attr_reader :query_forecasts - ## - # RPC-specific configuration for `query_reservations` - # @return [::Gapic::Config::Method] - # - attr_reader :query_reservations - ## - # RPC-specific configuration for `export_usage_histories` - # @return [::Gapic::Config::Method] - # - attr_reader :export_usage_histories - ## - # RPC-specific configuration for `export_forecasts` - # @return [::Gapic::Config::Method] - # - attr_reader :export_forecasts - ## - # RPC-specific configuration for `export_reservations_usage` - # @return [::Gapic::Config::Method] - # - attr_reader :export_reservations_usage - - # @private - def initialize parent_rpcs = nil - query_usage_histories_config = parent_rpcs.query_usage_histories if parent_rpcs.respond_to? :query_usage_histories - @query_usage_histories = ::Gapic::Config::Method.new query_usage_histories_config - query_forecasts_config = parent_rpcs.query_forecasts if parent_rpcs.respond_to? :query_forecasts - @query_forecasts = ::Gapic::Config::Method.new query_forecasts_config - query_reservations_config = parent_rpcs.query_reservations if parent_rpcs.respond_to? :query_reservations - @query_reservations = ::Gapic::Config::Method.new query_reservations_config - export_usage_histories_config = parent_rpcs.export_usage_histories if parent_rpcs.respond_to? :export_usage_histories - @export_usage_histories = ::Gapic::Config::Method.new export_usage_histories_config - export_forecasts_config = parent_rpcs.export_forecasts if parent_rpcs.respond_to? :export_forecasts - @export_forecasts = ::Gapic::Config::Method.new export_forecasts_config - export_reservations_usage_config = parent_rpcs.export_reservations_usage if parent_rpcs.respond_to? :export_reservations_usage - @export_reservations_usage = ::Gapic::Config::Method.new export_reservations_usage_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.rb deleted file mode 100644 index ea4ccaef3e70..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module CapacityPlanner - module V1beta - module UsageService - # Credentials for the UsageService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/devstorage.full_control" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/operations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/operations.rb deleted file mode 100644 index 0731abc7bbca..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/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 CapacityPlanner - module V1beta - module UsageService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the UsageService 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 UsageService 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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_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::CapacityPlanner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - 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 = "capacityplanner.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-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb deleted file mode 100644 index e80872a6f86f..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/paths.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CapacityPlanner - module V1beta - module UsageService - # Path helper methods for the UsageService API. - module Paths - ## - # 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 - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb deleted file mode 100644 index 47ef6d973505..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/capacity_planner/v1beta/version" - -require "google/cloud/capacity_planner/v1beta/usage_service/credentials" -require "google/cloud/capacity_planner/v1beta/usage_service/paths" -require "google/cloud/capacity_planner/v1beta/usage_service/rest/operations" -require "google/cloud/capacity_planner/v1beta/usage_service/rest/client" - -module Google - module Cloud - module CapacityPlanner - module V1beta - ## - # Provides access to historical and forecasted usage data. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/capacity_planner/v1beta/usage_service/rest" - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - module UsageService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/capacity_planner/v1beta/usage_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb deleted file mode 100644 index 948562c616db..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/client.rb +++ /dev/null @@ -1,1146 +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/capacityplanner/v1beta/usage_service_pb" -require "google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub" - -module Google - module Cloud - module CapacityPlanner - module V1beta - module UsageService - module Rest - ## - # REST client for the UsageService service. - # - # Provides access to historical and forecasted usage data. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :usage_service_stub - - ## - # Configure the UsageService Client class. - # - # See {::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all UsageService clients - # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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", "CapacityPlanner", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4, 13] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the UsageService 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::CapacityPlanner::V1beta::UsageService::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 - @usage_service_stub.universe_domain - end - - ## - # Create a new UsageService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the UsageService 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::CapacityPlanner::V1beta::UsageService::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 - - @usage_service_stub = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @usage_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @usage_service_stub.logger - end - - # Service calls - - ## - # Returns a list of the usage histories that are in the parent parameter - # and match your specified filters. - # - # @overload query_usage_histories(request, options = nil) - # Pass arguments to `query_usage_histories` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload query_usage_histories(parent: nil, location_level: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil) - # Pass arguments to `query_usage_histories` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # - # projects/{project}/locations/{location} or - # organizations/{organization}/locations/{location} or - # folders/{folder}/locations/{location} - # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @param is_spot [::Boolean] - # Optional. The is_spot flag is used to fetch the usage data for preemptible - # Resources. - # @param machine_family [::String] - # The machine family for the `UsageHistory` values to return. Possible values - # include "n1", and "n2d". See - # https://cloud.google.com/compute/docs/machine-types for more examples. - # Empty machine_family will return results matching all machine families. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the `UsageHistory` values to return. - # @param disk_type [::String] - # Optional. The disk_type for the `UsageHistory` values to return request - # with persistent-disk cloud_resource_type. Empty disk_type will return - # results matching all disk types. - # @param confidential_mode [::Boolean] - # Optional. Whether the persistent disk is in confidential mode. - # @param gpu_type [::String] - # Optional. The GPU type for the `UsageHistory` values to return. Sample - # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `UsageHistory` values to return. Empty - # tpu_type will return results matching all TPUs. - # @param cloud_resource_type [::String] - # Required. The resource for the `UsageHistory` values to return. Possible - # values include "gce-vcpus", "gce-ram", "gce-local-ssd", - # "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type - # will return results matching all resources. - # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # The method that should be used to convert sampled usage data to daily - # usage values. - # AGGREGATION_METHOD_UNSPECIFIED will return results matching all the - # aggregation methods. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of reservations usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of reservations usage. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new - # - # # Call the query_usage_histories method. - # result = client.query_usage_histories request - # - # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse. - # p result - # - def query_usage_histories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest - - # Converts hash 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.query_usage_histories.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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.query_usage_histories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.query_usage_histories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.query_usage_histories 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 - - ## - # Returns a list of the forecasts that are in the parent parameter - # and match your specified filters. - # - # @overload query_forecasts(request, options = nil) - # Pass arguments to `query_forecasts` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload query_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, confidential_mode: nil, gpu_type: nil, tpu_type: nil, cloud_resource_type: nil, forecast_type: nil, prediction_interval: nil, aggregation_method: nil) - # Pass arguments to `query_forecasts` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param machine_family [::String] - # The machine family to use to select the `Forecast` values to return. - # Possible values include "n1", and "n2d". - # Empty machine_family will return results matching all machine families. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the time series values to return. - # @param disk_type [::String] - # Optional. The disk_type for the `Forecast` values to return with request - # persistent-disk cloud_resource_type. - # Empty disk_type will return results matching all disk types. - # @param confidential_mode [::Boolean] - # Optional. Whether the persistent disk is in confidential mode. - # @param gpu_type [::String] - # Optional. The GPU type for the `Forecast` values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type - # will return results matching all TPUs. - # @param cloud_resource_type [::String] - # Required. The resource for the `Forecast` values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", - # "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results - # matching all resources. - # @param forecast_type [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] - # The type of forecast to use to select the `Forecast` values to return. - # FORECAST_TYPE_UNSPECIFIED will return results matching all the forecast - # types. - # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] - # The prediction interval to use to select the `Forecast` values to return. - # PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction - # intervals. - # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Aggregation Method of the historical usage for which the forecast is - # generated - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new - # - # # Call the query_forecasts method. - # result = client.query_forecasts request - # - # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse. - # p result - # - def query_forecasts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest - - # Converts hash 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.query_forecasts.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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.query_forecasts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.query_forecasts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.query_forecasts 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 - - ## - # Returns a list of the reservations that are in the parent parameter - # and match your specified filters. - # - # @overload query_reservations(request, options = nil) - # Pass arguments to `query_reservations` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload query_reservations(parent: nil, location_level: nil, machine_family: nil, machine_shape: nil, gpu_type: nil, cloud_resource_type: nil, reservation_type: nil, share_type: nil, ownership_type: nil, reservation_data_level: nil, include_unapproved_reservations: nil, aggregation_method: nil, start_date: nil, end_date: nil) - # Pass arguments to `query_reservations` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @param machine_family [::String] - # Optional. The machine family to use to select the aggregate reserved values - # to return. Possible values include "n1", and "n2d" etc. Empty - # machine_family will return results matching all machine families. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine_shape as a filter to select matching reservations. - # @param gpu_type [::String] - # Optional. The GPU type for the reserved values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param cloud_resource_type [::String] - # Required. The resource for the reserved values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm". - # @param reservation_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationType] - # Required. The Reservation type for example, future reservation request and - # allocation. If unspecified, all types are - # included. - # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ShareType] - # Optional. Types of share settings to filter reservations in response. If - # unspecified, all types are included. - # @param ownership_type [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::OwnershipType] - # Optional. Types of ownerships to filter reservations based on. - # In case of OWNED, it filters reservations which are owned by selected - # parent project/folder/organization. If unspecified, all types are - # included. - # @param reservation_data_level [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationDataLevel] - # Required. Reservations output data format. - # @param include_unapproved_reservations [::Boolean] - # Optional. Whether to include pending for approval reservations in the - # response. This field is only applicable for future reservations. - # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. Aggregation Method of the historical reservation usage - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of reservations usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of reservations usage. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new - # - # # Call the query_reservations method. - # result = client.query_reservations request - # - # # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse. - # p result - # - def query_reservations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest - - # Converts hash 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.query_reservations.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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.query_reservations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.query_reservations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.query_reservations 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 - - ## - # Exports historical usage data requested by user into either an existing - # Cloud Storage bucket or a BigQuery table. - # - # @overload export_usage_histories(request, options = nil) - # Pass arguments to `export_usage_histories` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_usage_histories(parent: nil, is_spot: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, usage_aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) - # Pass arguments to `export_usage_histories` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param is_spot [::Boolean] - # Optional. Set true to export usage for spot resources. - # @param machine_family [::String] - # Optional. The machine family for the `UsageHistory` values to return. - # Possible values include "n1", and "n2d". See - # https://cloud.google.com/compute/docs/machine-types for more examples. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the time series values to export. - # @param disk_type [::String] - # Optional. The disk_type for the `UsageHistory` values to return request - # with persistent-disk resource_type. Possible values include "pd-ssd", - # "pd-standard", "pd-balanced", and "pd-extreme". - # @param gpu_type [::String] - # Optional. The GPU type for the `UsageHistory` values to return. Sample - # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `UsageHistory` values to return. Empty - # tpu_type will return results matching all TPUs. - # @param resource_type [::String] - # Required. The resource for the `UsageHistory` values to return. Possible - # values include "gce-vcpus", "gce-ram", "gce-local-ssd", - # "gce-persistent-disk", "gce-gpu" and "gce-tpu". - # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. The method that should be used to convert sampled usage data to - # daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results - # matching all the aggregation methods. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of usage. - # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # @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/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new - # - # # Call the export_usage_histories method. - # result = client.export_usage_histories 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 export_usage_histories request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest - - # Converts hash 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.export_usage_histories.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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_usage_histories.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_usage_histories.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.export_usage_histories 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 - - ## - # Exports forecasted usage data requested by user into either an existing - # Cloud Storage bucket or a BigQuery table. - # - # @overload export_forecasts(request, options = nil) - # Pass arguments to `export_forecasts` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_forecasts(parent: nil, machine_family: nil, machine_shape: nil, disk_type: nil, gpu_type: nil, tpu_type: nil, resource_type: nil, prediction_interval: nil, aggregation_method: nil, start_date: nil, end_date: nil, output_config: nil) - # Pass arguments to `export_forecasts` via keyword arguments. Note that at - # least one keyword argument is 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 compute engine resource and location for the time series - # values to return. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param machine_family [::String] - # Optional. The machine family to use to select the `Forecast` values to - # return. Possible values include "n1", and "n2d". - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine shape for the time series values to export. - # @param disk_type [::String] - # Optional. The disk_type for the `Forecast` values to return with request - # persistent-disk resource_type. - # @param gpu_type [::String] - # Optional. The GPU type for the `Forecast` values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @param tpu_type [::String] - # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type - # will return results matching all TPUs. - # @param resource_type [::String] - # Required. The resource for the `Forecast` values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", - # "gce-gpu" and "gce-tpu". - # @param prediction_interval [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] - # Optional. The prediction interval to use to select the `Forecast` values to - # return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all - # prediction intervals. - # @param aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. Aggregation Method of the historical usage for which the forecast - # is generated. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of forecasts. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of forecasts. - # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # @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/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new - # - # # Call the export_forecasts method. - # result = client.export_forecasts 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 export_forecasts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest - - # Converts hash 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.export_forecasts.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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_forecasts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_forecasts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.export_forecasts 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 - - ## - # Exports reservations usage data requested by user into either an existing - # Cloud Storage bucket or a new/existing BigQuery table. - # - # @overload export_reservations_usage(request, options = nil) - # Pass arguments to `export_reservations_usage` via a request object, either of type - # {::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_reservations_usage(machine_family: nil, machine_shape: nil, gpu_type: nil, parent: nil, location_level: nil, cloud_resource_type: nil, usage_aggregation_method: nil, share_type: nil, start_date: nil, end_date: nil, output_config: nil) - # Pass arguments to `export_reservations_usage` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param machine_family [::String] - # Optional. The machine family to query reservations and usage by. For - # example: n1, n2d. - # - # Note: The following parameters are mutually exclusive: `machine_family`, `machine_shape`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param machine_shape [::Google::Cloud::CapacityPlanner::V1beta::MachineShape, ::Hash] - # Optional. The machine_shape as a filter to select matching reservations - # and its usage. - # - # Note: The following parameters are mutually exclusive: `machine_shape`, `machine_family`, `gpu_type`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param gpu_type [::String] - # Optional. The GPU type to query reservations and usage by. For example: - # NVIDIA T4. - # - # Note: The following parameters are mutually exclusive: `gpu_type`, `machine_family`, `machine_shape`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param parent [::String] - # Required. The compute engine resource and location of the - # reservationsusage. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @param location_level [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @param cloud_resource_type [::String] - # Required. The resource for the `ReservationsUsage` values to return. - # Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and - # "gce-gpu". - # @param usage_aggregation_method [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Required. The method that should be used to convert sampled reservations - # data to daily usage values. - # @param share_type [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest::ShareType] - # Optional. Type of share settings to filter reservations in response. If - # unspecified, all types are included. - # @param start_date [::Google::Type::Date, ::Hash] - # Optional. The start date of reservations usage. - # @param end_date [::Google::Type::Date, ::Hash] - # Optional. The end date of reservations usage. - # @param output_config [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig, ::Hash] - # Required. Output configuration indicating where the results will be output - # to. - # @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/capacity_planner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new - # - # # Call the export_reservations_usage method. - # result = client.export_reservations_usage 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 export_reservations_usage request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest - - # Converts hash 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.export_reservations_usage.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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_reservations_usage.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_reservations_usage.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @usage_service_stub.export_reservations_usage 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 class for the UsageService REST API. - # - # This class represents the configuration for UsageService 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::CapacityPlanner::V1beta::UsageService::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 - # # query_usage_histories to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.query_usage_histories.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.query_usage_histories.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 = "capacityplanner.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 UsageService 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 `query_usage_histories` - # @return [::Gapic::Config::Method] - # - attr_reader :query_usage_histories - ## - # RPC-specific configuration for `query_forecasts` - # @return [::Gapic::Config::Method] - # - attr_reader :query_forecasts - ## - # RPC-specific configuration for `query_reservations` - # @return [::Gapic::Config::Method] - # - attr_reader :query_reservations - ## - # RPC-specific configuration for `export_usage_histories` - # @return [::Gapic::Config::Method] - # - attr_reader :export_usage_histories - ## - # RPC-specific configuration for `export_forecasts` - # @return [::Gapic::Config::Method] - # - attr_reader :export_forecasts - ## - # RPC-specific configuration for `export_reservations_usage` - # @return [::Gapic::Config::Method] - # - attr_reader :export_reservations_usage - - # @private - def initialize parent_rpcs = nil - query_usage_histories_config = parent_rpcs.query_usage_histories if parent_rpcs.respond_to? :query_usage_histories - @query_usage_histories = ::Gapic::Config::Method.new query_usage_histories_config - query_forecasts_config = parent_rpcs.query_forecasts if parent_rpcs.respond_to? :query_forecasts - @query_forecasts = ::Gapic::Config::Method.new query_forecasts_config - query_reservations_config = parent_rpcs.query_reservations if parent_rpcs.respond_to? :query_reservations - @query_reservations = ::Gapic::Config::Method.new query_reservations_config - export_usage_histories_config = parent_rpcs.export_usage_histories if parent_rpcs.respond_to? :export_usage_histories - @export_usage_histories = ::Gapic::Config::Method.new export_usage_histories_config - export_forecasts_config = parent_rpcs.export_forecasts if parent_rpcs.respond_to? :export_forecasts - @export_forecasts = ::Gapic::Config::Method.new export_forecasts_config - export_reservations_usage_config = parent_rpcs.export_reservations_usage if parent_rpcs.respond_to? :export_reservations_usage - @export_reservations_usage = ::Gapic::Config::Method.new export_reservations_usage_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/operations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/operations.rb deleted file mode 100644 index 197309513187..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/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 CapacityPlanner - module V1beta - module UsageService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "capacityplanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the UsageService 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 UsageService 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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_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::CapacityPlanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_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 = "capacityplanner.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}", - matches: [ - ["name", %r{^operations/?$}, 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{^operations(?:/.*)?$}, true] - ] - ) - 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{^operations(?:/.*)?$}, true] - ] - ) - 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{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb deleted file mode 100644 index 9cc72c0835fb..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/usage_service/rest/service_stub.rb +++ /dev/null @@ -1,546 +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/capacityplanner/v1beta/usage_service_pb" - -module Google - module Cloud - module CapacityPlanner - module V1beta - module UsageService - module Rest - ## - # REST service stub for the UsageService 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 query_usage_histories REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest] - # 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::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse] - # A result object deserialized from the server's reply - def query_usage_histories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_query_usage_histories_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: "query_usage_histories", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the query_forecasts REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest] - # 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::CapacityPlanner::V1beta::QueryForecastsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse] - # A result object deserialized from the server's reply - def query_forecasts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_query_forecasts_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: "query_forecasts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the query_reservations REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest] - # 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::CapacityPlanner::V1beta::QueryReservationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse] - # A result object deserialized from the server's reply - def query_reservations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_query_reservations_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: "query_reservations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_usage_histories REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest] - # 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 export_usage_histories request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_usage_histories_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: "export_usage_histories", - 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 export_forecasts REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest] - # 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 export_forecasts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_forecasts_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: "export_forecasts", - 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 export_reservations_usage REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest] - # 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 export_reservations_usage request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_reservations_usage_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: "export_reservations_usage", - 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 query_usage_histories REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_query_usage_histories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/usageHistories:query", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/usageHistories:query", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/usageHistories:query", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the query_forecasts REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_query_forecasts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/forecasts:query", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/forecasts:query", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/forecasts:query", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the query_reservations REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_query_reservations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/reservations:query", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/reservations:query", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/reservations:query", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_usage_histories REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_usage_histories_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/usageHistories:export", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/usageHistories:export", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/usageHistories:export", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_forecasts REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_forecasts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/forecasts:export", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/forecasts:export", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/forecasts:export", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_reservations_usage REST call - # - # @param request_pb [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_reservations_usage_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/reservationsUsage:export", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/reservationsUsage:export", - body: "*", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/reservationsUsage:export", - body: "*", - matches: [ - ["parent", %r{^folders/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb deleted file mode 100644 index 6a241736f014..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacity_planner/v1beta/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CapacityPlanner - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb deleted file mode 100644 index 6557df6e7ed4..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/allocation_pb.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/capacityplanner/v1beta/allocation.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/capacityplanner/v1beta/allocation.proto\x12#google.cloud.capacityplanner.v1beta\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd4\r\n\nAllocation\x12\x64\n\x13specific_allocation\x18\x06 \x01(\x0b\x32\x45.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocationH\x00\x12\n\n\x02id\x18\x01 \x01(\x03\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04zone\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x12\n\nallocation\x18\x05 \x01(\t\x12\x18\n\x10owner_project_id\x18\n \x01(\t\x12\x46\n\x06status\x18\x07 \x01(\x0e\x32\x36.google.cloud.capacityplanner.v1beta.Allocation.Status\x12U\n\x0eshare_settings\x18\x08 \x01(\x0b\x32=.google.cloud.capacityplanner.v1beta.Allocation.ShareSettings\x12\x34\n\x10\x61uto_delete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x85\x07\n\x15SpecificSKUAllocation\x12~\n\x13instance_properties\x18\x01 \x01(\x0b\x32\x61.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties\x12\r\n\x05\x63ount\x18\x02 \x01(\x03\x12\x12\n\nused_count\x18\x03 \x01(\x03\x12\x15\n\rassured_count\x18\x04 \x01(\x03\x1a\xb1\x05\n\x1b\x41llocatedInstanceProperties\x12\x14\n\x0cmachine_type\x18\x01 \x01(\t\x12\x8e\x01\n\x11guest_accelerator\x18\x02 \x03(\x0b\x32s.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AcceleratorConfig\x12\x18\n\x10min_cpu_platform\x18\x03 \x01(\t\x12\x82\x01\n\tlocal_ssd\x18\x04 \x03(\x0b\x32o.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk\x1a\x30\n\x11\x41\x63\x63\x65leratorConfig\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x05\x1a\x99\x02\n\rAllocatedDisk\x12\x14\n\x0c\x64isk_size_gb\x18\x01 \x01(\x03\x12\x95\x01\n\x0e\x64isk_interface\x18\x02 \x01(\x0e\x32}.google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk.DiskInterface\"Z\n\rDiskInterface\x12\x1e\n\x1a\x44ISK_INTERFACE_UNSPECIFIED\x10\x00\x12\x08\n\x04SCSI\x10\x01\x12\x08\n\x04NVME\x10\x02\x12\n\n\x06NVDIMM\x10\x03\x12\t\n\x05ISCSI\x10\x04\x1a\x88\x02\n\rShareSettings\x12[\n\nshare_type\x18\x01 \x01(\x0e\x32G.google.cloud.capacityplanner.v1beta.Allocation.ShareSettings.ShareType\x12\x10\n\x08projects\x18\x02 \x03(\t\"\x87\x01\n\tShareType\x12\x1a\n\x16SHARE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cORGANIZATION\x10\x01\x12\x15\n\x11SPECIFIC_PROJECTS\x10\x02\x12\t\n\x05LOCAL\x10\x03\x12*\n&DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS\x10\x04\"b\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07INVALID\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0c\n\x08UPDATING\x10\x05\x42\x06\n\x04typeB\x84\x02\n\'com.google.cloud.capacityplanner.v1betaB\x0f\x41llocationProtoP\x01ZQcloud.google.com/go/capacityplanner/apiv1beta/capacityplannerpb;capacityplannerpb\xaa\x02#Google.Cloud.CapacityPlanner.V1Beta\xca\x02#Google\\Cloud\\CapacityPlanner\\V1beta\xea\x02&Google::Cloud::CapacityPlanner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CapacityPlanner - module V1beta - Allocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation").msgclass - Allocation::SpecificSKUAllocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation").msgclass - Allocation::SpecificSKUAllocation::AllocatedInstanceProperties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties").msgclass - Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AcceleratorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AcceleratorConfig").msgclass - Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk").msgclass - Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk::DiskInterface = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.SpecificSKUAllocation.AllocatedInstanceProperties.AllocatedDisk.DiskInterface").enummodule - Allocation::ShareSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.ShareSettings").msgclass - Allocation::ShareSettings::ShareType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.ShareSettings.ShareType").enummodule - Allocation::Status = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Allocation.Status").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb deleted file mode 100644 index 1dca0ce75e1f..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/future_reservation_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/capacityplanner/v1beta/future_reservation.proto - -require 'google/protobuf' - -require 'google/cloud/capacityplanner/v1beta/allocation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PROJECT\x10\x01\x12\n\n\x06\x46OLDER\x10\x02\x12\x07\n\x03ORG\x10\x03\"\x91\x01\n\rResourceIdKey\x12\x1c\n\rresource_code\x18\x02 \x01(\tB\x03\xe0\x41\x02H\x00\x12Q\n\x0bresource_id\x18\x01 \x01(\x0b\x32\x37.google.cloud.capacityplanner.v1beta.ResourceIdentifierB\x03\xe0\x41\x02\x42\x0f\n\rdemand_fields\"\x96\x01\n\x12ResourceIdentifier\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12\x15\n\rresource_name\x18\x02 \x01(\t\x12S\n\x13resource_attributes\x18\x03 \x03(\x0b\x32\x36.google.cloud.capacityplanner.v1beta.ResourceAttribute\"c\n\x11ResourceAttribute\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x41\n\x05value\x18\x02 \x01(\x0b\x32\x32.google.cloud.capacityplanner.v1beta.ResourceValue\"\x83\x01\n\rResourceValue\x12\x37\n\x04unit\x18\x01 \x01(\x0e\x32).google.cloud.capacityplanner.v1beta.Unit\x12\x39\n\x05value\x18\x02 \x01(\x0b\x32*.google.cloud.capacityplanner.v1beta.Value\"m\n\x05Value\x12\x15\n\x0bint64_value\x18\x01 \x01(\x03H\x00\x12\x16\n\x0cstring_value\x18\x02 \x01(\tH\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x14\n\nbool_value\x18\x04 \x01(\x08H\x00\x42\x07\n\x05value*\xec\x01\n\x04Unit\x12\x14\n\x10UNIT_UNSPECIFIED\x10\x00\x12\x0e\n\nUNIT_COUNT\x10\x01\x12\x06\n\x02KB\x10\x02\x12\x06\n\x02GB\x10\x03\x12\x06\n\x02TB\x10\x04\x12\x07\n\x03MIB\x10\x11\x12\x07\n\x03GIB\x10\x05\x12\x07\n\x03TIB\x10\x06\x12\x07\n\x03QPS\x10\x07\x12\x06\n\x02MB\x10\x08\x12\x07\n\x03PIB\x10\t\x12\x0c\n\x04TBPS\x10\n\x1a\x02\x08\x01\x12\r\n\tGBPS_BITS\x10\x0b\x12\x0c\n\x08GIB_BITS\x10\x0c\x12\r\n\tMBPS_BITS\x10\r\x12\x0e\n\nMBPS_BYTES\x10\x0e\x12\r\n\tTBPS_BITS\x10\x0f\x12\x0e\n\nTBPS_BYTES\x10\x10\x12\x08\n\x04KOPS\x10\x12\x42\x82\x02\n\'com.google.cloud.capacityplanner.v1betaB\rResourceProtoP\x01ZQcloud.google.com/go/capacityplanner/apiv1beta/capacityplannerpb;capacityplannerpb\xaa\x02#Google.Cloud.CapacityPlanner.V1Beta\xca\x02#Google\\Cloud\\CapacityPlanner\\V1beta\xea\x02&Google::Cloud::CapacityPlanner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CapacityPlanner - module V1beta - ResourceContainer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceContainer").msgclass - ResourceContainer::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceContainer.Type").enummodule - ResourceIdKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceIdKey").msgclass - ResourceIdentifier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceIdentifier").msgclass - ResourceAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceAttribute").msgclass - ResourceValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.ResourceValue").msgclass - Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Value").msgclass - Unit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.capacityplanner.v1beta.Unit").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb deleted file mode 100644 index 72d7c4b3a62e..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/lib/google/cloud/capacityplanner/v1beta/usage_service_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/capacityplanner/v1beta/usage_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/capacityplanner/v1beta/allocation_pb' -require 'google/cloud/capacityplanner/v1beta/future_reservation_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' - - -descriptor_data = "\n7google/cloud/capacityplanner/v1beta/usage_service.proto\x12#google.cloud.capacityplanner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x34google/cloud/capacityplanner/v1beta/allocation.proto\x1a.google.cloud.capacityplanner.v1beta.QueryReservationsResponse\"\xcc\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02\xbc\x01\x12:/v1beta/{parent=projects/*/locations/*}/reservations:queryZA\x12?/v1beta/{parent=organizations/*/locations/*}/reservations:queryZ;\x12\x39/v1beta/{parent=folders/*/locations/*}/reservations:query\x12\x83\x03\n\x14\x45xportUsageHistories\x12@.google.cloud.capacityplanner.v1beta.ExportUsageHistoriesRequest\x1a\x1d.google.longrunning.Operation\"\x89\x02\xca\x41\x31\n\x1c\x45xportUsageHistoriesResponse\x12\x11OperationMetadata\x82\xd3\xe4\x93\x02\xce\x01\"=/v1beta/{parent=projects/*/locations/*}/usageHistories:export:\x01*ZG\"B/v1beta/{parent=organizations/*/locations/*}/usageHistories:export:\x01*ZA\"] - # 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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb deleted file mode 100644 index fd3d03327fdd..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/allocation.rb +++ /dev/null @@ -1,206 +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 CapacityPlanner - module V1beta - # Repesents Allocation which is part of aggregated - # reservations data response of "QueryReservations". - # @!attribute [rw] specific_allocation - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation] - # Reservation for instances with specific machine shapes. - # @!attribute [rw] id - # @return [::Integer] - # The unique identifier for the resource. This identifier is - # defined by the server. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation timestamp for this allocation. - # @!attribute [rw] zone - # @return [::String] - # Zone in which the reservation resides. - # @!attribute [rw] description - # @return [::String] - # A description while creating reservation. - # @!attribute [rw] allocation - # @return [::String] - # The reservation resource name. - # @!attribute [rw] owner_project_id - # @return [::String] - # @!attribute [rw] status - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::Status] - # The status of the reservation. - # @!attribute [rw] share_settings - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::ShareSettings] - # Specify share-settings to create a shared reservation. - # @!attribute [rw] auto_delete_time - # @return [::Google::Protobuf::Timestamp] - # Absolute time in future when the reservation will be - # auto-deleted by Compute Engine. - class Allocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This reservation type allows to pre allocate specific instance - # configuration. - # @!attribute [rw] instance_properties - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties] - # The instance properties for the reservation. - # @!attribute [rw] count - # @return [::Integer] - # Specifies the number of resources that are allocated. - # @!attribute [rw] used_count - # @return [::Integer] - # Indicates how many instances are in use. - # @!attribute [rw] assured_count - # @return [::Integer] - # Indicates how many instances are actually usable currently. - class SpecificSKUAllocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Properties of the SKU instances being reserved. - # @!attribute [rw] machine_type - # @return [::String] - # Specifies type of machine (name only) which has fixed number of vCPUs - # and fixed amount of memory. This also includes specifying custom - # machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern. - # @!attribute [rw] guest_accelerator - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AcceleratorConfig>] - # Specifies accelerator type and count. - # @!attribute [rw] min_cpu_platform - # @return [::String] - # Minimum cpu platform the reservation. - # @!attribute [rw] local_ssd - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk>] - # Specifies amount of local ssd to reserve with each instance. The type - # of disk is local-ssd. - class AllocatedInstanceProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A specification of the type and number of accelerator cards attached to - # the instance. - # @!attribute [rw] type - # @return [::String] - # Accelerator name. - # See https://cloud.google.com/compute/docs/gpus/#introduction for a - # full list of accelerator types. - # @!attribute [rw] count - # @return [::Integer] - # The number of the guest accelerator cards exposed to this instance. - class AcceleratorConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A specification of the interface and size of disk attached to - # the instance. - # @!attribute [rw] disk_size_gb - # @return [::Integer] - # Specifies the size of the disk in base-2 GB. - # @!attribute [rw] disk_interface - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties::AllocatedDisk::DiskInterface] - # Specifies the disk interface to use for attaching this disk, which is - # either SCSI or NVME. The default is SCSI. - class AllocatedDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # guest device interface options to use for the disk. - module DiskInterface - # Default value. This value is unused. - DISK_INTERFACE_UNSPECIFIED = 0 - - # SCSI disk interface. - SCSI = 1 - - # NVME disk interface. - NVME = 2 - - # NVDIMM disk interface. - NVDIMM = 3 - - # ISCSI disk interface. - ISCSI = 4 - end - end - end - end - - # The share setting for reservation. - # @!attribute [rw] share_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::ShareSettings::ShareType] - # Type of sharing for this shared-reservation - # @!attribute [rw] projects - # @return [::Array<::String>] - # A List of Project names to specify consumer projects for this - # shared-reservation. This is only valid when share_type's value is - # SPECIFIC_PROJECTS. - class ShareSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible scope in which the reservation can be shared. More granularity - # can be added in future. - module ShareType - # Default value. This value is unused. - SHARE_TYPE_UNSPECIFIED = 0 - - # Shared-reservation is open to entire Organization - ORGANIZATION = 1 - - # Shared-reservation is open to specific projects - SPECIFIC_PROJECTS = 2 - - # Default value. - LOCAL = 3 - - # Shared-reservation is open to direct child projects of specific - # folders. - DIRECT_PROJECTS_UNDER_SPECIFIC_FOLDERS = 4 - end - end - - # The status of the reservation. - module Status - # Default value. This value is unused. - STATUS_UNSPECIFIED = 0 - - # Invalid Reservation - INVALID = 1 - - # Resources are being allocated for the reservation. - CREATING = 2 - - # Reservation has allocated all its resources. - READY = 3 - - # Reservation is currently being deleted. - DELETING = 4 - - # Reservation is currently being resized. - UPDATING = 5 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb deleted file mode 100644 index 23ca19eed3e3..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/future_reservation.rb +++ /dev/null @@ -1,185 +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 CapacityPlanner - module V1beta - # Repesents Future Reservation request which is part of aggregated - # reservations data response of "QueryReservations". - # @!attribute [rw] specific_sku_properties - # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::SpecificSKUProperties] - # Future Reservation configuration to indicate instance properties and - # total count. - # @!attribute [rw] id - # @return [::Integer] - # A unique identifier for this future reservation. The server - # defines this identifier. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The creation timestamp for this future reservation. - # @!attribute [rw] zone - # @return [::String] - # URL of the Zone where this future reservation resides. - # @!attribute [rw] description - # @return [::String] - # Description of the future reservation provided by user. - # @!attribute [rw] future_reservation - # @return [::String] - # The future reservation resource name. - # @!attribute [rw] owner_project_id - # @return [::String] - # @!attribute [rw] time_window - # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::TimeWindow] - # Time window for this Future Reservation. - # @!attribute [rw] share_settings - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::ShareSettings] - # List of Projects/Folders to share with. - # @!attribute [rw] name_prefix - # @return [::String] - # Name prefix for the reservations to be created at the time of - # delivery. The name prefix must comply with RFC1035. - # Maximum allowed length for name prefix is 20. Automatically created - # reservations name format will be -date-####. - # @!attribute [rw] status - # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::Status] - # Status of the Future Reservation - # @!attribute [rw] auto_created_reservations_delete_time - # @return [::Google::Protobuf::Timestamp] - # Future timestamp when the FR auto-created reservations will be deleted by - # Compute Engine. Format of this field must be a valid RFC3339 value. - # @!attribute [rw] auto_delete_auto_created_reservations - # @return [::Boolean] - # Setting for enabling or disabling automatic deletion for auto-created - # reservation. If set to true, auto-created reservations will be - # deleted at Future Reservation's end time (default) or at user's defined - # timestamp if any of the - # [auto_created_reservations_delete_time, auto_created_reservations_duration] - # values is specified. - # For keeping auto-created reservation indefinitely, this value should be set - # to false. - class FutureReservation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents specific SKU properties for the Future Reservation. - # @!attribute [rw] instance_properties - # @return [::Google::Cloud::CapacityPlanner::V1beta::Allocation::SpecificSKUAllocation::AllocatedInstanceProperties] - # Properties of the SKU instances being reserved. - # @!attribute [rw] total_count - # @return [::Integer] - # Total number of instances for which capacity assurance is requested at a - # future time period. - class SpecificSKUProperties - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents time window for the Future Reservation. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Start time of the Future Reservation. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # End time of the Future Reservation. - class TimeWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents status related to the future reservation. - # @!attribute [rw] procurement_status - # @return [::Google::Cloud::CapacityPlanner::V1beta::FutureReservation::Status::ProcurementStatus] - # Current state of this Future Reservation - # @!attribute [rw] lock_time - # @return [::Google::Protobuf::Timestamp] - # Time when Future Reservation would become LOCKED, after which no - # modifications to Future Reservation will be allowed. Applicable only - # after the Future Reservation is in the APPROVED state. The lock_time is - # an RFC3339 string. The procurement_status will transition to PROCURING - # state at this time. - # @!attribute [rw] auto_created_reservations - # @return [::Array<::String>] - # Fully qualified urls of the automatically created reservations at - # start_time. - # @!attribute [rw] fulfilled_count - # @return [::Integer] - # This count indicates the fulfilled capacity so far. This is set during - # "PROVISIONING" state. This count also includes capacity delivered as part - # of existing matching reservations. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents procurement status of the Future Reservation. - module ProcurementStatus - # This is unused status value. - PROCUREMENT_STATUS_UNSPECIFIED = 0 - - # Future reservation is pending approval by Google Cloud Platform. - PENDING_APPROVAL = 1 - - # Future reservation is approved by Google Cloud Platform. - APPROVED = 2 - - # Future reservation is committed by the customer. - COMMITTED = 3 - - # Future reservation is rejected by Google Cloud Platform. - DECLINED = 4 - - # Future reservation is cancelled by the customer. - CANCELLED = 5 - - # Future reservation is being procured by Google Cloud Platform. Beyond - # this point, Future reservation is locked and no further modifications - # are allowed. - PROCURING = 6 - - # Future reservation capacity is being provisioned. This state will be - # entered after start_time, while reservations are being created to - # provide total_count reserved instance slots. This state will not - # persist past start_time + 24h. - PROVISIONING = 7 - - # Future reservation is fulfilled completely. - FULFILLED = 8 - - # Future reservation failed. No additional reservations were provided. - FAILED = 9 - - # Future reservation is partially fulfilled. Additional reservations were - # provided but did not reach total_count reserved instance slots. - FAILED_PARTIALLY_FULFILLED = 10 - - # Related status for PlanningStatus.Draft. Transitions to - # PENDING_APPROVAL upon user submitting FR. - DRAFTING = 11 - - # An Amendment to the Future Reservation has been requested. If the - # Amendment is declined, the Future Reservation will be restored to the - # last known good state. - PENDING_AMENDMENT_APPROVAL = 12 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb deleted file mode 100644 index 279b2e874b84..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/location.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CapacityPlanner - module V1beta - # Identifier for a Google Cloud Platform location. - # @!attribute [rw] location_level - # @return [::Google::Cloud::CapacityPlanner::V1beta::LocationLevel] - # The location level such as a region. - # @!attribute [rw] source - # @return [::String] - # Required. Location where resource is sourced. For Cloud Storage, the - # alphabetically first location is the source. - # @!attribute [rw] linked_locations - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::LocationIdentifier::LinkedLocation>] - # Optional. Other linked locations. - class LocationIdentifier - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] location_level - # @return [::Google::Cloud::CapacityPlanner::V1beta::LocationLevel] - # The location level such as a region. - # @!attribute [rw] location - # @return [::String] - # Required. The linked cloud location. - # @!attribute [rw] label - # @return [::String] - class LinkedLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The level of the Google Cloud Platform location. - module LocationLevel - # Location level is unspecified. - LOCATION_LEVEL_UNSPECIFIED = 0 - - # Cloud region. - REGION = 1 - - # Cloud zone. - ZONE = 2 - - # Globally. - GLOBAL = 3 - - # A metro. - METRO = 4 - - # Dual region pair. - DUAL_REGION = 5 - - # Multiple regions. - MULTI_REGION = 6 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb deleted file mode 100644 index 68d8f2d1f4b5..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/resource.rb +++ /dev/null @@ -1,159 +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 CapacityPlanner - module V1beta - # The resource container of Google Cloud Platform hierarchy such as a project. - # @!attribute [rw] type - # @return [::Google::Cloud::CapacityPlanner::V1beta::ResourceContainer::Type] - # @!attribute [rw] id - # @return [::String] - # Required. Identifier of the resource container. For example, project number - # for project type. - class ResourceContainer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Type - TYPE_UNSPECIFIED = 0 - - PROJECT = 1 - - FOLDER = 2 - - ORG = 3 - end - end - - # The id for a Google Cloud Platform resource key. - # @!attribute [rw] resource_code - # @return [::String] - # Required. resource_code for the resource. eg: gce-ram, gce-vcpus, - # gce-gpu, gce-tpu, gce-vm, gce-persistent-disk, gce-local-ssd. - # @!attribute [rw] resource_id - # @return [::Google::Cloud::CapacityPlanner::V1beta::ResourceIdentifier] - # Required. Id of the resource. - class ResourceIdKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The identifier for a Google Cloud Platform resource. - # @!attribute [rw] service_name - # @return [::String] - # @!attribute [rw] resource_name - # @return [::String] - # @!attribute [rw] resource_attributes - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::ResourceAttribute>] - class ResourceIdentifier - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An attribute of a Google Cloud Platform resource. - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::CapacityPlanner::V1beta::ResourceValue] - class ResourceAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] unit - # @return [::Google::Cloud::CapacityPlanner::V1beta::Unit] - # @!attribute [rw] value - # @return [::Google::Cloud::CapacityPlanner::V1beta::Value] - class ResourceValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] int64_value - # @return [::Integer] - # Note: The following fields are mutually exclusive: `int64_value`, `string_value`, `double_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] string_value - # @return [::String] - # Note: The following fields are mutually exclusive: `string_value`, `int64_value`, `double_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_value - # @return [::Float] - # Note: The following fields are mutually exclusive: `double_value`, `int64_value`, `string_value`, `bool_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bool_value - # @return [::Boolean] - # Note: The following fields are mutually exclusive: `bool_value`, `int64_value`, `string_value`, `double_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module Unit - UNIT_UNSPECIFIED = 0 - - UNIT_COUNT = 1 - - # Kilobytes (10^3 bytes) - KB = 2 - - # Gigabytes (10^9 bytes) - GB = 3 - - # Terabytes (10^12 bytes) - TB = 4 - - # Mebibytes (2^20 bytes) - MIB = 17 - - # Gibibytes (2^30 bytes) - GIB = 5 - - # Tebibytes (2^40 bytes) - TIB = 6 - - # Queries per second - QPS = 7 - - # Megabytes (10^6 bytes) - MB = 8 - - # Pebibytes (2^50 bytes) - PIB = 9 - - # Terabits (10^12 bits) per second - TBPS = 10 - - GBPS_BITS = 11 - - GIB_BITS = 12 - - MBPS_BITS = 13 - - MBPS_BYTES = 14 - - TBPS_BITS = 15 - - TBPS_BYTES = 16 - - KOPS = 18 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb deleted file mode 100644 index 79c6457f5863..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/cloud/capacityplanner/v1beta/usage_service.rb +++ /dev/null @@ -1,912 +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 CapacityPlanner - module V1beta - # The `QueryUsageHistories` request. - # Next : 16 - # @!attribute [rw] parent - # @return [::String] - # Required. The compute engine resource and location for the time series - # values to return. The format is: - # - # projects/{project}/locations/{location} or - # organizations/{organization}/locations/{location} or - # folders/{folder}/locations/{location} - # @!attribute [rw] location_level - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @!attribute [rw] is_spot - # @return [::Boolean] - # Optional. The is_spot flag is used to fetch the usage data for preemptible - # Resources. - # @!attribute [rw] machine_family - # @return [::String] - # The machine family for the `UsageHistory` values to return. Possible values - # include "n1", and "n2d". See - # https://cloud.google.com/compute/docs/machine-types for more examples. - # Empty machine_family will return results matching all machine families. - # @!attribute [rw] machine_shape - # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] - # Optional. The machine shape for the `UsageHistory` values to return. - # @!attribute [rw] disk_type - # @return [::String] - # Optional. The disk_type for the `UsageHistory` values to return request - # with persistent-disk cloud_resource_type. Empty disk_type will return - # results matching all disk types. - # @!attribute [rw] confidential_mode - # @return [::Boolean] - # Optional. Whether the persistent disk is in confidential mode. - # @!attribute [rw] gpu_type - # @return [::String] - # Optional. The GPU type for the `UsageHistory` values to return. Sample - # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @!attribute [rw] tpu_type - # @return [::String] - # Optional. The TPU type for the `UsageHistory` values to return. Empty - # tpu_type will return results matching all TPUs. - # @!attribute [rw] cloud_resource_type - # @return [::String] - # Required. The resource for the `UsageHistory` values to return. Possible - # values include "gce-vcpus", "gce-ram", "gce-local-ssd", - # "gce-persistent-disk", "gce-gpu" and "gce-tpu". Empty cloud_resource_type - # will return results matching all resources. - # @!attribute [rw] usage_aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # The method that should be used to convert sampled usage data to daily - # usage values. - # AGGREGATION_METHOD_UNSPECIFIED will return results matching all the - # aggregation methods. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Optional. The start date of reservations usage. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Optional. The end date of reservations usage. - class QueryUsageHistoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `QueryUsageHistories` response. - # @!attribute [rw] usage_histories - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::UsageHistory>] - # The usage histories that match the request. - class QueryUsageHistoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `QueryForecasts` request. - # Next : 14 - # @!attribute [rw] parent - # @return [::String] - # Required. The compute engine resource and location for the time series - # values to return. The format is: - # - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @!attribute [rw] machine_family - # @return [::String] - # The machine family to use to select the `Forecast` values to return. - # Possible values include "n1", and "n2d". - # Empty machine_family will return results matching all machine families. - # @!attribute [rw] machine_shape - # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] - # Optional. The machine shape for the time series values to return. - # @!attribute [rw] disk_type - # @return [::String] - # Optional. The disk_type for the `Forecast` values to return with request - # persistent-disk cloud_resource_type. - # Empty disk_type will return results matching all disk types. - # @!attribute [rw] confidential_mode - # @return [::Boolean] - # Optional. Whether the persistent disk is in confidential mode. - # @!attribute [rw] gpu_type - # @return [::String] - # Optional. The GPU type for the `Forecast` values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @!attribute [rw] tpu_type - # @return [::String] - # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type - # will return results matching all TPUs. - # @!attribute [rw] cloud_resource_type - # @return [::String] - # Required. The resource for the `Forecast` values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", - # "gce-gpu" and "gce-tpu". Empty cloud_resource_type will return results - # matching all resources. - # @!attribute [rw] forecast_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] - # The type of forecast to use to select the `Forecast` values to return. - # FORECAST_TYPE_UNSPECIFIED will return results matching all the forecast - # types. - # @!attribute [rw] prediction_interval - # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] - # The prediction interval to use to select the `Forecast` values to return. - # PREDICTION_INTERVAL_UNSPECIFIED will return results matching all prediction - # intervals. - # @!attribute [rw] aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Aggregation Method of the historical usage for which the forecast is - # generated - class QueryForecastsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `QueryForecasts` response. - # @!attribute [rw] forecasts - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Forecast>] - # The forecasts that match the request. - class QueryForecastsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `QueryReservations` request. - # @!attribute [rw] parent - # @return [::String] - # Required. The compute engine resource and location for the time series - # values to return. The format is: - # - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @!attribute [rw] location_level - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @!attribute [rw] machine_family - # @return [::String] - # Optional. The machine family to use to select the aggregate reserved values - # to return. Possible values include "n1", and "n2d" etc. Empty - # machine_family will return results matching all machine families. - # @!attribute [rw] machine_shape - # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] - # Optional. The machine_shape as a filter to select matching reservations. - # @!attribute [rw] gpu_type - # @return [::String] - # Optional. The GPU type for the reserved values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @!attribute [rw] cloud_resource_type - # @return [::String] - # Required. The resource for the reserved values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-gpu" and "gce-vm". - # @!attribute [rw] reservation_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationType] - # Required. The Reservation type for example, future reservation request and - # allocation. If unspecified, all types are - # included. - # @!attribute [rw] share_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ShareType] - # Optional. Types of share settings to filter reservations in response. If - # unspecified, all types are included. - # @!attribute [rw] ownership_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::OwnershipType] - # Optional. Types of ownerships to filter reservations based on. - # In case of OWNED, it filters reservations which are owned by selected - # parent project/folder/organization. If unspecified, all types are - # included. - # @!attribute [rw] reservation_data_level - # @return [::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest::ReservationDataLevel] - # Required. Reservations output data format. - # @!attribute [rw] include_unapproved_reservations - # @return [::Boolean] - # Optional. Whether to include pending for approval reservations in the - # response. This field is only applicable for future reservations. - # @!attribute [rw] aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. Aggregation Method of the historical reservation usage - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Optional. The start date of reservations usage. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Optional. The end date of reservations usage. - class QueryReservationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of the reservation - module ReservationType - # No reservation type specified. - RESERVATION_TYPE_UNSPECIFIED = 0 - - # Allocation refers to realized reservation either auto created or created - # by the users on demand. - RESERVATION_TYPE_ALLOCATION = 1 - - # Future Reservation requests created by users. - RESERVATION_TYPE_FUTURE_RESERVATION = 2 - - # All reservations. - RESERVATION_TYPE_ALL = 3 - end - - # Possible scope in which the reservation can be shared. - module ShareType - # No share type specified. - SHARE_TYPE_UNSPECIFIED = 0 - - # Default value, for which reservation is open to only owner project. - SHARE_TYPE_LOCAL = 1 - - # Shared-reservation is open to specific projects. - SHARE_TYPE_SPECIFIC_PROJECTS = 2 - end - - # Reservation ownership status to provide distinction for Capacity Planning. - module OwnershipType - # No ownership status specified. - OWNERSHIP_TYPE_UNSPECIFIED = 0 - - # For the reservations owned within selected Google Cloud Platform Resource - # Container (project/folder/organization). - OWNERSHIP_TYPE_OWNED = 1 - - # For the reservations consumable within selected Google Cloud Platform - # Resource Container (project/folder/organization), but not owned by them. - OWNERSHIP_TYPE_SHARED_BY_OTHERS = 2 - end - - # The form in which data of reservations should be returned. - # In case of AGGREGATED, timeseries for selected reservations is returned. If - # unspecified, all levels are included. - module ReservationDataLevel - # No reservation data level specified. - RESERVATION_DATA_LEVEL_UNSPECIFIED = 0 - - # aggregated reservations data in a timeseries or aggregation over - # timeseries. - RESERVATION_DATA_LEVEL_AGGREGATED = 1 - - # per reservation detail which is equivalent of Arcus Future Reservation or - # Allocation with only limited fields which are useful for Capacity - # Planning. - RESERVATION_DATA_LEVEL_PER_RESERVATION = 2 - end - end - - # The `QueryReservations` response. - # @!attribute [rw] reservations - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::ReservationData>] - # The reservations data that match the request. - class QueryReservationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A single data point in a time series. - # @!attribute [rw] event_time - # @return [::Google::Protobuf::Timestamp] - # The time which the data point applies. - # @!attribute [rw] value - # @return [::Float] - # The value of the data point. - class Point - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of data points that describes the predicted time-varying values - # of a resource. - # @!attribute [rw] name - # @return [::String] - # The resource name of the connection in the form of: - # `projects/{project_id}/locations/{location_id}/forecasts/{forecast_id}` or - # `organizations/{organization_id}/locations/{location_id}/forecasts/{forecast_id}` - # or `folders/{folder_id}/locations/{location_id}/forecasts/{forecast_id}` - # @!attribute [rw] time_series - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] - # The collection of data points that represent the predicted values. Note - # that some of these values may be in the past (if, for example, the forecast - # was created in the past and predicted values for the present day). - # @!attribute [rw] forecast_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::ForecastType] - # The type of forecast. - # @!attribute [rw] bounds - # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::Bounds] - # The bounds represented by this forecast time series. - # @!attribute [rw] prediction_interval - # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] - # The prediction interval represented by the time series. - # @!attribute [rw] aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Aggregation Method of the historical usage for which the forecast is - # generated - class Forecast - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of the forecast. This describes the method that was used to - # produce future time series values from historical time series values. - module ForecastType - # No forecast type is specified. - FORECAST_TYPE_UNSPECIFIED = 0 - - # Statistical forecast. - STATISTICAL = 1 - - # Statistical forecast that attempts to predict the seasonal affects of - # Black Friday and Cyber Monday. - STATISTICAL_WITH_BFCM = 2 - - # Yearly Seasonality model provides generic seasonality beyond BFCM. - YEARLY_SEASONALITY = 3 - end - - # The bounds of the forecast time series. - module Bounds - # No bounds is specified. - BOUNDS_UNSPECIFIED = 0 - - # The time series represents the upper bound of the forecast. - LOWER_BOUND = 1 - - # The time series represents the median expected forecast value. - MEDIAN = 2 - - # The time series represents the lower bound of the forecast. - UPPER_BOUND = 3 - end - - # The prediction interval represented by a forecast. - module PredictionInterval - # No prediction interval is specified. - PREDICTION_INTERVAL_UNSPECIFIED = 0 - - # This represents a prediction interval that has 90% confidence. For - # example, for a symmetric prediction interval, a `PredictionInterval` - # of `PREDICTION_INTERVAL_90` means that the `UPPER_BOUND` will represent - # the 95th precentile. - PREDICTION_INTERVAL_90 = 1 - - # This represents a prediction interval that has 50% confidence. For - # example, for a symmetric prediction interval, a `PredictionInterval` - # of `PREDICTION_INTERVAL_50` means that the `UPPER_BOUND` will represent - # the 75th precentile. - PREDICTION_INTERVAL_50 = 2 - end - end - - # A collection of data points that describes the historical time-varying values - # of a resource. - # @!attribute [rw] time_series - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] - # The collection of data points that represent the historical values. - # @!attribute [rw] aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Method used to convert sampled usage data to time series values. - class UsageHistory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Methods for converting sampled data to time series values. - module AggregationMethod - # No aggregation method is specified. - AGGREGATION_METHOD_UNSPECIFIED = 0 - - MEDIAN = 1 - - # Time series values represent the 99th percentile of the sampled values. - PEAK = 2 - - # Time series values represent the 50th(median) percentile of the sampled - # values. - P50 = 3 - - # Time series values represent the 75th percentile of the sampled values. - P75 = 4 - - # Time series values represent the 99th percentile of the sampled values. - P99 = 5 - end - end - - # A collection of data points that describes the time-varying values of a - # resource. A time series is identified by its ID. - # Next : 13 - # @!attribute [rw] location_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Required. The type of location that the time series is summarizing. - # @!attribute [rw] location - # @return [::String] - # Optional. The location of the usage data in time series. - # @!attribute [rw] is_spot - # @return [::Boolean] - # Optional. The location of the usage data in time series. - # @!attribute [rw] machine_family - # @return [::String] - # The machine family for the time series values to return. Possible values - # include "n1" and "n2d". - # @!attribute [rw] disk_type - # @return [::String] - # The disk type for the time series values to return. - # @!attribute [rw] confidential_mode - # @return [::Boolean] - # Optional. The confidential mode for disk. - # @!attribute [rw] gpu_type - # @return [::String] - # The GPU type of the time series. - # @!attribute [rw] tpu_type - # @return [::String] - # The TPU type of the time series. - # @!attribute [rw] machine_shape - # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] - # The machine shape of the time series. - # @!attribute [rw] cloud_resource_type - # @return [::String] - # The resource for the time series values to return. Possible values include - # "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", "gce-gpu", - # "gce-tpu" and "gce-vm". - # @!attribute [rw] points - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Point>] - # The data points of this time series. When listing time series, points are - # returned in chronological order. - # @!attribute [rw] unit - # @return [::String] - # The units in which the values are reported. - class TimeSeries - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of location that the time series is summarizing. - module LocationType - # No location type was specified. - LOCATION_TYPE_UNSPECIFIED = 0 - - # Time series values represent usage aggregated at the region level. - REGIONAL = 1 - - # Time series values represent usage aggregated at the zone level. - ZONAL = 2 - end - end - - # Response entity for reservations data. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the connection in the form of: - # `projects/{project_id}/locations/{location_id}/reservations/{reservation_id}` - # or - # `organizations/{organization_id}/locations/{location_id}/reservations/{reservation_id}` - # or - # `folders/{folder_id}/locations/{location_id}/reservations/{reservation_id}` - # @!attribute [rw] time_series - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] - # The collection of data points that represent the aggregated reserved value - # for reservations filtered by the criteria. - # @!attribute [rw] used_reservation_values - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries] - # The collection of data points that represent the aggregated used value for - # reservations filtered by the criteria. - # @!attribute [rw] future_reservations - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::FutureReservation>] - # Future reservations filtered by the criteria. - # @!attribute [rw] allocations - # @return [::Array<::Google::Cloud::CapacityPlanner::V1beta::Allocation>] - # Allocations filtered by the criteria. - class ReservationData - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Machine shape details - # Next : 13 - # @!attribute [rw] machine_family - # @return [::String] - # Optional. The VM family. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. The characteristics of the sampled VM expressed as a string. - # @!attribute [rw] machine_shape - # @return [::String] - # Optional. The customer visible string representing the type of VM. - # @!attribute [rw] cpu_cores - # @return [::Float] - # Optional. Number of CPU cores per VM. - # @!attribute [rw] gpu_type - # @return [::String] - # Optional. The type of GPU with the VM. - # @!attribute [rw] gpu_compute_type - # @return [::String] - # Optional. The GPU name recognized by Compute Engine APIs. - # @!attribute [rw] gpu_cores - # @return [::Integer] - # Optional. The number of GPU cores per VM. - # @!attribute [rw] local_ssd_partitions - # @return [::Integer] - # Optional. The number of local SSD partitions per VM. - # @!attribute [rw] local_ssd_gb - # @return [::Float] - # Optional. Total amount of local SSD storage. - # @!attribute [rw] memory_gb - # @return [::Float] - # Optional. Total amount of memory with the VM. - # @!attribute [rw] local_ssd_interface - # @return [::String] - # Optional. The local SSD interface used such as nvme or scsi - # @!attribute [rw] min_cpu_platform - # @return [::String] - # Optional. The Min-cpu platform used such as icelake - class MachineShape - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ExportUsageHistories` request - # Next : 12 - # @!attribute [rw] parent - # @return [::String] - # Required. The compute engine resource and location for the time series - # values to return. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @!attribute [rw] is_spot - # @return [::Boolean] - # Optional. Set true to export usage for spot resources. - # @!attribute [rw] machine_family - # @return [::String] - # Optional. The machine family for the `UsageHistory` values to return. - # Possible values include "n1", and "n2d". See - # https://cloud.google.com/compute/docs/machine-types for more examples. - # @!attribute [rw] machine_shape - # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] - # Optional. The machine shape for the time series values to export. - # @!attribute [rw] disk_type - # @return [::String] - # Optional. The disk_type for the `UsageHistory` values to return request - # with persistent-disk resource_type. Possible values include "pd-ssd", - # "pd-standard", "pd-balanced", and "pd-extreme". - # @!attribute [rw] gpu_type - # @return [::String] - # Optional. The GPU type for the `UsageHistory` values to return. Sample - # values are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @!attribute [rw] tpu_type - # @return [::String] - # Optional. The TPU type for the `UsageHistory` values to return. Empty - # tpu_type will return results matching all TPUs. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource for the `UsageHistory` values to return. Possible - # values include "gce-vcpus", "gce-ram", "gce-local-ssd", - # "gce-persistent-disk", "gce-gpu" and "gce-tpu". - # @!attribute [rw] usage_aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. The method that should be used to convert sampled usage data to - # daily usage values. AGGREGATION_METHOD_UNSPECIFIED will return results - # matching all the aggregation methods. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Optional. The start date of usage. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Optional. The end date of usage. - # @!attribute [rw] output_config - # @return [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig] - # Required. Output configuration indicating where the results will be output - # to. - class ExportUsageHistoriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ExportForecasts` request - # Next : 13 - # @!attribute [rw] parent - # @return [::String] - # Required. The compute engine resource and location for the time series - # values to return. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @!attribute [rw] machine_family - # @return [::String] - # Optional. The machine family to use to select the `Forecast` values to - # return. Possible values include "n1", and "n2d". - # @!attribute [rw] machine_shape - # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] - # Optional. The machine shape for the time series values to export. - # @!attribute [rw] disk_type - # @return [::String] - # Optional. The disk_type for the `Forecast` values to return with request - # persistent-disk resource_type. - # @!attribute [rw] gpu_type - # @return [::String] - # Optional. The GPU type for the `Forecast` values to return. Sample values - # are "nvidia-tesla-t4", and "nvidia-tesla-a100". See - # https://cloud.google.com/compute/docs/gpus for a list. Empty gpu_type - # will return results matching all GPUs. - # @!attribute [rw] tpu_type - # @return [::String] - # Optional. The TPU type for the `Forecast` values to return. Empty tpu_type - # will return results matching all TPUs. - # @!attribute [rw] resource_type - # @return [::String] - # Required. The resource for the `Forecast` values to return. Possible values - # include "gce-vcpus", "gce-ram", "gce-local-ssd", "gce-persistent-disk", - # "gce-gpu" and "gce-tpu". - # @!attribute [rw] prediction_interval - # @return [::Google::Cloud::CapacityPlanner::V1beta::Forecast::PredictionInterval] - # Optional. The prediction interval to use to select the `Forecast` values to - # return. PREDICTION_INTERVAL_UNSPECIFIED will return results matching all - # prediction intervals. - # @!attribute [rw] aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Optional. Aggregation Method of the historical usage for which the forecast - # is generated. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Optional. The start date of forecasts. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Optional. The end date of forecasts. - # @!attribute [rw] output_config - # @return [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig] - # Required. Output configuration indicating where the results will be output - # to. - class ExportForecastsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The `ExportReservationsUsage` request - # @!attribute [rw] machine_family - # @return [::String] - # Optional. The machine family to query reservations and usage by. For - # example: n1, n2d. - # - # Note: The following fields are mutually exclusive: `machine_family`, `machine_shape`, `gpu_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] machine_shape - # @return [::Google::Cloud::CapacityPlanner::V1beta::MachineShape] - # Optional. The machine_shape as a filter to select matching reservations - # and its usage. - # - # Note: The following fields are mutually exclusive: `machine_shape`, `machine_family`, `gpu_type`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gpu_type - # @return [::String] - # Optional. The GPU type to query reservations and usage by. For example: - # NVIDIA T4. - # - # Note: The following fields are mutually exclusive: `gpu_type`, `machine_family`, `machine_shape`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] parent - # @return [::String] - # Required. The compute engine resource and location of the - # reservationsusage. The format is: - # projects/\\{project}/locations/\\{location} or - # organizations/\\{organization}/locations/\\{location} or - # folders/\\{folder}/locations/\\{location} - # @!attribute [rw] location_level - # @return [::Google::Cloud::CapacityPlanner::V1beta::TimeSeries::LocationType] - # Optional. The location level of the reservations usage timeseries. - # @!attribute [rw] cloud_resource_type - # @return [::String] - # Required. The resource for the `ReservationsUsage` values to return. - # Possible values include "gce-vcpus", "gce-ram", "gce-local-ssd", and - # "gce-gpu". - # @!attribute [rw] usage_aggregation_method - # @return [::Google::Cloud::CapacityPlanner::V1beta::UsageHistory::AggregationMethod] - # Required. The method that should be used to convert sampled reservations - # data to daily usage values. - # @!attribute [rw] share_type - # @return [::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest::ShareType] - # Optional. Type of share settings to filter reservations in response. If - # unspecified, all types are included. - # @!attribute [rw] start_date - # @return [::Google::Type::Date] - # Optional. The start date of reservations usage. - # @!attribute [rw] end_date - # @return [::Google::Type::Date] - # Optional. The end date of reservations usage. - # @!attribute [rw] output_config - # @return [::Google::Cloud::CapacityPlanner::V1beta::OutputConfig] - # Required. Output configuration indicating where the results will be output - # to. - class ExportReservationsUsageRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible scope in which the reservation can be shared. - module ShareType - # No share type specified. - SHARE_TYPE_UNSPECIFIED = 0 - - # Default value, for which reservation is open to only owner project. - SHARE_TYPE_LOCAL = 1 - - # Shared-reservation is open to specific projects. - SHARE_TYPE_SPECIFIC_PROJECTS = 2 - end - end - - # Output configuration for export destination. - # @!attribute [rw] gcs_destination - # @return [::Google::Cloud::CapacityPlanner::V1beta::GcsDestination] - # Destination on Cloud Storage. - # - # Note: The following fields are mutually exclusive: `gcs_destination`, `bigquery_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bigquery_destination - # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination] - # Destination on BigQuery. - # - # Note: The following fields are mutually exclusive: `bigquery_destination`, `gcs_destination`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class OutputConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Cloud Storage location. - # @!attribute [rw] uri - # @return [::String] - # Optional. The path to the file in Cloud Storage where the export will be - # stored. The URI is in the form `gs://bucketName/fileName`. If the file - # already exists, the request succeeds, but the operation fails. - # @!attribute [rw] bucket - # @return [::String] - # Required. The bucket name to which the export will be stored. - # @!attribute [rw] object - # @return [::String] - # Required. The object name to which the export will be stored. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Flag to indicate overwrite in case file already exists. - class GcsDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A BigQuery destination for exporting assets to. - # @!attribute [rw] dataset - # @return [::String] - # Required. The BigQuery dataset in format - # "projects/\\{projectId}/datasets/\\{datasetId}", to which the snapshot result - # should be exported. If this dataset does not exist, the export call returns - # an INVALID_ARGUMENT error. - # @!attribute [rw] table - # @return [::String] - # Required. The BigQuery table to which the snapshot result should be - # written. - # @!attribute [rw] partition_key - # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination::PartitionKey] - # Optional. The partition key for BigQuery partitioned table. - # @!attribute [rw] write_disposition - # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination::WriteDisposition] - # Optional. Specifies the action that occurs if the destination table or - # partition already exists. - # @!attribute [rw] create_disposition - # @return [::Google::Cloud::CapacityPlanner::V1beta::BigQueryDestination::CreateDisposition] - # Optional. Specifies the action that occurs if the destination table does - # not exist - # @!attribute [rw] gcs_location - # @return [::String] - # Optional. Specifies the Cloud Storage location. - # Users can choose to provide a location for Cloud Storage bucket to store - # the exported data. (as it is possible that some locations are restricted - # via org policy for that project) Temporary Cloud Storage bucket creation is - # an interim step for BigQuery upload. If no value is provided, the default - # location used will be 'US'. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This enum determines the partition key column for the BigQuery tables. - # Partitioning can improve query performance and reduce query cost by - # filtering partitions. Refer to - # https://cloud.google.com/bigquery/docs/partitioned-tables for details. - module PartitionKey - # Unspecified partition key. Tables won't be partitioned using this - # option. - PARTITION_KEY_UNSPECIFIED = 0 - - # The time when the request is received. If specified as partition key, - # the result table(s) is partitioned by the RequestTime column, an - # additional timestamp column representing when the request was received. - REQUEST_TIME = 1 - end - - # Specifies the action that occurs if the destination table or partition - # already exists. By default, the data will be appended to the existing - # table. - module WriteDisposition - # Unspecified write disposition. - WRITE_DISPOSITION_UNSPECIFIED = 0 - - # If the table or partition already exists, BigQuery appends the data to - # the table or the latest partition. - WRITE_APPEND = 1 - - # If the table or partition already exists, BigQuery overwrites the entire - # table or all the partitions data. - WRITE_TRUNCATE = 2 - - # If the table already exists and contains data, an error is returned. - WRITE_EMPTY = 3 - end - - # Specifies the action that occurs if the destination table does not exist. - # By default, a new table will be created. - module CreateDisposition - # Unspecified create disposition. - CREATE_DISPOSITION_UNSPECIFIED = 0 - - # If the table does not exist, BigQuery creates the table. - CREATE_IF_NEEDED = 1 - - # If the table does not exist, an error will be returned. - CREATE_NEVER = 2 - end - end - - # Represents the metadata of a 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. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response message for [UsageService.ExportUsageHistories]. - # @!attribute [rw] response - # @return [::String] - # The response message for the usage history export. In case of bigquery, - # it will also contain job id. - class ExportUsageHistoriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response message for [UsageService.ExportForecasts]. - # @!attribute [rw] response - # @return [::String] - # The response message for the forecast export. In case of bigquery, - # it will also contain job id. - class ExportForecastsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response message for [UsageService.ExportReservationsUsage]. - # @!attribute [rw] response - # @return [::String] - # The response message for the reservations usage export. In case of - # bigquery, it will also contain job id. - class ExportReservationsUsageResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/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-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/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-capacity_planner-v1beta/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/type/date.rb deleted file mode 100644 index 1d0a9780457f..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/proto_docs/google/type/date.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile deleted file mode 100644 index 95bb82d75ac5..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-capacity_planner-v1beta", path: "../" -else - gem "google-cloud-capacity_planner-v1beta" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json deleted file mode 100644 index 1664264586ff..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/snippet_metadata_google.cloud.capacityplanner.v1beta.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-capacity_planner-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.capacityplanner.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "capacityplanner_v1beta_generated_UsageService_QueryUsageHistories_sync", - "title": "Snippet for the query_usage_histories call in the UsageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_usage_histories.", - "file": "usage_service/query_usage_histories.rb", - "language": "RUBY", - "client_method": { - "short_name": "query_usage_histories", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_usage_histories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse", - "client": { - "short_name": "UsageService::Client", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" - }, - "method": { - "short_name": "QueryUsageHistories", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService.QueryUsageHistories", - "service": { - "short_name": "UsageService", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "capacityplanner_v1beta_generated_UsageService_QueryForecasts_sync", - "title": "Snippet for the query_forecasts call in the UsageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_forecasts.", - "file": "usage_service/query_forecasts.rb", - "language": "RUBY", - "client_method": { - "short_name": "query_forecasts", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_forecasts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse", - "client": { - "short_name": "UsageService::Client", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" - }, - "method": { - "short_name": "QueryForecasts", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService.QueryForecasts", - "service": { - "short_name": "UsageService", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "capacityplanner_v1beta_generated_UsageService_QueryReservations_sync", - "title": "Snippet for the query_reservations call in the UsageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_reservations.", - "file": "usage_service/query_reservations.rb", - "language": "RUBY", - "client_method": { - "short_name": "query_reservations", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#query_reservations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse", - "client": { - "short_name": "UsageService::Client", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" - }, - "method": { - "short_name": "QueryReservations", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService.QueryReservations", - "service": { - "short_name": "UsageService", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "capacityplanner_v1beta_generated_UsageService_ExportUsageHistories_sync", - "title": "Snippet for the export_usage_histories call in the UsageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_usage_histories.", - "file": "usage_service/export_usage_histories.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_usage_histories", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_usage_histories", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "UsageService::Client", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" - }, - "method": { - "short_name": "ExportUsageHistories", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService.ExportUsageHistories", - "service": { - "short_name": "UsageService", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "capacityplanner_v1beta_generated_UsageService_ExportForecasts_sync", - "title": "Snippet for the export_forecasts call in the UsageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_forecasts.", - "file": "usage_service/export_forecasts.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_forecasts", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_forecasts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "UsageService::Client", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" - }, - "method": { - "short_name": "ExportForecasts", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService.ExportForecasts", - "service": { - "short_name": "UsageService", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "capacityplanner_v1beta_generated_UsageService_ExportReservationsUsage_sync", - "title": "Snippet for the export_reservations_usage call in the UsageService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_reservations_usage.", - "file": "usage_service/export_reservations_usage.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_reservations_usage", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client#export_reservations_usage", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "UsageService::Client", - "full_name": "::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client" - }, - "method": { - "short_name": "ExportReservationsUsage", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService.ExportReservationsUsage", - "service": { - "short_name": "UsageService", - "full_name": "google.cloud.capacityplanner.v1beta.UsageService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.rb deleted file mode 100644 index 235a5f5ed9ee..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_forecasts.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 capacityplanner_v1beta_generated_UsageService_ExportForecasts_sync] -require "google/cloud/capacity_planner/v1beta" - -## -# Snippet for the export_forecasts call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#export_forecasts. -# -def export_forecasts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new - - # Call the export_forecasts method. - result = client.export_forecasts 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 capacityplanner_v1beta_generated_UsageService_ExportForecasts_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.rb deleted file mode 100644 index a27bc6e1ebc2..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_reservations_usage.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 capacityplanner_v1beta_generated_UsageService_ExportReservationsUsage_sync] -require "google/cloud/capacity_planner/v1beta" - -## -# Snippet for the export_reservations_usage call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#export_reservations_usage. -# -def export_reservations_usage - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new - - # Call the export_reservations_usage method. - result = client.export_reservations_usage 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 capacityplanner_v1beta_generated_UsageService_ExportReservationsUsage_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.rb deleted file mode 100644 index 667907cfe746..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/export_usage_histories.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 capacityplanner_v1beta_generated_UsageService_ExportUsageHistories_sync] -require "google/cloud/capacity_planner/v1beta" - -## -# Snippet for the export_usage_histories call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#export_usage_histories. -# -def export_usage_histories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new - - # Call the export_usage_histories method. - result = client.export_usage_histories 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 capacityplanner_v1beta_generated_UsageService_ExportUsageHistories_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.rb deleted file mode 100644 index 36f71013a08a..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_forecasts.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 capacityplanner_v1beta_generated_UsageService_QueryForecasts_sync] -require "google/cloud/capacity_planner/v1beta" - -## -# Snippet for the query_forecasts call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#query_forecasts. -# -def query_forecasts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new - - # Call the query_forecasts method. - result = client.query_forecasts request - - # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse. - p result -end -# [END capacityplanner_v1beta_generated_UsageService_QueryForecasts_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.rb deleted file mode 100644 index 48196522f4e9..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_reservations.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 capacityplanner_v1beta_generated_UsageService_QueryReservations_sync] -require "google/cloud/capacity_planner/v1beta" - -## -# Snippet for the query_reservations call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#query_reservations. -# -def query_reservations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new - - # Call the query_reservations method. - result = client.query_reservations request - - # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse. - p result -end -# [END capacityplanner_v1beta_generated_UsageService_QueryReservations_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.rb deleted file mode 100644 index 3fa1c33dcd9a..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/snippets/usage_service/query_usage_histories.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 capacityplanner_v1beta_generated_UsageService_QueryUsageHistories_sync] -require "google/cloud/capacity_planner/v1beta" - -## -# Snippet for the query_usage_histories call in the UsageService 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::CapacityPlanner::V1beta::UsageService::Client#query_usage_histories. -# -def query_usage_histories - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new - - # Call the query_usage_histories method. - result = client.query_usage_histories request - - # The returned object is of type Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse. - p result -end -# [END capacityplanner_v1beta_generated_UsageService_QueryUsageHistories_sync] diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_operations_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_operations_test.rb deleted file mode 100644 index b4888a250c6d..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_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/capacityplanner/v1beta/usage_service_pb" -require "google/cloud/capacityplanner/v1beta/usage_service_services_pb" -require "google/cloud/capacity_planner/v1beta/usage_service" - -class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb deleted file mode 100644 index a1794d23a68e..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/capacity_planner/v1beta/usage_service" - -class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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_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::CapacityPlanner::V1beta::UsageService::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 -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb deleted file mode 100644 index f426a662f818..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_rest_test.rb +++ /dev/null @@ -1,488 +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/capacityplanner/v1beta/usage_service_pb" -require "google/cloud/capacity_planner/v1beta/usage_service/rest" - - -class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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_query_usage_histories - # Create test objects. - client_result = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - location_level = :LOCATION_TYPE_UNSPECIFIED - is_spot = true - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - confidential_mode = true - gpu_type = "hello world" - tpu_type = "hello world" - cloud_resource_type = "hello world" - usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - - query_usage_histories_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_query_usage_histories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, query_usage_histories_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.query_usage_histories parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.query_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.query_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, query_usage_histories_client_stub.call_count - end - end - end - - def test_query_forecasts - # Create test objects. - client_result = ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - confidential_mode = true - gpu_type = "hello world" - tpu_type = "hello world" - cloud_resource_type = "hello world" - forecast_type = :FORECAST_TYPE_UNSPECIFIED - prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED - aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - - query_forecasts_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_query_forecasts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, query_forecasts_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.query_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.query_forecasts ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.query_forecasts(::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, query_forecasts_client_stub.call_count - end - end - end - - def test_query_reservations - # Create test objects. - client_result = ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - location_level = :LOCATION_TYPE_UNSPECIFIED - machine_family = "hello world" - machine_shape = {} - gpu_type = "hello world" - cloud_resource_type = "hello world" - reservation_type = :RESERVATION_TYPE_UNSPECIFIED - share_type = :SHARE_TYPE_UNSPECIFIED - ownership_type = :OWNERSHIP_TYPE_UNSPECIFIED - reservation_data_level = :RESERVATION_DATA_LEVEL_UNSPECIFIED - include_unapproved_reservations = true - aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - - query_reservations_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_query_reservations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, query_reservations_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.query_reservations parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.query_reservations ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.query_reservations(::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, query_reservations_client_stub.call_count - end - end - end - - def test_export_usage_histories - # 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" - is_spot = true - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - gpu_type = "hello world" - tpu_type = "hello world" - resource_type = "hello world" - usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - output_config = {} - - export_usage_histories_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_export_usage_histories_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_usage_histories_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_usage_histories parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_usage_histories_client_stub.call_count - end - end - end - - def test_export_forecasts - # 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" - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - gpu_type = "hello world" - tpu_type = "hello world" - resource_type = "hello world" - prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED - aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - output_config = {} - - export_forecasts_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_export_forecasts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_forecasts_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_forecasts ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_forecasts(::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_forecasts_client_stub.call_count - end - end - end - - def test_export_reservations_usage - # 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. - machine_family = "hello world" - parent = "hello world" - location_level = :LOCATION_TYPE_UNSPECIFIED - cloud_resource_type = "hello world" - usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - share_type = :SHARE_TYPE_UNSPECIFIED - start_date = {} - end_date = {} - output_config = {} - - export_reservations_usage_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::CapacityPlanner::V1beta::UsageService::Rest::ServiceStub.stub :transcode_export_reservations_usage_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_reservations_usage_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_reservations_usage machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_reservations_usage ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_reservations_usage(::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_reservations_usage_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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb deleted file mode 100644 index ce4daf2c4599..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/google/cloud/capacity_planner/v1beta/usage_service_test.rb +++ /dev/null @@ -1,612 +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/capacityplanner/v1beta/usage_service_pb" -require "google/cloud/capacity_planner/v1beta/usage_service" - -class ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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_query_usage_histories - # Create GRPC objects. - grpc_response = ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesResponse.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" - location_level = :LOCATION_TYPE_UNSPECIFIED - is_spot = true - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - confidential_mode = true - gpu_type = "hello world" - tpu_type = "hello world" - cloud_resource_type = "hello world" - usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - - query_usage_histories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :query_usage_histories, name - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal :LOCATION_TYPE_UNSPECIFIED, request["location_level"] - assert_equal true, request["is_spot"] - assert_equal "hello world", request["machine_family"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] - assert_equal "hello world", request["disk_type"] - assert_equal true, request["confidential_mode"] - assert_equal "hello world", request["gpu_type"] - assert_equal "hello world", request["tpu_type"] - assert_equal "hello world", request["cloud_resource_type"] - assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["usage_aggregation_method"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, query_usage_histories_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.query_usage_histories parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.query_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.query_usage_histories({ parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.query_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::QueryUsageHistoriesRequest.new(parent: parent, location_level: location_level, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, query_usage_histories_client_stub.call_rpc_count - end - end - - def test_query_forecasts - # Create GRPC objects. - grpc_response = ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsResponse.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" - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - confidential_mode = true - gpu_type = "hello world" - tpu_type = "hello world" - cloud_resource_type = "hello world" - forecast_type = :FORECAST_TYPE_UNSPECIFIED - prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED - aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - - query_forecasts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :query_forecasts, name - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["machine_family"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] - assert_equal "hello world", request["disk_type"] - assert_equal true, request["confidential_mode"] - assert_equal "hello world", request["gpu_type"] - assert_equal "hello world", request["tpu_type"] - assert_equal "hello world", request["cloud_resource_type"] - assert_equal :FORECAST_TYPE_UNSPECIFIED, request["forecast_type"] - assert_equal :PREDICTION_INTERVAL_UNSPECIFIED, request["prediction_interval"] - assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["aggregation_method"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, query_forecasts_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.query_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.query_forecasts ::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.query_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.query_forecasts(::Google::Cloud::CapacityPlanner::V1beta::QueryForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, confidential_mode: confidential_mode, gpu_type: gpu_type, tpu_type: tpu_type, cloud_resource_type: cloud_resource_type, forecast_type: forecast_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, query_forecasts_client_stub.call_rpc_count - end - end - - def test_query_reservations - # Create GRPC objects. - grpc_response = ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsResponse.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" - location_level = :LOCATION_TYPE_UNSPECIFIED - machine_family = "hello world" - machine_shape = {} - gpu_type = "hello world" - cloud_resource_type = "hello world" - reservation_type = :RESERVATION_TYPE_UNSPECIFIED - share_type = :SHARE_TYPE_UNSPECIFIED - ownership_type = :OWNERSHIP_TYPE_UNSPECIFIED - reservation_data_level = :RESERVATION_DATA_LEVEL_UNSPECIFIED - include_unapproved_reservations = true - aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - - query_reservations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :query_reservations, name - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest, request - assert_equal "hello world", request["parent"] - assert_equal :LOCATION_TYPE_UNSPECIFIED, request["location_level"] - assert_equal "hello world", request["machine_family"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] - assert_equal "hello world", request["gpu_type"] - assert_equal "hello world", request["cloud_resource_type"] - assert_equal :RESERVATION_TYPE_UNSPECIFIED, request["reservation_type"] - assert_equal :SHARE_TYPE_UNSPECIFIED, request["share_type"] - assert_equal :OWNERSHIP_TYPE_UNSPECIFIED, request["ownership_type"] - assert_equal :RESERVATION_DATA_LEVEL_UNSPECIFIED, request["reservation_data_level"] - assert_equal true, request["include_unapproved_reservations"] - assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["aggregation_method"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, query_reservations_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.query_reservations parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.query_reservations ::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.query_reservations({ parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.query_reservations(::Google::Cloud::CapacityPlanner::V1beta::QueryReservationsRequest.new(parent: parent, location_level: location_level, machine_family: machine_family, machine_shape: machine_shape, gpu_type: gpu_type, cloud_resource_type: cloud_resource_type, reservation_type: reservation_type, share_type: share_type, ownership_type: ownership_type, reservation_data_level: reservation_data_level, include_unapproved_reservations: include_unapproved_reservations, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, query_reservations_client_stub.call_rpc_count - end - end - - def test_export_usage_histories - # 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" - is_spot = true - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - gpu_type = "hello world" - tpu_type = "hello world" - resource_type = "hello world" - usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - output_config = {} - - export_usage_histories_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_usage_histories, name - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest, request - assert_equal "hello world", request["parent"] - assert_equal true, request["is_spot"] - assert_equal "hello world", request["machine_family"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] - assert_equal "hello world", request["disk_type"] - assert_equal "hello world", request["gpu_type"] - assert_equal "hello world", request["tpu_type"] - assert_equal "hello world", request["resource_type"] - assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["usage_aggregation_method"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_usage_histories_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) 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.export_usage_histories parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config 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.export_usage_histories ::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) 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.export_usage_histories({ parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, 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.export_usage_histories(::Google::Cloud::CapacityPlanner::V1beta::ExportUsageHistoriesRequest.new(parent: parent, is_spot: is_spot, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, usage_aggregation_method: usage_aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), 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, export_usage_histories_client_stub.call_rpc_count - end - end - - def test_export_forecasts - # 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" - machine_family = "hello world" - machine_shape = {} - disk_type = "hello world" - gpu_type = "hello world" - tpu_type = "hello world" - resource_type = "hello world" - prediction_interval = :PREDICTION_INTERVAL_UNSPECIFIED - aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - start_date = {} - end_date = {} - output_config = {} - - export_forecasts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_forecasts, name - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["machine_family"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::MachineShape), request["machine_shape"] - assert_equal "hello world", request["disk_type"] - assert_equal "hello world", request["gpu_type"] - assert_equal "hello world", request["tpu_type"] - assert_equal "hello world", request["resource_type"] - assert_equal :PREDICTION_INTERVAL_UNSPECIFIED, request["prediction_interval"] - assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["aggregation_method"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_forecasts_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }) 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.export_forecasts parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config 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.export_forecasts ::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config) 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.export_forecasts({ parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config }, 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.export_forecasts(::Google::Cloud::CapacityPlanner::V1beta::ExportForecastsRequest.new(parent: parent, machine_family: machine_family, machine_shape: machine_shape, disk_type: disk_type, gpu_type: gpu_type, tpu_type: tpu_type, resource_type: resource_type, prediction_interval: prediction_interval, aggregation_method: aggregation_method, start_date: start_date, end_date: end_date, output_config: output_config), 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, export_forecasts_client_stub.call_rpc_count - end - end - - def test_export_reservations_usage - # 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. - machine_family = "hello world" - parent = "hello world" - location_level = :LOCATION_TYPE_UNSPECIFIED - cloud_resource_type = "hello world" - usage_aggregation_method = :AGGREGATION_METHOD_UNSPECIFIED - share_type = :SHARE_TYPE_UNSPECIFIED - start_date = {} - end_date = {} - output_config = {} - - export_reservations_usage_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_reservations_usage, name - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest, request - assert_equal "hello world", request["machine_family"] - assert_equal :machine_family, request.resource - assert_equal "hello world", request["parent"] - assert_equal :LOCATION_TYPE_UNSPECIFIED, request["location_level"] - assert_equal "hello world", request["cloud_resource_type"] - assert_equal :AGGREGATION_METHOD_UNSPECIFIED, request["usage_aggregation_method"] - assert_equal :SHARE_TYPE_UNSPECIFIED, request["share_type"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["start_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["end_date"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CapacityPlanner::V1beta::OutputConfig), request["output_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_reservations_usage_client_stub do - # Create client - client = ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }) 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.export_reservations_usage machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config 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.export_reservations_usage ::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config) 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.export_reservations_usage({ machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config }, 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.export_reservations_usage(::Google::Cloud::CapacityPlanner::V1beta::ExportReservationsUsageRequest.new(machine_family: machine_family, parent: parent, location_level: location_level, cloud_resource_type: cloud_resource_type, usage_aggregation_method: usage_aggregation_method, share_type: share_type, start_date: start_date, end_date: end_date, output_config: output_config), 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, export_reservations_usage_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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::UsageService::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::CapacityPlanner::V1beta::UsageService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::CapacityPlanner::V1beta::UsageService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-capacity_planner-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/.gitignore b/owl-bot-staging/google-cloud-certificate_manager-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-certificate_manager-v1/.repo-metadata.json deleted file mode 100644 index 67f57f59fa4f..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "certificatemanager.googleapis.com", - "api_shortname": "certificatemanager", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-certificate_manager-v1/latest", - "distribution_name": "google-cloud-certificate_manager-v1", - "is_cloud": true, - "language": "ruby", - "name": "certificatemanager", - "name_pretty": "Certificate Manager V1 API", - "product_documentation": "https://cloud.google.com/certificate-manager", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Certificate Manager lets you acquire and manage Transport Layer Security (TLS) (SSL) certificates for use with classic external HTTP(S) load balancers in Google Cloud. Note that google-cloud-certificate_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-certificate_manager instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/certificate-manager", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml b/owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml deleted file mode 100644 index 49b1dc3efefd..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-certificate_manager-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-certificate_manager-v1.rb" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/.toys.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/.yardopts b/owl-bot-staging/google-cloud-certificate_manager-v1/.yardopts deleted file mode 100644 index ca21ac00ea4f..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Certificate Manager 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-certificate_manager-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-certificate_manager-v1/AUTHENTICATION.md deleted file mode 100644 index 6c91720978a3..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-certificate_manager-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-certificate_manager-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/certificate_manager/v1" - -client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/certificate_manager/v1" - -::Google::Cloud::CertificateManager::V1::CertificateManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::CertificateManager::V1::CertificateManager::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-certificate_manager-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/certificate_manager/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::CertificateManager::V1::CertificateManager::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-certificate_manager-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-certificate_manager-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile b/owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/LICENSE.md b/owl-bot-staging/google-cloud-certificate_manager-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/README.md b/owl-bot-staging/google-cloud-certificate_manager-v1/README.md deleted file mode 100644 index 6bc00c2a6a4f..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Certificate Manager V1 API - -API Client library for the Certificate Manager V1 API - -Certificate Manager lets you acquire and manage Transport Layer Security (TLS) (SSL) certificates for use with classic external HTTP(S) load balancers in Google Cloud. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Certificate Manager V1 API. Most users should consider using -the main client gem, -[google-cloud-certificate_manager](https://rubygems.org/gems/google-cloud-certificate_manager). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-certificate_manager-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/certificatemanager.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/certificate_manager/v1" - -client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new -request = ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new # (request fields as keyword arguments...) -response = client.list_certificates request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-certificate_manager-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/certificate-manager) -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/certificate_manager/v1" -require "logger" - -client = ::Google::Cloud::CertificateManager::V1::CertificateManager::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-certificate_manager`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-certificate_manager-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-certificate_manager`. -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-certificate_manager-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-certificate_manager-v1/Rakefile b/owl-bot-staging/google-cloud-certificate_manager-v1/Rakefile deleted file mode 100644 index b45a3913cae6..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/certificate_manager/v1/certificate_manager/credentials" - ::Google::Cloud::CertificateManager::V1::CertificateManager::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-certificate_manager-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-certificate_manager-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-certificate_manager-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-certificate_manager-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-certificate_manager-v1" - header "google-cloud-certificate_manager-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-certificate_manager-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-certificate_manager-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-certificate_manager-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-certificate_manager-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-certificate_manager-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-certificate_manager-v1/gapic_metadata.json deleted file mode 100644 index 18e863768690..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/gapic_metadata.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.certificatemanager.v1", - "libraryPackage": "::Google::Cloud::CertificateManager::V1", - "services": { - "CertificateManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client", - "rpcs": { - "ListCertificates": { - "methods": [ - "list_certificates" - ] - }, - "GetCertificate": { - "methods": [ - "get_certificate" - ] - }, - "CreateCertificate": { - "methods": [ - "create_certificate" - ] - }, - "UpdateCertificate": { - "methods": [ - "update_certificate" - ] - }, - "DeleteCertificate": { - "methods": [ - "delete_certificate" - ] - }, - "ListCertificateMaps": { - "methods": [ - "list_certificate_maps" - ] - }, - "GetCertificateMap": { - "methods": [ - "get_certificate_map" - ] - }, - "CreateCertificateMap": { - "methods": [ - "create_certificate_map" - ] - }, - "UpdateCertificateMap": { - "methods": [ - "update_certificate_map" - ] - }, - "DeleteCertificateMap": { - "methods": [ - "delete_certificate_map" - ] - }, - "ListCertificateMapEntries": { - "methods": [ - "list_certificate_map_entries" - ] - }, - "GetCertificateMapEntry": { - "methods": [ - "get_certificate_map_entry" - ] - }, - "CreateCertificateMapEntry": { - "methods": [ - "create_certificate_map_entry" - ] - }, - "UpdateCertificateMapEntry": { - "methods": [ - "update_certificate_map_entry" - ] - }, - "DeleteCertificateMapEntry": { - "methods": [ - "delete_certificate_map_entry" - ] - }, - "ListDnsAuthorizations": { - "methods": [ - "list_dns_authorizations" - ] - }, - "GetDnsAuthorization": { - "methods": [ - "get_dns_authorization" - ] - }, - "CreateDnsAuthorization": { - "methods": [ - "create_dns_authorization" - ] - }, - "UpdateDnsAuthorization": { - "methods": [ - "update_dns_authorization" - ] - }, - "DeleteDnsAuthorization": { - "methods": [ - "delete_dns_authorization" - ] - }, - "ListCertificateIssuanceConfigs": { - "methods": [ - "list_certificate_issuance_configs" - ] - }, - "GetCertificateIssuanceConfig": { - "methods": [ - "get_certificate_issuance_config" - ] - }, - "CreateCertificateIssuanceConfig": { - "methods": [ - "create_certificate_issuance_config" - ] - }, - "DeleteCertificateIssuanceConfig": { - "methods": [ - "delete_certificate_issuance_config" - ] - }, - "ListTrustConfigs": { - "methods": [ - "list_trust_configs" - ] - }, - "GetTrustConfig": { - "methods": [ - "get_trust_config" - ] - }, - "CreateTrustConfig": { - "methods": [ - "create_trust_config" - ] - }, - "UpdateTrustConfig": { - "methods": [ - "update_trust_config" - ] - }, - "DeleteTrustConfig": { - "methods": [ - "delete_trust_config" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec b/owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec deleted file mode 100644 index 408430c3296d..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/google-cloud-certificate_manager-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/certificate_manager/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-certificate_manager-v1" - gem.version = Google::Cloud::CertificateManager::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Certificate Manager lets you acquire and manage Transport Layer Security (TLS) (SSL) certificates for use with classic external HTTP(S) load balancers in Google Cloud. Note that google-cloud-certificate_manager-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-certificate_manager instead. See the readme for more details." - gem.summary = "API Client library for the Certificate Manager 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.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-v1.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-v1.rb deleted file mode 100644 index a560e5985df3..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google-cloud-certificate_manager-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/certificate_manager/v1" diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1.rb deleted file mode 100644 index 3c20017ffbbb..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/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/certificate_manager/v1/certificate_manager" -require "google/cloud/certificate_manager/v1/version" - -module Google - module Cloud - module CertificateManager - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/certificate_manager/v1" - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/certificate_manager/v1" - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/certificate_manager/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb deleted file mode 100644 index 49d28058b675..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module CertificateManager - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/certificate_manager/v1/rest" - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CertificateManager"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb deleted file mode 100644 index 8f41b8b38e0f..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager.rb +++ /dev/null @@ -1,81 +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/certificate_manager/v1/version" - -require "google/cloud/certificate_manager/v1/certificate_manager/credentials" -require "google/cloud/certificate_manager/v1/certificate_manager/paths" -require "google/cloud/certificate_manager/v1/certificate_manager/operations" -require "google/cloud/certificate_manager/v1/certificate_manager/client" -require "google/cloud/certificate_manager/v1/certificate_manager/rest" - -module Google - module Cloud - module CertificateManager - module V1 - ## - # API Overview - # - # Certificates Manager API allows customers to see and manage all their TLS - # certificates. - # - # Certificates Manager API service provides methods to manage certificates, - # group them into collections, and create serving configuration that can be - # easily applied to other Cloud resources e.g. Target Proxies. - # - # Data Model - # - # The Certificates Manager service exposes the following resources: - # - # * `Certificate` that describes a single TLS certificate. - # * `CertificateMap` that describes a collection of certificates that can be - # attached to a target resource. - # * `CertificateMapEntry` that describes a single configuration entry that - # consists of a SNI and a group of certificates. It's a subresource of - # CertificateMap. - # - # Certificate, CertificateMap and CertificateMapEntry IDs - # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, - # - only lower case letters, digits, and hyphen are allowed - # - length of the resource ID has to be in [1,63] range. - # - # Provides methods to manage Cloud Certificate Manager entities. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/certificate_manager/v1/certificate_manager" - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/certificate_manager/v1/certificate_manager/rest" - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - module CertificateManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "certificate_manager", "helpers.rb" -require "google/cloud/certificate_manager/v1/certificate_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb deleted file mode 100644 index b409a564a66b..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/client.rb +++ /dev/null @@ -1,3567 +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/certificatemanager/v1/certificate_manager_pb" -require "google/cloud/location" - -module Google - module Cloud - module CertificateManager - module V1 - module CertificateManager - ## - # Client for the CertificateManager service. - # - # API Overview - # - # Certificates Manager API allows customers to see and manage all their TLS - # certificates. - # - # Certificates Manager API service provides methods to manage certificates, - # group them into collections, and create serving configuration that can be - # easily applied to other Cloud resources e.g. Target Proxies. - # - # Data Model - # - # The Certificates Manager service exposes the following resources: - # - # * `Certificate` that describes a single TLS certificate. - # * `CertificateMap` that describes a collection of certificates that can be - # attached to a target resource. - # * `CertificateMapEntry` that describes a single configuration entry that - # consists of a SNI and a group of certificates. It's a subresource of - # CertificateMap. - # - # Certificate, CertificateMap and CertificateMapEntry IDs - # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, - # - only lower case letters, digits, and hyphen are allowed - # - length of the resource ID has to be in [1,63] range. - # - # Provides methods to manage Cloud Certificate Manager entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :certificate_manager_stub - - ## - # Configure the CertificateManager Client class. - # - # See {::Google::Cloud::CertificateManager::V1::CertificateManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CertificateManager clients - # ::Google::Cloud::CertificateManager::V1::CertificateManager::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", "CertificateManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_certificates.timeout = 60.0 - default_config.rpcs.list_certificates.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate.timeout = 60.0 - default_config.rpcs.get_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate.timeout = 60.0 - default_config.rpcs.create_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_certificate.timeout = 60.0 - default_config.rpcs.update_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate.timeout = 60.0 - default_config.rpcs.delete_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_certificate_maps.timeout = 60.0 - default_config.rpcs.list_certificate_maps.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate_map.timeout = 60.0 - default_config.rpcs.get_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate_map.timeout = 60.0 - default_config.rpcs.create_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_certificate_map.timeout = 60.0 - default_config.rpcs.update_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate_map.timeout = 60.0 - default_config.rpcs.delete_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_certificate_map_entries.timeout = 60.0 - default_config.rpcs.list_certificate_map_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate_map_entry.timeout = 60.0 - default_config.rpcs.get_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate_map_entry.timeout = 60.0 - default_config.rpcs.create_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_certificate_map_entry.timeout = 60.0 - default_config.rpcs.update_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate_map_entry.timeout = 60.0 - default_config.rpcs.delete_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_dns_authorizations.timeout = 60.0 - default_config.rpcs.list_dns_authorizations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_dns_authorization.timeout = 60.0 - default_config.rpcs.get_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_dns_authorization.timeout = 60.0 - default_config.rpcs.create_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_dns_authorization.timeout = 60.0 - default_config.rpcs.update_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_dns_authorization.timeout = 60.0 - default_config.rpcs.delete_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_certificate_issuance_configs.timeout = 60.0 - default_config.rpcs.list_certificate_issuance_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate_issuance_config.timeout = 60.0 - default_config.rpcs.get_certificate_issuance_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate_issuance_config.timeout = 60.0 - default_config.rpcs.create_certificate_issuance_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate_issuance_config.timeout = 60.0 - default_config.rpcs.delete_certificate_issuance_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 CertificateManager 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::CertificateManager::V1::CertificateManager::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 - @certificate_manager_stub.universe_domain - end - - ## - # Create a new CertificateManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CertificateManager 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/certificatemanager/v1/certificate_manager_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 - - @certificate_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CertificateManager::V1::CertificateManager::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 - ) - - @certificate_manager_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @certificate_manager_stub.endpoint - config.universe_domain = @certificate_manager_stub.universe_domain - config.logger = @certificate_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateManager::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @certificate_manager_stub.logger - end - - # Service calls - - ## - # Lists Certificates in a given project and location. - # - # @overload list_certificates(request, options = nil) - # Pass arguments to `list_certificates` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificates` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the certificate should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of certificates to return per call. - # @param page_token [::String] - # The value returned by the last `ListCertificatesResponse`. Indicates that - # this is a continuation of a prior `ListCertificates` call, and that the - # system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the Certificates returned. - # @param order_by [::String] - # A list of Certificate field names used to specify the order of the returned - # results. The default sorting order is ascending. To specify descending - # order for a field, add a suffix `" desc"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new - # - # # Call the list_certificates method. - # result = client.list_certificates 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::CertificateManager::V1::Certificate. - # p item - # end - # - def list_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest - - # Converts hash 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_certificates.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::CertificateManager::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_certificates.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :list_certificates, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificates, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Certificate. - # - # @overload get_certificate(request, options = nil) - # Pass arguments to `get_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(name: nil) - # Pass arguments to `get_certificate` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate to describe. Must be in the format - # `projects/*/locations/*/certificates/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CertificateManager::V1::Certificate] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CertificateManager::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateRequest.new - # - # # Call the get_certificate method. - # result = client.get_certificate request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::Certificate. - # p result - # - def get_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :get_certificate, 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 Certificate in a given project and location. - # - # @overload create_certificate(request, options = nil) - # Pass arguments to `create_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(parent: nil, certificate_id: nil, certificate: nil) - # Pass arguments to `create_certificate` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate. Must be in the format - # `projects/*/locations/*`. - # @param certificate_id [::String] - # Required. A user-provided name of the certificate. - # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] - # Required. A definition of the certificate 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new - # - # # Call the create_certificate method. - # result = client.create_certificate 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_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :create_certificate, 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 Certificate. - # - # @overload update_certificate(request, options = nil) - # Pass arguments to `update_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(certificate: nil, update_mask: nil) - # Pass arguments to `update_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] - # Required. A definition of the certificate to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new - # - # # Call the update_certificate method. - # result = client.update_certificate 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_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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.certificate&.name - header_params["certificate.name"] = request.certificate.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_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :update_certificate, 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 single Certificate. - # - # @overload delete_certificate(request, options = nil) - # Pass arguments to `delete_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(name: nil) - # Pass arguments to `delete_certificate` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate to delete. Must be in the format - # `projects/*/locations/*/certificates/*`. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new - # - # # Call the delete_certificate method. - # result = client.delete_certificate 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_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :delete_certificate, 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 CertificateMaps in a given project and location. - # - # @overload list_certificate_maps(request, options = nil) - # Pass arguments to `list_certificate_maps` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_maps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_maps` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the certificate maps should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of certificate maps to return per call. - # @param page_token [::String] - # The value returned by the last `ListCertificateMapsResponse`. Indicates - # that this is a continuation of a prior `ListCertificateMaps` call, and that - # the system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the Certificates Maps returned. - # @param order_by [::String] - # A list of Certificate Map field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.new - # - # # Call the list_certificate_maps method. - # result = client.list_certificate_maps 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::CertificateManager::V1::CertificateMap. - # p item - # end - # - def list_certificate_maps request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest - - # Converts hash 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_certificate_maps.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::CertificateManager::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_certificate_maps.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_maps.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :list_certificate_maps, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_maps, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single CertificateMap. - # - # @overload get_certificate_map(request, options = nil) - # Pass arguments to `get_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(name: nil) - # Pass arguments to `get_certificate_map` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map to describe. Must be in the format - # `projects/*/locations/*/certificateMaps/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CertificateManager::V1::CertificateMap] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new - # - # # Call the get_certificate_map method. - # result = client.get_certificate_map request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMap. - # p result - # - def get_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :get_certificate_map, 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 CertificateMap in a given project and location. - # - # @overload create_certificate_map(request, options = nil) - # Pass arguments to `create_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(parent: nil, certificate_map_id: nil, certificate_map: nil) - # Pass arguments to `create_certificate_map` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate map. Must be in the format - # `projects/*/locations/*`. - # @param certificate_map_id [::String] - # Required. A user-provided name of the certificate map. - # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] - # Required. A definition of the certificate map 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new - # - # # Call the create_certificate_map method. - # result = client.create_certificate_map 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_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :create_certificate_map, 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 CertificateMap. - # - # @overload update_certificate_map(request, options = nil) - # Pass arguments to `update_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(certificate_map: nil, update_mask: nil) - # Pass arguments to `update_certificate_map` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] - # Required. A definition of the certificate map to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new - # - # # Call the update_certificate_map method. - # result = client.update_certificate_map 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_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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.certificate_map&.name - header_params["certificate_map.name"] = request.certificate_map.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_certificate_map.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :update_certificate_map, 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 single CertificateMap. A Certificate Map can't be deleted - # if it contains Certificate Map Entries. Remove all the entries from - # the map before calling this method. - # - # @overload delete_certificate_map(request, options = nil) - # Pass arguments to `delete_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(name: nil) - # Pass arguments to `delete_certificate_map` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map to delete. Must be in the format - # `projects/*/locations/*/certificateMaps/*`. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new - # - # # Call the delete_certificate_map method. - # result = client.delete_certificate_map 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_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :delete_certificate_map, 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 CertificateMapEntries in a given project and location. - # - # @overload list_certificate_map_entries(request, options = nil) - # Pass arguments to `list_certificate_map_entries` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_map_entries` via keyword arguments. Note that at - # least one keyword argument is 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 project, location and certificate map from which the - # certificate map entries should be listed, specified in the format - # `projects/*/locations/*/certificateMaps/*`. - # @param page_size [::Integer] - # Maximum number of certificate map entries to return. The service may return - # fewer than this value. - # If unspecified, at most 50 certificate map entries will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # The value returned by the last `ListCertificateMapEntriesResponse`. - # Indicates that this is a continuation of a prior - # `ListCertificateMapEntries` call, and that the system should return the - # next page of data. - # @param filter [::String] - # Filter expression to restrict the returned Certificate Map Entries. - # @param order_by [::String] - # A list of Certificate Map Entry field names used to specify - # the order of the returned results. The default sorting order is ascending. - # To specify descending order for a field, add a suffix `" desc"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.new - # - # # Call the list_certificate_map_entries method. - # result = client.list_certificate_map_entries 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::CertificateManager::V1::CertificateMapEntry. - # p item - # end - # - def list_certificate_map_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest - - # Converts hash 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_certificate_map_entries.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::CertificateManager::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_certificate_map_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_map_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :list_certificate_map_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_map_entries, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single CertificateMapEntry. - # - # @overload get_certificate_map_entry(request, options = nil) - # Pass arguments to `get_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) - # Pass arguments to `get_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map entry to describe. Must be in the - # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new - # - # # Call the get_certificate_map_entry method. - # result = client.get_certificate_map_entry request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMapEntry. - # p result - # - def get_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :get_certificate_map_entry, 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 CertificateMapEntry in a given project and location. - # - # @overload create_certificate_map_entry(request, options = nil) - # Pass arguments to `create_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(parent: nil, certificate_map_entry_id: nil, certificate_map_entry: nil) - # Pass arguments to `create_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate map entry. Must be in the - # format `projects/*/locations/*/certificateMaps/*`. - # @param certificate_map_entry_id [::String] - # Required. A user-provided name of the certificate map entry. - # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] - # Required. A definition of the certificate map entry 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new - # - # # Call the create_certificate_map_entry method. - # result = client.create_certificate_map_entry 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_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :create_certificate_map_entry, 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 CertificateMapEntry. - # - # @overload update_certificate_map_entry(request, options = nil) - # Pass arguments to `update_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(certificate_map_entry: nil, update_mask: nil) - # Pass arguments to `update_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] - # Required. A definition of the certificate map entry to create map entry. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new - # - # # Call the update_certificate_map_entry method. - # result = client.update_certificate_map_entry 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_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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.certificate_map_entry&.name - header_params["certificate_map_entry.name"] = request.certificate_map_entry.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_certificate_map_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :update_certificate_map_entry, 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 single CertificateMapEntry. - # - # @overload delete_certificate_map_entry(request, options = nil) - # Pass arguments to `delete_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) - # Pass arguments to `delete_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map entry to delete. Must be in the - # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new - # - # # Call the delete_certificate_map_entry method. - # result = client.delete_certificate_map_entry 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_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :delete_certificate_map_entry, 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 DnsAuthorizations in a given project and location. - # - # @overload list_dns_authorizations(request, options = nil) - # Pass arguments to `list_dns_authorizations` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorizations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_dns_authorizations` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the dns authorizations should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of dns authorizations to return per call. - # @param page_token [::String] - # The value returned by the last `ListDnsAuthorizationsResponse`. Indicates - # that this is a continuation of a prior `ListDnsAuthorizations` call, and - # that the system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the Dns Authorizations returned. - # @param order_by [::String] - # A list of Dns Authorization field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.new - # - # # Call the list_dns_authorizations method. - # result = client.list_dns_authorizations 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::CertificateManager::V1::DnsAuthorization. - # p item - # end - # - def list_dns_authorizations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest - - # Converts hash 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_dns_authorizations.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::CertificateManager::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_dns_authorizations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_dns_authorizations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :list_dns_authorizations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_dns_authorizations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single DnsAuthorization. - # - # @overload get_dns_authorization(request, options = nil) - # Pass arguments to `get_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) - # Pass arguments to `get_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the dns authorization to describe. Must be in the - # format `projects/*/locations/*/dnsAuthorizations/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CertificateManager::V1::DnsAuthorization] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new - # - # # Call the get_dns_authorization method. - # result = client.get_dns_authorization request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::DnsAuthorization. - # p result - # - def get_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :get_dns_authorization, 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 DnsAuthorization in a given project and location. - # - # @overload create_dns_authorization(request, options = nil) - # Pass arguments to `create_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(parent: nil, dns_authorization_id: nil, dns_authorization: nil) - # Pass arguments to `create_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the dns authorization. Must be in the - # format `projects/*/locations/*`. - # @param dns_authorization_id [::String] - # Required. A user-provided name of the dns authorization. - # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] - # Required. A definition of the dns authorization 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new - # - # # Call the create_dns_authorization method. - # result = client.create_dns_authorization 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_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :create_dns_authorization, 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 DnsAuthorization. - # - # @overload update_dns_authorization(request, options = nil) - # Pass arguments to `update_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(dns_authorization: nil, update_mask: nil) - # Pass arguments to `update_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] - # Required. A definition of the dns authorization to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new - # - # # Call the update_dns_authorization method. - # result = client.update_dns_authorization 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_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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.dns_authorization&.name - header_params["dns_authorization.name"] = request.dns_authorization.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_dns_authorization.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :update_dns_authorization, 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 single DnsAuthorization. - # - # @overload delete_dns_authorization(request, options = nil) - # Pass arguments to `delete_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) - # Pass arguments to `delete_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the dns authorization to delete. Must be in the format - # `projects/*/locations/*/dnsAuthorizations/*`. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new - # - # # Call the delete_dns_authorization method. - # result = client.delete_dns_authorization 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_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :delete_dns_authorization, 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 CertificateIssuanceConfigs in a given project and location. - # - # @overload list_certificate_issuance_configs(request, options = nil) - # Pass arguments to `list_certificate_issuance_configs` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_issuance_configs` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the certificate should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of certificate configs to return per call. - # @param page_token [::String] - # The value returned by the last `ListCertificateIssuanceConfigsResponse`. - # Indicates that this is a continuation of a prior - # `ListCertificateIssuanceConfigs` call, and that the system should return - # the next page of data. - # @param filter [::String] - # Filter expression to restrict the Certificates Configs returned. - # @param order_by [::String] - # A list of Certificate Config field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.new - # - # # Call the list_certificate_issuance_configs method. - # result = client.list_certificate_issuance_configs 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::CertificateManager::V1::CertificateIssuanceConfig. - # p item - # end - # - def list_certificate_issuance_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest - - # Converts hash 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_certificate_issuance_configs.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::CertificateManager::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_certificate_issuance_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_certificate_issuance_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :list_certificate_issuance_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_certificate_issuance_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single CertificateIssuanceConfig. - # - # @overload get_certificate_issuance_config(request, options = nil) - # Pass arguments to `get_certificate_issuance_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) - # Pass arguments to `get_certificate_issuance_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate issuance config to describe. Must be in - # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new - # - # # Call the get_certificate_issuance_config method. - # result = client.get_certificate_issuance_config request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig. - # p result - # - def get_certificate_issuance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest - - # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_certificate_issuance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :get_certificate_issuance_config, 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 CertificateIssuanceConfig in a given project and location. - # - # @overload create_certificate_issuance_config(request, options = nil) - # Pass arguments to `create_certificate_issuance_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_config(parent: nil, certificate_issuance_config_id: nil, certificate_issuance_config: nil) - # Pass arguments to `create_certificate_issuance_config` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate issuance config. Must be - # in the format `projects/*/locations/*`. - # @param certificate_issuance_config_id [::String] - # Required. A user-provided name of the certificate config. - # @param certificate_issuance_config [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig, ::Hash] - # Required. A definition of the certificate issuance config 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new - # - # # Call the create_certificate_issuance_config method. - # result = client.create_certificate_issuance_config 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_certificate_issuance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest - - # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_certificate_issuance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :create_certificate_issuance_config, 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 single CertificateIssuanceConfig. - # - # @overload delete_certificate_issuance_config(request, options = nil) - # Pass arguments to `delete_certificate_issuance_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) - # Pass arguments to `delete_certificate_issuance_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate issuance config to delete. Must be in - # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new - # - # # Call the delete_certificate_issuance_config method. - # result = client.delete_certificate_issuance_config 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_certificate_issuance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest - - # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_certificate_issuance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :delete_certificate_issuance_config, 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 TrustConfigs in a given project and location. - # - # @overload list_trust_configs(request, options = nil) - # Pass arguments to `list_trust_configs` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_trust_configs` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TrustConfigs should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TrustConfigs to return per call. - # @param page_token [::String] - # The value returned by the last `ListTrustConfigsResponse`. Indicates - # that this is a continuation of a prior `ListTrustConfigs` call, and that - # the system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the TrustConfigs returned. - # @param order_by [::String] - # A list of TrustConfig field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new - # - # # Call the list_trust_configs method. - # result = client.list_trust_configs 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::CertificateManager::V1::TrustConfig. - # p item - # end - # - def list_trust_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest - - # Converts hash 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_trust_configs.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::CertificateManager::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_trust_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_trust_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :list_trust_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @certificate_manager_stub, :list_trust_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TrustConfig. - # - # @overload get_trust_config(request, options = nil) - # Pass arguments to `get_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(name: nil) - # Pass arguments to `get_trust_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TrustConfig to describe. Must be in the format - # `projects/*/locations/*/trustConfigs/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CertificateManager::V1::TrustConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new - # - # # Call the get_trust_config method. - # result = client.get_trust_config request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig. - # p result - # - def get_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :get_trust_config, 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 TrustConfig in a given project and location. - # - # @overload create_trust_config(request, options = nil) - # Pass arguments to `create_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(parent: nil, trust_config_id: nil, trust_config: nil) - # Pass arguments to `create_trust_config` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the TrustConfig. Must be in the format - # `projects/*/locations/*`. - # @param trust_config_id [::String] - # Required. A user-provided name of the TrustConfig. Must match the regexp - # `[a-z0-9-]{1,63}`. - # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] - # Required. A definition of the TrustConfig 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new - # - # # Call the create_trust_config method. - # result = client.create_trust_config 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_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :create_trust_config, 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 TrustConfig. - # - # @overload update_trust_config(request, options = nil) - # Pass arguments to `update_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(trust_config: nil, update_mask: nil) - # Pass arguments to `update_trust_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] - # Required. A definition of the TrustConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new - # - # # Call the update_trust_config method. - # result = client.update_trust_config 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_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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.trust_config&.name - header_params["trust_config.name"] = request.trust_config.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_trust_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :update_trust_config, 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 single TrustConfig. - # - # @overload delete_trust_config(request, options = nil) - # Pass arguments to `delete_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(name: nil, etag: nil) - # Pass arguments to `delete_trust_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TrustConfig to delete. Must be in the format - # `projects/*/locations/*/trustConfigs/*`. - # @param etag [::String] - # The current etag of the TrustConfig. - # If an etag is provided and does not match the current etag of the resource, - # deletion will be blocked and an ABORTED error will be returned. - # - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new - # - # # Call the delete_trust_config method. - # result = client.delete_trust_config 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_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.call_rpc :delete_trust_config, 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 CertificateManager API. - # - # This class represents the configuration for CertificateManager, - # 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::CertificateManager::V1::CertificateManager::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_certificates to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_certificates.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_certificates.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::CertificateManager::V1::CertificateManager::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 = "certificatemanager.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 CertificateManager 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_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificates - ## - # RPC-specific configuration for `get_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate - ## - # RPC-specific configuration for `create_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate - ## - # RPC-specific configuration for `update_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate - ## - # RPC-specific configuration for `delete_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate - ## - # RPC-specific configuration for `list_certificate_maps` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_maps - ## - # RPC-specific configuration for `get_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_map - ## - # RPC-specific configuration for `create_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_map - ## - # RPC-specific configuration for `update_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_map - ## - # RPC-specific configuration for `delete_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_map - ## - # RPC-specific configuration for `list_certificate_map_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_map_entries - ## - # RPC-specific configuration for `get_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_map_entry - ## - # RPC-specific configuration for `create_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_map_entry - ## - # RPC-specific configuration for `update_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_map_entry - ## - # RPC-specific configuration for `delete_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_map_entry - ## - # RPC-specific configuration for `list_dns_authorizations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_dns_authorizations - ## - # RPC-specific configuration for `get_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dns_authorization - ## - # RPC-specific configuration for `create_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dns_authorization - ## - # RPC-specific configuration for `update_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dns_authorization - ## - # RPC-specific configuration for `delete_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dns_authorization - ## - # RPC-specific configuration for `list_certificate_issuance_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_issuance_configs - ## - # RPC-specific configuration for `get_certificate_issuance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_issuance_config - ## - # RPC-specific configuration for `create_certificate_issuance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_issuance_config - ## - # RPC-specific configuration for `delete_certificate_issuance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_issuance_config - ## - # RPC-specific configuration for `list_trust_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_trust_configs - ## - # RPC-specific configuration for `get_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trust_config - ## - # RPC-specific configuration for `create_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trust_config - ## - # RPC-specific configuration for `update_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trust_config - ## - # RPC-specific configuration for `delete_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trust_config - - # @private - def initialize parent_rpcs = nil - list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates - @list_certificates = ::Gapic::Config::Method.new list_certificates_config - get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate - @get_certificate = ::Gapic::Config::Method.new get_certificate_config - create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate - @create_certificate = ::Gapic::Config::Method.new create_certificate_config - update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate - @update_certificate = ::Gapic::Config::Method.new update_certificate_config - delete_certificate_config = parent_rpcs.delete_certificate if parent_rpcs.respond_to? :delete_certificate - @delete_certificate = ::Gapic::Config::Method.new delete_certificate_config - list_certificate_maps_config = parent_rpcs.list_certificate_maps if parent_rpcs.respond_to? :list_certificate_maps - @list_certificate_maps = ::Gapic::Config::Method.new list_certificate_maps_config - get_certificate_map_config = parent_rpcs.get_certificate_map if parent_rpcs.respond_to? :get_certificate_map - @get_certificate_map = ::Gapic::Config::Method.new get_certificate_map_config - create_certificate_map_config = parent_rpcs.create_certificate_map if parent_rpcs.respond_to? :create_certificate_map - @create_certificate_map = ::Gapic::Config::Method.new create_certificate_map_config - update_certificate_map_config = parent_rpcs.update_certificate_map if parent_rpcs.respond_to? :update_certificate_map - @update_certificate_map = ::Gapic::Config::Method.new update_certificate_map_config - delete_certificate_map_config = parent_rpcs.delete_certificate_map if parent_rpcs.respond_to? :delete_certificate_map - @delete_certificate_map = ::Gapic::Config::Method.new delete_certificate_map_config - list_certificate_map_entries_config = parent_rpcs.list_certificate_map_entries if parent_rpcs.respond_to? :list_certificate_map_entries - @list_certificate_map_entries = ::Gapic::Config::Method.new list_certificate_map_entries_config - get_certificate_map_entry_config = parent_rpcs.get_certificate_map_entry if parent_rpcs.respond_to? :get_certificate_map_entry - @get_certificate_map_entry = ::Gapic::Config::Method.new get_certificate_map_entry_config - create_certificate_map_entry_config = parent_rpcs.create_certificate_map_entry if parent_rpcs.respond_to? :create_certificate_map_entry - @create_certificate_map_entry = ::Gapic::Config::Method.new create_certificate_map_entry_config - update_certificate_map_entry_config = parent_rpcs.update_certificate_map_entry if parent_rpcs.respond_to? :update_certificate_map_entry - @update_certificate_map_entry = ::Gapic::Config::Method.new update_certificate_map_entry_config - delete_certificate_map_entry_config = parent_rpcs.delete_certificate_map_entry if parent_rpcs.respond_to? :delete_certificate_map_entry - @delete_certificate_map_entry = ::Gapic::Config::Method.new delete_certificate_map_entry_config - list_dns_authorizations_config = parent_rpcs.list_dns_authorizations if parent_rpcs.respond_to? :list_dns_authorizations - @list_dns_authorizations = ::Gapic::Config::Method.new list_dns_authorizations_config - get_dns_authorization_config = parent_rpcs.get_dns_authorization if parent_rpcs.respond_to? :get_dns_authorization - @get_dns_authorization = ::Gapic::Config::Method.new get_dns_authorization_config - create_dns_authorization_config = parent_rpcs.create_dns_authorization if parent_rpcs.respond_to? :create_dns_authorization - @create_dns_authorization = ::Gapic::Config::Method.new create_dns_authorization_config - update_dns_authorization_config = parent_rpcs.update_dns_authorization if parent_rpcs.respond_to? :update_dns_authorization - @update_dns_authorization = ::Gapic::Config::Method.new update_dns_authorization_config - delete_dns_authorization_config = parent_rpcs.delete_dns_authorization if parent_rpcs.respond_to? :delete_dns_authorization - @delete_dns_authorization = ::Gapic::Config::Method.new delete_dns_authorization_config - list_certificate_issuance_configs_config = parent_rpcs.list_certificate_issuance_configs if parent_rpcs.respond_to? :list_certificate_issuance_configs - @list_certificate_issuance_configs = ::Gapic::Config::Method.new list_certificate_issuance_configs_config - get_certificate_issuance_config_config = parent_rpcs.get_certificate_issuance_config if parent_rpcs.respond_to? :get_certificate_issuance_config - @get_certificate_issuance_config = ::Gapic::Config::Method.new get_certificate_issuance_config_config - create_certificate_issuance_config_config = parent_rpcs.create_certificate_issuance_config if parent_rpcs.respond_to? :create_certificate_issuance_config - @create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config - delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config - @delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config - list_trust_configs_config = parent_rpcs.list_trust_configs if parent_rpcs.respond_to? :list_trust_configs - @list_trust_configs = ::Gapic::Config::Method.new list_trust_configs_config - get_trust_config_config = parent_rpcs.get_trust_config if parent_rpcs.respond_to? :get_trust_config - @get_trust_config = ::Gapic::Config::Method.new get_trust_config_config - create_trust_config_config = parent_rpcs.create_trust_config if parent_rpcs.respond_to? :create_trust_config - @create_trust_config = ::Gapic::Config::Method.new create_trust_config_config - update_trust_config_config = parent_rpcs.update_trust_config if parent_rpcs.respond_to? :update_trust_config - @update_trust_config = ::Gapic::Config::Method.new update_trust_config_config - delete_trust_config_config = parent_rpcs.delete_trust_config if parent_rpcs.respond_to? :delete_trust_config - @delete_trust_config = ::Gapic::Config::Method.new delete_trust_config_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb deleted file mode 100644 index 7c858c767e6f..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CertificateManager - module V1 - module CertificateManager - # Credentials for the CertificateManager API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/operations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/operations.rb deleted file mode 100644 index b10d77666dbb..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/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 CertificateManager - module V1 - module CertificateManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CertificateManager 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 CertificateManager 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::CertificateManager::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::CertificateManager::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::CertificateManager::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::CertificateManager::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::CertificateManager::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 = "certificatemanager.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-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb deleted file mode 100644 index 056853804233..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/paths.rb +++ /dev/null @@ -1,185 +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 CertificateManager - module V1 - module CertificateManager - # Path helper methods for the CertificateManager API. - module Paths - ## - # Create a fully-qualified CaPool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/caPools/{ca_pool}` - # - # @param project [String] - # @param location [String] - # @param ca_pool [String] - # - # @return [::String] - def ca_pool_path project:, location:, ca_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/caPools/#{ca_pool}" - end - - ## - # Create a fully-qualified Certificate resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificates/{certificate}` - # - # @param project [String] - # @param location [String] - # @param certificate [String] - # - # @return [::String] - def certificate_path project:, location:, certificate: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificates/#{certificate}" - end - - ## - # Create a fully-qualified CertificateIssuanceConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}` - # - # @param project [String] - # @param location [String] - # @param certificate_issuance_config [String] - # - # @return [::String] - def certificate_issuance_config_path project:, location:, certificate_issuance_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificateIssuanceConfigs/#{certificate_issuance_config}" - end - - ## - # Create a fully-qualified CertificateMap resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificateMaps/{certificate_map}` - # - # @param project [String] - # @param location [String] - # @param certificate_map [String] - # - # @return [::String] - def certificate_map_path project:, location:, certificate_map: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificateMaps/#{certificate_map}" - end - - ## - # Create a fully-qualified CertificateMapEntry resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}` - # - # @param project [String] - # @param location [String] - # @param certificate_map [String] - # @param certificate_map_entry [String] - # - # @return [::String] - def certificate_map_entry_path project:, location:, certificate_map:, certificate_map_entry: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "certificate_map cannot contain /" if certificate_map.to_s.include? "/" - - "projects/#{project}/locations/#{location}/certificateMaps/#{certificate_map}/certificateMapEntries/#{certificate_map_entry}" - end - - ## - # Create a fully-qualified DnsAuthorization resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}` - # - # @param project [String] - # @param location [String] - # @param dns_authorization [String] - # - # @return [::String] - def dns_authorization_path project:, location:, dns_authorization: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/dnsAuthorizations/#{dns_authorization}" - 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 TrustConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/trustConfigs/{trust_config}` - # - # @param project [String] - # @param location [String] - # @param trust_config [String] - # - # @return [::String] - def trust_config_path project:, location:, trust_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/trustConfigs/#{trust_config}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb deleted file mode 100644 index 495df2e270ea..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/certificate_manager/v1/version" -require "google/cloud/certificate_manager/v1/bindings_override" - -require "google/cloud/certificate_manager/v1/certificate_manager/credentials" -require "google/cloud/certificate_manager/v1/certificate_manager/paths" -require "google/cloud/certificate_manager/v1/certificate_manager/rest/operations" -require "google/cloud/certificate_manager/v1/certificate_manager/rest/client" - -module Google - module Cloud - module CertificateManager - module V1 - ## - # API Overview - # - # Certificates Manager API allows customers to see and manage all their TLS - # certificates. - # - # Certificates Manager API service provides methods to manage certificates, - # group them into collections, and create serving configuration that can be - # easily applied to other Cloud resources e.g. Target Proxies. - # - # Data Model - # - # The Certificates Manager service exposes the following resources: - # - # * `Certificate` that describes a single TLS certificate. - # * `CertificateMap` that describes a collection of certificates that can be - # attached to a target resource. - # * `CertificateMapEntry` that describes a single configuration entry that - # consists of a SNI and a group of certificates. It's a subresource of - # CertificateMap. - # - # Certificate, CertificateMap and CertificateMapEntry IDs - # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, - # - only lower case letters, digits, and hyphen are allowed - # - length of the resource ID has to be in [1,63] range. - # - # Provides methods to manage Cloud Certificate Manager entities. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/certificate_manager/v1/certificate_manager/rest" - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - module CertificateManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/certificate_manager/v1/certificate_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb deleted file mode 100644 index 4103362cc5a2..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/client.rb +++ /dev/null @@ -1,3329 +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/certificatemanager/v1/certificate_manager_pb" -require "google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module CertificateManager - module V1 - module CertificateManager - module Rest - ## - # REST client for the CertificateManager service. - # - # API Overview - # - # Certificates Manager API allows customers to see and manage all their TLS - # certificates. - # - # Certificates Manager API service provides methods to manage certificates, - # group them into collections, and create serving configuration that can be - # easily applied to other Cloud resources e.g. Target Proxies. - # - # Data Model - # - # The Certificates Manager service exposes the following resources: - # - # * `Certificate` that describes a single TLS certificate. - # * `CertificateMap` that describes a collection of certificates that can be - # attached to a target resource. - # * `CertificateMapEntry` that describes a single configuration entry that - # consists of a SNI and a group of certificates. It's a subresource of - # CertificateMap. - # - # Certificate, CertificateMap and CertificateMapEntry IDs - # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, - # - only lower case letters, digits, and hyphen are allowed - # - length of the resource ID has to be in [1,63] range. - # - # Provides methods to manage Cloud Certificate Manager entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :certificate_manager_stub - - ## - # Configure the CertificateManager Client class. - # - # See {::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CertificateManager clients - # ::Google::Cloud::CertificateManager::V1::CertificateManager::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", "CertificateManager", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_certificates.timeout = 60.0 - default_config.rpcs.list_certificates.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate.timeout = 60.0 - default_config.rpcs.get_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate.timeout = 60.0 - default_config.rpcs.create_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_certificate.timeout = 60.0 - default_config.rpcs.update_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate.timeout = 60.0 - default_config.rpcs.delete_certificate.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_certificate_maps.timeout = 60.0 - default_config.rpcs.list_certificate_maps.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate_map.timeout = 60.0 - default_config.rpcs.get_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate_map.timeout = 60.0 - default_config.rpcs.create_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_certificate_map.timeout = 60.0 - default_config.rpcs.update_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate_map.timeout = 60.0 - default_config.rpcs.delete_certificate_map.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_certificate_map_entries.timeout = 60.0 - default_config.rpcs.list_certificate_map_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate_map_entry.timeout = 60.0 - default_config.rpcs.get_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate_map_entry.timeout = 60.0 - default_config.rpcs.create_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_certificate_map_entry.timeout = 60.0 - default_config.rpcs.update_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate_map_entry.timeout = 60.0 - default_config.rpcs.delete_certificate_map_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_dns_authorizations.timeout = 60.0 - default_config.rpcs.list_dns_authorizations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_dns_authorization.timeout = 60.0 - default_config.rpcs.get_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_dns_authorization.timeout = 60.0 - default_config.rpcs.create_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_dns_authorization.timeout = 60.0 - default_config.rpcs.update_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_dns_authorization.timeout = 60.0 - default_config.rpcs.delete_dns_authorization.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_certificate_issuance_configs.timeout = 60.0 - default_config.rpcs.list_certificate_issuance_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_certificate_issuance_config.timeout = 60.0 - default_config.rpcs.get_certificate_issuance_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_certificate_issuance_config.timeout = 60.0 - default_config.rpcs.create_certificate_issuance_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_certificate_issuance_config.timeout = 60.0 - default_config.rpcs.delete_certificate_issuance_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 CertificateManager 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::CertificateManager::V1::CertificateManager::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 - @certificate_manager_stub.universe_domain - end - - ## - # Create a new CertificateManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CertificateManager 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::CertificateManager::V1::CertificateManager::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 - - @certificate_manager_stub = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @certificate_manager_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @certificate_manager_stub.endpoint - config.universe_domain = @certificate_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @certificate_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Operations] - # - attr_reader :operations_client - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @certificate_manager_stub.logger - end - - # Service calls - - ## - # Lists Certificates in a given project and location. - # - # @overload list_certificates(request, options = nil) - # Pass arguments to `list_certificates` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificatesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificates(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificates` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the certificate should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of certificates to return per call. - # @param page_token [::String] - # The value returned by the last `ListCertificatesResponse`. Indicates that - # this is a continuation of a prior `ListCertificates` call, and that the - # system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the Certificates returned. - # @param order_by [::String] - # A list of Certificate field names used to specify the order of the returned - # results. The default sorting order is ascending. To specify descending - # order for a field, add a suffix `" desc"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::Certificate>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new - # - # # Call the list_certificates method. - # result = client.list_certificates 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::CertificateManager::V1::Certificate. - # p item - # end - # - def list_certificates request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest - - # Converts hash 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_certificates.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::CertificateManager::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_certificates.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificates.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.list_certificates request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificates, "certificates", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Certificate. - # - # @overload get_certificate(request, options = nil) - # Pass arguments to `get_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(name: nil) - # Pass arguments to `get_certificate` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate to describe. Must be in the format - # `projects/*/locations/*/certificates/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CertificateManager::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::Certificate] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateRequest.new - # - # # Call the get_certificate method. - # result = client.get_certificate request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::Certificate. - # p result - # - def get_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.get_certificate 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 Certificate in a given project and location. - # - # @overload create_certificate(request, options = nil) - # Pass arguments to `create_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(parent: nil, certificate_id: nil, certificate: nil) - # Pass arguments to `create_certificate` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate. Must be in the format - # `projects/*/locations/*`. - # @param certificate_id [::String] - # Required. A user-provided name of the certificate. - # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] - # Required. A definition of the certificate 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new - # - # # Call the create_certificate method. - # result = client.create_certificate 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_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.create_certificate 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 Certificate. - # - # @overload update_certificate(request, options = nil) - # Pass arguments to `update_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(certificate: nil, update_mask: nil) - # Pass arguments to `update_certificate` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate [::Google::Cloud::CertificateManager::V1::Certificate, ::Hash] - # Required. A definition of the certificate to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new - # - # # Call the update_certificate method. - # result = client.update_certificate 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_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.update_certificate 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 single Certificate. - # - # @overload delete_certificate(request, options = nil) - # Pass arguments to `delete_certificate` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate(name: nil) - # Pass arguments to `delete_certificate` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate to delete. Must be in the format - # `projects/*/locations/*/certificates/*`. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new - # - # # Call the delete_certificate method. - # result = client.delete_certificate 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_certificate request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest - - # Converts hash 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_certificate.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::CertificateManager::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_certificate.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_certificate.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.delete_certificate 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 CertificateMaps in a given project and location. - # - # @overload list_certificate_maps(request, options = nil) - # Pass arguments to `list_certificate_maps` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_maps(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_maps` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the certificate maps should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of certificate maps to return per call. - # @param page_token [::String] - # The value returned by the last `ListCertificateMapsResponse`. Indicates - # that this is a continuation of a prior `ListCertificateMaps` call, and that - # the system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the Certificates Maps returned. - # @param order_by [::String] - # A list of Certificate Map field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMap>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.new - # - # # Call the list_certificate_maps method. - # result = client.list_certificate_maps 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::CertificateManager::V1::CertificateMap. - # p item - # end - # - def list_certificate_maps request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest - - # Converts hash 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_certificate_maps.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::CertificateManager::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_certificate_maps.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_maps.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.list_certificate_maps request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificate_maps, "certificate_maps", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single CertificateMap. - # - # @overload get_certificate_map(request, options = nil) - # Pass arguments to `get_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(name: nil) - # Pass arguments to `get_certificate_map` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map to describe. Must be in the format - # `projects/*/locations/*/certificateMaps/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateMap] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new - # - # # Call the get_certificate_map method. - # result = client.get_certificate_map request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMap. - # p result - # - def get_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.get_certificate_map 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 CertificateMap in a given project and location. - # - # @overload create_certificate_map(request, options = nil) - # Pass arguments to `create_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(parent: nil, certificate_map_id: nil, certificate_map: nil) - # Pass arguments to `create_certificate_map` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate map. Must be in the format - # `projects/*/locations/*`. - # @param certificate_map_id [::String] - # Required. A user-provided name of the certificate map. - # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] - # Required. A definition of the certificate map 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new - # - # # Call the create_certificate_map method. - # result = client.create_certificate_map 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_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.create_certificate_map 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 CertificateMap. - # - # @overload update_certificate_map(request, options = nil) - # Pass arguments to `update_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(certificate_map: nil, update_mask: nil) - # Pass arguments to `update_certificate_map` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_map [::Google::Cloud::CertificateManager::V1::CertificateMap, ::Hash] - # Required. A definition of the certificate map to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new - # - # # Call the update_certificate_map method. - # result = client.update_certificate_map 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_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.update_certificate_map 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 single CertificateMap. A Certificate Map can't be deleted - # if it contains Certificate Map Entries. Remove all the entries from - # the map before calling this method. - # - # @overload delete_certificate_map(request, options = nil) - # Pass arguments to `delete_certificate_map` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map(name: nil) - # Pass arguments to `delete_certificate_map` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map to delete. Must be in the format - # `projects/*/locations/*/certificateMaps/*`. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new - # - # # Call the delete_certificate_map method. - # result = client.delete_certificate_map 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_certificate_map request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest - - # Converts hash 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_certificate_map.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::CertificateManager::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_certificate_map.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_certificate_map.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.delete_certificate_map 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 CertificateMapEntries in a given project and location. - # - # @overload list_certificate_map_entries(request, options = nil) - # Pass arguments to `list_certificate_map_entries` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_map_entries` via keyword arguments. Note that at - # least one keyword argument is 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 project, location and certificate map from which the - # certificate map entries should be listed, specified in the format - # `projects/*/locations/*/certificateMaps/*`. - # @param page_size [::Integer] - # Maximum number of certificate map entries to return. The service may return - # fewer than this value. - # If unspecified, at most 50 certificate map entries will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # The value returned by the last `ListCertificateMapEntriesResponse`. - # Indicates that this is a continuation of a prior - # `ListCertificateMapEntries` call, and that the system should return the - # next page of data. - # @param filter [::String] - # Filter expression to restrict the returned Certificate Map Entries. - # @param order_by [::String] - # A list of Certificate Map Entry field names used to specify - # the order of the returned results. The default sorting order is ascending. - # To specify descending order for a field, add a suffix `" desc"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.new - # - # # Call the list_certificate_map_entries method. - # result = client.list_certificate_map_entries 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::CertificateManager::V1::CertificateMapEntry. - # p item - # end - # - def list_certificate_map_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest - - # Converts hash 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_certificate_map_entries.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::CertificateManager::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_certificate_map_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_map_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.list_certificate_map_entries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificate_map_entries, "certificate_map_entries", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single CertificateMapEntry. - # - # @overload get_certificate_map_entry(request, options = nil) - # Pass arguments to `get_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) - # Pass arguments to `get_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map entry to describe. Must be in the - # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new - # - # # Call the get_certificate_map_entry method. - # result = client.get_certificate_map_entry request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMapEntry. - # p result - # - def get_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.get_certificate_map_entry 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 CertificateMapEntry in a given project and location. - # - # @overload create_certificate_map_entry(request, options = nil) - # Pass arguments to `create_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(parent: nil, certificate_map_entry_id: nil, certificate_map_entry: nil) - # Pass arguments to `create_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate map entry. Must be in the - # format `projects/*/locations/*/certificateMaps/*`. - # @param certificate_map_entry_id [::String] - # Required. A user-provided name of the certificate map entry. - # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] - # Required. A definition of the certificate map entry 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new - # - # # Call the create_certificate_map_entry method. - # result = client.create_certificate_map_entry 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_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.create_certificate_map_entry 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 CertificateMapEntry. - # - # @overload update_certificate_map_entry(request, options = nil) - # Pass arguments to `update_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(certificate_map_entry: nil, update_mask: nil) - # Pass arguments to `update_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param certificate_map_entry [::Google::Cloud::CertificateManager::V1::CertificateMapEntry, ::Hash] - # Required. A definition of the certificate map entry to create map entry. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new - # - # # Call the update_certificate_map_entry method. - # result = client.update_certificate_map_entry 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_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.update_certificate_map_entry 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 single CertificateMapEntry. - # - # @overload delete_certificate_map_entry(request, options = nil) - # Pass arguments to `delete_certificate_map_entry` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_map_entry(name: nil) - # Pass arguments to `delete_certificate_map_entry` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate map entry to delete. Must be in the - # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new - # - # # Call the delete_certificate_map_entry method. - # result = client.delete_certificate_map_entry 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_certificate_map_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest - - # Converts hash 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_certificate_map_entry.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::CertificateManager::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_certificate_map_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_certificate_map_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.delete_certificate_map_entry 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 DnsAuthorizations in a given project and location. - # - # @overload list_dns_authorizations(request, options = nil) - # Pass arguments to `list_dns_authorizations` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorizations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_dns_authorizations` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the dns authorizations should - # be listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of dns authorizations to return per call. - # @param page_token [::String] - # The value returned by the last `ListDnsAuthorizationsResponse`. Indicates - # that this is a continuation of a prior `ListDnsAuthorizations` call, and - # that the system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the Dns Authorizations returned. - # @param order_by [::String] - # A list of Dns Authorization field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.new - # - # # Call the list_dns_authorizations method. - # result = client.list_dns_authorizations 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::CertificateManager::V1::DnsAuthorization. - # p item - # end - # - def list_dns_authorizations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest - - # Converts hash 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_dns_authorizations.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::CertificateManager::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_dns_authorizations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_dns_authorizations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.list_dns_authorizations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_dns_authorizations, "dns_authorizations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single DnsAuthorization. - # - # @overload get_dns_authorization(request, options = nil) - # Pass arguments to `get_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) - # Pass arguments to `get_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the dns authorization to describe. Must be in the - # format `projects/*/locations/*/dnsAuthorizations/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CertificateManager::V1::DnsAuthorization] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new - # - # # Call the get_dns_authorization method. - # result = client.get_dns_authorization request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::DnsAuthorization. - # p result - # - def get_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.get_dns_authorization 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 DnsAuthorization in a given project and location. - # - # @overload create_dns_authorization(request, options = nil) - # Pass arguments to `create_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(parent: nil, dns_authorization_id: nil, dns_authorization: nil) - # Pass arguments to `create_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the dns authorization. Must be in the - # format `projects/*/locations/*`. - # @param dns_authorization_id [::String] - # Required. A user-provided name of the dns authorization. - # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] - # Required. A definition of the dns authorization 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new - # - # # Call the create_dns_authorization method. - # result = client.create_dns_authorization 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_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.create_dns_authorization 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 DnsAuthorization. - # - # @overload update_dns_authorization(request, options = nil) - # Pass arguments to `update_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(dns_authorization: nil, update_mask: nil) - # Pass arguments to `update_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param dns_authorization [::Google::Cloud::CertificateManager::V1::DnsAuthorization, ::Hash] - # Required. A definition of the dns authorization to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new - # - # # Call the update_dns_authorization method. - # result = client.update_dns_authorization 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_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.update_dns_authorization 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 single DnsAuthorization. - # - # @overload delete_dns_authorization(request, options = nil) - # Pass arguments to `delete_dns_authorization` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dns_authorization(name: nil) - # Pass arguments to `delete_dns_authorization` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the dns authorization to delete. Must be in the format - # `projects/*/locations/*/dnsAuthorizations/*`. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new - # - # # Call the delete_dns_authorization method. - # result = client.delete_dns_authorization 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_dns_authorization request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest - - # Converts hash 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_dns_authorization.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::CertificateManager::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_dns_authorization.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dns_authorization.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.delete_dns_authorization 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 CertificateIssuanceConfigs in a given project and location. - # - # @overload list_certificate_issuance_configs(request, options = nil) - # Pass arguments to `list_certificate_issuance_configs` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_certificate_issuance_configs` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the certificate should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of certificate configs to return per call. - # @param page_token [::String] - # The value returned by the last `ListCertificateIssuanceConfigsResponse`. - # Indicates that this is a continuation of a prior - # `ListCertificateIssuanceConfigs` call, and that the system should return - # the next page of data. - # @param filter [::String] - # Filter expression to restrict the Certificates Configs returned. - # @param order_by [::String] - # A list of Certificate Config field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.new - # - # # Call the list_certificate_issuance_configs method. - # result = client.list_certificate_issuance_configs 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::CertificateManager::V1::CertificateIssuanceConfig. - # p item - # end - # - def list_certificate_issuance_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest - - # Converts hash 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_certificate_issuance_configs.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::CertificateManager::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_certificate_issuance_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_certificate_issuance_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.list_certificate_issuance_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_certificate_issuance_configs, "certificate_issuance_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single CertificateIssuanceConfig. - # - # @overload get_certificate_issuance_config(request, options = nil) - # Pass arguments to `get_certificate_issuance_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) - # Pass arguments to `get_certificate_issuance_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate issuance config to describe. Must be in - # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new - # - # # Call the get_certificate_issuance_config method. - # result = client.get_certificate_issuance_config request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig. - # p result - # - def get_certificate_issuance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest - - # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_certificate_issuance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.get_certificate_issuance_config 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 CertificateIssuanceConfig in a given project and location. - # - # @overload create_certificate_issuance_config(request, options = nil) - # Pass arguments to `create_certificate_issuance_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_config(parent: nil, certificate_issuance_config_id: nil, certificate_issuance_config: nil) - # Pass arguments to `create_certificate_issuance_config` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the certificate issuance config. Must be - # in the format `projects/*/locations/*`. - # @param certificate_issuance_config_id [::String] - # Required. A user-provided name of the certificate config. - # @param certificate_issuance_config [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig, ::Hash] - # Required. A definition of the certificate issuance config 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new - # - # # Call the create_certificate_issuance_config method. - # result = client.create_certificate_issuance_config 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_certificate_issuance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest - - # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_certificate_issuance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.create_certificate_issuance_config 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 single CertificateIssuanceConfig. - # - # @overload delete_certificate_issuance_config(request, options = nil) - # Pass arguments to `delete_certificate_issuance_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_certificate_issuance_config(name: nil) - # Pass arguments to `delete_certificate_issuance_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the certificate issuance config to delete. Must be in - # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new - # - # # Call the delete_certificate_issuance_config method. - # result = client.delete_certificate_issuance_config 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_certificate_issuance_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest - - # Converts hash 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_certificate_issuance_config.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::CertificateManager::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_certificate_issuance_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_certificate_issuance_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.delete_certificate_issuance_config 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 TrustConfigs in a given project and location. - # - # @overload list_trust_configs(request, options = nil) - # Pass arguments to `list_trust_configs` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_trust_configs` via keyword arguments. Note that at - # least one keyword argument is 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 project and location from which the TrustConfigs should be - # listed, specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Maximum number of TrustConfigs to return per call. - # @param page_token [::String] - # The value returned by the last `ListTrustConfigsResponse`. Indicates - # that this is a continuation of a prior `ListTrustConfigs` call, and that - # the system should return the next page of data. - # @param filter [::String] - # Filter expression to restrict the TrustConfigs returned. - # @param order_by [::String] - # A list of TrustConfig field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CertificateManager::V1::TrustConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new - # - # # Call the list_trust_configs method. - # result = client.list_trust_configs 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::CertificateManager::V1::TrustConfig. - # p item - # end - # - def list_trust_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest - - # Converts hash 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_trust_configs.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::CertificateManager::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_trust_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_trust_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.list_trust_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @certificate_manager_stub, :list_trust_configs, "trust_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single TrustConfig. - # - # @overload get_trust_config(request, options = nil) - # Pass arguments to `get_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(name: nil) - # Pass arguments to `get_trust_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TrustConfig to describe. Must be in the format - # `projects/*/locations/*/trustConfigs/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CertificateManager::V1::TrustConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new - # - # # Call the get_trust_config method. - # result = client.get_trust_config request - # - # # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig. - # p result - # - def get_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.get_trust_config 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 TrustConfig in a given project and location. - # - # @overload create_trust_config(request, options = nil) - # Pass arguments to `create_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(parent: nil, trust_config_id: nil, trust_config: nil) - # Pass arguments to `create_trust_config` via keyword arguments. Note that at - # least one keyword argument is 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 resource of the TrustConfig. Must be in the format - # `projects/*/locations/*`. - # @param trust_config_id [::String] - # Required. A user-provided name of the TrustConfig. Must match the regexp - # `[a-z0-9-]{1,63}`. - # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] - # Required. A definition of the TrustConfig 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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new - # - # # Call the create_trust_config method. - # result = client.create_trust_config 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_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.create_trust_config 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 TrustConfig. - # - # @overload update_trust_config(request, options = nil) - # Pass arguments to `update_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(trust_config: nil, update_mask: nil) - # Pass arguments to `update_trust_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param trust_config [::Google::Cloud::CertificateManager::V1::TrustConfig, ::Hash] - # Required. A definition of the TrustConfig to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new - # - # # Call the update_trust_config method. - # result = client.update_trust_config 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_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.update_trust_config 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 single TrustConfig. - # - # @overload delete_trust_config(request, options = nil) - # Pass arguments to `delete_trust_config` via a request object, either of type - # {::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trust_config(name: nil, etag: nil) - # Pass arguments to `delete_trust_config` via keyword arguments. Note that at - # least one keyword argument is 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. A name of the TrustConfig to delete. Must be in the format - # `projects/*/locations/*/trustConfigs/*`. - # @param etag [::String] - # The current etag of the TrustConfig. - # If an etag is provided and does not match the current etag of the resource, - # deletion will be blocked and an ABORTED error will be returned. - # @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/certificate_manager/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new - # - # # Call the delete_trust_config method. - # result = client.delete_trust_config 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_trust_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest - - # Converts hash 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_trust_config.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::CertificateManager::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_trust_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_trust_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @certificate_manager_stub.delete_trust_config 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 class for the CertificateManager REST API. - # - # This class represents the configuration for CertificateManager 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::CertificateManager::V1::CertificateManager::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_certificates to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_certificates.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_certificates.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 = "certificatemanager.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CertificateManager 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_certificates` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificates - ## - # RPC-specific configuration for `get_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate - ## - # RPC-specific configuration for `create_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate - ## - # RPC-specific configuration for `update_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate - ## - # RPC-specific configuration for `delete_certificate` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate - ## - # RPC-specific configuration for `list_certificate_maps` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_maps - ## - # RPC-specific configuration for `get_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_map - ## - # RPC-specific configuration for `create_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_map - ## - # RPC-specific configuration for `update_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_map - ## - # RPC-specific configuration for `delete_certificate_map` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_map - ## - # RPC-specific configuration for `list_certificate_map_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_map_entries - ## - # RPC-specific configuration for `get_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_map_entry - ## - # RPC-specific configuration for `create_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_map_entry - ## - # RPC-specific configuration for `update_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :update_certificate_map_entry - ## - # RPC-specific configuration for `delete_certificate_map_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_map_entry - ## - # RPC-specific configuration for `list_dns_authorizations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_dns_authorizations - ## - # RPC-specific configuration for `get_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dns_authorization - ## - # RPC-specific configuration for `create_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dns_authorization - ## - # RPC-specific configuration for `update_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dns_authorization - ## - # RPC-specific configuration for `delete_dns_authorization` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dns_authorization - ## - # RPC-specific configuration for `list_certificate_issuance_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_certificate_issuance_configs - ## - # RPC-specific configuration for `get_certificate_issuance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_certificate_issuance_config - ## - # RPC-specific configuration for `create_certificate_issuance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_certificate_issuance_config - ## - # RPC-specific configuration for `delete_certificate_issuance_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_certificate_issuance_config - ## - # RPC-specific configuration for `list_trust_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_trust_configs - ## - # RPC-specific configuration for `get_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trust_config - ## - # RPC-specific configuration for `create_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trust_config - ## - # RPC-specific configuration for `update_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trust_config - ## - # RPC-specific configuration for `delete_trust_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trust_config - - # @private - def initialize parent_rpcs = nil - list_certificates_config = parent_rpcs.list_certificates if parent_rpcs.respond_to? :list_certificates - @list_certificates = ::Gapic::Config::Method.new list_certificates_config - get_certificate_config = parent_rpcs.get_certificate if parent_rpcs.respond_to? :get_certificate - @get_certificate = ::Gapic::Config::Method.new get_certificate_config - create_certificate_config = parent_rpcs.create_certificate if parent_rpcs.respond_to? :create_certificate - @create_certificate = ::Gapic::Config::Method.new create_certificate_config - update_certificate_config = parent_rpcs.update_certificate if parent_rpcs.respond_to? :update_certificate - @update_certificate = ::Gapic::Config::Method.new update_certificate_config - delete_certificate_config = parent_rpcs.delete_certificate if parent_rpcs.respond_to? :delete_certificate - @delete_certificate = ::Gapic::Config::Method.new delete_certificate_config - list_certificate_maps_config = parent_rpcs.list_certificate_maps if parent_rpcs.respond_to? :list_certificate_maps - @list_certificate_maps = ::Gapic::Config::Method.new list_certificate_maps_config - get_certificate_map_config = parent_rpcs.get_certificate_map if parent_rpcs.respond_to? :get_certificate_map - @get_certificate_map = ::Gapic::Config::Method.new get_certificate_map_config - create_certificate_map_config = parent_rpcs.create_certificate_map if parent_rpcs.respond_to? :create_certificate_map - @create_certificate_map = ::Gapic::Config::Method.new create_certificate_map_config - update_certificate_map_config = parent_rpcs.update_certificate_map if parent_rpcs.respond_to? :update_certificate_map - @update_certificate_map = ::Gapic::Config::Method.new update_certificate_map_config - delete_certificate_map_config = parent_rpcs.delete_certificate_map if parent_rpcs.respond_to? :delete_certificate_map - @delete_certificate_map = ::Gapic::Config::Method.new delete_certificate_map_config - list_certificate_map_entries_config = parent_rpcs.list_certificate_map_entries if parent_rpcs.respond_to? :list_certificate_map_entries - @list_certificate_map_entries = ::Gapic::Config::Method.new list_certificate_map_entries_config - get_certificate_map_entry_config = parent_rpcs.get_certificate_map_entry if parent_rpcs.respond_to? :get_certificate_map_entry - @get_certificate_map_entry = ::Gapic::Config::Method.new get_certificate_map_entry_config - create_certificate_map_entry_config = parent_rpcs.create_certificate_map_entry if parent_rpcs.respond_to? :create_certificate_map_entry - @create_certificate_map_entry = ::Gapic::Config::Method.new create_certificate_map_entry_config - update_certificate_map_entry_config = parent_rpcs.update_certificate_map_entry if parent_rpcs.respond_to? :update_certificate_map_entry - @update_certificate_map_entry = ::Gapic::Config::Method.new update_certificate_map_entry_config - delete_certificate_map_entry_config = parent_rpcs.delete_certificate_map_entry if parent_rpcs.respond_to? :delete_certificate_map_entry - @delete_certificate_map_entry = ::Gapic::Config::Method.new delete_certificate_map_entry_config - list_dns_authorizations_config = parent_rpcs.list_dns_authorizations if parent_rpcs.respond_to? :list_dns_authorizations - @list_dns_authorizations = ::Gapic::Config::Method.new list_dns_authorizations_config - get_dns_authorization_config = parent_rpcs.get_dns_authorization if parent_rpcs.respond_to? :get_dns_authorization - @get_dns_authorization = ::Gapic::Config::Method.new get_dns_authorization_config - create_dns_authorization_config = parent_rpcs.create_dns_authorization if parent_rpcs.respond_to? :create_dns_authorization - @create_dns_authorization = ::Gapic::Config::Method.new create_dns_authorization_config - update_dns_authorization_config = parent_rpcs.update_dns_authorization if parent_rpcs.respond_to? :update_dns_authorization - @update_dns_authorization = ::Gapic::Config::Method.new update_dns_authorization_config - delete_dns_authorization_config = parent_rpcs.delete_dns_authorization if parent_rpcs.respond_to? :delete_dns_authorization - @delete_dns_authorization = ::Gapic::Config::Method.new delete_dns_authorization_config - list_certificate_issuance_configs_config = parent_rpcs.list_certificate_issuance_configs if parent_rpcs.respond_to? :list_certificate_issuance_configs - @list_certificate_issuance_configs = ::Gapic::Config::Method.new list_certificate_issuance_configs_config - get_certificate_issuance_config_config = parent_rpcs.get_certificate_issuance_config if parent_rpcs.respond_to? :get_certificate_issuance_config - @get_certificate_issuance_config = ::Gapic::Config::Method.new get_certificate_issuance_config_config - create_certificate_issuance_config_config = parent_rpcs.create_certificate_issuance_config if parent_rpcs.respond_to? :create_certificate_issuance_config - @create_certificate_issuance_config = ::Gapic::Config::Method.new create_certificate_issuance_config_config - delete_certificate_issuance_config_config = parent_rpcs.delete_certificate_issuance_config if parent_rpcs.respond_to? :delete_certificate_issuance_config - @delete_certificate_issuance_config = ::Gapic::Config::Method.new delete_certificate_issuance_config_config - list_trust_configs_config = parent_rpcs.list_trust_configs if parent_rpcs.respond_to? :list_trust_configs - @list_trust_configs = ::Gapic::Config::Method.new list_trust_configs_config - get_trust_config_config = parent_rpcs.get_trust_config if parent_rpcs.respond_to? :get_trust_config - @get_trust_config = ::Gapic::Config::Method.new get_trust_config_config - create_trust_config_config = parent_rpcs.create_trust_config if parent_rpcs.respond_to? :create_trust_config - @create_trust_config = ::Gapic::Config::Method.new create_trust_config_config - update_trust_config_config = parent_rpcs.update_trust_config if parent_rpcs.respond_to? :update_trust_config - @update_trust_config = ::Gapic::Config::Method.new update_trust_config_config - delete_trust_config_config = parent_rpcs.delete_trust_config if parent_rpcs.respond_to? :delete_trust_config - @delete_trust_config = ::Gapic::Config::Method.new delete_trust_config_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/operations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/operations.rb deleted file mode 100644 index 8cc6ca05f6f2..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/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 CertificateManager - module V1 - module CertificateManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "certificatemanager.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CertificateManager 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 CertificateManager 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::CertificateManager::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::CertificateManager::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::CertificateManager::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::CertificateManager::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 = "certificatemanager.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-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb deleted file mode 100644 index 666d3ba3f4d7..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/certificate_manager/rest/service_stub.rb +++ /dev/null @@ -1,1861 +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/certificatemanager/v1/certificate_manager_pb" - -module Google - module Cloud - module CertificateManager - module V1 - module CertificateManager - module Rest - ## - # REST service stub for the CertificateManager 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_certificates REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest] - # 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::CertificateManager::V1::ListCertificatesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::ListCertificatesResponse] - # A result object deserialized from the server's reply - def list_certificates request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificates_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_certificates", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse.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_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateRequest] - # 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::CertificateManager::V1::Certificate] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::Certificate] - # A result object deserialized from the server's reply - def get_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_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_certificate", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::Certificate.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_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest] - # 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_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_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_certificate", - 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_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest] - # 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_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_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_certificate", - 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_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest] - # 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_certificate request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_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_certificate", - 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_certificate_maps REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest] - # 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::CertificateManager::V1::ListCertificateMapsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse] - # A result object deserialized from the server's reply - def list_certificate_maps request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_maps_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_certificate_maps", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse.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_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest] - # 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::CertificateManager::V1::CertificateMap] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] - # A result object deserialized from the server's reply - def get_certificate_map request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_map_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_certificate_map", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::CertificateMap.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_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest] - # 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_certificate_map request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_map_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_certificate_map", - 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_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest] - # 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_certificate_map request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_map_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_certificate_map", - 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_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest] - # 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_certificate_map request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_map_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_certificate_map", - 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_certificate_map_entries REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest] - # 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::CertificateManager::V1::ListCertificateMapEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse] - # A result object deserialized from the server's reply - def list_certificate_map_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_map_entries_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_certificate_map_entries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse.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_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest] - # 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::CertificateManager::V1::CertificateMapEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] - # A result object deserialized from the server's reply - def get_certificate_map_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_map_entry_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_certificate_map_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::CertificateMapEntry.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_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest] - # 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_certificate_map_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_map_entry_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_certificate_map_entry", - 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_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest] - # 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_certificate_map_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_certificate_map_entry_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_certificate_map_entry", - 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_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest] - # 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_certificate_map_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_map_entry_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_certificate_map_entry", - 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_dns_authorizations REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest] - # 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::CertificateManager::V1::ListDnsAuthorizationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse] - # A result object deserialized from the server's reply - def list_dns_authorizations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_dns_authorizations_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_dns_authorizations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse.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_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest] - # 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::CertificateManager::V1::DnsAuthorization] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] - # A result object deserialized from the server's reply - def get_dns_authorization request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dns_authorization_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_dns_authorization", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::DnsAuthorization.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_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest] - # 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_dns_authorization request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dns_authorization_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_dns_authorization", - 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_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest] - # 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_dns_authorization request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dns_authorization_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_dns_authorization", - 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_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest] - # 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_dns_authorization request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dns_authorization_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_dns_authorization", - 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_certificate_issuance_configs REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest] - # 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::CertificateManager::V1::ListCertificateIssuanceConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse] - # A result object deserialized from the server's reply - def list_certificate_issuance_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_certificate_issuance_configs_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_certificate_issuance_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse.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_certificate_issuance_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest] - # 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::CertificateManager::V1::CertificateIssuanceConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] - # A result object deserialized from the server's reply - def get_certificate_issuance_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_certificate_issuance_config_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_certificate_issuance_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.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_certificate_issuance_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest] - # 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_certificate_issuance_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_certificate_issuance_config_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_certificate_issuance_config", - 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_certificate_issuance_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest] - # 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_certificate_issuance_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_certificate_issuance_config_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_certificate_issuance_config", - 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_trust_configs REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest] - # 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::CertificateManager::V1::ListTrustConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse] - # A result object deserialized from the server's reply - def list_trust_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_trust_configs_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_trust_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse.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_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest] - # 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::CertificateManager::V1::TrustConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] - # A result object deserialized from the server's reply - def get_trust_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_trust_config_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_trust_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CertificateManager::V1::TrustConfig.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_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest] - # 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_trust_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_trust_config_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_trust_config", - 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_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest] - # 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_trust_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_trust_config_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_trust_config", - 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_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest] - # 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_trust_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_trust_config_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_trust_config", - 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 list_certificates REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificatesRequest] - # 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_certificates_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificates", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateRequest] - # 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_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateRequest] - # 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_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/certificates", - body: "certificate", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest] - # 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_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{certificate.name}", - body: "certificate", - matches: [ - ["certificate.name", %r{^projects/[^/]+/locations/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_certificate REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest] - # 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_certificate_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificates/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_maps REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest] - # 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_certificate_maps_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificateMaps", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest] - # 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_certificate_map_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest] - # 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_certificate_map_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/certificateMaps", - body: "certificate_map", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest] - # 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_certificate_map_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{certificate_map.name}", - body: "certificate_map", - matches: [ - ["certificate_map.name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_certificate_map REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest] - # 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_certificate_map_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_map_entries REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest] - # 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_certificate_map_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificateMapEntries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest] - # 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_certificate_map_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/certificateMapEntries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest] - # 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_certificate_map_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/certificateMapEntries", - body: "certificate_map_entry", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest] - # 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_certificate_map_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{certificate_map_entry.name}", - body: "certificate_map_entry", - matches: [ - ["certificate_map_entry.name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/certificateMapEntries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_certificate_map_entry REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest] - # 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_certificate_map_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateMaps/[^/]+/certificateMapEntries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_dns_authorizations REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest] - # 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_dns_authorizations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dnsAuthorizations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest] - # 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_dns_authorization_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dnsAuthorizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest] - # 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_dns_authorization_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dnsAuthorizations", - body: "dns_authorization", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest] - # 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_dns_authorization_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{dns_authorization.name}", - body: "dns_authorization", - matches: [ - ["dns_authorization.name", %r{^projects/[^/]+/locations/[^/]+/dnsAuthorizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dns_authorization REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest] - # 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_dns_authorization_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/dnsAuthorizations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_certificate_issuance_configs REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest] - # 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_certificate_issuance_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/certificateIssuanceConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_certificate_issuance_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest] - # 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_certificate_issuance_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateIssuanceConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_certificate_issuance_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest] - # 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_certificate_issuance_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/certificateIssuanceConfigs", - body: "certificate_issuance_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_certificate_issuance_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest] - # 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_certificate_issuance_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/certificateIssuanceConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_trust_configs REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest] - # 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_trust_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/trustConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest] - # 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_trust_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest] - # 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_trust_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/trustConfigs", - body: "trust_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest] - # 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_trust_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{trust_config.name}", - body: "trust_config", - matches: [ - ["trust_config.name", %r{^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_trust_config REST call - # - # @param request_pb [::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest] - # 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_trust_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/trustConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb deleted file mode 100644 index f38f65295a35..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/certificate_manager/v1/certificate_manager/rest" -require "google/cloud/certificate_manager/v1/bindings_override" -require "google/cloud/certificate_manager/v1/version" - -module Google - module Cloud - module CertificateManager - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/certificate_manager/v1/rest" - # client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/version.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/v1/version.rb deleted file mode 100644 index 67813bc06643..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificate_manager/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 CertificateManager - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb deleted file mode 100644 index 53e9071d2f3b..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_issuance_config_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/certificatemanager/v1/certificate_issuance_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nDgoogle/cloud/certificatemanager/v1/certificate_issuance_config.proto\x12\"google.cloud.certificatemanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xab\x01\n%ListCertificateIssuanceConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"\xbb\x01\n&ListCertificateIssuanceConfigsResponse\x12\x63\n\x1c\x63\x65rtificate_issuance_configs\x18\x01 \x03(\x0b\x32=.google.cloud.certificatemanager.v1.CertificateIssuanceConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"x\n#GetCertificateIssuanceConfigRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;certificatemanager.googleapis.com/CertificateIssuanceConfig\"\xf9\x01\n&CreateCertificateIssuanceConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12+\n\x1e\x63\x65rtificate_issuance_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12g\n\x1b\x63\x65rtificate_issuance_config\x18\x03 \x01(\x0b\x32=.google.cloud.certificatemanager.v1.CertificateIssuanceConfigB\x03\xe0\x41\x02\"{\n&DeleteCertificateIssuanceConfigRequest\x12Q\n\x04name\x18\x01 \x01(\tBC\xe0\x41\x02\xfa\x41=\n;certificatemanager.googleapis.com/CertificateIssuanceConfig\"\xa3\t\n\x19\x43\x65rtificateIssuanceConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Y\n\x06labels\x18\x04 \x03(\x0b\x32I.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x83\x01\n\x1c\x63\x65rtificate_authority_config\x18\x06 \x01(\x0b\x32X.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfigB\x03\xe0\x41\x02\x12\x30\n\x08lifetime\x18\x07 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\'\n\x1arotation_window_percentage\x18\x08 \x01(\x05\x42\x03\xe0\x41\x02\x12\x66\n\rkey_algorithm\x18\t \x01(\x0e\x32J.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithmB\x03\xe0\x41\x02\x1a\xb0\x02\n\x1a\x43\x65rtificateAuthorityConfig\x12\xaa\x01\n$certificate_authority_service_config\x18\x01 \x01(\x0b\x32z.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfigH\x00\x1a]\n!CertificateAuthorityServiceConfig\x12\x38\n\x07\x63\x61_pool\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fprivateca.googleapis.com/CaPoolB\x06\n\x04kind\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"K\n\x0cKeyAlgorithm\x12\x1d\n\x19KEY_ALGORITHM_UNSPECIFIED\x10\x00\x12\x0c\n\x08RSA_2048\x10\x01\x12\x0e\n\nECDSA_P256\x10\x04:\xa3\x01\xea\x41\x9f\x01\n;certificatemanager.googleapis.com/CertificateIssuanceConfig\x12`projects/{project}/locations/{location}/certificateIssuanceConfigs/{certificate_issuance_config}B\xf3\x02\n&com.google.cloud.certificatemanager.v1B\x1e\x43\x65rtificateIssuanceConfigProtoP\x01ZVcloud.google.com/go/certificatemanager/apiv1/certificatemanagerpb;certificatemanagerpb\xaa\x02\"Google.Cloud.CertificateManager.V1\xca\x02\"Google\\Cloud\\CertificateManager\\V1\xea\x02%Google::Cloud::CertificateManager::V1\xea\x41\\\n\x1fprivateca.googleapis.com/CaPool\x12\x39projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CertificateManager - module V1 - ListCertificateIssuanceConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest").msgclass - ListCertificateIssuanceConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse").msgclass - GetCertificateIssuanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest").msgclass - CreateCertificateIssuanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest").msgclass - DeleteCertificateIssuanceConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest").msgclass - CertificateIssuanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig").msgclass - CertificateIssuanceConfig::CertificateAuthorityConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig").msgclass - CertificateIssuanceConfig::CertificateAuthorityConfig::CertificateAuthorityServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig").msgclass - CertificateIssuanceConfig::KeyAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateIssuanceConfig.KeyAlgorithm").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb deleted file mode 100644 index af08692825af..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/certificatemanager/v1/certificate_manager.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/certificatemanager/v1/certificate_issuance_config_pb' -require 'google/cloud/certificatemanager/v1/trust_config_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google.cloud.certificatemanager.v1.CertificateMap.LabelsEntry\x12X\n\x0cgclb_targets\x18\x04 \x03(\x0b\x32=.google.cloud.certificatemanager.v1.CertificateMap.GclbTargetB\x03\xe0\x41\x03\x1a\xfa\x01\n\nGclbTarget\x12!\n\x12target_https_proxy\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1f\n\x10target_ssl_proxy\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x12_\n\nip_configs\x18\x02 \x03(\x0b\x32\x46.google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfigB\x03\xe0\x41\x03\x1a\x37\n\x08IpConfig\x12\x17\n\nip_address\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x12\n\x05ports\x18\x03 \x03(\rB\x03\xe0\x41\x03\x42\x0e\n\x0ctarget_proxy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n0certificatemanager.googleapis.com/CertificateMap\x12Iprojects/{project}/locations/{location}/certificateMaps/{certificate_map}\"\x91\x06\n\x13\x43\x65rtificateMapEntry\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\t \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12S\n\x06labels\x18\x04 \x03(\x0b\x32\x43.google.cloud.certificatemanager.v1.CertificateMapEntry.LabelsEntry\x12\x12\n\x08hostname\x18\x05 \x01(\tH\x00\x12R\n\x07matcher\x18\n \x01(\x0e\x32?.google.cloud.certificatemanager.v1.CertificateMapEntry.MatcherH\x00\x12H\n\x0c\x63\x65rtificates\x18\x07 \x03(\tB2\xfa\x41/\n-certificatemanager.googleapis.com/Certificate\x12\x44\n\x05state\x18\x08 \x01(\x0e\x32\x30.google.cloud.certificatemanager.v1.ServingStateB\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\"/\n\x07Matcher\x12\x17\n\x13MATCHER_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIMARY\x10\x01:\xb4\x01\xea\x41\xb0\x01\n5certificatemanager.googleapis.com/CertificateMapEntry\x12wprojects/{project}/locations/{location}/certificateMaps/{certificate_map}/certificateMapEntries/{certificate_map_entry}B\x07\n\x05match\"\x92\x06\n\x10\x44nsAuthorization\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x06labels\x18\x04 \x03(\x0b\x32@.google.cloud.certificatemanager.v1.DnsAuthorization.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x16\n\x06\x64omain\x18\x06 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x05\x12h\n\x13\x64ns_resource_record\x18\n \x01(\x0b\x32\x46.google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecordB\x03\xe0\x41\x03\x12L\n\x04type\x18\x0b \x01(\x0e\x32\x39.google.cloud.certificatemanager.v1.DnsAuthorization.TypeB\x03\xe0\x41\x05\x1aL\n\x11\x44nsResourceRecord\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04type\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x64\x61ta\x18\x03 \x01(\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\"F\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x46IXED_RECORD\x10\x01\x12\x16\n\x12PER_PROJECT_RECORD\x10\x02:\x87\x01\xea\x41\x83\x01\n2certificatemanager.googleapis.com/DnsAuthorization\x12Mprojects/{project}/locations/{location}/dnsAuthorizations/{dns_authorization}*F\n\x0cServingState\x12\x1d\n\x19SERVING_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x32\xd6:\n\x12\x43\x65rtificateManager\x12\xd0\x01\n\x10ListCertificates\x12;.google.cloud.certificatemanager.v1.ListCertificatesRequest\x1a<.google.cloud.certificatemanager.v1.ListCertificatesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/certificates\x12\xbd\x01\n\x0eGetCertificate\x12\x39.google.cloud.certificatemanager.v1.GetCertificateRequest\x1a/.google.cloud.certificatemanager.v1.Certificate\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/certificates/*}\x12\xff\x01\n\x11\x43reateCertificate\x12<.google.cloud.certificatemanager.v1.CreateCertificateRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41 \n\x0b\x43\x65rtificate\x12\x11OperationMetadata\xda\x41!parent,certificate,certificate_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/certificates:\x0b\x63\x65rtificate\x12\x81\x02\n\x11UpdateCertificate\x12<.google.cloud.certificatemanager.v1.UpdateCertificateRequest\x1a\x1d.google.longrunning.Operation\"\x8e\x01\xca\x41 \n\x0b\x43\x65rtificate\x12\x11OperationMetadata\xda\x41\x17\x63\x65rtificate,update_mask\x82\xd3\xe4\x93\x02K2.google.cloud.certificatemanager.v1.ListCertificateMapsRequest\x1a?.google.cloud.certificatemanager.v1.ListCertificateMapsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/certificateMaps\x12\xc9\x01\n\x11GetCertificateMap\x12<.google.cloud.certificatemanager.v1.GetCertificateMapRequest\x1a\x32.google.cloud.certificatemanager.v1.CertificateMap\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/certificateMaps/*}\x12\x97\x02\n\x14\x43reateCertificateMap\x12?.google.cloud.certificatemanager.v1.CreateCertificateMapRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0e\x43\x65rtificateMap\x12\x11OperationMetadata\xda\x41)parent,certificate_map,certificate_map_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/certificateMaps:\x0f\x63\x65rtificate_map\x12\x99\x02\n\x14UpdateCertificateMap\x12?.google.cloud.certificatemanager.v1.UpdateCertificateMapRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0e\x43\x65rtificateMap\x12\x11OperationMetadata\xda\x41\x1b\x63\x65rtificate_map,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{certificate_map.name=projects/*/locations/*/certificateMaps/*}:\x0f\x63\x65rtificate_map\x12\xe7\x01\n\x14\x44\x65leteCertificateMap\x12?.google.cloud.certificatemanager.v1.DeleteCertificateMapRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/certificateMaps/*}\x12\x86\x02\n\x19ListCertificateMapEntries\x12\x44.google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest\x1a\x45.google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries\x12\xf0\x01\n\x16GetCertificateMapEntry\x12\x41.google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest\x1a\x37.google.cloud.certificatemanager.v1.CertificateMapEntry\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}\x12\xd0\x02\n\x19\x43reateCertificateMapEntry\x12\x44.google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest\x1a\x1d.google.longrunning.Operation\"\xcd\x01\xca\x41(\n\x13\x43\x65rtificateMapEntry\x12\x11OperationMetadata\xda\x41\x35parent,certificate_map_entry,certificate_map_entry_id\x82\xd3\xe4\x93\x02\x64\"K/v1/{parent=projects/*/locations/*/certificateMaps/*}/certificateMapEntries:\x15\x63\x65rtificate_map_entry\x12\xd2\x02\n\x19UpdateCertificateMapEntry\x12\x44.google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest\x1a\x1d.google.longrunning.Operation\"\xcf\x01\xca\x41(\n\x13\x43\x65rtificateMapEntry\x12\x11OperationMetadata\xda\x41!certificate_map_entry,update_mask\x82\xd3\xe4\x93\x02z2a/v1/{certificate_map_entry.name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}:\x15\x63\x65rtificate_map_entry\x12\x8a\x02\n\x19\x44\x65leteCertificateMapEntry\x12\x44.google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02M*K/v1/{name=projects/*/locations/*/certificateMaps/*/certificateMapEntries/*}\x12\xe4\x01\n\x15ListDnsAuthorizations\x12@.google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest\x1a\x41.google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*}/dnsAuthorizations\x12\xd1\x01\n\x13GetDnsAuthorization\x12>.google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest\x1a\x34.google.cloud.certificatemanager.v1.DnsAuthorization\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/dnsAuthorizations/*}\x12\xa5\x02\n\x16\x43reateDnsAuthorization\x12\x41.google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41%\n\x10\x44nsAuthorization\x12\x11OperationMetadata\xda\x41-parent,dns_authorization,dns_authorization_id\x82\xd3\xe4\x93\x02J\"5/v1/{parent=projects/*/locations/*}/dnsAuthorizations:\x11\x64ns_authorization\x12\xa7\x02\n\x16UpdateDnsAuthorization\x12\x41.google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41%\n\x10\x44nsAuthorization\x12\x11OperationMetadata\xda\x41\x1d\x64ns_authorization,update_mask\x82\xd3\xe4\x93\x02\\2G/v1/{dns_authorization.name=projects/*/locations/*/dnsAuthorizations/*}:\x11\x64ns_authorization\x12\xed\x01\n\x16\x44\x65leteDnsAuthorization\x12\x41.google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest\x1a\x1d.google.longrunning.Operation\"q\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/dnsAuthorizations/*}\x12\x88\x02\n\x1eListCertificateIssuanceConfigs\x12I.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsRequest\x1aJ.google.cloud.certificatemanager.v1.ListCertificateIssuanceConfigsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs\x12\xf5\x01\n\x1cGetCertificateIssuanceConfig\x12G.google.cloud.certificatemanager.v1.GetCertificateIssuanceConfigRequest\x1a=.google.cloud.certificatemanager.v1.CertificateIssuanceConfig\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}\x12\xe7\x02\n\x1f\x43reateCertificateIssuanceConfig\x12J.google.cloud.certificatemanager.v1.CreateCertificateIssuanceConfigRequest\x1a\x1d.google.longrunning.Operation\"\xd8\x01\xca\x41.\n\x19\x43\x65rtificateIssuanceConfig\x12\x11OperationMetadata\xda\x41\x41parent,certificate_issuance_config,certificate_issuance_config_id\x82\xd3\xe4\x93\x02]\">/v1/{parent=projects/*/locations/*}/certificateIssuanceConfigs:\x1b\x63\x65rtificate_issuance_config\x12\x88\x02\n\x1f\x44\x65leteCertificateIssuanceConfig\x12J.google.cloud.certificatemanager.v1.DeleteCertificateIssuanceConfigRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/locations/*/certificateIssuanceConfigs/*}\x12\xd0\x01\n\x10ListTrustConfigs\x12;.google.cloud.certificatemanager.v1.ListTrustConfigsRequest\x1a<.google.cloud.certificatemanager.v1.ListTrustConfigsResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/trustConfigs\x12\xbd\x01\n\x0eGetTrustConfig\x12\x39.google.cloud.certificatemanager.v1.GetTrustConfigRequest\x1a/.google.cloud.certificatemanager.v1.TrustConfig\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/trustConfigs/*}\x12\x82\x02\n\x11\x43reateTrustConfig\x12<.google.cloud.certificatemanager.v1.CreateTrustConfigRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bTrustConfig\x12\x11OperationMetadata\xda\x41#parent,trust_config,trust_config_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/trustConfigs:\x0ctrust_config\x12\x84\x02\n\x11UpdateTrustConfig\x12<.google.cloud.certificatemanager.v1.UpdateTrustConfigRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41 \n\x0bTrustConfig\x12\x11OperationMetadata\xda\x41\x18trust_config,update_mask\x82\xd3\xe4\x93\x02M2=/v1/{trust_config.name=projects/*/locations/*/trustConfigs/*}:\x0ctrust_config\x12\xde\x01\n\x11\x44\x65leteTrustConfig\x12<.google.cloud.certificatemanager.v1.DeleteTrustConfigRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/locations/*/trustConfigs/*}\x1aU\xca\x41!certificatemanager.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8d\x02\n&com.google.cloud.certificatemanager.v1B\x17\x43\x65rtificateManagerProtoP\x01ZVcloud.google.com/go/certificatemanager/apiv1/certificatemanagerpb;certificatemanagerpb\xaa\x02\"Google.Cloud.CertificateManager.V1\xca\x02\"Google\\Cloud\\CertificateManager\\V1\xea\x02%Google::Cloud::CertificateManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CertificateManager - module V1 - ListCertificatesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificatesRequest").msgclass - ListCertificatesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificatesResponse").msgclass - GetCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateRequest").msgclass - CreateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateRequest").msgclass - UpdateCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateCertificateRequest").msgclass - DeleteCertificateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateRequest").msgclass - ListCertificateMapsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapsRequest").msgclass - ListCertificateMapsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapsResponse").msgclass - GetCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateMapRequest").msgclass - CreateCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateMapRequest").msgclass - UpdateCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateCertificateMapRequest").msgclass - DeleteCertificateMapRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateMapRequest").msgclass - ListCertificateMapEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapEntriesRequest").msgclass - ListCertificateMapEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListCertificateMapEntriesResponse").msgclass - GetCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetCertificateMapEntryRequest").msgclass - CreateCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateCertificateMapEntryRequest").msgclass - UpdateCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateCertificateMapEntryRequest").msgclass - DeleteCertificateMapEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteCertificateMapEntryRequest").msgclass - ListDnsAuthorizationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListDnsAuthorizationsRequest").msgclass - ListDnsAuthorizationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListDnsAuthorizationsResponse").msgclass - GetDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetDnsAuthorizationRequest").msgclass - CreateDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateDnsAuthorizationRequest").msgclass - UpdateDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateDnsAuthorizationRequest").msgclass - DeleteDnsAuthorizationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteDnsAuthorizationRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.OperationMetadata").msgclass - Certificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate").msgclass - Certificate::SelfManagedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate").msgclass - Certificate::ManagedCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate").msgclass - Certificate::ManagedCertificate::ProvisioningIssue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue").msgclass - Certificate::ManagedCertificate::ProvisioningIssue::Reason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.ProvisioningIssue.Reason").enummodule - Certificate::ManagedCertificate::AuthorizationAttemptInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo").msgclass - Certificate::ManagedCertificate::AuthorizationAttemptInfo::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.State").enummodule - Certificate::ManagedCertificate::AuthorizationAttemptInfo::FailureReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.AuthorizationAttemptInfo.FailureReason").enummodule - Certificate::ManagedCertificate::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.ManagedCertificate.State").enummodule - Certificate::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.Certificate.Scope").enummodule - CertificateMap = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMap").msgclass - CertificateMap::GclbTarget = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMap.GclbTarget").msgclass - CertificateMap::GclbTarget::IpConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMap.GclbTarget.IpConfig").msgclass - CertificateMapEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMapEntry").msgclass - CertificateMapEntry::Matcher = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CertificateMapEntry.Matcher").enummodule - DnsAuthorization = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DnsAuthorization").msgclass - DnsAuthorization::DnsResourceRecord = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DnsAuthorization.DnsResourceRecord").msgclass - DnsAuthorization::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DnsAuthorization.Type").enummodule - ServingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ServingState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb deleted file mode 100644 index 798df335056a..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/certificate_manager_services_pb.rb +++ /dev/null @@ -1,128 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/certificatemanager/v1/certificate_manager.proto for package 'Google.Cloud.CertificateManager.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/certificatemanager/v1/certificate_manager_pb' - -module Google - module Cloud - module CertificateManager - module V1 - module CertificateManager - # API Overview - # - # Certificates Manager API allows customers to see and manage all their TLS - # certificates. - # - # Certificates Manager API service provides methods to manage certificates, - # group them into collections, and create serving configuration that can be - # easily applied to other Cloud resources e.g. Target Proxies. - # - # Data Model - # - # The Certificates Manager service exposes the following resources: - # - # * `Certificate` that describes a single TLS certificate. - # * `CertificateMap` that describes a collection of certificates that can be - # attached to a target resource. - # * `CertificateMapEntry` that describes a single configuration entry that - # consists of a SNI and a group of certificates. It's a subresource of - # CertificateMap. - # - # Certificate, CertificateMap and CertificateMapEntry IDs - # have to fully match the regexp `[a-z0-9-]{1,63}`. In other words, - # - only lower case letters, digits, and hyphen are allowed - # - length of the resource ID has to be in [1,63] range. - # - # Provides methods to manage Cloud Certificate Manager entities. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.certificatemanager.v1.CertificateManager' - - # Lists Certificates in a given project and location. - rpc :ListCertificates, ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse - # Gets details of a single Certificate. - rpc :GetCertificate, ::Google::Cloud::CertificateManager::V1::GetCertificateRequest, ::Google::Cloud::CertificateManager::V1::Certificate - # Creates a new Certificate in a given project and location. - rpc :CreateCertificate, ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, ::Google::Longrunning::Operation - # Updates a Certificate. - rpc :UpdateCertificate, ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, ::Google::Longrunning::Operation - # Deletes a single Certificate. - rpc :DeleteCertificate, ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, ::Google::Longrunning::Operation - # Lists CertificateMaps in a given project and location. - rpc :ListCertificateMaps, ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse - # Gets details of a single CertificateMap. - rpc :GetCertificateMap, ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, ::Google::Cloud::CertificateManager::V1::CertificateMap - # Creates a new CertificateMap in a given project and location. - rpc :CreateCertificateMap, ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, ::Google::Longrunning::Operation - # Updates a CertificateMap. - rpc :UpdateCertificateMap, ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, ::Google::Longrunning::Operation - # Deletes a single CertificateMap. A Certificate Map can't be deleted - # if it contains Certificate Map Entries. Remove all the entries from - # the map before calling this method. - rpc :DeleteCertificateMap, ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, ::Google::Longrunning::Operation - # Lists CertificateMapEntries in a given project and location. - rpc :ListCertificateMapEntries, ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse - # Gets details of a single CertificateMapEntry. - rpc :GetCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, ::Google::Cloud::CertificateManager::V1::CertificateMapEntry - # Creates a new CertificateMapEntry in a given project and location. - rpc :CreateCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, ::Google::Longrunning::Operation - # Updates a CertificateMapEntry. - rpc :UpdateCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, ::Google::Longrunning::Operation - # Deletes a single CertificateMapEntry. - rpc :DeleteCertificateMapEntry, ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, ::Google::Longrunning::Operation - # Lists DnsAuthorizations in a given project and location. - rpc :ListDnsAuthorizations, ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse - # Gets details of a single DnsAuthorization. - rpc :GetDnsAuthorization, ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, ::Google::Cloud::CertificateManager::V1::DnsAuthorization - # Creates a new DnsAuthorization in a given project and location. - rpc :CreateDnsAuthorization, ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, ::Google::Longrunning::Operation - # Updates a DnsAuthorization. - rpc :UpdateDnsAuthorization, ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, ::Google::Longrunning::Operation - # Deletes a single DnsAuthorization. - rpc :DeleteDnsAuthorization, ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, ::Google::Longrunning::Operation - # Lists CertificateIssuanceConfigs in a given project and location. - rpc :ListCertificateIssuanceConfigs, ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse - # Gets details of a single CertificateIssuanceConfig. - rpc :GetCertificateIssuanceConfig, ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig - # Creates a new CertificateIssuanceConfig in a given project and location. - rpc :CreateCertificateIssuanceConfig, ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, ::Google::Longrunning::Operation - # Deletes a single CertificateIssuanceConfig. - rpc :DeleteCertificateIssuanceConfig, ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, ::Google::Longrunning::Operation - # Lists TrustConfigs in a given project and location. - rpc :ListTrustConfigs, ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse - # Gets details of a single TrustConfig. - rpc :GetTrustConfig, ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, ::Google::Cloud::CertificateManager::V1::TrustConfig - # Creates a new TrustConfig in a given project and location. - rpc :CreateTrustConfig, ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, ::Google::Longrunning::Operation - # Updates a TrustConfig. - rpc :UpdateTrustConfig, ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, ::Google::Longrunning::Operation - # Deletes a single TrustConfig. - rpc :DeleteTrustConfig, ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb deleted file mode 100644 index 7232b277f428..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/lib/google/cloud/certificatemanager/v1/trust_config_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/certificatemanager/v1/trust_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/certificatemanager/v1/trust_config.proto\x12\"google.cloud.certificatemanager.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9d\x01\n\x17ListTrustConfigsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\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\"\x90\x01\n\x18ListTrustConfigsResponse\x12\x46\n\rtrust_configs\x18\x01 \x03(\x0b\x32/.google.cloud.certificatemanager.v1.TrustConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\\\n\x15GetTrustConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-certificatemanager.googleapis.com/TrustConfig\"\xbf\x01\n\x18\x43reateTrustConfigRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x1c\n\x0ftrust_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12J\n\x0ctrust_config\x18\x03 \x01(\x0b\x32/.google.cloud.certificatemanager.v1.TrustConfigB\x03\xe0\x41\x02\"\x9c\x01\n\x18UpdateTrustConfigRequest\x12J\n\x0ctrust_config\x18\x01 \x01(\x0b\x32/.google.cloud.certificatemanager.v1.TrustConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"m\n\x18\x44\x65leteTrustConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-certificatemanager.googleapis.com/TrustConfig\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\"\x95\x06\n\x0bTrustConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x06labels\x18\x04 \x03(\x0b\x32;.google.cloud.certificatemanager.v1.TrustConfig.LabelsEntry\x12\x13\n\x0b\x64\x65scription\x18\x05 \x01(\t\x12\x0c\n\x04\x65tag\x18\x06 \x01(\t\x12P\n\x0ctrust_stores\x18\x08 \x03(\x0b\x32:.google.cloud.certificatemanager.v1.TrustConfig.TrustStore\x1a\x30\n\x0bTrustAnchor\x12\x19\n\x0fpem_certificate\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1a\x33\n\x0eIntermediateCA\x12\x19\n\x0fpem_certificate\x18\x01 \x01(\tH\x00\x42\x06\n\x04kind\x1a\xba\x01\n\nTrustStore\x12R\n\rtrust_anchors\x18\x01 \x03(\x0b\x32;.google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor\x12X\n\x10intermediate_cas\x18\x02 \x03(\x0b\x32>.google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:w\xea\x41t\n-certificatemanager.googleapis.com/TrustConfig\x12\x43projects/{project}/locations/{location}/trustConfigs/{trust_config}B\x86\x02\n&com.google.cloud.certificatemanager.v1B\x10TrustConifgProtoP\x01ZVcloud.google.com/go/certificatemanager/apiv1/certificatemanagerpb;certificatemanagerpb\xaa\x02\"Google.Cloud.CertificateManager.V1\xca\x02\"Google\\Cloud\\CertificateManager\\V1\xea\x02%Google::Cloud::CertificateManager::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CertificateManager - module V1 - ListTrustConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListTrustConfigsRequest").msgclass - ListTrustConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.ListTrustConfigsResponse").msgclass - GetTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.GetTrustConfigRequest").msgclass - CreateTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.CreateTrustConfigRequest").msgclass - UpdateTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.UpdateTrustConfigRequest").msgclass - DeleteTrustConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.DeleteTrustConfigRequest").msgclass - TrustConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig").msgclass - TrustConfig::TrustAnchor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig.TrustAnchor").msgclass - TrustConfig::IntermediateCA = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig.IntermediateCA").msgclass - TrustConfig::TrustStore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.certificatemanager.v1.TrustConfig.TrustStore").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md deleted file mode 100644 index bae476f8b306..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Certificate Manager 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-certificate_manager-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb deleted file mode 100644 index 309ea459d3d3..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_issuance_config.rb +++ /dev/null @@ -1,186 +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 CertificateManager - module V1 - # Request for the `ListCertificateIssuanceConfigs` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the certificate should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of certificate configs to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListCertificateIssuanceConfigsResponse`. - # Indicates that this is a continuation of a prior - # `ListCertificateIssuanceConfigs` call, and that the system should return - # the next page of data. - # @!attribute [rw] filter - # @return [::String] - # Filter expression to restrict the Certificates Configs returned. - # @!attribute [rw] order_by - # @return [::String] - # A list of Certificate Config field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - class ListCertificateIssuanceConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListCertificateIssuanceConfigs` method. - # @!attribute [rw] certificate_issuance_configs - # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig>] - # A list of certificate configs for the parent resource. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListCertificateIssuanceConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetCertificateIssuanceConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate issuance config to describe. Must be in - # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - class GetCertificateIssuanceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateCertificateIssuanceConfig` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the certificate issuance config. Must be - # in the format `projects/*/locations/*`. - # @!attribute [rw] certificate_issuance_config_id - # @return [::String] - # Required. A user-provided name of the certificate config. - # @!attribute [rw] certificate_issuance_config - # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig] - # Required. A definition of the certificate issuance config to create. - class CreateCertificateIssuanceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteCertificateIssuanceConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate issuance config to delete. Must be in - # the format `projects/*/locations/*/certificateIssuanceConfigs/*`. - class DeleteCertificateIssuanceConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CertificateIssuanceConfig specifies how to issue and manage a certificate. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the certificate issuance config. - # CertificateIssuanceConfig names must be unique globally and match pattern - # `projects/*/locations/*/certificateIssuanceConfigs/*`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a CertificateIssuanceConfig. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a CertificateIssuanceConfig. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Set of labels associated with a CertificateIssuanceConfig. - # @!attribute [rw] description - # @return [::String] - # One or more paragraphs of text description of a CertificateIssuanceConfig. - # @!attribute [rw] certificate_authority_config - # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig::CertificateAuthorityConfig] - # Required. The CA that issues the workload certificate. It includes the CA - # address, type, authentication to CA service, etc. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # Required. Workload certificate lifetime requested. - # @!attribute [rw] rotation_window_percentage - # @return [::Integer] - # Required. Specifies the percentage of elapsed time of the certificate - # lifetime to wait before renewing the certificate. Must be a number between - # 1-99, inclusive. - # @!attribute [rw] key_algorithm - # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig::KeyAlgorithm] - # Required. The key algorithm to use when generating the private key. - class CertificateIssuanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The CA that issues the workload certificate. It includes CA address, type, - # authentication to CA service, etc. - # @!attribute [rw] certificate_authority_service_config - # @return [::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig::CertificateAuthorityConfig::CertificateAuthorityServiceConfig] - # Defines a CertificateAuthorityServiceConfig. - class CertificateAuthorityConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains information required to contact CA service. - # @!attribute [rw] ca_pool - # @return [::String] - # Required. A CA pool resource used to issue a certificate. - # The CA pool string has a relative resource path following the form - # "projects/\\{project}/locations/\\{location}/caPools/\\{ca_pool}". - class CertificateAuthorityServiceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of keypair to generate. - module KeyAlgorithm - # Unspecified key algorithm. - KEY_ALGORITHM_UNSPECIFIED = 0 - - # Specifies RSA with a 2048-bit modulus. - RSA_2048 = 1 - - # Specifies ECDSA with curve P256. - ECDSA_P256 = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb deleted file mode 100644 index 4535652f31dd..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/certificate_manager.rb +++ /dev/null @@ -1,896 +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 CertificateManager - module V1 - # Request for the `ListCertificates` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the certificate should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of certificates to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListCertificatesResponse`. Indicates that - # this is a continuation of a prior `ListCertificates` call, and that the - # system should return the next page of data. - # @!attribute [rw] filter - # @return [::String] - # Filter expression to restrict the Certificates returned. - # @!attribute [rw] order_by - # @return [::String] - # A list of Certificate field names used to specify the order of the returned - # results. The default sorting order is ascending. To specify descending - # order for a field, add a suffix `" desc"`. - class ListCertificatesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListCertificates` method. - # @!attribute [rw] certificates - # @return [::Array<::Google::Cloud::CertificateManager::V1::Certificate>] - # A list of certificates for the parent resource. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # A list of locations that could not be reached. - class ListCertificatesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetCertificate` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate to describe. Must be in the format - # `projects/*/locations/*/certificates/*`. - class GetCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateCertificate` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the certificate. Must be in the format - # `projects/*/locations/*`. - # @!attribute [rw] certificate_id - # @return [::String] - # Required. A user-provided name of the certificate. - # @!attribute [rw] certificate - # @return [::Google::Cloud::CertificateManager::V1::Certificate] - # Required. A definition of the certificate to create. - class CreateCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateCertificate` method. - # @!attribute [rw] certificate - # @return [::Google::Cloud::CertificateManager::V1::Certificate] - # Required. A definition of the certificate to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - class UpdateCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteCertificate` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate to delete. Must be in the format - # `projects/*/locations/*/certificates/*`. - class DeleteCertificateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListCertificateMaps` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the certificate maps should - # be listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of certificate maps to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListCertificateMapsResponse`. Indicates - # that this is a continuation of a prior `ListCertificateMaps` call, and that - # the system should return the next page of data. - # @!attribute [rw] filter - # @return [::String] - # Filter expression to restrict the Certificates Maps returned. - # @!attribute [rw] order_by - # @return [::String] - # A list of Certificate Map field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - class ListCertificateMapsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListCertificateMaps` method. - # @!attribute [rw] certificate_maps - # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMap>] - # A list of certificate maps for the parent resource. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListCertificateMapsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetCertificateMap` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate map to describe. Must be in the format - # `projects/*/locations/*/certificateMaps/*`. - class GetCertificateMapRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateCertificateMap` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the certificate map. Must be in the format - # `projects/*/locations/*`. - # @!attribute [rw] certificate_map_id - # @return [::String] - # Required. A user-provided name of the certificate map. - # @!attribute [rw] certificate_map - # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] - # Required. A definition of the certificate map to create. - class CreateCertificateMapRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateCertificateMap` method. - # @!attribute [rw] certificate_map - # @return [::Google::Cloud::CertificateManager::V1::CertificateMap] - # Required. A definition of the certificate map to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - class UpdateCertificateMapRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteCertificateMap` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate map to delete. Must be in the format - # `projects/*/locations/*/certificateMaps/*`. - class DeleteCertificateMapRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListCertificateMapEntries` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project, location and certificate map from which the - # certificate map entries should be listed, specified in the format - # `projects/*/locations/*/certificateMaps/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of certificate map entries to return. The service may return - # fewer than this value. - # If unspecified, at most 50 certificate map entries will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListCertificateMapEntriesResponse`. - # Indicates that this is a continuation of a prior - # `ListCertificateMapEntries` call, and that the system should return the - # next page of data. - # @!attribute [rw] filter - # @return [::String] - # Filter expression to restrict the returned Certificate Map Entries. - # @!attribute [rw] order_by - # @return [::String] - # A list of Certificate Map Entry field names used to specify - # the order of the returned results. The default sorting order is ascending. - # To specify descending order for a field, add a suffix `" desc"`. - class ListCertificateMapEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListCertificateMapEntries` method. - # @!attribute [rw] certificate_map_entries - # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMapEntry>] - # A list of certificate map entries for the parent resource. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListCertificateMapEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetCertificateMapEntry` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate map entry to describe. Must be in the - # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - class GetCertificateMapEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateCertificateMapEntry` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the certificate map entry. Must be in the - # format `projects/*/locations/*/certificateMaps/*`. - # @!attribute [rw] certificate_map_entry_id - # @return [::String] - # Required. A user-provided name of the certificate map entry. - # @!attribute [rw] certificate_map_entry - # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] - # Required. A definition of the certificate map entry to create. - class CreateCertificateMapEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateCertificateMapEntry` method. - # @!attribute [rw] certificate_map_entry - # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry] - # Required. A definition of the certificate map entry to create map entry. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - class UpdateCertificateMapEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteCertificateMapEntry` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the certificate map entry to delete. Must be in the - # format `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - class DeleteCertificateMapEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListDnsAuthorizations` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the dns authorizations should - # be listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of dns authorizations to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListDnsAuthorizationsResponse`. Indicates - # that this is a continuation of a prior `ListDnsAuthorizations` call, and - # that the system should return the next page of data. - # @!attribute [rw] filter - # @return [::String] - # Filter expression to restrict the Dns Authorizations returned. - # @!attribute [rw] order_by - # @return [::String] - # A list of Dns Authorization field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - class ListDnsAuthorizationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListDnsAuthorizations` method. - # @!attribute [rw] dns_authorizations - # @return [::Array<::Google::Cloud::CertificateManager::V1::DnsAuthorization>] - # A list of dns authorizations for the parent resource. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDnsAuthorizationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetDnsAuthorization` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the dns authorization to describe. Must be in the - # format `projects/*/locations/*/dnsAuthorizations/*`. - class GetDnsAuthorizationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateDnsAuthorization` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the dns authorization. Must be in the - # format `projects/*/locations/*`. - # @!attribute [rw] dns_authorization_id - # @return [::String] - # Required. A user-provided name of the dns authorization. - # @!attribute [rw] dns_authorization - # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] - # Required. A definition of the dns authorization to create. - class CreateDnsAuthorizationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateDnsAuthorization` method. - # @!attribute [rw] dns_authorization - # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization] - # Required. A definition of the dns authorization to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - class UpdateDnsAuthorizationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteDnsAuthorization` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the dns authorization to delete. Must be in the format - # `projects/*/locations/*/dnsAuthorizations/*`. - class DeleteDnsAuthorizationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. Output only. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation was created. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation finished running. - # @!attribute [rw] target - # @return [::String] - # Server-defined resource path for the target of the operation. - # @!attribute [rw] verb - # @return [::String] - # Name of the verb executed by the operation. - # @!attribute [rw] status_message - # @return [::String] - # Human-readable status of the operation, if any. - # @!attribute [rw] requested_cancellation - # @return [::Boolean] - # 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`. - # @!attribute [rw] api_version - # @return [::String] - # API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines TLS certificate. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the certificate. Certificate names must be unique - # globally and match pattern `projects/*/locations/*/certificates/*`. - # @!attribute [rw] description - # @return [::String] - # One or more paragraphs of text description of a certificate. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a Certificate. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a Certificate. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Set of labels associated with a Certificate. - # @!attribute [rw] self_managed - # @return [::Google::Cloud::CertificateManager::V1::Certificate::SelfManagedCertificate] - # If set, defines data of a self-managed certificate. - # - # Note: The following fields are mutually exclusive: `self_managed`, `managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] managed - # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate] - # If set, contains configuration and state of a managed certificate. - # - # Note: The following fields are mutually exclusive: `managed`, `self_managed`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] san_dnsnames - # @return [::Array<::String>] - # Output only. The list of Subject Alternative Names of dnsName type defined - # in the certificate (see RFC 5280 4.2.1.6). Managed certificates that - # haven't been provisioned yet have this field populated with a value of the - # managed.domains field. - # @!attribute [r] pem_certificate - # @return [::String] - # Output only. The PEM-encoded certificate chain. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The expiry timestamp of a Certificate. - # @!attribute [rw] scope - # @return [::Google::Cloud::CertificateManager::V1::Certificate::Scope] - # Immutable. The scope of the certificate. - class Certificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Certificate data for a SelfManaged Certificate. - # SelfManaged Certificates are uploaded by the user. Updating such - # certificates before they expire remains the user's responsibility. - # @!attribute [rw] pem_certificate - # @return [::String] - # Input only. The PEM-encoded certificate chain. - # Leaf certificate comes first, followed by intermediate ones if any. - # @!attribute [rw] pem_private_key - # @return [::String] - # Input only. The PEM-encoded private key of the leaf certificate. - class SelfManagedCertificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration and state of a Managed Certificate. - # Certificate Manager provisions and renews Managed Certificates - # automatically, for as long as it's authorized to do so. - # @!attribute [rw] domains - # @return [::Array<::String>] - # Immutable. The domains for which a managed SSL certificate will be - # generated. Wildcard domains are only supported with DNS challenge - # resolution. - # @!attribute [rw] dns_authorizations - # @return [::Array<::String>] - # Immutable. Authorizations that will be used for performing domain - # authorization. - # @!attribute [rw] issuance_config - # @return [::String] - # Immutable. The resource name for a - # {::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig CertificateIssuanceConfig} - # used to configure private PKI certificates in the format - # `projects/*/locations/*/certificateIssuanceConfigs/*`. - # If this field is not set, the certificates will instead be publicly - # signed as documented at - # https://cloud.google.com/load-balancing/docs/ssl-certificates/google-managed-certs#caa. - # @!attribute [r] state - # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::State] - # Output only. State of the managed certificate resource. - # @!attribute [r] provisioning_issue - # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::ProvisioningIssue] - # Output only. Information about issues with provisioning a Managed - # Certificate. - # @!attribute [r] authorization_attempt_info - # @return [::Array<::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::AuthorizationAttemptInfo>] - # Output only. Detailed state of the latest authorization attempt for each - # domain specified for managed certificate resource. - class ManagedCertificate - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about issues with provisioning a Managed Certificate. - # @!attribute [r] reason - # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::ProvisioningIssue::Reason] - # Output only. Reason for provisioning failures. - # @!attribute [r] details - # @return [::String] - # Output only. Human readable explanation about the issue. Provided to - # help address the configuration issues. Not guaranteed to be stable. For - # programmatic access use Reason enum. - class ProvisioningIssue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Reason for provisioning failures. - module Reason - # Reason is unspecified. - REASON_UNSPECIFIED = 0 - - # Certificate provisioning failed due to an issue with one or more of - # the domains on the certificate. - # For details of which domains failed, consult the - # `authorization_attempt_info` field. - AUTHORIZATION_ISSUE = 1 - - # Exceeded Certificate Authority quotas or internal rate limits of the - # system. Provisioning may take longer to complete. - RATE_LIMITED = 2 - end - end - - # State of the latest attempt to authorize a domain for certificate - # issuance. - # @!attribute [rw] domain - # @return [::String] - # Domain name of the authorization attempt. - # @!attribute [r] state - # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::AuthorizationAttemptInfo::State] - # Output only. State of the domain for managed certificate issuance. - # @!attribute [r] failure_reason - # @return [::Google::Cloud::CertificateManager::V1::Certificate::ManagedCertificate::AuthorizationAttemptInfo::FailureReason] - # Output only. Reason for failure of the authorization attempt for the - # domain. - # @!attribute [r] details - # @return [::String] - # Output only. Human readable explanation for reaching the state. - # Provided to help address the configuration issues. Not guaranteed to be - # stable. For programmatic access use FailureReason enum. - class AuthorizationAttemptInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State of the domain for managed certificate issuance. - module State - # State is unspecified. - STATE_UNSPECIFIED = 0 - - # Certificate provisioning for this domain is under way. Google Cloud - # will attempt to authorize the domain. - AUTHORIZING = 1 - - # A managed certificate can be provisioned, no issues for this domain. - AUTHORIZED = 6 - - # Attempt to authorize the domain failed. This prevents the Managed - # Certificate from being issued. - # See `failure_reason` and `details` fields for more information. - FAILED = 7 - end - - # Reason for failure of the authorization attempt for the domain. - module FailureReason - # FailureReason is unspecified. - FAILURE_REASON_UNSPECIFIED = 0 - - # There was a problem with the user's DNS or load balancer - # configuration for this domain. - CONFIG = 1 - - # Certificate issuance forbidden by an explicit CAA record for the - # domain or a failure to check CAA records for the domain. - CAA = 2 - - # Reached a CA or internal rate-limit for the domain, - # e.g. for certificates per top-level private domain. - RATE_LIMITED = 3 - end - end - - # State of the managed certificate resource. - module State - # State is unspecified. - STATE_UNSPECIFIED = 0 - - # Certificate Manager attempts to provision or renew the certificate. - # If the process takes longer than expected, consult the - # `provisioning_issue` field. - PROVISIONING = 1 - - # Multiple certificate provisioning attempts failed and Certificate - # Manager gave up. To try again, delete and create a new managed - # Certificate resource. - # For details see the `provisioning_issue` field. - FAILED = 2 - - # The certificate management is working, and a certificate has been - # provisioned. - ACTIVE = 3 - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Certificate scope. - module Scope - # Certificates with default scope are served from core Google data centers. - # If unsure, choose this option. - DEFAULT = 0 - - # Certificates with scope EDGE_CACHE are special-purposed certificates, - # served from Edge Points of Presence. - # See https://cloud.google.com/vpc/docs/edge-locations. - EDGE_CACHE = 1 - - # Certificates with ALL_REGIONS scope are served from all Google Cloud - # regions. See https://cloud.google.com/compute/docs/regions-zones. - ALL_REGIONS = 2 - end - end - - # Defines a collection of certificate configurations. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the Certificate Map. Certificate Map names must be - # unique globally and match pattern - # `projects/*/locations/*/certificateMaps/*`. - # @!attribute [rw] description - # @return [::String] - # One or more paragraphs of text description of a certificate map. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a Certificate Map. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update timestamp of a Certificate Map. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Set of labels associated with a Certificate Map. - # @!attribute [r] gclb_targets - # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMap::GclbTarget>] - # Output only. A list of GCLB targets that use this Certificate Map. - # A Target Proxy is only present on this list if it's attached to a - # Forwarding Rule. - class CertificateMap - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a Target Proxy that uses this Certificate Map. - # @!attribute [r] target_https_proxy - # @return [::String] - # Output only. This field returns the resource name in the following - # format: - # `//compute.googleapis.com/projects/*/global/targetHttpsProxies/*`. - # - # Note: The following fields are mutually exclusive: `target_https_proxy`, `target_ssl_proxy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] target_ssl_proxy - # @return [::String] - # Output only. This field returns the resource name in the following - # format: - # `//compute.googleapis.com/projects/*/global/targetSslProxies/*`. - # - # Note: The following fields are mutually exclusive: `target_ssl_proxy`, `target_https_proxy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] ip_configs - # @return [::Array<::Google::Cloud::CertificateManager::V1::CertificateMap::GclbTarget::IpConfig>] - # Output only. IP configurations for this Target Proxy where the - # Certificate Map is serving. - class GclbTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines IP configuration where this Certificate Map is serving. - # @!attribute [r] ip_address - # @return [::String] - # Output only. An external IP address. - # @!attribute [r] ports - # @return [::Array<::Integer>] - # Output only. Ports. - class IpConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - 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 - - # Defines a certificate map entry. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the Certificate Map Entry. Certificate Map Entry - # names must be unique globally and match pattern - # `projects/*/locations/*/certificateMaps/*/certificateMapEntries/*`. - # @!attribute [rw] description - # @return [::String] - # One or more paragraphs of text description of a certificate map entry. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a Certificate Map Entry. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The update timestamp of a Certificate Map Entry. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Set of labels associated with a Certificate Map Entry. - # @!attribute [rw] hostname - # @return [::String] - # A Hostname (FQDN, e.g. `example.com`) or a wildcard hostname expression - # (`*.example.com`) for a set of hostnames with common suffix. Used as - # Server Name Indication (SNI) for selecting a proper certificate. - # - # Note: The following fields are mutually exclusive: `hostname`, `matcher`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] matcher - # @return [::Google::Cloud::CertificateManager::V1::CertificateMapEntry::Matcher] - # A predefined matcher for particular cases, other than SNI selection. - # - # Note: The following fields are mutually exclusive: `matcher`, `hostname`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] certificates - # @return [::Array<::String>] - # A set of Certificates defines for the given `hostname`. There can be - # defined up to four certificates in each Certificate Map Entry. Each - # certificate must match pattern `projects/*/locations/*/certificates/*`. - # @!attribute [r] state - # @return [::Google::Cloud::CertificateManager::V1::ServingState] - # Output only. A serving state of this Certificate Map Entry. - class CertificateMapEntry - 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 - - # Defines predefined cases other than SNI-hostname match when this - # configuration should be applied. - module Matcher - # A matcher has't been recognized. - MATCHER_UNSPECIFIED = 0 - - # A primary certificate that is served when SNI wasn't specified in the - # request or SNI couldn't be found in the map. - PRIMARY = 1 - end - end - - # A DnsAuthorization resource describes a way to perform domain authorization - # for certificate issuance. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the dns authorization. DnsAuthorization names must - # be unique globally and match pattern - # `projects/*/locations/*/dnsAuthorizations/*`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a DnsAuthorization. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a DnsAuthorization. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Set of labels associated with a DnsAuthorization. - # @!attribute [rw] description - # @return [::String] - # One or more paragraphs of text description of a DnsAuthorization. - # @!attribute [rw] domain - # @return [::String] - # Required. Immutable. A domain that is being authorized. A DnsAuthorization - # resource covers a single domain and its wildcard, e.g. authorization for - # `example.com` can be used to issue certificates for `example.com` and - # `*.example.com`. - # @!attribute [r] dns_resource_record - # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization::DnsResourceRecord] - # Output only. DNS Resource Record that needs to be added to DNS - # configuration. - # @!attribute [rw] type - # @return [::Google::Cloud::CertificateManager::V1::DnsAuthorization::Type] - # Immutable. Type of DnsAuthorization. If unset during resource creation the - # following default will be used: - # - in location global: FIXED_RECORD. - class DnsAuthorization - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The structure describing the DNS Resource Record that needs to be added - # to DNS configuration for the authorization to be usable by - # certificate. - # @!attribute [r] name - # @return [::String] - # Output only. Fully qualified name of the DNS Resource Record. - # e.g. `_acme-challenge.example.com` - # @!attribute [r] type - # @return [::String] - # Output only. Type of the DNS Resource Record. - # Currently always set to "CNAME". - # @!attribute [r] data - # @return [::String] - # Output only. Data of the DNS Resource Record. - class DnsResourceRecord - 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 - - # DnsAuthorization type. - module Type - # Type is unspecified. - TYPE_UNSPECIFIED = 0 - - # FIXED_RECORD DNS authorization uses DNS-01 validation method. - FIXED_RECORD = 1 - - # PER_PROJECT_RECORD DNS authorization allows for independent management - # of Google-managed certificates with DNS authorization across multiple - # projects. - PER_PROJECT_RECORD = 2 - end - end - - # Defines set of serving states associated with a resource. - module ServingState - # The status is undefined. - SERVING_STATE_UNSPECIFIED = 0 - - # The configuration is serving. - ACTIVE = 1 - - # Update is in progress. Some frontends may serve this configuration. - PENDING = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb deleted file mode 100644 index 58fbca8230a1..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/cloud/certificatemanager/v1/trust_config.rb +++ /dev/null @@ -1,210 +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 CertificateManager - module V1 - # Request for the `ListTrustConfigs` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the TrustConfigs should be - # listed, specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of TrustConfigs to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last `ListTrustConfigsResponse`. Indicates - # that this is a continuation of a prior `ListTrustConfigs` call, and that - # the system should return the next page of data. - # @!attribute [rw] filter - # @return [::String] - # Filter expression to restrict the TrustConfigs returned. - # @!attribute [rw] order_by - # @return [::String] - # A list of TrustConfig field names used to specify the order of the - # returned results. The default sorting order is ascending. To specify - # descending order for a field, add a suffix `" desc"`. - class ListTrustConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListTrustConfigs` method. - # @!attribute [rw] trust_configs - # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig>] - # A list of TrustConfigs for the parent resource. - # @!attribute [rw] next_page_token - # @return [::String] - # If there might be more results than those appearing in this response, then - # `next_page_token` is included. To get the next set of results, call this - # method again using the value of `next_page_token` as `page_token`. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListTrustConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetTrustConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TrustConfig to describe. Must be in the format - # `projects/*/locations/*/trustConfigs/*`. - class GetTrustConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateTrustConfig` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource of the TrustConfig. Must be in the format - # `projects/*/locations/*`. - # @!attribute [rw] trust_config_id - # @return [::String] - # Required. A user-provided name of the TrustConfig. Must match the regexp - # `[a-z0-9-]{1,63}`. - # @!attribute [rw] trust_config - # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] - # Required. A definition of the TrustConfig to create. - class CreateTrustConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateTrustConfig` method. - # @!attribute [rw] trust_config - # @return [::Google::Cloud::CertificateManager::V1::TrustConfig] - # Required. A definition of the TrustConfig to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The update mask applies to the resource. For the `FieldMask` - # definition, see - # https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask. - class UpdateTrustConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteTrustConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the TrustConfig to delete. Must be in the format - # `projects/*/locations/*/trustConfigs/*`. - # @!attribute [rw] etag - # @return [::String] - # The current etag of the TrustConfig. - # If an etag is provided and does not match the current etag of the resource, - # deletion will be blocked and an ABORTED error will be returned. - class DeleteTrustConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines a trust config. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the trust config. TrustConfig names must be - # unique globally and match pattern - # `projects/*/locations/*/trustConfigs/*`. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation timestamp of a TrustConfig. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a TrustConfig. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Set of labels associated with a TrustConfig. - # @!attribute [rw] description - # @return [::String] - # One or more paragraphs of text description of a TrustConfig. - # @!attribute [rw] etag - # @return [::String] - # This checksum is computed by the server based on the value of other - # fields, and may be sent on update and delete requests to ensure the - # client has an up-to-date value before proceeding. - # @!attribute [rw] trust_stores - # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig::TrustStore>] - # Set of trust stores to perform validation against. - # - # This field is supported when TrustConfig is configured with Load Balancers, - # currently not supported for SPIFFE certificate validation. - # - # Only one TrustStore specified is currently allowed. - class TrustConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a trust anchor. - # @!attribute [rw] pem_certificate - # @return [::String] - # PEM root certificate of the PKI used for validation. - # - # Each certificate provided in PEM format may occupy up to 5kB. - class TrustAnchor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines an intermediate CA. - # @!attribute [rw] pem_certificate - # @return [::String] - # PEM intermediate certificate used for building up paths - # for validation. - # - # Each certificate provided in PEM format may occupy up to 5kB. - class IntermediateCA - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines a trust store. - # @!attribute [rw] trust_anchors - # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig::TrustAnchor>] - # List of Trust Anchors to be used while performing validation - # against a given TrustStore. - # @!attribute [rw] intermediate_cas - # @return [::Array<::Google::Cloud::CertificateManager::V1::TrustConfig::IntermediateCA>] - # Set of intermediate CA certificates used for the path building - # phase of chain validation. - # - # The field is currently not supported if TrustConfig is used for the - # workload certificate feature. - class TrustStore - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/Gemfile deleted file mode 100644 index a6fc4e1b0e1f..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-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-certificate_manager-v1", path: "../" -else - gem "google-cloud-certificate_manager-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-certificate_manager-v1/snippets/certificate_manager/create_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate.rb deleted file mode 100644 index 88a72fd1753f..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate.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 certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the create_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate. -# -def create_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new - - # Call the create_certificate method. - result = client.create_certificate 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 certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.rb deleted file mode 100644 index e2c0bd353947..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_issuance_config.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 certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the create_certificate_issuance_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate_issuance_config. -# -def create_certificate_issuance_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new - - # Call the create_certificate_issuance_config method. - result = client.create_certificate_issuance_config 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 certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.rb deleted file mode 100644 index 00626d926dc1..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map.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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the create_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate_map. -# -def create_certificate_map - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new - - # Call the create_certificate_map method. - result = client.create_certificate_map 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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.rb deleted file mode 100644 index e46d9756c52c..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the create_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_certificate_map_entry. -# -def create_certificate_map_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new - - # Call the create_certificate_map_entry method. - result = client.create_certificate_map_entry 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 certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.rb deleted file mode 100644 index 324f09b29049..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the create_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_dns_authorization. -# -def create_dns_authorization - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new - - # Call the create_dns_authorization method. - result = client.create_dns_authorization 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 certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.rb deleted file mode 100644 index 3bf4e1e8d1ff..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/create_trust_config.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 certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the create_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#create_trust_config. -# -def create_trust_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new - - # Call the create_trust_config method. - result = client.create_trust_config 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 certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.rb deleted file mode 100644 index 512228dcedc5..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the delete_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate. -# -def delete_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new - - # Call the delete_certificate method. - result = client.delete_certificate 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.rb deleted file mode 100644 index 698b21c66447..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_issuance_config.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the delete_certificate_issuance_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate_issuance_config. -# -def delete_certificate_issuance_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new - - # Call the delete_certificate_issuance_config method. - result = client.delete_certificate_issuance_config 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.rb deleted file mode 100644 index e99339fb4f89..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the delete_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate_map. -# -def delete_certificate_map - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new - - # Call the delete_certificate_map method. - result = client.delete_certificate_map 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.rb deleted file mode 100644 index c88a12ec38df..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the delete_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_certificate_map_entry. -# -def delete_certificate_map_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new - - # Call the delete_certificate_map_entry method. - result = client.delete_certificate_map_entry 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 certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.rb deleted file mode 100644 index 581c980d8c0d..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the delete_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_dns_authorization. -# -def delete_dns_authorization - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new - - # Call the delete_dns_authorization method. - result = client.delete_dns_authorization 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 certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.rb deleted file mode 100644 index 84b680f43f72..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/delete_trust_config.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 certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the delete_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#delete_trust_config. -# -def delete_trust_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new - - # Call the delete_trust_config method. - result = client.delete_trust_config 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 certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.rb deleted file mode 100644 index ea936dc2274d..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate.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 certificatemanager_v1_generated_CertificateManager_GetCertificate_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the get_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate. -# -def get_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::GetCertificateRequest.new - - # Call the get_certificate method. - result = client.get_certificate request - - # The returned object is of type Google::Cloud::CertificateManager::V1::Certificate. - p result -end -# [END certificatemanager_v1_generated_CertificateManager_GetCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.rb deleted file mode 100644 index 1a0d544d86fe..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_issuance_config.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 certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the get_certificate_issuance_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate_issuance_config. -# -def get_certificate_issuance_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new - - # Call the get_certificate_issuance_config method. - result = client.get_certificate_issuance_config request - - # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig. - p result -end -# [END certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.rb deleted file mode 100644 index 003b8a63bd8e..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map.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 certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the get_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate_map. -# -def get_certificate_map - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new - - # Call the get_certificate_map method. - result = client.get_certificate_map request - - # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMap. - p result -end -# [END certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.rb deleted file mode 100644 index 93be15b96fd6..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the get_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_certificate_map_entry. -# -def get_certificate_map_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new - - # Call the get_certificate_map_entry method. - result = client.get_certificate_map_entry request - - # The returned object is of type Google::Cloud::CertificateManager::V1::CertificateMapEntry. - p result -end -# [END certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.rb deleted file mode 100644 index c501f218f1cd..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the get_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_dns_authorization. -# -def get_dns_authorization - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new - - # Call the get_dns_authorization method. - result = client.get_dns_authorization request - - # The returned object is of type Google::Cloud::CertificateManager::V1::DnsAuthorization. - p result -end -# [END certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.rb deleted file mode 100644 index acbf49bdebfb..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/get_trust_config.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 certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the get_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#get_trust_config. -# -def get_trust_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new - - # Call the get_trust_config method. - result = client.get_trust_config request - - # The returned object is of type Google::Cloud::CertificateManager::V1::TrustConfig. - p result -end -# [END certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.rb deleted file mode 100644 index 3dd56266effb..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_issuance_configs.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 certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the list_certificate_issuance_configs call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificate_issuance_configs. -# -def list_certificate_issuance_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.new - - # Call the list_certificate_issuance_configs method. - result = client.list_certificate_issuance_configs 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::CertificateManager::V1::CertificateIssuanceConfig. - p item - end -end -# [END certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.rb deleted file mode 100644 index b946859ef9bd..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_map_entries.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 certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the list_certificate_map_entries call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificate_map_entries. -# -def list_certificate_map_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.new - - # Call the list_certificate_map_entries method. - result = client.list_certificate_map_entries 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::CertificateManager::V1::CertificateMapEntry. - p item - end -end -# [END certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.rb deleted file mode 100644 index 9708cba6902b..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificate_maps.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 certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the list_certificate_maps call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificate_maps. -# -def list_certificate_maps - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.new - - # Call the list_certificate_maps method. - result = client.list_certificate_maps 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::CertificateManager::V1::CertificateMap. - p item - end -end -# [END certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.rb deleted file mode 100644 index f150d46f27df..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_certificates.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 certificatemanager_v1_generated_CertificateManager_ListCertificates_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the list_certificates call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_certificates. -# -def list_certificates - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::ListCertificatesRequest.new - - # Call the list_certificates method. - result = client.list_certificates 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::CertificateManager::V1::Certificate. - p item - end -end -# [END certificatemanager_v1_generated_CertificateManager_ListCertificates_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.rb deleted file mode 100644 index 16e15b84c7b1..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_dns_authorizations.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 certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the list_dns_authorizations call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_dns_authorizations. -# -def list_dns_authorizations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.new - - # Call the list_dns_authorizations method. - result = client.list_dns_authorizations 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::CertificateManager::V1::DnsAuthorization. - p item - end -end -# [END certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.rb deleted file mode 100644 index 74991af03dac..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/list_trust_configs.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 certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the list_trust_configs call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#list_trust_configs. -# -def list_trust_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.new - - # Call the list_trust_configs method. - result = client.list_trust_configs 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::CertificateManager::V1::TrustConfig. - p item - end -end -# [END certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.rb deleted file mode 100644 index 44dc497deb3e..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate.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 certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the update_certificate call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_certificate. -# -def update_certificate - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new - - # Call the update_certificate method. - result = client.update_certificate 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 certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.rb deleted file mode 100644 index 047e69d9381b..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map.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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the update_certificate_map call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_certificate_map. -# -def update_certificate_map - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new - - # Call the update_certificate_map method. - result = client.update_certificate_map 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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.rb deleted file mode 100644 index 1032589fd824..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_certificate_map_entry.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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the update_certificate_map_entry call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_certificate_map_entry. -# -def update_certificate_map_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new - - # Call the update_certificate_map_entry method. - result = client.update_certificate_map_entry 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 certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.rb deleted file mode 100644 index a9a2e0018f5e..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_dns_authorization.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 certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the update_dns_authorization call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_dns_authorization. -# -def update_dns_authorization - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new - - # Call the update_dns_authorization method. - result = client.update_dns_authorization 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 certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.rb deleted file mode 100644 index 3ed74d3a0995..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/certificate_manager/update_trust_config.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 certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync] -require "google/cloud/certificate_manager/v1" - -## -# Snippet for the update_trust_config call in the CertificateManager 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::CertificateManager::V1::CertificateManager::Client#update_trust_config. -# -def update_trust_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CertificateManager::V1::CertificateManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new - - # Call the update_trust_config method. - result = client.update_trust_config 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 certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync] diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json b/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json deleted file mode 100644 index 5ae9a91447df..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/snippets/snippet_metadata_google.cloud.certificatemanager.v1.json +++ /dev/null @@ -1,1175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-certificate_manager-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.certificatemanager.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificates_sync", - "title": "Snippet for the list_certificates call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificates.", - "file": "certificate_manager/list_certificates.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificates", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificates", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::ListCertificatesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificatesResponse", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "ListCertificates", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificates", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificate_sync", - "title": "Snippet for the get_certificate call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate.", - "file": "certificate_manager/get_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::GetCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::Certificate", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "GetCertificate", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificate", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificate_sync", - "title": "Snippet for the create_certificate call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate.", - "file": "certificate_manager/create_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "CreateCertificate", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificate", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateCertificate_sync", - "title": "Snippet for the update_certificate call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate.", - "file": "certificate_manager/update_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "UpdateCertificate", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateCertificate", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificate_sync", - "title": "Snippet for the delete_certificate call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate.", - "file": "certificate_manager/delete_certificate.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_certificate", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "DeleteCertificate", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificate", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificateMaps_sync", - "title": "Snippet for the list_certificate_maps call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_maps.", - "file": "certificate_manager/list_certificate_maps.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_maps", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_maps", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "ListCertificateMaps", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificateMaps", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificateMap_sync", - "title": "Snippet for the get_certificate_map call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map.", - "file": "certificate_manager/get_certificate_map.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_map", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::CertificateMap", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "GetCertificateMap", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificateMap", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificateMap_sync", - "title": "Snippet for the create_certificate_map call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map.", - "file": "certificate_manager/create_certificate_map.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate_map", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "CreateCertificateMap", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificateMap", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateCertificateMap_sync", - "title": "Snippet for the update_certificate_map call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map.", - "file": "certificate_manager/update_certificate_map.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate_map", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "UpdateCertificateMap", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateCertificateMap", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificateMap_sync", - "title": "Snippet for the delete_certificate_map call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map.", - "file": "certificate_manager/delete_certificate_map.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_certificate_map", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "DeleteCertificateMap", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificateMap", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificateMapEntries_sync", - "title": "Snippet for the list_certificate_map_entries call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_map_entries.", - "file": "certificate_manager/list_certificate_map_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_map_entries", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_map_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "ListCertificateMapEntries", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificateMapEntries", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificateMapEntry_sync", - "title": "Snippet for the get_certificate_map_entry call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map_entry.", - "file": "certificate_manager/get_certificate_map_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_map_entry", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_map_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::CertificateMapEntry", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "GetCertificateMapEntry", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificateMapEntry", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificateMapEntry_sync", - "title": "Snippet for the create_certificate_map_entry call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map_entry.", - "file": "certificate_manager/create_certificate_map_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate_map_entry", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_map_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "CreateCertificateMapEntry", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificateMapEntry", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateCertificateMapEntry_sync", - "title": "Snippet for the update_certificate_map_entry call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map_entry.", - "file": "certificate_manager/update_certificate_map_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_certificate_map_entry", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_certificate_map_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "UpdateCertificateMapEntry", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateCertificateMapEntry", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificateMapEntry_sync", - "title": "Snippet for the delete_certificate_map_entry call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map_entry.", - "file": "certificate_manager/delete_certificate_map_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_certificate_map_entry", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_map_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "DeleteCertificateMapEntry", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificateMapEntry", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_ListDnsAuthorizations_sync", - "title": "Snippet for the list_dns_authorizations call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_dns_authorizations.", - "file": "certificate_manager/list_dns_authorizations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_dns_authorizations", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_dns_authorizations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "ListDnsAuthorizations", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListDnsAuthorizations", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_GetDnsAuthorization_sync", - "title": "Snippet for the get_dns_authorization call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_dns_authorization.", - "file": "certificate_manager/get_dns_authorization.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dns_authorization", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_dns_authorization", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::DnsAuthorization", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "GetDnsAuthorization", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetDnsAuthorization", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateDnsAuthorization_sync", - "title": "Snippet for the create_dns_authorization call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_dns_authorization.", - "file": "certificate_manager/create_dns_authorization.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dns_authorization", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_dns_authorization", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "CreateDnsAuthorization", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateDnsAuthorization", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateDnsAuthorization_sync", - "title": "Snippet for the update_dns_authorization call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_dns_authorization.", - "file": "certificate_manager/update_dns_authorization.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dns_authorization", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_dns_authorization", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "UpdateDnsAuthorization", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateDnsAuthorization", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteDnsAuthorization_sync", - "title": "Snippet for the delete_dns_authorization call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_dns_authorization.", - "file": "certificate_manager/delete_dns_authorization.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dns_authorization", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_dns_authorization", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "DeleteDnsAuthorization", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteDnsAuthorization", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_ListCertificateIssuanceConfigs_sync", - "title": "Snippet for the list_certificate_issuance_configs call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_issuance_configs.", - "file": "certificate_manager/list_certificate_issuance_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_certificate_issuance_configs", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_certificate_issuance_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "ListCertificateIssuanceConfigs", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListCertificateIssuanceConfigs", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_GetCertificateIssuanceConfig_sync", - "title": "Snippet for the get_certificate_issuance_config call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_issuance_config.", - "file": "certificate_manager/get_certificate_issuance_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_certificate_issuance_config", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_certificate_issuance_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "GetCertificateIssuanceConfig", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetCertificateIssuanceConfig", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateCertificateIssuanceConfig_sync", - "title": "Snippet for the create_certificate_issuance_config call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_issuance_config.", - "file": "certificate_manager/create_certificate_issuance_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_certificate_issuance_config", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_certificate_issuance_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "CreateCertificateIssuanceConfig", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateCertificateIssuanceConfig", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteCertificateIssuanceConfig_sync", - "title": "Snippet for the delete_certificate_issuance_config call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_issuance_config.", - "file": "certificate_manager/delete_certificate_issuance_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_certificate_issuance_config", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_certificate_issuance_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "DeleteCertificateIssuanceConfig", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteCertificateIssuanceConfig", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_ListTrustConfigs_sync", - "title": "Snippet for the list_trust_configs call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_trust_configs.", - "file": "certificate_manager/list_trust_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_trust_configs", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#list_trust_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "ListTrustConfigs", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.ListTrustConfigs", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_GetTrustConfig_sync", - "title": "Snippet for the get_trust_config call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_trust_config.", - "file": "certificate_manager/get_trust_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_trust_config", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#get_trust_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CertificateManager::V1::TrustConfig", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "GetTrustConfig", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.GetTrustConfig", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_CreateTrustConfig_sync", - "title": "Snippet for the create_trust_config call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_trust_config.", - "file": "certificate_manager/create_trust_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_trust_config", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#create_trust_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "CreateTrustConfig", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.CreateTrustConfig", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_UpdateTrustConfig_sync", - "title": "Snippet for the update_trust_config call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_trust_config.", - "file": "certificate_manager/update_trust_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_trust_config", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#update_trust_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "UpdateTrustConfig", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.UpdateTrustConfig", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "certificatemanager_v1_generated_CertificateManager_DeleteTrustConfig_sync", - "title": "Snippet for the delete_trust_config call in the CertificateManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_trust_config.", - "file": "certificate_manager/delete_trust_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_trust_config", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client#delete_trust_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CertificateManager::Client", - "full_name": "::Google::Cloud::CertificateManager::V1::CertificateManager::Client" - }, - "method": { - "short_name": "DeleteTrustConfig", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager.DeleteTrustConfig", - "service": { - "short_name": "CertificateManager", - "full_name": "google.cloud.certificatemanager.v1.CertificateManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_operations_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_operations_test.rb deleted file mode 100644 index 6ecd8da13871..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_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/certificatemanager/v1/certificate_manager_pb" -require "google/cloud/certificatemanager/v1/certificate_manager_services_pb" -require "google/cloud/certificate_manager/v1/certificate_manager" - -class ::Google::Cloud::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb deleted file mode 100644 index 9d224b9b14db..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_paths_test.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/certificate_manager/v1/certificate_manager" - -class ::Google::Cloud::CertificateManager::V1::CertificateManager::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_ca_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.ca_pool_path project: "value0", location: "value1", ca_pool: "value2" - assert_equal "projects/value0/locations/value1/caPools/value2", path - end - end - - def test_certificate_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_path project: "value0", location: "value1", certificate: "value2" - assert_equal "projects/value0/locations/value1/certificates/value2", path - end - end - - def test_certificate_issuance_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_issuance_config_path project: "value0", location: "value1", certificate_issuance_config: "value2" - assert_equal "projects/value0/locations/value1/certificateIssuanceConfigs/value2", path - end - end - - def test_certificate_map_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_map_path project: "value0", location: "value1", certificate_map: "value2" - assert_equal "projects/value0/locations/value1/certificateMaps/value2", path - end - end - - def test_certificate_map_entry_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.certificate_map_entry_path project: "value0", location: "value1", certificate_map: "value2", certificate_map_entry: "value3" - assert_equal "projects/value0/locations/value1/certificateMaps/value2/certificateMapEntries/value3", path - end - end - - def test_dns_authorization_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dns_authorization_path project: "value0", location: "value1", dns_authorization: "value2" - assert_equal "projects/value0/locations/value1/dnsAuthorizations/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::CertificateManager::V1::CertificateManager::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_trust_config_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.trust_config_path project: "value0", location: "value1", trust_config: "value2" - assert_equal "projects/value0/locations/value1/trustConfigs/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb deleted file mode 100644 index ca98ed7a6415..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_rest_test.rb +++ /dev/null @@ -1,1707 +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/certificatemanager/v1/certificate_manager_pb" -require "google/cloud/certificate_manager/v1/certificate_manager/rest" - - -class ::Google::Cloud::CertificateManager::V1::CertificateManager::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_certificates - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse.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_certificates_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificates_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificates_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_certificates({ 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_certificates 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_certificates ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates({ 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_certificates(::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates_client_stub.call_count - end - end - end - - def test_get_certificate - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::Certificate.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_certificate({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_certificate name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_certificate ::Google::Cloud::CertificateManager::V1::GetCertificateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_certificate({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_certificate(::Google::Cloud::CertificateManager::V1::GetCertificateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_client_stub.call_count - end - end - end - - def test_create_certificate - # 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" - certificate_id = "hello world" - certificate = {} - - create_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_certificate parent: parent, certificate_id: certificate_id, certificate: certificate do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_certificate ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_certificate(::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_client_stub.call_count - end - end - end - - def test_update_certificate - # 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. - certificate = {} - update_mask = {} - - update_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_certificate({ certificate: certificate, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_certificate certificate: certificate, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_certificate ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_certificate({ certificate: certificate, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_certificate(::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_client_stub.call_count - end - end - end - - def test_delete_certificate - # 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_certificate_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_certificate({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_certificate name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_certificate ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_certificate({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_certificate(::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_certificate_client_stub.call_count - end - end - end - - def test_list_certificate_maps - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse.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_certificate_maps_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificate_maps_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_maps_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_certificate_maps({ 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_certificate_maps 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_certificate_maps ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps({ 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_certificate_maps(::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps_client_stub.call_count - end - end - end - - def test_get_certificate_map - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::CertificateMap.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_map_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_certificate_map({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_certificate_map name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_certificate_map ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_certificate_map({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_certificate_map(::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_map_client_stub.call_count - end - end - end - - def test_create_certificate_map - # 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" - certificate_map_id = "hello world" - certificate_map = {} - - create_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_map_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_certificate_map parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_certificate_map ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_certificate_map(::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_map_client_stub.call_count - end - end - end - - def test_update_certificate_map - # 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. - certificate_map = {} - update_mask = {} - - update_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_certificate_map_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_certificate_map({ certificate_map: certificate_map, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_certificate_map certificate_map: certificate_map, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_certificate_map ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_certificate_map({ certificate_map: certificate_map, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_certificate_map(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_map_client_stub.call_count - end - end - end - - def test_delete_certificate_map - # 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_certificate_map_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_map_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_certificate_map({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_certificate_map name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_certificate_map ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_certificate_map({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_certificate_map(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_certificate_map_client_stub.call_count - end - end - end - - def test_list_certificate_map_entries - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse.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_certificate_map_entries_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificate_map_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_map_entries_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_certificate_map_entries({ 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_certificate_map_entries 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_certificate_map_entries ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries({ 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_certificate_map_entries(::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries_client_stub.call_count - end - end - end - - def test_get_certificate_map_entry - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::CertificateMapEntry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_map_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_certificate_map_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_certificate_map_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_certificate_map_entry ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_certificate_map_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_certificate_map_entry(::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_map_entry_client_stub.call_count - end - end - end - - def test_create_certificate_map_entry - # 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" - certificate_map_entry_id = "hello world" - certificate_map_entry = {} - - create_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_map_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_certificate_map_entry parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_certificate_map_entry ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_certificate_map_entry(::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_map_entry_client_stub.call_count - end - end - end - - def test_update_certificate_map_entry - # 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. - certificate_map_entry = {} - update_mask = {} - - update_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_certificate_map_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_certificate_map_entry({ certificate_map_entry: certificate_map_entry, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_certificate_map_entry certificate_map_entry: certificate_map_entry, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_certificate_map_entry ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_certificate_map_entry({ certificate_map_entry: certificate_map_entry, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_certificate_map_entry(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_certificate_map_entry_client_stub.call_count - end - end - end - - def test_delete_certificate_map_entry - # 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_certificate_map_entry_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_map_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_certificate_map_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_certificate_map_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_certificate_map_entry ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_certificate_map_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_certificate_map_entry(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_certificate_map_entry_client_stub.call_count - end - end - end - - def test_list_dns_authorizations - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse.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_dns_authorizations_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_dns_authorizations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_dns_authorizations_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_dns_authorizations({ 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_dns_authorizations 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_dns_authorizations ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations({ 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_dns_authorizations(::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations_client_stub.call_count - end - end - end - - def test_get_dns_authorization - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::DnsAuthorization.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_dns_authorization_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dns_authorization({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dns_authorization name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dns_authorization ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dns_authorization({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dns_authorization(::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dns_authorization_client_stub.call_count - end - end - end - - def test_create_dns_authorization - # 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" - dns_authorization_id = "hello world" - dns_authorization = {} - - create_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_dns_authorization_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_dns_authorization parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_dns_authorization ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_dns_authorization(::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dns_authorization_client_stub.call_count - end - end - end - - def test_update_dns_authorization - # 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. - dns_authorization = {} - update_mask = {} - - update_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_dns_authorization_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_dns_authorization({ dns_authorization: dns_authorization, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_dns_authorization dns_authorization: dns_authorization, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_dns_authorization ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_dns_authorization({ dns_authorization: dns_authorization, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_dns_authorization(::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dns_authorization_client_stub.call_count - end - end - end - - def test_delete_dns_authorization - # 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_dns_authorization_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_dns_authorization_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_dns_authorization({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_dns_authorization name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_dns_authorization ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_dns_authorization({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_dns_authorization(::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dns_authorization_client_stub.call_count - end - end - end - - def test_list_certificate_issuance_configs - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse.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_certificate_issuance_configs_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_certificate_issuance_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_certificate_issuance_configs_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_certificate_issuance_configs({ 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_certificate_issuance_configs 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_certificate_issuance_configs ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs({ 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_certificate_issuance_configs(::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs_client_stub.call_count - end - end - end - - def test_get_certificate_issuance_config - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_certificate_issuance_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_certificate_issuance_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_certificate_issuance_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_certificate_issuance_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_certificate_issuance_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_certificate_issuance_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_certificate_issuance_config_client_stub.call_count - end - end - end - - def test_create_certificate_issuance_config - # 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" - certificate_issuance_config_id = "hello world" - certificate_issuance_config = {} - - create_certificate_issuance_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_certificate_issuance_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_certificate_issuance_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_certificate_issuance_config parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_certificate_issuance_config_client_stub.call_count - end - end - end - - def test_delete_certificate_issuance_config - # 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_certificate_issuance_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_certificate_issuance_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_certificate_issuance_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_certificate_issuance_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_certificate_issuance_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_certificate_issuance_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_certificate_issuance_config_client_stub.call_count - end - end - end - - def test_list_trust_configs - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse.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_trust_configs_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_list_trust_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_trust_configs_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_trust_configs({ 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_trust_configs 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_trust_configs ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs({ 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_trust_configs(::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs_client_stub.call_count - end - end - end - - def test_get_trust_config - # Create test objects. - client_result = ::Google::Cloud::CertificateManager::V1::TrustConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_get_trust_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_trust_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_trust_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_trust_config ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_trust_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_trust_config(::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_trust_config_client_stub.call_count - end - end - end - - def test_create_trust_config - # 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" - trust_config_id = "hello world" - trust_config = {} - - create_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_create_trust_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_trust_config parent: parent, trust_config_id: trust_config_id, trust_config: trust_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_trust_config ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_trust_config(::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_trust_config_client_stub.call_count - end - end - end - - def test_update_trust_config - # 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. - trust_config = {} - update_mask = {} - - update_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_update_trust_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_trust_config({ trust_config: trust_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_trust_config trust_config: trust_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_trust_config ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_trust_config({ trust_config: trust_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_trust_config(::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_trust_config_client_stub.call_count - end - end - end - - def test_delete_trust_config - # 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" - etag = "hello world" - - delete_trust_config_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::CertificateManager::V1::CertificateManager::Rest::ServiceStub.stub :transcode_delete_trust_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_trust_config({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_trust_config name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_trust_config ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_trust_config({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_trust_config(::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_trust_config_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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb deleted file mode 100644 index 5f5039354e80..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/test/google/cloud/certificate_manager/v1/certificate_manager_test.rb +++ /dev/null @@ -1,1999 +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/certificatemanager/v1/certificate_manager_pb" -require "google/cloud/certificate_manager/v1/certificate_manager" - -class ::Google::Cloud::CertificateManager::V1::CertificateManager::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_certificates - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificatesResponse.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_certificates_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificates, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest, 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_certificates_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_certificates({ 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_certificates 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_certificates ::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates({ 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_certificates(::Google::Cloud::CertificateManager::V1::ListCertificatesRequest.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_certificates_client_stub.call_rpc_count - end - end - - def test_get_certificate - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::Certificate.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_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_certificate({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_certificate name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_certificate ::Google::Cloud::CertificateManager::V1::GetCertificateRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_certificate({ 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_certificate(::Google::Cloud::CertificateManager::V1::GetCertificateRequest.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_certificate_client_stub.call_rpc_count - end - end - - def test_create_certificate - # 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" - certificate_id = "hello world" - certificate = {} - - create_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::Certificate), request["certificate"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }) 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_certificate parent: parent, certificate_id: certificate_id, certificate: certificate 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_certificate ::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate) 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_certificate({ parent: parent, certificate_id: certificate_id, certificate: certificate }, 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_certificate(::Google::Cloud::CertificateManager::V1::CreateCertificateRequest.new(parent: parent, certificate_id: certificate_id, certificate: certificate), 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_certificate_client_stub.call_rpc_count - end - end - - def test_update_certificate - # 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. - certificate = {} - update_mask = {} - - update_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::Certificate), request["certificate"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_certificate({ certificate: certificate, 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_certificate certificate: certificate, 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_certificate ::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, 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_certificate({ certificate: certificate, 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_certificate(::Google::Cloud::CertificateManager::V1::UpdateCertificateRequest.new(certificate: certificate, 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_certificate_client_stub.call_rpc_count - end - end - - def test_delete_certificate - # 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_certificate_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_certificate, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_certificate_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_certificate({ 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_certificate 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_certificate ::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.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_certificate({ 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_certificate(::Google::Cloud::CertificateManager::V1::DeleteCertificateRequest.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_certificate_client_stub.call_rpc_count - end - end - - def test_list_certificate_maps - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificateMapsResponse.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_certificate_maps_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_maps, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest, 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_certificate_maps_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_certificate_maps({ 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_certificate_maps 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_certificate_maps ::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps({ 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_certificate_maps(::Google::Cloud::CertificateManager::V1::ListCertificateMapsRequest.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_certificate_maps_client_stub.call_rpc_count - end - end - - def test_get_certificate_map - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::CertificateMap.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_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_map, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_certificate_map({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_certificate_map name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_certificate_map ::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_certificate_map({ 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_certificate_map(::Google::Cloud::CertificateManager::V1::GetCertificateMapRequest.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_certificate_map_client_stub.call_rpc_count - end - end - - def test_create_certificate_map - # 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" - certificate_map_id = "hello world" - certificate_map = {} - - create_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate_map, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_map_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMap), request["certificate_map"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }) 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_certificate_map parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map 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_certificate_map ::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map) 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_certificate_map({ parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map }, 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_certificate_map(::Google::Cloud::CertificateManager::V1::CreateCertificateMapRequest.new(parent: parent, certificate_map_id: certificate_map_id, certificate_map: certificate_map), 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_certificate_map_client_stub.call_rpc_count - end - end - - def test_update_certificate_map - # 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. - certificate_map = {} - update_mask = {} - - update_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate_map, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMap), request["certificate_map"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_certificate_map({ certificate_map: certificate_map, 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_certificate_map certificate_map: certificate_map, 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_certificate_map ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, 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_certificate_map({ certificate_map: certificate_map, 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_certificate_map(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapRequest.new(certificate_map: certificate_map, 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_certificate_map_client_stub.call_rpc_count - end - end - - def test_delete_certificate_map - # 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_certificate_map_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_certificate_map, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_certificate_map_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_certificate_map({ 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_certificate_map 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_certificate_map ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.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_certificate_map({ 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_certificate_map(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapRequest.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_certificate_map_client_stub.call_rpc_count - end - end - - def test_list_certificate_map_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesResponse.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_certificate_map_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_map_entries, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest, 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_certificate_map_entries_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_certificate_map_entries({ 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_certificate_map_entries 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_certificate_map_entries ::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries({ 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_certificate_map_entries(::Google::Cloud::CertificateManager::V1::ListCertificateMapEntriesRequest.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_certificate_map_entries_client_stub.call_rpc_count - end - end - - def test_get_certificate_map_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::CertificateMapEntry.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_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_map_entry, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_certificate_map_entry({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_certificate_map_entry name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_certificate_map_entry ::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_certificate_map_entry({ 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::GetCertificateMapEntryRequest.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_certificate_map_entry_client_stub.call_rpc_count - end - end - - def test_create_certificate_map_entry - # 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" - certificate_map_entry_id = "hello world" - certificate_map_entry = {} - - create_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate_map_entry, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_map_entry_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMapEntry), request["certificate_map_entry"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }) 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_certificate_map_entry parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry 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_certificate_map_entry ::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry) 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_certificate_map_entry({ parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry }, 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::CreateCertificateMapEntryRequest.new(parent: parent, certificate_map_entry_id: certificate_map_entry_id, certificate_map_entry: certificate_map_entry), 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_certificate_map_entry_client_stub.call_rpc_count - end - end - - def test_update_certificate_map_entry - # 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. - certificate_map_entry = {} - update_mask = {} - - update_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_certificate_map_entry, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateMapEntry), request["certificate_map_entry"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_certificate_map_entry({ certificate_map_entry: certificate_map_entry, 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_certificate_map_entry certificate_map_entry: certificate_map_entry, 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_certificate_map_entry ::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, 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_certificate_map_entry({ certificate_map_entry: certificate_map_entry, 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::UpdateCertificateMapEntryRequest.new(certificate_map_entry: certificate_map_entry, 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_certificate_map_entry_client_stub.call_rpc_count - end - end - - def test_delete_certificate_map_entry - # 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_certificate_map_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_certificate_map_entry, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_certificate_map_entry_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_certificate_map_entry({ 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_certificate_map_entry 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_certificate_map_entry ::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.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_certificate_map_entry({ 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_certificate_map_entry(::Google::Cloud::CertificateManager::V1::DeleteCertificateMapEntryRequest.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_certificate_map_entry_client_stub.call_rpc_count - end - end - - def test_list_dns_authorizations - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsResponse.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_dns_authorizations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_dns_authorizations, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest, 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_dns_authorizations_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_dns_authorizations({ 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_dns_authorizations 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_dns_authorizations ::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations({ 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_dns_authorizations(::Google::Cloud::CertificateManager::V1::ListDnsAuthorizationsRequest.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_dns_authorizations_client_stub.call_rpc_count - end - end - - def test_get_dns_authorization - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::DnsAuthorization.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_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dns_authorization, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dns_authorization({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dns_authorization name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dns_authorization ::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dns_authorization({ 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_dns_authorization(::Google::Cloud::CertificateManager::V1::GetDnsAuthorizationRequest.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_dns_authorization_client_stub.call_rpc_count - end - end - - def test_create_dns_authorization - # 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" - dns_authorization_id = "hello world" - dns_authorization = {} - - create_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dns_authorization, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["dns_authorization_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::DnsAuthorization), request["dns_authorization"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }) 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_dns_authorization parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization 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_dns_authorization ::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization) 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_dns_authorization({ parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization }, 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_dns_authorization(::Google::Cloud::CertificateManager::V1::CreateDnsAuthorizationRequest.new(parent: parent, dns_authorization_id: dns_authorization_id, dns_authorization: dns_authorization), 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_dns_authorization_client_stub.call_rpc_count - end - end - - def test_update_dns_authorization - # 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. - dns_authorization = {} - update_mask = {} - - update_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dns_authorization, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::DnsAuthorization), request["dns_authorization"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_dns_authorization({ dns_authorization: dns_authorization, 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_dns_authorization dns_authorization: dns_authorization, 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_dns_authorization ::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, 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_dns_authorization({ dns_authorization: dns_authorization, 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_dns_authorization(::Google::Cloud::CertificateManager::V1::UpdateDnsAuthorizationRequest.new(dns_authorization: dns_authorization, 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_dns_authorization_client_stub.call_rpc_count - end - end - - def test_delete_dns_authorization - # 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_dns_authorization_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dns_authorization, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dns_authorization_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_dns_authorization({ 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_dns_authorization 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_dns_authorization ::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.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_dns_authorization({ 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_dns_authorization(::Google::Cloud::CertificateManager::V1::DeleteDnsAuthorizationRequest.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_dns_authorization_client_stub.call_rpc_count - end - end - - def test_list_certificate_issuance_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsResponse.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_certificate_issuance_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_certificate_issuance_configs, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest, 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_certificate_issuance_configs_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_certificate_issuance_configs({ 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_certificate_issuance_configs 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_certificate_issuance_configs ::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs({ 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_certificate_issuance_configs(::Google::Cloud::CertificateManager::V1::ListCertificateIssuanceConfigsRequest.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_certificate_issuance_configs_client_stub.call_rpc_count - end - end - - def test_get_certificate_issuance_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig.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_certificate_issuance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_certificate_issuance_config, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_certificate_issuance_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_certificate_issuance_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_certificate_issuance_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_certificate_issuance_config({ 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_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::GetCertificateIssuanceConfigRequest.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_certificate_issuance_config_client_stub.call_rpc_count - end - end - - def test_create_certificate_issuance_config - # 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" - certificate_issuance_config_id = "hello world" - certificate_issuance_config = {} - - create_certificate_issuance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_certificate_issuance_config, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["certificate_issuance_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::CertificateIssuanceConfig), request["certificate_issuance_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_certificate_issuance_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }) 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_certificate_issuance_config parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config 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_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config) 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_certificate_issuance_config({ parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config }, 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_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::CreateCertificateIssuanceConfigRequest.new(parent: parent, certificate_issuance_config_id: certificate_issuance_config_id, certificate_issuance_config: certificate_issuance_config), 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_certificate_issuance_config_client_stub.call_rpc_count - end - end - - def test_delete_certificate_issuance_config - # 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_certificate_issuance_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_certificate_issuance_config, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_certificate_issuance_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_certificate_issuance_config({ 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_certificate_issuance_config 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_certificate_issuance_config ::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.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_certificate_issuance_config({ 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_certificate_issuance_config(::Google::Cloud::CertificateManager::V1::DeleteCertificateIssuanceConfigRequest.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_certificate_issuance_config_client_stub.call_rpc_count - end - end - - def test_list_trust_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::ListTrustConfigsResponse.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_trust_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_trust_configs, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest, 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_trust_configs_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_trust_configs({ 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_trust_configs 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_trust_configs ::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs({ 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_trust_configs(::Google::Cloud::CertificateManager::V1::ListTrustConfigsRequest.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_trust_configs_client_stub.call_rpc_count - end - end - - def test_get_trust_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::CertificateManager::V1::TrustConfig.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_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_trust_config, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_trust_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_trust_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_trust_config ::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_trust_config({ 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_trust_config(::Google::Cloud::CertificateManager::V1::GetTrustConfigRequest.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_trust_config_client_stub.call_rpc_count - end - end - - def test_create_trust_config - # 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" - trust_config_id = "hello world" - trust_config = {} - - create_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_trust_config, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["trust_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::TrustConfig), request["trust_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }) 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_trust_config parent: parent, trust_config_id: trust_config_id, trust_config: trust_config 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_trust_config ::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config) 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_trust_config({ parent: parent, trust_config_id: trust_config_id, trust_config: trust_config }, 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_trust_config(::Google::Cloud::CertificateManager::V1::CreateTrustConfigRequest.new(parent: parent, trust_config_id: trust_config_id, trust_config: trust_config), 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_trust_config_client_stub.call_rpc_count - end - end - - def test_update_trust_config - # 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. - trust_config = {} - update_mask = {} - - update_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_trust_config, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CertificateManager::V1::TrustConfig), request["trust_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_trust_config({ trust_config: trust_config, 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_trust_config trust_config: trust_config, 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_trust_config ::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, 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_trust_config({ trust_config: trust_config, 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_trust_config(::Google::Cloud::CertificateManager::V1::UpdateTrustConfigRequest.new(trust_config: trust_config, 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_trust_config_client_stub.call_rpc_count - end - end - - def test_delete_trust_config - # 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" - etag = "hello world" - - delete_trust_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_trust_config, name - assert_kind_of ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_trust_config_client_stub do - # Create client - client = ::Google::Cloud::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_trust_config({ name: name, etag: etag }) 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_trust_config name: name, etag: etag 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_trust_config ::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag) 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_trust_config({ name: name, etag: etag }, 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_trust_config(::Google::Cloud::CertificateManager::V1::DeleteTrustConfigRequest.new(name: name, etag: etag), 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_trust_config_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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CertificateManager::V1::CertificateManager::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::CertificateManager::V1::CertificateManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::CertificateManager::V1::CertificateManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb b/owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-certificate_manager-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.gitignore b/owl-bot-staging/google-cloud-chronicle-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json deleted file mode 100644 index aa41429c48f2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "chronicle.googleapis.com", - "api_shortname": "chronicle", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest", - "distribution_name": "google-cloud-chronicle-v1", - "is_cloud": true, - "language": "ruby", - "name": "chronicle", - "name_pretty": "Chronicle V1 API", - "product_documentation": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/chronicle/docs/secops/secops-overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml b/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml deleted file mode 100644 index 247c818fc834..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-chronicle-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-chronicle-v1.rb" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb b/owl-bot-staging/google-cloud-chronicle-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/.yardopts b/owl-bot-staging/google-cloud-chronicle-v1/.yardopts deleted file mode 100644 index 279160678357..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Chronicle 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-chronicle-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md deleted file mode 100644 index 2b6138fc6b12..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-chronicle-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-chronicle-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/chronicle/v1" - -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/chronicle/v1" - -::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::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-chronicle-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/chronicle/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::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-chronicle-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md b/owl-bot-staging/google-cloud-chronicle-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/README.md b/owl-bot-staging/google-cloud-chronicle-v1/README.md deleted file mode 100644 index 0020c37e4f88..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Chronicle V1 API - -The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. - -The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Chronicle V1 API. Most users should consider using -the main client gem, -[google-cloud-chronicle](https://rubygems.org/gems/google-cloud-chronicle). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-chronicle-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/chronicle.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/chronicle/v1" - -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new -request = ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new # (request fields as keyword arguments...) -response = client.create_data_access_label request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-chronicle-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/chronicle/docs/secops/secops-overview) -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/chronicle/v1" -require "logger" - -client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::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-chronicle`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-chronicle-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-chronicle`. -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-chronicle-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-chronicle-v1/Rakefile b/owl-bot-staging/google-cloud-chronicle-v1/Rakefile deleted file mode 100644 index 1ec0994ae807..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/chronicle/v1/data_access_control_service/credentials" - ::Google::Cloud::Chronicle::V1::DataAccessControlService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-chronicle-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-chronicle-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-chronicle-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-chronicle-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-chronicle-v1" - header "google-cloud-chronicle-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-chronicle-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-chronicle-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-chronicle-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-chronicle-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-chronicle-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json deleted file mode 100644 index 5ee0ce216af9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/gapic_metadata.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.chronicle.v1", - "libraryPackage": "::Google::Cloud::Chronicle::V1", - "services": { - "DataAccessControlService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client", - "rpcs": { - "CreateDataAccessLabel": { - "methods": [ - "create_data_access_label" - ] - }, - "GetDataAccessLabel": { - "methods": [ - "get_data_access_label" - ] - }, - "ListDataAccessLabels": { - "methods": [ - "list_data_access_labels" - ] - }, - "UpdateDataAccessLabel": { - "methods": [ - "update_data_access_label" - ] - }, - "DeleteDataAccessLabel": { - "methods": [ - "delete_data_access_label" - ] - }, - "CreateDataAccessScope": { - "methods": [ - "create_data_access_scope" - ] - }, - "GetDataAccessScope": { - "methods": [ - "get_data_access_scope" - ] - }, - "ListDataAccessScopes": { - "methods": [ - "list_data_access_scopes" - ] - }, - "UpdateDataAccessScope": { - "methods": [ - "update_data_access_scope" - ] - }, - "DeleteDataAccessScope": { - "methods": [ - "delete_data_access_scope" - ] - } - } - } - } - }, - "EntityService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::EntityService::Client", - "rpcs": { - "GetWatchlist": { - "methods": [ - "get_watchlist" - ] - }, - "ListWatchlists": { - "methods": [ - "list_watchlists" - ] - }, - "CreateWatchlist": { - "methods": [ - "create_watchlist" - ] - }, - "UpdateWatchlist": { - "methods": [ - "update_watchlist" - ] - }, - "DeleteWatchlist": { - "methods": [ - "delete_watchlist" - ] - } - } - } - } - }, - "InstanceService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::InstanceService::Client", - "rpcs": { - "GetInstance": { - "methods": [ - "get_instance" - ] - } - } - } - } - }, - "ReferenceListService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client", - "rpcs": { - "GetReferenceList": { - "methods": [ - "get_reference_list" - ] - }, - "ListReferenceLists": { - "methods": [ - "list_reference_lists" - ] - }, - "CreateReferenceList": { - "methods": [ - "create_reference_list" - ] - }, - "UpdateReferenceList": { - "methods": [ - "update_reference_list" - ] - } - } - } - } - }, - "RuleService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Chronicle::V1::RuleService::Client", - "rpcs": { - "CreateRule": { - "methods": [ - "create_rule" - ] - }, - "GetRule": { - "methods": [ - "get_rule" - ] - }, - "ListRules": { - "methods": [ - "list_rules" - ] - }, - "UpdateRule": { - "methods": [ - "update_rule" - ] - }, - "DeleteRule": { - "methods": [ - "delete_rule" - ] - }, - "ListRuleRevisions": { - "methods": [ - "list_rule_revisions" - ] - }, - "CreateRetrohunt": { - "methods": [ - "create_retrohunt" - ] - }, - "GetRetrohunt": { - "methods": [ - "get_retrohunt" - ] - }, - "ListRetrohunts": { - "methods": [ - "list_retrohunts" - ] - }, - "GetRuleDeployment": { - "methods": [ - "get_rule_deployment" - ] - }, - "ListRuleDeployments": { - "methods": [ - "list_rule_deployments" - ] - }, - "UpdateRuleDeployment": { - "methods": [ - "update_rule_deployment" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec b/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec deleted file mode 100644 index d2af296cfe16..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/google-cloud-chronicle-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/chronicle/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-chronicle-v1" - gem.version = Google::Cloud::Chronicle::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle. Note that google-cloud-chronicle-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-chronicle instead. See the readme for more details." - gem.summary = "The Google Cloud Security Operations API, popularly known as the Chronicle API, serves endpoints that enable security analysts to analyze and mitigate a security threat throughout its lifecycle." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-v1.rb deleted file mode 100644 index 8d5cd2a8ddb3..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google-cloud-chronicle-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/chronicle/v1" diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb deleted file mode 100644 index 3eb05282e5da..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1.rb +++ /dev/null @@ -1,49 +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/chronicle/v1/data_access_control_service" -require "google/cloud/chronicle/v1/entity_service" -require "google/cloud/chronicle/v1/instance_service" -require "google/cloud/chronicle/v1/reference_list_service" -require "google/cloud/chronicle/v1/rule_service" -require "google/cloud/chronicle/v1/version" - -module Google - module Cloud - module Chronicle - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/chronicle/v1" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/chronicle/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb deleted file mode 100644 index cc6fd584534a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/data_access_control.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/chronicle/v1/data_access_control.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x01\n\x1c\x43reateDataAccessLabelRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12J\n\x11\x64\x61ta_access_label\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_label_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\x9b\x01\n\x1bListDataAccessLabelsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessLabel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1cListDataAccessLabelsResponse\x12\x46\n\x12\x64\x61ta_access_labels\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9b\x01\n\x1cUpdateDataAccessLabelRequest\x12J\n\x11\x64\x61ta_access_label\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessLabelB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessLabelRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\"\xcf\x01\n\x1c\x43reateDataAccessScopeRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12J\n\x11\x64\x61ta_access_scope\x18\x02 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12!\n\x14\x64\x61ta_access_scope_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"[\n\x19GetDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\x9b\x01\n\x1bListDataAccessScopesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(chronicle.googleapis.com/DataAccessScope\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x1cListDataAccessScopesResponse\x12\x46\n\x12\x64\x61ta_access_scopes\x18\x01 \x03(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScope\x12-\n global_data_access_scope_granted\x18\x03 \x01(\x08H\x00\x88\x01\x01\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\tB#\n!_global_data_access_scope_granted\"\x9b\x01\n\x1cUpdateDataAccessScopeRequest\x12J\n\x11\x64\x61ta_access_scope\x18\x01 \x01(\x0b\x32*.google.cloud.chronicle.v1.DataAccessScopeB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"^\n\x1c\x44\x65leteDataAccessScopeRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\"\xd5\x03\n\x0f\x44\x61taAccessLabel\x12\x13\n\tudm_query\x18\x03 \x01(\tH\x00\x12;\n\x04name\x18\x01 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessLabel\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x61uthor\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessLabel\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}B\x0c\n\ndefinition\"\x88\x05\n\x0f\x44\x61taAccessScope\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12\\\n\x1a\x61llowed_data_access_labels\x18\x02 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12[\n\x19\x64\x65nied_data_access_labels\x18\x03 \x03(\x0b\x32\x33.google.cloud.chronicle.v1.DataAccessLabelReferenceB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x04 \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\x13\n\x06\x61uthor\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0blast_editor\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tallow_all\x18\n \x01(\x08\x42\x03\xe0\x41\x01:\x91\x01\xea\x41\x8d\x01\n(chronicle.googleapis.com/DataAccessScope\x12\x61projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}\"\xd0\x01\n\x18\x44\x61taAccessLabelReference\x12\x1b\n\x11\x64\x61ta_access_label\x18\x01 \x01(\tH\x00\x12\x12\n\x08log_type\x18\x02 \x01(\tH\x00\x12\x19\n\x0f\x61sset_namespace\x18\x03 \x01(\tH\x00\x12\x44\n\x0fingestion_label\x18\x04 \x01(\x0b\x32).google.cloud.chronicle.v1.IngestionLabelH\x00\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x03\x42\x07\n\x05label\"V\n\x0eIngestionLabel\x12 \n\x13ingestion_label_key\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15ingestion_label_value\x18\x02 \x01(\tB\x03\xe0\x41\x01\x32\xe6\x12\n\x18\x44\x61taAccessControlService\x12\x8a\x02\n\x15\x43reateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.CreateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8b\x01\xda\x41-parent,data_access_label,data_access_label_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels:\x11\x64\x61ta_access_label\x12\xc7\x01\n\x12GetDataAccessLabel\x12\x34.google.cloud.chronicle.v1.GetDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\xda\x01\n\x14ListDataAccessLabels\x12\x36.google.cloud.chronicle.v1.ListDataAccessLabelsRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessLabelsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessLabels\x12\x8c\x02\n\x15UpdateDataAccessLabel\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessLabelRequest\x1a*.google.cloud.chronicle.v1.DataAccessLabel\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_label,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_label.name=projects/*/locations/*/instances/*/dataAccessLabels/*}:\x11\x64\x61ta_access_label\x12\xb9\x01\n\x15\x44\x65leteDataAccessLabel\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessLabelRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessLabels/*}\x12\x8a\x02\n\x15\x43reateDataAccessScope\x12\x37.google.cloud.chronicle.v1.CreateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8b\x01\xda\x41-parent,data_access_scope,data_access_scope_id\x82\xd3\xe4\x93\x02U\"@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes:\x11\x64\x61ta_access_scope\x12\xc7\x01\n\x12GetDataAccessScope\x12\x34.google.cloud.chronicle.v1.GetDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x12\xda\x01\n\x14ListDataAccessScopes\x12\x36.google.cloud.chronicle.v1.ListDataAccessScopesRequest\x1a\x37.google.cloud.chronicle.v1.ListDataAccessScopesResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1/{parent=projects/*/locations/*/instances/*}/dataAccessScopes\x12\x8c\x02\n\x15UpdateDataAccessScope\x12\x37.google.cloud.chronicle.v1.UpdateDataAccessScopeRequest\x1a*.google.cloud.chronicle.v1.DataAccessScope\"\x8d\x01\xda\x41\x1d\x64\x61ta_access_scope,update_mask\x82\xd3\xe4\x93\x02g2R/v1/{data_access_scope.name=projects/*/locations/*/instances/*/dataAccessScopes/*}:\x11\x64\x61ta_access_scope\x12\xb9\x01\n\x15\x44\x65leteDataAccessScope\x12\x37.google.cloud.chronicle.v1.DeleteDataAccessScopeRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1/{name=projects/*/locations/*/instances/*/dataAccessScopes/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc6\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0f\x44\x61taAccessProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - CreateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessLabelRequest").msgclass - GetDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessLabelRequest").msgclass - ListDataAccessLabelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsRequest").msgclass - ListDataAccessLabelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessLabelsResponse").msgclass - UpdateDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessLabelRequest").msgclass - DeleteDataAccessLabelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessLabelRequest").msgclass - CreateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateDataAccessScopeRequest").msgclass - GetDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetDataAccessScopeRequest").msgclass - ListDataAccessScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesRequest").msgclass - ListDataAccessScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListDataAccessScopesResponse").msgclass - UpdateDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateDataAccessScopeRequest").msgclass - DeleteDataAccessScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteDataAccessScopeRequest").msgclass - DataAccessLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabel").msgclass - DataAccessScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessScope").msgclass - DataAccessLabelReference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DataAccessLabelReference").msgclass - IngestionLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.IngestionLabel").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb deleted file mode 100644 index 7001b817d96a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_access_control_service/credentials" -require "google/cloud/chronicle/v1/data_access_control_service/paths" -require "google/cloud/chronicle/v1/data_access_control_service/client" -require "google/cloud/chronicle/v1/data_access_control_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/data_access_control_service" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/data_access_control_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module DataAccessControlService - end - end - end - end -end - -helper_path = ::File.join __dir__, "data_access_control_service", "helpers.rb" -require "google/cloud/chronicle/v1/data_access_control_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb deleted file mode 100644 index 06ae3041cf1e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/client.rb +++ /dev/null @@ -1,1431 +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/chronicle/v1/data_access_control_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - ## - # Client for the DataAccessControlService service. - # - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_access_control_service_stub - - ## - # Configure the DataAccessControlService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAccessControlService clients - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_data_access_label.timeout = 60.0 - - default_config.rpcs.get_data_access_label.timeout = 60.0 - default_config.rpcs.get_data_access_label.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_labels.timeout = 60.0 - default_config.rpcs.list_data_access_labels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_label.timeout = 60.0 - - default_config.rpcs.delete_data_access_label.timeout = 60.0 - - default_config.rpcs.create_data_access_scope.timeout = 60.0 - - default_config.rpcs.get_data_access_scope.timeout = 60.0 - default_config.rpcs.get_data_access_scope.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_scopes.timeout = 60.0 - default_config.rpcs.list_data_access_scopes.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_scope.timeout = 60.0 - - default_config.rpcs.delete_data_access_scope.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 - @data_access_control_service_stub.universe_domain - end - - ## - # Create a new DataAccessControlService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAccessControlService 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/chronicle/v1/data_access_control_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 - - @data_access_control_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::DataAccessControlService::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 - ) - - @data_access_control_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_access_control_service_stub.logger - end - - # Service calls - - ## - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - # - # @overload create_data_access_label(request, options = nil) - # Pass arguments to `create_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) - # Pass arguments to `create_data_access_label` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. Data access label to create. - # @param data_access_label_id [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - # - # # Call the create_data_access_label method. - # result = client.create_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def create_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :create_data_access_label, 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 a data access label. - # - # @overload get_data_access_label(request, options = nil) - # Pass arguments to `get_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(name: nil) - # Pass arguments to `get_data_access_label` via keyword arguments. Note that at - # least one keyword argument is 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 ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - # - # # Call the get_data_access_label method. - # result = client.get_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def get_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :get_data_access_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all data access labels for the customer. - # - # @overload list_data_access_labels(request, options = nil) - # Pass arguments to `list_data_access_labels` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_labels` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - # - # # Call the list_data_access_labels method. - # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - # p item - # end - # - def list_data_access_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest - - # Converts hash 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_data_access_labels.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::Chronicle::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_data_access_labels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_access_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :list_data_access_labels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, 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 - - ## - # Updates a data access label. - # - # @overload update_data_access_label(request, options = nil) - # Pass arguments to `update_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(data_access_label: nil, update_mask: nil) - # Pass arguments to `update_data_access_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - # - # # Call the update_data_access_label method. - # result = client.update_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def update_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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.data_access_label&.name - header_params["data_access_label.name"] = request.data_access_label.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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :update_data_access_label, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - # - # @overload delete_data_access_label(request, options = nil) - # Pass arguments to `delete_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(name: nil) - # Pass arguments to `delete_data_access_label` via keyword arguments. Note that at - # least one keyword argument is 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 ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - # - # # Call the delete_data_access_label method. - # result = client.delete_data_access_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :delete_data_access_label, 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 data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - # - # @overload create_data_access_scope(request, options = nil) - # Pass arguments to `create_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) - # Pass arguments to `create_data_access_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 resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. Data access scope to create. - # @param data_access_scope_id [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - # - # # Call the create_data_access_scope method. - # result = client.create_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def create_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :create_data_access_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 - - ## - # Retrieves an existing data access scope. - # - # @overload get_data_access_scope(request, options = nil) - # Pass arguments to `get_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) - # Pass arguments to `get_data_access_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 ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - # - # # Call the get_data_access_scope method. - # result = client.get_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def get_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :get_data_access_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 - - ## - # Lists all existing data access scopes for the customer. - # - # @overload list_data_access_scopes(request, options = nil) - # Pass arguments to `list_data_access_scopes` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_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 resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - # - # # Call the list_data_access_scopes method. - # result = client.list_data_access_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::Chronicle::V1::DataAccessScope. - # p item - # end - # - def list_data_access_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scopes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_data_access_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :list_data_access_scopes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_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 - - ## - # Updates a data access scope. - # - # @overload update_data_access_scope(request, options = nil) - # Pass arguments to `update_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(data_access_scope: nil, update_mask: nil) - # Pass arguments to `update_data_access_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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - # - # # Call the update_data_access_scope method. - # result = client.update_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def update_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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.data_access_scope&.name - header_params["data_access_scope.name"] = request.data_access_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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :update_data_access_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 - - ## - # Deletes a data access scope. - # - # @overload delete_data_access_scope(request, options = nil) - # Pass arguments to `delete_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) - # Pass arguments to `delete_data_access_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 ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - # - # # Call the delete_data_access_scope method. - # result = client.delete_data_access_scope request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.call_rpc :delete_data_access_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 - - ## - # Configuration class for the DataAccessControlService API. - # - # This class represents the configuration for DataAccessControlService, - # 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::Chronicle::V1::DataAccessControlService::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 - # # create_data_access_label to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.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::Chronicle::V1::DataAccessControlService::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 = "chronicle.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 DataAccessControlService 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 `create_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_label - ## - # RPC-specific configuration for `get_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_label - ## - # RPC-specific configuration for `list_data_access_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_labels - ## - # RPC-specific configuration for `update_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_label - ## - # RPC-specific configuration for `delete_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_label - ## - # RPC-specific configuration for `create_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_scope - ## - # RPC-specific configuration for `get_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_scope - ## - # RPC-specific configuration for `list_data_access_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_scopes - ## - # RPC-specific configuration for `update_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_scope - ## - # RPC-specific configuration for `delete_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_scope - - # @private - def initialize parent_rpcs = nil - create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label - @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config - get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label - @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config - list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels - @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config - update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label - @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config - delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label - @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config - create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope - @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config - get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope - @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config - list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes - @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config - update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope - @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config - delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope - @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb deleted file mode 100644 index 2e86b999c1a0..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - # Credentials for the DataAccessControlService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb deleted file mode 100644 index f3ec957a19df..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/paths.rb +++ /dev/null @@ -1,94 +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 Chronicle - module V1 - module DataAccessControlService - # Path helper methods for the DataAccessControlService API. - module Paths - ## - # Create a fully-qualified DataAccessLabel resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_label [String] - # - # @return [::String] - def data_access_label_path project:, location:, instance:, data_access_label: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessLabels/#{data_access_label}" - end - - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb deleted file mode 100644 index e93f75e06d2d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/data_access_control_service/credentials" -require "google/cloud/chronicle/v1/data_access_control_service/paths" -require "google/cloud/chronicle/v1/data_access_control_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/data_access_control_service/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module DataAccessControlService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/data_access_control_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb deleted file mode 100644 index 88d1752de0f5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/client.rb +++ /dev/null @@ -1,1318 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - module Rest - ## - # REST client for the DataAccessControlService service. - # - # DataAccessControlService exposes resources and endpoints related to data - # access control. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :data_access_control_service_stub - - ## - # Configure the DataAccessControlService Client class. - # - # See {::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all DataAccessControlService clients - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_data_access_label.timeout = 60.0 - - default_config.rpcs.get_data_access_label.timeout = 60.0 - default_config.rpcs.get_data_access_label.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_labels.timeout = 60.0 - default_config.rpcs.list_data_access_labels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_label.timeout = 60.0 - - default_config.rpcs.delete_data_access_label.timeout = 60.0 - - default_config.rpcs.create_data_access_scope.timeout = 60.0 - - default_config.rpcs.get_data_access_scope.timeout = 60.0 - default_config.rpcs.get_data_access_scope.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_data_access_scopes.timeout = 60.0 - default_config.rpcs.list_data_access_scopes.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_data_access_scope.timeout = 60.0 - - default_config.rpcs.delete_data_access_scope.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 - @data_access_control_service_stub.universe_domain - end - - ## - # Create a new DataAccessControlService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the DataAccessControlService 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 - - @data_access_control_service_stub = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @data_access_control_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @data_access_control_service_stub.logger - end - - # Service calls - - ## - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - # - # @overload create_data_access_label(request, options = nil) - # Pass arguments to `create_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(parent: nil, data_access_label: nil, data_access_label_id: nil) - # Pass arguments to `create_data_access_label` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. Data access label to create. - # @param data_access_label_id [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - # - # # Call the create_data_access_label method. - # result = client.create_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def create_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.create_data_access_label 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 a data access label. - # - # @overload get_data_access_label(request, options = nil) - # Pass arguments to `get_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(name: nil) - # Pass arguments to `get_data_access_label` via keyword arguments. Note that at - # least one keyword argument is 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 ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - # - # # Call the get_data_access_label method. - # result = client.get_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def get_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.get_data_access_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all data access labels for the customer. - # - # @overload list_data_access_labels(request, options = nil) - # Pass arguments to `list_data_access_labels` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_labels(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_labels` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - # - # # Call the list_data_access_labels method. - # result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - # p item - # end - # - def list_data_access_labels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest - - # Converts hash 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_data_access_labels.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::Chronicle::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_data_access_labels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_access_labels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.list_data_access_labels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_labels, "data_access_labels", 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 - - ## - # Updates a data access label. - # - # @overload update_data_access_label(request, options = nil) - # Pass arguments to `update_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(data_access_label: nil, update_mask: nil) - # Pass arguments to `update_data_access_label` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param data_access_label [::Google::Cloud::Chronicle::V1::DataAccessLabel, ::Hash] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - # - # # Call the update_data_access_label method. - # result = client.update_data_access_label request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - # p result - # - def update_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.update_data_access_label request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - # - # @overload delete_data_access_label(request, options = nil) - # Pass arguments to `delete_data_access_label` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_label(name: nil) - # Pass arguments to `delete_data_access_label` via keyword arguments. Note that at - # least one keyword argument is 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 ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - # - # # Call the delete_data_access_label method. - # result = client.delete_data_access_label request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_label request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest - - # Converts hash 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_data_access_label.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::Chronicle::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_data_access_label.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_access_label.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.delete_data_access_label 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 data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - # - # @overload create_data_access_scope(request, options = nil) - # Pass arguments to `create_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(parent: nil, data_access_scope: nil, data_access_scope_id: nil) - # Pass arguments to `create_data_access_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 resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. Data access scope to create. - # @param data_access_scope_id [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - # - # # Call the create_data_access_scope method. - # result = client.create_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def create_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.create_data_access_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 - - ## - # Retrieves an existing data access scope. - # - # @overload get_data_access_scope(request, options = nil) - # Pass arguments to `get_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) - # Pass arguments to `get_data_access_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 ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - # - # # Call the get_data_access_scope method. - # result = client.get_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def get_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.get_data_access_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 - - ## - # Lists all existing data access scopes for the customer. - # - # @overload list_data_access_scopes(request, options = nil) - # Pass arguments to `list_data_access_scopes` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scopes(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_data_access_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 resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - # - # # Call the list_data_access_scopes method. - # result = client.list_data_access_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::Chronicle::V1::DataAccessScope. - # p item - # end - # - def list_data_access_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scopes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_data_access_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.list_data_access_scopes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @data_access_control_service_stub, :list_data_access_scopes, "data_access_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 - - ## - # Updates a data access scope. - # - # @overload update_data_access_scope(request, options = nil) - # Pass arguments to `update_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(data_access_scope: nil, update_mask: nil) - # Pass arguments to `update_data_access_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 data_access_scope [::Google::Cloud::Chronicle::V1::DataAccessScope, ::Hash] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - # - # # Call the update_data_access_scope method. - # result = client.update_data_access_scope request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - # p result - # - def update_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.update_data_access_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 - - ## - # Deletes a data access scope. - # - # @overload delete_data_access_scope(request, options = nil) - # Pass arguments to `delete_data_access_scope` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_data_access_scope(name: nil) - # Pass arguments to `delete_data_access_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 ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - # - # # Call the delete_data_access_scope method. - # result = client.delete_data_access_scope request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_data_access_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest - - # Converts hash 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_data_access_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::Chronicle::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_data_access_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_data_access_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @data_access_control_service_stub.delete_data_access_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 - - ## - # Configuration class for the DataAccessControlService REST API. - # - # This class represents the configuration for DataAccessControlService 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::Chronicle::V1::DataAccessControlService::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 - # # create_data_access_label to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_data_access_label.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 = "chronicle.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 DataAccessControlService 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 `create_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_label - ## - # RPC-specific configuration for `get_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_label - ## - # RPC-specific configuration for `list_data_access_labels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_labels - ## - # RPC-specific configuration for `update_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_label - ## - # RPC-specific configuration for `delete_data_access_label` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_label - ## - # RPC-specific configuration for `create_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_data_access_scope - ## - # RPC-specific configuration for `get_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_data_access_scope - ## - # RPC-specific configuration for `list_data_access_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_data_access_scopes - ## - # RPC-specific configuration for `update_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_data_access_scope - ## - # RPC-specific configuration for `delete_data_access_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_data_access_scope - - # @private - def initialize parent_rpcs = nil - create_data_access_label_config = parent_rpcs.create_data_access_label if parent_rpcs.respond_to? :create_data_access_label - @create_data_access_label = ::Gapic::Config::Method.new create_data_access_label_config - get_data_access_label_config = parent_rpcs.get_data_access_label if parent_rpcs.respond_to? :get_data_access_label - @get_data_access_label = ::Gapic::Config::Method.new get_data_access_label_config - list_data_access_labels_config = parent_rpcs.list_data_access_labels if parent_rpcs.respond_to? :list_data_access_labels - @list_data_access_labels = ::Gapic::Config::Method.new list_data_access_labels_config - update_data_access_label_config = parent_rpcs.update_data_access_label if parent_rpcs.respond_to? :update_data_access_label - @update_data_access_label = ::Gapic::Config::Method.new update_data_access_label_config - delete_data_access_label_config = parent_rpcs.delete_data_access_label if parent_rpcs.respond_to? :delete_data_access_label - @delete_data_access_label = ::Gapic::Config::Method.new delete_data_access_label_config - create_data_access_scope_config = parent_rpcs.create_data_access_scope if parent_rpcs.respond_to? :create_data_access_scope - @create_data_access_scope = ::Gapic::Config::Method.new create_data_access_scope_config - get_data_access_scope_config = parent_rpcs.get_data_access_scope if parent_rpcs.respond_to? :get_data_access_scope - @get_data_access_scope = ::Gapic::Config::Method.new get_data_access_scope_config - list_data_access_scopes_config = parent_rpcs.list_data_access_scopes if parent_rpcs.respond_to? :list_data_access_scopes - @list_data_access_scopes = ::Gapic::Config::Method.new list_data_access_scopes_config - update_data_access_scope_config = parent_rpcs.update_data_access_scope if parent_rpcs.respond_to? :update_data_access_scope - @update_data_access_scope = ::Gapic::Config::Method.new update_data_access_scope_config - delete_data_access_scope_config = parent_rpcs.delete_data_access_scope if parent_rpcs.respond_to? :delete_data_access_scope - @delete_data_access_scope = ::Gapic::Config::Method.new delete_data_access_scope_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb deleted file mode 100644 index c11b9f42da29..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_service/rest/service_stub.rb +++ /dev/null @@ -1,695 +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/chronicle/v1/data_access_control_pb" - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - module Rest - ## - # REST service stub for the DataAccessControlService 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 create_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def create_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def get_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_labels REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] - # 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::Chronicle::V1::ListDataAccessLabelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse] - # A result object deserialized from the server's reply - def list_data_access_labels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_labels_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_data_access_labels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] - # 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::Chronicle::V1::DataAccessLabel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # A result object deserialized from the server's reply - def update_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_label_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_data_access_label", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] - # 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_data_access_label request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_label_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_data_access_label", - 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 create_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def create_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_data_access_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def get_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_data_access_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scopes REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] - # 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::Chronicle::V1::ListDataAccessScopesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse] - # A result object deserialized from the server's reply - def list_data_access_scopes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_data_access_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_data_access_scopes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] - # 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::Chronicle::V1::DataAccessScope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # A result object deserialized from the server's reply - def update_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_data_access_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_data_access_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] - # 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_data_access_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_data_access_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_data_access_scope", - 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 create_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAccessLabels", - body: "data_access_label", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_access_labels REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest] - # 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_data_access_labels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAccessLabels", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_access_label.name}", - body: "data_access_label", - matches: [ - ["data_access_label.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_access_label REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest] - # 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_data_access_label_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessLabels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/dataAccessScopes", - body: "data_access_scope", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_data_access_scopes REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest] - # 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_data_access_scopes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/dataAccessScopes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{data_access_scope.name}", - body: "data_access_scope", - matches: [ - ["data_access_scope.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_data_access_scope REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest] - # 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_data_access_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/dataAccessScopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb deleted file mode 100644 index 0ef90feac2fc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/data_access_control_services_pb.rb +++ /dev/null @@ -1,76 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/data_access_control.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/chronicle/v1/data_access_control_pb' - -module Google - module Cloud - module Chronicle - module V1 - module DataAccessControlService - # DataAccessControlService exposes resources and endpoints related to data - # access control. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.DataAccessControlService' - - # Creates a data access label. - # Data access labels are applied to incoming event data and selected in data - # access scopes (another resource), and only users with scopes containing the - # label can see data with that label. Currently, the data access label - # resource only includes custom labels, which are labels that correspond - # to UDM queries over event data. - rpc :CreateDataAccessLabel, ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Gets a data access label. - rpc :GetDataAccessLabel, ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Lists all data access labels for the customer. - rpc :ListDataAccessLabels, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse - # Updates a data access label. - rpc :UpdateDataAccessLabel, ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, ::Google::Cloud::Chronicle::V1::DataAccessLabel - # Deletes a data access label. When a label is deleted, new - # data that enters in the system will not receive the label, but the label - # will not be removed from old data that still refers to it. - rpc :DeleteDataAccessLabel, ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, ::Google::Protobuf::Empty - # Creates a data access scope. - # Data access scope is a combination of allowed and denied labels attached - # to a permission group. If a scope has allowed labels A and B and denied - # labels C and D, then the group of people attached to the scope - # will have permissions to see all events labeled with A or B (or both) and - # not labeled with either C or D. - rpc :CreateDataAccessScope, ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Retrieves an existing data access scope. - rpc :GetDataAccessScope, ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Lists all existing data access scopes for the customer. - rpc :ListDataAccessScopes, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse - # Updates a data access scope. - rpc :UpdateDataAccessScope, ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, ::Google::Cloud::Chronicle::V1::DataAccessScope - # Deletes a data access scope. - rpc :DeleteDataAccessScope, ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb deleted file mode 100644 index 80fdf542b870..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/entity.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/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/chronicle/v1/entity.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd5\x06\n\tWatchlist\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1f\n\x12multiplying_factor\x18\x05 \x01(\x02\x42\x03\xe0\x41\x01\x12h\n\x1b\x65ntity_population_mechanism\x18\x06 \x01(\x0b\x32>.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanismB\x03\xe0\x41\x02\x12K\n\x0c\x65ntity_count\x18\x07 \x01(\x0b\x32\x30.google.cloud.chronicle.v1.Watchlist.EntityCountB\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\\\n\x1awatchlist_user_preferences\x18\n \x01(\x0b\x32\x33.google.cloud.chronicle.v1.WatchlistUserPreferencesB\x03\xe0\x41\x01\x1a\x90\x01\n\x19\x45ntityPopulationMechanism\x12\\\n\x06manual\x18\x01 \x01(\x0b\x32\x45.google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.ManualB\x03\xe0\x41\x01H\x00\x1a\x08\n\x06ManualB\x0b\n\tmechanism\x1a\x34\n\x0b\x45ntityCount\x12\x11\n\x04user\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x12\n\x05\x61sset\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03:\x94\x01\xea\x41\x90\x01\n\"chronicle.googleapis.com/Watchlist\x12Sprojects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}*\nwatchlists2\twatchlist\"/\n\x18WatchlistUserPreferences\x12\x13\n\x06pinned\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\"O\n\x13GetWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\"\x99\x01\n\x15ListWatchlistsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\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\"u\n\x16ListWatchlistsResponse\x12=\n\nwatchlists\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x01\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xad\x01\n\x16\x43reateWatchlistRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Watchlist\x12\x19\n\x0cwatchlist_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12<\n\twatchlist\x18\x03 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\"\x8c\x01\n\x16UpdateWatchlistRequest\x12<\n\twatchlist\x18\x01 \x01(\x0b\x32$.google.cloud.chronicle.v1.WatchlistB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"f\n\x16\x44\x65leteWatchlistRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Watchlist\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x32\xbe\x08\n\rEntityService\x12\xaf\x01\n\x0cGetWatchlist\x12..google.cloud.chronicle.v1.GetWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x12\xc2\x01\n\x0eListWatchlists\x12\x30.google.cloud.chronicle.v1.ListWatchlistsRequest\x1a\x31.google.cloud.chronicle.v1.ListWatchlistsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/instances/*}/watchlists\x12\xd9\x01\n\x0f\x43reateWatchlist\x12\x31.google.cloud.chronicle.v1.CreateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"m\xda\x41\x1dparent,watchlist,watchlist_id\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/instances/*}/watchlists:\twatchlist\x12\xdb\x01\n\x0fUpdateWatchlist\x12\x31.google.cloud.chronicle.v1.UpdateWatchlistRequest\x1a$.google.cloud.chronicle.v1.Watchlist\"o\xda\x41\x15watchlist,update_mask\x82\xd3\xe4\x93\x02Q2D/v1/{watchlist.name=projects/*/locations/*/instances/*/watchlists/*}:\twatchlist\x12\xad\x01\n\x0f\x44\x65leteWatchlist\x12\x31.google.cloud.chronicle.v1.DeleteWatchlistRequest\x1a\x16.google.protobuf.Empty\"O\xda\x41\nname,force\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/instances/*/watchlists/*}\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc2\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x0b\x45ntityProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - Watchlist = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist").msgclass - Watchlist::EntityPopulationMechanism = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism").msgclass - Watchlist::EntityPopulationMechanism::Manual = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityPopulationMechanism.Manual").msgclass - Watchlist::EntityCount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Watchlist.EntityCount").msgclass - WatchlistUserPreferences = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.WatchlistUserPreferences").msgclass - GetWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetWatchlistRequest").msgclass - ListWatchlistsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsRequest").msgclass - ListWatchlistsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListWatchlistsResponse").msgclass - CreateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateWatchlistRequest").msgclass - UpdateWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateWatchlistRequest").msgclass - DeleteWatchlistRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteWatchlistRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb deleted file mode 100644 index 5dd703d38f49..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/entity_service/credentials" -require "google/cloud/chronicle/v1/entity_service/paths" -require "google/cloud/chronicle/v1/entity_service/client" -require "google/cloud/chronicle/v1/entity_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # EntityService contains apis for finding entities. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/entity_service" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/entity_service/rest" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - module EntityService - end - end - end - end -end - -helper_path = ::File.join __dir__, "entity_service", "helpers.rb" -require "google/cloud/chronicle/v1/entity_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb deleted file mode 100644 index 58bdcbe09913..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/client.rb +++ /dev/null @@ -1,908 +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/chronicle/v1/entity_pb" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - ## - # Client for the EntityService service. - # - # EntityService contains apis for finding entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :entity_service_stub - - ## - # Configure the EntityService Client class. - # - # See {::Google::Cloud::Chronicle::V1::EntityService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EntityService clients - # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_watchlist.timeout = 90.0 - default_config.rpcs.get_watchlist.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_watchlists.timeout = 90.0 - default_config.rpcs.list_watchlists.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_watchlist.timeout = 90.0 - - default_config.rpcs.update_watchlist.timeout = 90.0 - - default_config.rpcs.delete_watchlist.timeout = 90.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EntityService 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::Chronicle::V1::EntityService::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 - @entity_service_stub.universe_domain - end - - ## - # Create a new EntityService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EntityService 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/chronicle/v1/entity_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 - - @entity_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::EntityService::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 - ) - - @entity_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @entity_service_stub.logger - end - - # Service calls - - ## - # Gets watchlist details for the given watchlist ID. - # - # @overload get_watchlist(request, options = nil) - # Pass arguments to `get_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(name: nil) - # Pass arguments to `get_watchlist` via keyword arguments. Note that at - # least one keyword argument is 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 parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - # - # # Call the get_watchlist method. - # result = client.get_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def get_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :get_watchlist, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all watchlists for the given instance. - # - # @overload list_watchlists(request, options = nil) - # Pass arguments to `list_watchlists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_watchlists` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - # - # # Call the list_watchlists method. - # result = client.list_watchlists 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::Chronicle::V1::Watchlist. - # p item - # end - # - def list_watchlists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest - - # Converts hash 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_watchlists.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::Chronicle::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_watchlists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_watchlists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :list_watchlists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @entity_service_stub, :list_watchlists, 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 - - ## - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - # - # @overload create_watchlist(request, options = nil) - # Pass arguments to `create_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) - # Pass arguments to `create_watchlist` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param watchlist_id [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - # - # # Call the create_watchlist method. - # result = client.create_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def create_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :create_watchlist, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the watchlist for the given instance. - # - # @overload update_watchlist(request, options = nil) - # Pass arguments to `update_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(watchlist: nil, update_mask: nil) - # Pass arguments to `update_watchlist` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - # - # # Call the update_watchlist method. - # result = client.update_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def update_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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.watchlist&.name - header_params["watchlist.name"] = request.watchlist.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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :update_watchlist, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the watchlist for the given instance. - # - # @overload delete_watchlist(request, options = nil) - # Pass arguments to `delete_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(name: nil, force: nil) - # Pass arguments to `delete_watchlist` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param force [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - # - # # Call the delete_watchlist method. - # result = client.delete_watchlist request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.call_rpc :delete_watchlist, 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 EntityService API. - # - # This class represents the configuration for EntityService, - # 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::Chronicle::V1::EntityService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_watchlist to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::EntityService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.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::Chronicle::V1::EntityService::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 = "chronicle.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 EntityService 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 `get_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :get_watchlist - ## - # RPC-specific configuration for `list_watchlists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_watchlists - ## - # RPC-specific configuration for `create_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :create_watchlist - ## - # RPC-specific configuration for `update_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :update_watchlist - ## - # RPC-specific configuration for `delete_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_watchlist - - # @private - def initialize parent_rpcs = nil - get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist - @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config - list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists - @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config - create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist - @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config - update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist - @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config - delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist - @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb deleted file mode 100644 index d22648b53244..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - # Credentials for the EntityService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb deleted file mode 100644 index 21433575930f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/paths.rb +++ /dev/null @@ -1,73 +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 Chronicle - module V1 - module EntityService - # Path helper methods for the EntityService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified Watchlist resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param watchlist [String] - # - # @return [::String] - def watchlist_path project:, location:, instance:, watchlist: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/watchlists/#{watchlist}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb deleted file mode 100644 index 5e1f8b48cf66..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest.rb +++ /dev/null @@ -1,52 +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/chronicle/v1/version" - -require "google/cloud/chronicle/v1/entity_service/credentials" -require "google/cloud/chronicle/v1/entity_service/paths" -require "google/cloud/chronicle/v1/entity_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # EntityService contains apis for finding entities. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/entity_service/rest" - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - module EntityService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/entity_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb deleted file mode 100644 index fc82038f4319..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/client.rb +++ /dev/null @@ -1,830 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - module Rest - ## - # REST client for the EntityService service. - # - # EntityService contains apis for finding entities. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :entity_service_stub - - ## - # Configure the EntityService Client class. - # - # See {::Google::Cloud::Chronicle::V1::EntityService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all EntityService clients - # ::Google::Cloud::Chronicle::V1::EntityService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_watchlist.timeout = 90.0 - default_config.rpcs.get_watchlist.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_watchlists.timeout = 90.0 - default_config.rpcs.list_watchlists.retry_policy = { - initial_delay: 1.0, max_delay: 90.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_watchlist.timeout = 90.0 - - default_config.rpcs.update_watchlist.timeout = 90.0 - - default_config.rpcs.delete_watchlist.timeout = 90.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the EntityService 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::Chronicle::V1::EntityService::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 - @entity_service_stub.universe_domain - end - - ## - # Create a new EntityService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the EntityService 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 - - @entity_service_stub = ::Google::Cloud::Chronicle::V1::EntityService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @entity_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @entity_service_stub.logger - end - - # Service calls - - ## - # Gets watchlist details for the given watchlist ID. - # - # @overload get_watchlist(request, options = nil) - # Pass arguments to `get_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(name: nil) - # Pass arguments to `get_watchlist` via keyword arguments. Note that at - # least one keyword argument is 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 parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - # - # # Call the get_watchlist method. - # result = client.get_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def get_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.get_watchlist request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all watchlists for the given instance. - # - # @overload list_watchlists(request, options = nil) - # Pass arguments to `list_watchlists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListWatchlistsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlists(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_watchlists` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Watchlist>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - # - # # Call the list_watchlists method. - # result = client.list_watchlists 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::Chronicle::V1::Watchlist. - # p item - # end - # - def list_watchlists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest - - # Converts hash 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_watchlists.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::Chronicle::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_watchlists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_watchlists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.list_watchlists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @entity_service_stub, :list_watchlists, "watchlists", 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 - - ## - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - # - # @overload create_watchlist(request, options = nil) - # Pass arguments to `create_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(parent: nil, watchlist_id: nil, watchlist: nil) - # Pass arguments to `create_watchlist` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param watchlist_id [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - # - # # Call the create_watchlist method. - # result = client.create_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def create_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.create_watchlist request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the watchlist for the given instance. - # - # @overload update_watchlist(request, options = nil) - # Pass arguments to `update_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(watchlist: nil, update_mask: nil) - # Pass arguments to `update_watchlist` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param watchlist [::Google::Cloud::Chronicle::V1::Watchlist, ::Hash] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - # - # # Call the update_watchlist method. - # result = client.update_watchlist request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - # p result - # - def update_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.update_watchlist request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the watchlist for the given instance. - # - # @overload delete_watchlist(request, options = nil) - # Pass arguments to `delete_watchlist` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_watchlist(name: nil, force: nil) - # Pass arguments to `delete_watchlist` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @param force [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - # - # # Call the delete_watchlist method. - # result = client.delete_watchlist request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_watchlist request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest - - # Converts hash 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_watchlist.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::Chronicle::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_watchlist.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_watchlist.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @entity_service_stub.delete_watchlist 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 EntityService REST API. - # - # This class represents the configuration for EntityService 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::Chronicle::V1::EntityService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_watchlist to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_watchlist.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 = "chronicle.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 EntityService 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 `get_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :get_watchlist - ## - # RPC-specific configuration for `list_watchlists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_watchlists - ## - # RPC-specific configuration for `create_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :create_watchlist - ## - # RPC-specific configuration for `update_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :update_watchlist - ## - # RPC-specific configuration for `delete_watchlist` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_watchlist - - # @private - def initialize parent_rpcs = nil - get_watchlist_config = parent_rpcs.get_watchlist if parent_rpcs.respond_to? :get_watchlist - @get_watchlist = ::Gapic::Config::Method.new get_watchlist_config - list_watchlists_config = parent_rpcs.list_watchlists if parent_rpcs.respond_to? :list_watchlists - @list_watchlists = ::Gapic::Config::Method.new list_watchlists_config - create_watchlist_config = parent_rpcs.create_watchlist if parent_rpcs.respond_to? :create_watchlist - @create_watchlist = ::Gapic::Config::Method.new create_watchlist_config - update_watchlist_config = parent_rpcs.update_watchlist if parent_rpcs.respond_to? :update_watchlist - @update_watchlist = ::Gapic::Config::Method.new update_watchlist_config - delete_watchlist_config = parent_rpcs.delete_watchlist if parent_rpcs.respond_to? :delete_watchlist - @delete_watchlist = ::Gapic::Config::Method.new delete_watchlist_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb deleted file mode 100644 index 526e1e685af9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_service/rest/service_stub.rb +++ /dev/null @@ -1,388 +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/chronicle/v1/entity_pb" - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - module Rest - ## - # REST service stub for the EntityService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def get_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] - # 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::Chronicle::V1::ListWatchlistsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListWatchlistsResponse] - # A result object deserialized from the server's reply - def list_watchlists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_watchlists_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_watchlists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def create_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] - # 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::Chronicle::V1::Watchlist] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # A result object deserialized from the server's reply - def update_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] - # 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_watchlist request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_watchlist_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_watchlist", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_watchlists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListWatchlistsRequest] - # 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_watchlists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/watchlists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/watchlists", - body: "watchlist", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{watchlist.name}", - body: "watchlist", - matches: [ - ["watchlist.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_watchlist REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest] - # 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_watchlist_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/watchlists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb deleted file mode 100644 index c59e9b0b6f56..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/entity_services_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/entity.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/chronicle/v1/entity_pb' - -module Google - module Cloud - module Chronicle - module V1 - module EntityService - # EntityService contains apis for finding entities. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.EntityService' - - # Gets watchlist details for the given watchlist ID. - rpc :GetWatchlist, ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Lists all watchlists for the given instance. - rpc :ListWatchlists, ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse - # Creates a watchlist for the given instance. - # Note that there can be at most 200 watchlists per instance. - rpc :CreateWatchlist, ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Updates the watchlist for the given instance. - rpc :UpdateWatchlist, ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, ::Google::Cloud::Chronicle::V1::Watchlist - # Deletes the watchlist for the given instance. - rpc :DeleteWatchlist, ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb deleted file mode 100644 index 93db557b2ce9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_pb.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/instance.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' - - -descriptor_data = "\n(google/cloud/chronicle/v1/instance.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x01\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08:y\xea\x41v\n!chronicle.googleapis.com/Instance\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the InstanceService API. - # - # This class represents the configuration for InstanceService, - # 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::Chronicle::V1::InstanceService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::InstanceService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.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::Chronicle::V1::InstanceService::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 = "chronicle.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 InstanceService 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 `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb deleted file mode 100644 index 63fbe3b5b5fb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - # Credentials for the InstanceService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb deleted file mode 100644 index 71d7213a0c6d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/paths.rb +++ /dev/null @@ -1,52 +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 Chronicle - module V1 - module InstanceService - # Path helper methods for the InstanceService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb deleted file mode 100644 index 40b1913eead4..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest.rb +++ /dev/null @@ -1,52 +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/chronicle/v1/version" - -require "google/cloud/chronicle/v1/instance_service/credentials" -require "google/cloud/chronicle/v1/instance_service/paths" -require "google/cloud/chronicle/v1/instance_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # InstanceService provides the entry interface for the Chronicle API. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/instance_service/rest" - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - module InstanceService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/instance_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb deleted file mode 100644 index 4b6f95ea6cbb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/client.rb +++ /dev/null @@ -1,431 +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/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - module Rest - ## - # REST client for the InstanceService service. - # - # InstanceService provides the entry interface for the Chronicle API. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :instance_service_stub - - ## - # Configure the InstanceService Client class. - # - # See {::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all InstanceService clients - # ::Google::Cloud::Chronicle::V1::InstanceService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the InstanceService 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::Chronicle::V1::InstanceService::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 - @instance_service_stub.universe_domain - end - - ## - # Create a new InstanceService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the InstanceService 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 - - @instance_service_stub = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @instance_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @instance_service_stub.logger - end - - # Service calls - - ## - # Gets a Instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the instance to retrieve. - # Format: - # `projects/{project_id}/locations/{location}/instances/{instance}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetInstanceRequest - - # Converts hash 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_instance.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::Chronicle::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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @instance_service_stub.get_instance 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 InstanceService REST API. - # - # This class represents the configuration for InstanceService 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::Chronicle::V1::InstanceService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_instance to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_instance.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 = "chronicle.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 InstanceService 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 `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - - # @private - def initialize parent_rpcs = nil - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb deleted file mode 100644 index 54fc5b580ded..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_service/rest/service_stub.rb +++ /dev/null @@ -1,142 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/chronicle/v1/instance_pb" - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - module Rest - ## - # REST service stub for the InstanceService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_instance REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] - # 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::Chronicle::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_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_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Instance.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb deleted file mode 100644 index 3465f58ac427..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/instance_services_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/instance.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/chronicle/v1/instance_pb' - -module Google - module Cloud - module Chronicle - module V1 - module InstanceService - # InstanceService provides the entry interface for the Chronicle API. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.InstanceService' - - # Gets a Instance. - rpc :GetInstance, ::Google::Cloud::Chronicle::V1::GetInstanceRequest, ::Google::Cloud::Chronicle::V1::Instance - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb deleted file mode 100644 index 7cd0fc43edd1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_pb.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/reference_list.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/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/chronicle/v1/reference_list.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"]\n\tScopeInfo\x12P\n\x14reference_list_scope\x18\x02 \x01(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListScopeB\x03\xe0\x41\x02\".\n\x12ReferenceListScope\x12\x18\n\x0bscope_names\x18\x01 \x03(\tB\x03\xe0\x41\x01\"\x93\x01\n\x17GetReferenceListRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12:\n\x04view\x18\x02 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"\xbe\x01\n\x19ListReferenceListsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12:\n\x04view\x18\x04 \x01(\x0e\x32,.google.cloud.chronicle.v1.ReferenceListView\"x\n\x1aListReferenceListsResponse\x12\x41\n\x0freference_lists\x18\x01 \x03(\x0b\x32(.google.cloud.chronicle.v1.ReferenceList\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc3\x01\n\x1a\x43reateReferenceListRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&chronicle.googleapis.com/ReferenceList\x12\x45\n\x0ereference_list\x18\x02 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12\x1e\n\x11reference_list_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x94\x01\n\x1aUpdateReferenceListRequest\x12\x45\n\x0ereference_list\x18\x01 \x01(\x0b\x32(.google.cloud.chronicle.v1.ReferenceListB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xaa\x04\n\rReferenceList\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x07\x65ntries\x18\x05 \x03(\x0b\x32-.google.cloud.chronicle.v1.ReferenceListEntryB\x03\xe0\x41\x02\x12\x12\n\x05rules\x18\x06 \x03(\tB\x03\xe0\x41\x03\x12L\n\x0bsyntax_type\x18\x08 \x01(\x0e\x32\x32.google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\x03\xe0\x41\x02\x12$\n\x17rule_associations_count\x18\t \x01(\x05\x42\x03\xe0\x41\x03\x12\x38\n\nscope_info\x18\x0b \x01(\x0b\x32$.google.cloud.chronicle.v1.ScopeInfo:\x8a\x01\xea\x41\x86\x01\n&chronicle.googleapis.com/ReferenceList\x12\\projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}\"(\n\x12ReferenceListEntry\x12\x12\n\x05value\x18\x01 \x01(\tB\x03\xe0\x41\x02*\xc2\x01\n\x17ReferenceListSyntaxType\x12*\n&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\x10\x00\x12\x30\n,REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\x10\x01\x12$\n REFERENCE_LIST_SYNTAX_TYPE_REGEX\x10\x02\x12#\n\x1fREFERENCE_LIST_SYNTAX_TYPE_CIDR\x10\x03*u\n\x11ReferenceListView\x12#\n\x1fREFERENCE_LIST_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19REFERENCE_LIST_VIEW_BASIC\x10\x01\x12\x1c\n\x18REFERENCE_LIST_VIEW_FULL\x10\x02\x32\xf5\x07\n\x14ReferenceListService\x12\xbf\x01\n\x10GetReferenceList\x12\x32.google.cloud.chronicle.v1.GetReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\x12\xd2\x01\n\x12ListReferenceLists\x12\x34.google.cloud.chronicle.v1.ListReferenceListsRequest\x1a\x35.google.cloud.chronicle.v1.ListReferenceListsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/referenceLists\x12\xf9\x01\n\x13\x43reateReferenceList\x12\x35.google.cloud.chronicle.v1.CreateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x80\x01\xda\x41\'parent,reference_list,reference_list_id\x82\xd3\xe4\x93\x02P\">/v1/{parent=projects/*/locations/*/instances/*}/referenceLists:\x0ereference_list\x12\xfb\x01\n\x13UpdateReferenceList\x12\x35.google.cloud.chronicle.v1.UpdateReferenceListRequest\x1a(.google.cloud.chronicle.v1.ReferenceList\"\x82\x01\xda\x41\x1areference_list,update_mask\x82\xd3\xe4\x93\x02_2M/v1/{reference_list.name=projects/*/locations/*/instances/*/referenceLists/*}:\x0ereference_list\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc9\x01\n\x1d\x63om.google.cloud.chronicle.v1B\x12ReferenceListProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - ScopeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ScopeInfo").msgclass - ReferenceListScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListScope").msgclass - GetReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetReferenceListRequest").msgclass - ListReferenceListsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsRequest").msgclass - ListReferenceListsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListReferenceListsResponse").msgclass - CreateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateReferenceListRequest").msgclass - UpdateReferenceListRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateReferenceListRequest").msgclass - ReferenceList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceList").msgclass - ReferenceListEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListEntry").msgclass - ReferenceListSyntaxType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListSyntaxType").enummodule - ReferenceListView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ReferenceListView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb deleted file mode 100644 index e88bb3a15142..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/reference_list_service/credentials" -require "google/cloud/chronicle/v1/reference_list_service/paths" -require "google/cloud/chronicle/v1/reference_list_service/client" -require "google/cloud/chronicle/v1/reference_list_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # ReferenceListService provides an interface for managing reference lists. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/reference_list_service" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/reference_list_service/rest" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - module ReferenceListService - end - end - end - end -end - -helper_path = ::File.join __dir__, "reference_list_service", "helpers.rb" -require "google/cloud/chronicle/v1/reference_list_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb deleted file mode 100644 index 7472a7315b5a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/client.rb +++ /dev/null @@ -1,809 +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/chronicle/v1/reference_list_pb" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - ## - # Client for the ReferenceListService service. - # - # ReferenceListService provides an interface for managing reference lists. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reference_list_service_stub - - ## - # Configure the ReferenceListService Client class. - # - # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReferenceListService clients - # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_reference_list.timeout = 60.0 - default_config.rpcs.get_reference_list.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reference_lists.timeout = 60.0 - default_config.rpcs.list_reference_lists.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_reference_list.timeout = 60.0 - - default_config.rpcs.update_reference_list.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - @reference_list_service_stub.universe_domain - end - - ## - # Create a new ReferenceListService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReferenceListService 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/chronicle/v1/reference_list_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 - - @reference_list_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::ReferenceListService::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 - ) - - @reference_list_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reference_list_service_stub.logger - end - - # Service calls - - ## - # Gets a single reference list. - # - # @overload get_reference_list(request, options = nil) - # Pass arguments to `get_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_list(name: nil, view: nil) - # Pass arguments to `get_reference_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - # - # # Call the get_reference_list method. - # result = client.get_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def get_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest - - # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :get_reference_list, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a collection of reference lists. - # - # @overload list_reference_lists(request, options = nil) - # Pass arguments to `list_reference_lists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_reference_lists` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - # - # # Call the list_reference_lists method. - # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - # p item - # end - # - def list_reference_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest - - # Converts hash 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_reference_lists.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::Chronicle::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_reference_lists.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_reference_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :list_reference_lists, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, 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 - - ## - # Creates a new reference list. - # - # @overload create_reference_list(request, options = nil) - # Pass arguments to `create_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) - # Pass arguments to `create_reference_list` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to create. - # @param reference_list_id [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - # - # # Call the create_reference_list method. - # result = client.create_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def create_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest - - # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :create_reference_list, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing reference list. - # - # @overload update_reference_list(request, options = nil) - # Pass arguments to `update_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_list(reference_list: nil, update_mask: nil) - # Pass arguments to `update_reference_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - # - # # Call the update_reference_list method. - # result = client.update_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def update_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest - - # Converts hash 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_reference_list.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::Chronicle::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.reference_list&.name - header_params["reference_list.name"] = request.reference_list.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_reference_list.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.call_rpc :update_reference_list, 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 ReferenceListService API. - # - # This class represents the configuration for ReferenceListService, - # 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::Chronicle::V1::ReferenceListService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_reference_list to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.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::Chronicle::V1::ReferenceListService::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 = "chronicle.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 ReferenceListService 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 `get_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_list - ## - # RPC-specific configuration for `list_reference_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_lists - ## - # RPC-specific configuration for `create_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_list - ## - # RPC-specific configuration for `update_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reference_list - - # @private - def initialize parent_rpcs = nil - get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list - @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config - list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists - @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config - create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list - @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config - update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list - @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb deleted file mode 100644 index bc9bb656539c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - # Credentials for the ReferenceListService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb deleted file mode 100644 index 0655f1b591bb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/paths.rb +++ /dev/null @@ -1,73 +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 Chronicle - module V1 - module ReferenceListService - # Path helper methods for the ReferenceListService API. - module Paths - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified ReferenceList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param reference_list [String] - # - # @return [::String] - def reference_list_path project:, location:, instance:, reference_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb deleted file mode 100644 index 72c3da5feecc..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest.rb +++ /dev/null @@ -1,52 +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/chronicle/v1/version" - -require "google/cloud/chronicle/v1/reference_list_service/credentials" -require "google/cloud/chronicle/v1/reference_list_service/paths" -require "google/cloud/chronicle/v1/reference_list_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # ReferenceListService provides an interface for managing reference lists. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/reference_list_service/rest" - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - module ReferenceListService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/reference_list_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb deleted file mode 100644 index 31d0d82a8c4c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/client.rb +++ /dev/null @@ -1,738 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - module Rest - ## - # REST client for the ReferenceListService service. - # - # ReferenceListService provides an interface for managing reference lists. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :reference_list_service_stub - - ## - # Configure the ReferenceListService Client class. - # - # See {::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all ReferenceListService clients - # ::Google::Cloud::Chronicle::V1::ReferenceListService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_reference_list.timeout = 60.0 - default_config.rpcs.get_reference_list.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_reference_lists.timeout = 60.0 - default_config.rpcs.list_reference_lists.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_reference_list.timeout = 60.0 - - default_config.rpcs.update_reference_list.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the ReferenceListService 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::Chronicle::V1::ReferenceListService::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 - @reference_list_service_stub.universe_domain - end - - ## - # Create a new ReferenceListService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the ReferenceListService 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 - - @reference_list_service_stub = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @reference_list_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @reference_list_service_stub.logger - end - - # Service calls - - ## - # Gets a single reference list. - # - # @overload get_reference_list(request, options = nil) - # Pass arguments to `get_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_list(name: nil, view: nil) - # Pass arguments to `get_reference_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - # - # # Call the get_reference_list method. - # result = client.get_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def get_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetReferenceListRequest - - # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.get_reference_list request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists a collection of reference lists. - # - # @overload list_reference_lists(request, options = nil) - # Pass arguments to `list_reference_lists` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListReferenceListsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_lists(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_reference_lists` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::ReferenceList>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - # - # # Call the list_reference_lists method. - # result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - # p item - # end - # - def list_reference_lists request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest - - # Converts hash 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_reference_lists.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::Chronicle::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_reference_lists.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_reference_lists.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.list_reference_lists request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @reference_list_service_stub, :list_reference_lists, "reference_lists", 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 - - ## - # Creates a new reference list. - # - # @overload create_reference_list(request, options = nil) - # Pass arguments to `create_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_list(parent: nil, reference_list: nil, reference_list_id: nil) - # Pass arguments to `create_reference_list` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to create. - # @param reference_list_id [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - # - # # Call the create_reference_list method. - # result = client.create_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def create_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest - - # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.create_reference_list request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing reference list. - # - # @overload update_reference_list(request, options = nil) - # Pass arguments to `update_reference_list` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_reference_list(reference_list: nil, update_mask: nil) - # Pass arguments to `update_reference_list` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param reference_list [::Google::Cloud::Chronicle::V1::ReferenceList, ::Hash] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - # - # # Call the update_reference_list method. - # result = client.update_reference_list request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - # p result - # - def update_reference_list request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest - - # Converts hash 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_reference_list.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::Chronicle::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_reference_list.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_reference_list.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @reference_list_service_stub.update_reference_list 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 ReferenceListService REST API. - # - # This class represents the configuration for ReferenceListService 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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_reference_list to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_reference_list.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 = "chronicle.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 ReferenceListService 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 `get_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :get_reference_list - ## - # RPC-specific configuration for `list_reference_lists` - # @return [::Gapic::Config::Method] - # - attr_reader :list_reference_lists - ## - # RPC-specific configuration for `create_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :create_reference_list - ## - # RPC-specific configuration for `update_reference_list` - # @return [::Gapic::Config::Method] - # - attr_reader :update_reference_list - - # @private - def initialize parent_rpcs = nil - get_reference_list_config = parent_rpcs.get_reference_list if parent_rpcs.respond_to? :get_reference_list - @get_reference_list = ::Gapic::Config::Method.new get_reference_list_config - list_reference_lists_config = parent_rpcs.list_reference_lists if parent_rpcs.respond_to? :list_reference_lists - @list_reference_lists = ::Gapic::Config::Method.new list_reference_lists_config - create_reference_list_config = parent_rpcs.create_reference_list if parent_rpcs.respond_to? :create_reference_list - @create_reference_list = ::Gapic::Config::Method.new create_reference_list_config - update_reference_list_config = parent_rpcs.update_reference_list if parent_rpcs.respond_to? :update_reference_list - @update_reference_list = ::Gapic::Config::Method.new update_reference_list_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb deleted file mode 100644 index 718ce68bd0d6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_service/rest/service_stub.rb +++ /dev/null @@ -1,327 +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/chronicle/v1/reference_list_pb" - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - module Rest - ## - # REST service stub for the ReferenceListService service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def get_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_lists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] - # 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::Chronicle::V1::ListReferenceListsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListReferenceListsResponse] - # A result object deserialized from the server's reply - def list_reference_lists request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_reference_lists_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_reference_lists", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def create_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.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_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] - # 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::Chronicle::V1::ReferenceList] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # A result object deserialized from the server's reply - def update_reference_list request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_reference_list_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_reference_list", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ReferenceList.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_reference_lists REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListReferenceListsRequest] - # 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_reference_lists_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/referenceLists", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/referenceLists", - body: "reference_list", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_reference_list REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest] - # 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_reference_list_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{reference_list.name}", - body: "reference_list", - matches: [ - ["reference_list.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/referenceLists/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb deleted file mode 100644 index aa0cb32e7359..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/reference_list_services_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/reference_list.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/chronicle/v1/reference_list_pb' - -module Google - module Cloud - module Chronicle - module V1 - module ReferenceListService - # ReferenceListService provides an interface for managing reference lists. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.ReferenceListService' - - # Gets a single reference list. - rpc :GetReferenceList, ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - # Lists a collection of reference lists. - rpc :ListReferenceLists, ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse - # Creates a new reference list. - rpc :CreateReferenceList, ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - # Updates an existing reference list. - rpc :UpdateReferenceList, ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, ::Google::Cloud::Chronicle::V1::ReferenceList - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb deleted file mode 100644 index 43053a2db121..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rest.rb +++ /dev/null @@ -1,41 +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/chronicle/v1/data_access_control_service/rest" -require "google/cloud/chronicle/v1/entity_service/rest" -require "google/cloud/chronicle/v1/instance_service/rest" -require "google/cloud/chronicle/v1/reference_list_service/rest" -require "google/cloud/chronicle/v1/rule_service/rest" -require "google/cloud/chronicle/v1/version" - -module Google - module Cloud - module Chronicle - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/chronicle/v1/rest" - # client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb deleted file mode 100644 index e4b4236afdf1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/chronicle/v1/rule.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/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n$google/cloud/chronicle/v1/rule.proto\x12\x19google.cloud.chronicle.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\x91\t\n\x04Rule\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0brevision_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x0c\n\x04text\x18\x04 \x01(\t\x12\x13\n\x06\x61uthor\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12:\n\x08severity\x18\x06 \x01(\x0b\x32#.google.cloud.chronicle.v1.SeverityB\x03\xe0\x41\x03\x12\x44\n\x08metadata\x18\x07 \x03(\x0b\x32-.google.cloud.chronicle.v1.Rule.MetadataEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12P\n\x11\x63ompilation_state\x18\n \x01(\x0e\x32\x30.google.cloud.chronicle.v1.Rule.CompilationStateB\x03\xe0\x41\x03\x12\x36\n\x04type\x18\x0c \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleTypeB\x03\xe0\x41\x03\x12G\n\x0freference_lists\x18\r \x03(\tB.\xe0\x41\x03\xfa\x41(\n&chronicle.googleapis.com/ReferenceList\x12M\n\x17\x61llowed_run_frequencies\x18\x0e \x03(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequencyB\x03\xe0\x41\x03\x12\x0c\n\x04\x65tag\x18\x0f \x01(\t\x12<\n\x05scope\x18\x10 \x01(\tB-\xfa\x41*\n(chronicle.googleapis.com/DataAccessScope\x12V\n\x17\x63ompilation_diagnostics\x18\x11 \x03(\x0b\x32\x30.google.cloud.chronicle.v1.CompilationDiagnosticB\x03\xe0\x41\x03\x12.\n!near_real_time_live_rule_eligible\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12?\n\x0binputs_used\x18\x14 \x01(\x0b\x32%.google.cloud.chronicle.v1.InputsUsedB\x03\xe0\x41\x03\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"P\n\x10\x43ompilationState\x12!\n\x1d\x43OMPILATION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSUCCEEDED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02:m\xea\x41j\n\x1d\x63hronicle.googleapis.com/Rule\x12Iprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}\"\xcb\x05\n\x0eRuleDeployment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\x12\x10\n\x08\x61lerting\x18\x03 \x01(\x08\x12\x10\n\x08\x61rchived\x18\x04 \x01(\x08\x12\x35\n\x0c\x61rchive_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\rrun_frequency\x18\x06 \x01(\x0e\x32\'.google.cloud.chronicle.v1.RunFrequency\x12V\n\x0f\x65xecution_state\x18\x07 \x01(\x0e\x32\x38.google.cloud.chronicle.v1.RuleDeployment.ExecutionStateB\x03\xe0\x41\x03\x12=\n\x0eproducer_rules\x18\x08 \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12=\n\x0e\x63onsumer_rules\x18\t \x03(\tB%\xe0\x41\x03\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x46\n\x1dlast_alert_status_change_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"W\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x01\x12\x0b\n\x07LIMITED\x10\x02\x12\n\n\x06PAUSED\x10\x03:\x82\x01\xea\x41\x7f\n\'chronicle.googleapis.com/RuleDeployment\x12Tprojects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment\"\xc8\x03\n\tRetrohunt\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x10process_interval\x18\x02 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x02\x12\x36\n\x12\x65xecution_interval\x18\x03 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.chronicle.v1.Retrohunt.StateB\x03\xe0\x41\x03\x12 \n\x13progress_percentage\x18\x05 \x01(\x02\x42\x03\xe0\x41\x03\"P\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\x08\n\x04\x44ONE\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04:\x8a\x01\xea\x41\x86\x01\n\"chronicle.googleapis.com/Retrohunt\x12`projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}\"~\n\x11\x43reateRuleRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x32\n\x04rule\x18\x02 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\"x\n\x0eGetRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x04view\x18\x02 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"\xb3\x01\n\x10ListRulesRequest\x12\x35\n\x06parent\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\x12\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"\\\n\x11ListRulesResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"x\n\x11UpdateRuleRequest\x12\x32\n\x04rule\x18\x01 \x01(\x0b\x32\x1f.google.cloud.chronicle.v1.RuleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\\\n\x11\x44\x65leteRuleRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa9\x01\n\x18ListRuleRevisionsRequest\x12\x33\n\x04name\x18\x01 \x01(\tB%\xe0\x41\x02\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x31\n\x04view\x18\x04 \x01(\x0e\x32#.google.cloud.chronicle.v1.RuleView\"d\n\x19ListRuleRevisionsResponse\x12.\n\x05rules\x18\x01 \x03(\x0b\x32\x1f.google.cloud.chronicle.v1.Rule\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x92\x01\n\x16\x43reateRetrohuntRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\x12<\n\tretrohunt\x18\x02 \x01(\x0b\x32$.google.cloud.chronicle.v1.RetrohuntB\x03\xe0\x41\x02\"O\n\x13GetRetrohuntRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"chronicle.googleapis.com/Retrohunt\"\x8a\x01\n\x15ListRetrohuntsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"chronicle.googleapis.com/Retrohunt\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\"k\n\x16ListRetrohuntsResponse\x12\x38\n\nretrohunts\x18\x01 \x03(\x0b\x32$.google.cloud.chronicle.v1.Retrohunt\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x18GetRuleDeploymentRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'chronicle.googleapis.com/RuleDeployment\"\x94\x01\n\x1aListRuleDeploymentsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'chronicle.googleapis.com/RuleDeployment\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\"{\n\x1bListRuleDeploymentsResponse\x12\x43\n\x10rule_deployments\x18\x01 \x03(\x0b\x32).google.cloud.chronicle.v1.RuleDeployment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x1bUpdateRuleDeploymentRequest\x12G\n\x0frule_deployment\x18\x01 \x01(\x0b\x32).google.cloud.chronicle.v1.RuleDeploymentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"y\n\x13\x43ompilationPosition\x12\x17\n\nstart_line\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cstart_column\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x15\n\x08\x65nd_line\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nend_column\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\"\x96\x02\n\x15\x43ompilationDiagnostic\x12\x14\n\x07message\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x45\n\x08position\x18\x02 \x01(\x0b\x32..google.cloud.chronicle.v1.CompilationPositionB\x03\xe0\x41\x03\x12P\n\x08severity\x18\x03 \x01(\x0e\x32\x39.google.cloud.chronicle.v1.CompilationDiagnostic.SeverityB\x03\xe0\x41\x03\x12\x10\n\x03uri\x18\x05 \x01(\tB\x03\xe0\x41\x03\"<\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0b\n\x07WARNING\x10\x01\x12\t\n\x05\x45RROR\x10\x02\" \n\x08Severity\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\"\x9a\x01\n\x11RetrohuntMetadata\x12\x35\n\tretrohunt\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1d\x63hronicle.googleapis.com/Rule\x12\x31\n\x12\x65xecution_interval\x18\x02 \x01(\x0b\x32\x15.google.type.Interval\x12\x1b\n\x13progress_percentage\x18\x03 \x01(\x02\"Z\n\nInputsUsed\x12\x15\n\x08uses_udm\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0buses_entity\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0euses_detection\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01*N\n\x0cRunFrequency\x12\x1d\n\x19RUN_FREQUENCY_UNSPECIFIED\x10\x00\x12\x08\n\x04LIVE\x10\x01\x12\n\n\x06HOURLY\x10\x02\x12\t\n\x05\x44\x41ILY\x10\x03*H\n\x08RuleType\x12\x19\n\x15RULE_TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cSINGLE_EVENT\x10\x01\x12\x0f\n\x0bMULTI_EVENT\x10\x02*V\n\x08RuleView\x12\x19\n\x15RULE_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x12\x1a\n\x16REVISION_METADATA_ONLY\x10\x03\x32\xa9\x13\n\x0bRuleService\x12\xae\x01\n\nCreateRule\x12,.google.cloud.chronicle.v1.CreateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"Q\xda\x41\x0bparent,rule\x82\xd3\xe4\x93\x02=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\x04rule\x12\x9b\x01\n\x07GetRule\x12).google.cloud.chronicle.v1.GetRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xae\x01\n\tListRules\x12+.google.cloud.chronicle.v1.ListRulesRequest\x1a,.google.cloud.chronicle.v1.ListRulesResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{parent=projects/*/locations/*/instances/*}/rules\x12\xb8\x01\n\nUpdateRule\x12,.google.cloud.chronicle.v1.UpdateRuleRequest\x1a\x1f.google.cloud.chronicle.v1.Rule\"[\xda\x41\x10rule,update_mask\x82\xd3\xe4\x93\x02\x42\x32:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\x04rule\x12\x98\x01\n\nDeleteRule\x12,.google.cloud.chronicle.v1.DeleteRuleRequest\x1a\x16.google.protobuf.Empty\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\x12\xd2\x01\n\x11ListRuleRevisions\x12\x33.google.cloud.chronicle.v1.ListRuleRevisionsRequest\x1a\x34.google.cloud.chronicle.v1.ListRuleRevisionsResponse\"R\xda\x41\x04name\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{name=projects/*/locations/*/instances/*/rules/*}:listRevisions\x12\xef\x01\n\x0f\x43reateRetrohunt\x12\x31.google.cloud.chronicle.v1.CreateRetrohuntRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1e\n\tRetrohunt\x12\x11RetrohuntMetadata\xda\x41\x10parent,retrohunt\x82\xd3\xe4\x93\x02O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:\tretrohunt\x12\xb7\x01\n\x0cGetRetrohunt\x12..google.cloud.chronicle.v1.GetRetrohuntRequest\x1a$.google.cloud.chronicle.v1.Retrohunt\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\x12\xca\x01\n\x0eListRetrohunts\x12\x30.google.cloud.chronicle.v1.ListRetrohuntsRequest\x1a\x31.google.cloud.chronicle.v1.ListRetrohuntsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts\x12\xc4\x01\n\x11GetRuleDeployment\x12\x33.google.cloud.chronicle.v1.GetRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\x12\xda\x01\n\x13ListRuleDeployments\x12\x35.google.cloud.chronicle.v1.ListRuleDeploymentsRequest\x1a\x36.google.cloud.chronicle.v1.ListRuleDeploymentsResponse\"T\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x45\x12\x43/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\x12\x83\x02\n\x14UpdateRuleDeployment\x12\x36.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest\x1a).google.cloud.chronicle.v1.RuleDeployment\"\x87\x01\xda\x41\x1brule_deployment,update_mask\x82\xd3\xe4\x93\x02\x63\x32P/v1/{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\x0frule_deployment\x1aL\xca\x41\x18\x63hronicle.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc0\x01\n\x1d\x63om.google.cloud.chronicle.v1B\tRuleProtoP\x01Z;cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb\xaa\x02\x19Google.Cloud.Chronicle.V1\xca\x02\x19Google\\Cloud\\Chronicle\\V1\xea\x02\x1cGoogle::Cloud::Chronicle::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module Chronicle - module V1 - Rule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule").msgclass - Rule::CompilationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Rule.CompilationState").enummodule - RuleDeployment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment").msgclass - RuleDeployment::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleDeployment.ExecutionState").enummodule - Retrohunt = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt").msgclass - Retrohunt::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Retrohunt.State").enummodule - CreateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRuleRequest").msgclass - GetRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleRequest").msgclass - ListRulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesRequest").msgclass - ListRulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRulesResponse").msgclass - UpdateRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleRequest").msgclass - DeleteRuleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.DeleteRuleRequest").msgclass - ListRuleRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsRequest").msgclass - ListRuleRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleRevisionsResponse").msgclass - CreateRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CreateRetrohuntRequest").msgclass - GetRetrohuntRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRetrohuntRequest").msgclass - ListRetrohuntsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsRequest").msgclass - ListRetrohuntsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRetrohuntsResponse").msgclass - GetRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.GetRuleDeploymentRequest").msgclass - ListRuleDeploymentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsRequest").msgclass - ListRuleDeploymentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.ListRuleDeploymentsResponse").msgclass - UpdateRuleDeploymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.UpdateRuleDeploymentRequest").msgclass - CompilationPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationPosition").msgclass - CompilationDiagnostic = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic").msgclass - CompilationDiagnostic::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.CompilationDiagnostic.Severity").enummodule - Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.Severity").msgclass - RetrohuntMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RetrohuntMetadata").msgclass - InputsUsed = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.InputsUsed").msgclass - RunFrequency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RunFrequency").enummodule - RuleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleType").enummodule - RuleView = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.chronicle.v1.RuleView").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb deleted file mode 100644 index e84fdd68ca88..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/rule_service/credentials" -require "google/cloud/chronicle/v1/rule_service/paths" -require "google/cloud/chronicle/v1/rule_service/operations" -require "google/cloud/chronicle/v1/rule_service/client" -require "google/cloud/chronicle/v1/rule_service/rest" - -module Google - module Cloud - module Chronicle - module V1 - ## - # RuleService provides interface for user-created rules. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/chronicle/v1/rule_service" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/chronicle/v1/rule_service/rest" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - module RuleService - end - end - end - end -end - -helper_path = ::File.join __dir__, "rule_service", "helpers.rb" -require "google/cloud/chronicle/v1/rule_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb deleted file mode 100644 index 53a82998663a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/client.rb +++ /dev/null @@ -1,1691 +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/chronicle/v1/rule_pb" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - ## - # Client for the RuleService service. - # - # RuleService provides interface for user-created rules. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :rule_service_stub - - ## - # Configure the RuleService Client class. - # - # See {::Google::Cloud::Chronicle::V1::RuleService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RuleService clients - # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_rule.timeout = 60.0 - - default_config.rpcs.get_rule.timeout = 60.0 - default_config.rpcs.get_rule.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 600.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule.timeout = 600.0 - - default_config.rpcs.delete_rule.timeout = 60.0 - - default_config.rpcs.list_rule_revisions.timeout = 600.0 - default_config.rpcs.list_rule_revisions.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_retrohunt.timeout = 600.0 - - default_config.rpcs.get_retrohunt.timeout = 60.0 - default_config.rpcs.get_retrohunt.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_retrohunts.timeout = 60.0 - default_config.rpcs.list_retrohunts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_rule_deployment.timeout = 600.0 - default_config.rpcs.get_rule_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rule_deployments.timeout = 600.0 - default_config.rpcs.list_rule_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule_deployment.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RuleService 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::Chronicle::V1::RuleService::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 - @rule_service_stub.universe_domain - end - - ## - # Create a new RuleService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RuleService 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/chronicle/v1/rule_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 - - @rule_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Chronicle::V1::RuleService::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 - ) - - @rule_service_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Chronicle::V1::RuleService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @rule_service_stub.logger - end - - # Service calls - - ## - # Creates a new Rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(parent: nil, rule: nil) - # Pass arguments to `create_rule` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest - - # Converts hash 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_rule.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::Chronicle::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :create_rule, 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 a Rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(name: nil, view: nil) - # Pass arguments to `get_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest - - # Converts hash 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_rule.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::Chronicle::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @param filter [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest - - # Converts hash 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_rules.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::Chronicle::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_rules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rules, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rules, 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 - - ## - # Updates a Rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest - - # Converts hash 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_rule.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::Chronicle::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.rule&.name - header_params["rule.name"] = request.rule.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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :update_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(name: nil, force: nil) - # Pass arguments to `delete_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param force [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also 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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest - - # Converts hash 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_rule.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::Chronicle::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_rule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :delete_rule, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of the rule. - # - # @overload list_rule_revisions(request, options = nil) - # Pass arguments to `list_rule_revisions` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_rule_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - # - # # Call the list_rule_revisions method. - # result = client.list_rule_revisions 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rule_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest - - # Converts hash 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_rule_revisions.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::Chronicle::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_rule_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rule_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rule_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, 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 - - ## - # Create a Retrohunt. - # - # @overload create_retrohunt(request, options = nil) - # Pass arguments to `create_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_retrohunt(parent: nil, retrohunt: nil) - # Pass arguments to `create_retrohunt` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] - # Required. The retrohunt 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/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - # - # # Call the create_retrohunt method. - # result = client.create_retrohunt 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_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest - - # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :create_retrohunt, 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 - - ## - # Get a Retrohunt. - # - # @overload get_retrohunt(request, options = nil) - # Pass arguments to `get_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_retrohunt(name: nil) - # Pass arguments to `get_retrohunt` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::Retrohunt] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - # - # # Call the get_retrohunt method. - # result = client.get_retrohunt request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - # p result - # - def get_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest - - # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_retrohunt, 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 - - ## - # List Retrohunts. - # - # @overload list_retrohunts(request, options = nil) - # Pass arguments to `list_retrohunts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_retrohunts` via keyword arguments. Note that at - # least one keyword argument is 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 rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - # - # # Call the list_retrohunts method. - # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - # p item - # end - # - def list_retrohunts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest - - # Converts hash 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_retrohunts.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::Chronicle::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_retrohunts.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_retrohunts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_retrohunts, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_retrohunts, 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 a RuleDeployment. - # - # @overload get_rule_deployment(request, options = nil) - # Pass arguments to `get_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_deployment(name: nil) - # Pass arguments to `get_rule_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - # - # # Call the get_rule_deployment method. - # result = client.get_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def get_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest - - # Converts hash 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_rule_deployment.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::Chronicle::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_rule_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :get_rule_deployment, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists RuleDeployments across all Rules. - # - # @overload list_rule_deployments(request, options = nil) - # Pass arguments to `list_rule_deployments` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_rule_deployments` via keyword arguments. Note that at - # least one keyword argument is 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 collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @param page_size [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - # - # # Call the list_rule_deployments method. - # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - # p item - # end - # - def list_rule_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest - - # Converts hash 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_rule_deployments.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::Chronicle::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_rule_deployments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_rule_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :list_rule_deployments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, 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 - - ## - # Updates a RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - # - # @overload update_rule_deployment(request, options = nil) - # Pass arguments to `update_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_deployment(rule_deployment: nil, update_mask: nil) - # Pass arguments to `update_rule_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - # - # # Call the update_rule_deployment method. - # result = client.update_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def update_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest - - # Converts hash 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_rule_deployment.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::Chronicle::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.rule_deployment&.name - header_params["rule_deployment.name"] = request.rule_deployment.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_rule_deployment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.call_rpc :update_rule_deployment, 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 RuleService API. - # - # This class represents the configuration for RuleService, - # 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::Chronicle::V1::RuleService::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 - # # create_rule to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::RuleService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.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::Chronicle::V1::RuleService::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 = "chronicle.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 RuleService 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 `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `list_rule_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_revisions - ## - # RPC-specific configuration for `create_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :create_retrohunt - ## - # RPC-specific configuration for `get_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :get_retrohunt - ## - # RPC-specific configuration for `list_retrohunts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_retrohunts - ## - # RPC-specific configuration for `get_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule_deployment - ## - # RPC-specific configuration for `list_rule_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_deployments - ## - # RPC-specific configuration for `update_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule_deployment - - # @private - def initialize parent_rpcs = nil - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions - @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config - create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt - @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config - get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt - @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config - list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts - @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config - get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment - @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config - list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments - @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config - update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment - @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb deleted file mode 100644 index a66ae4c0ebf6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - # Credentials for the RuleService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/operations.rb deleted file mode 100644 index 162ec1fb3163..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/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 Chronicle - module V1 - module RuleService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the RuleService 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 RuleService 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::Chronicle::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::Chronicle::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::Chronicle::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::Chronicle::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::Chronicle::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 = "chronicle.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-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb deleted file mode 100644 index 00b03a7b2d54..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/paths.rb +++ /dev/null @@ -1,159 +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 Chronicle - module V1 - module RuleService - # Path helper methods for the RuleService API. - module Paths - ## - # Create a fully-qualified DataAccessScope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param data_access_scope [String] - # - # @return [::String] - def data_access_scope_path project:, location:, instance:, data_access_scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/dataAccessScopes/#{data_access_scope}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - end - - ## - # Create a fully-qualified ReferenceList resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param reference_list [String] - # - # @return [::String] - def reference_list_path project:, location:, instance:, reference_list: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/referenceLists/#{reference_list}" - end - - ## - # Create a fully-qualified Retrohunt resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # @param retrohunt [String] - # - # @return [::String] - def retrohunt_path project:, location:, instance:, rule:, retrohunt: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - raise ::ArgumentError, "rule cannot contain /" if rule.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/retrohunts/#{retrohunt}" - end - - ## - # Create a fully-qualified Rule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # - # @return [::String] - def rule_path project:, location:, instance:, rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}" - end - - ## - # Create a fully-qualified RuleDeployment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param rule [String] - # - # @return [::String] - def rule_deployment_path project:, location:, instance:, rule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/rules/#{rule}/deployment" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb deleted file mode 100644 index d27a86220664..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/chronicle/v1/version" - -require "google/cloud/chronicle/v1/rule_service/credentials" -require "google/cloud/chronicle/v1/rule_service/paths" -require "google/cloud/chronicle/v1/rule_service/rest/operations" -require "google/cloud/chronicle/v1/rule_service/rest/client" - -module Google - module Cloud - module Chronicle - module V1 - ## - # RuleService provides interface for user-created rules. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/chronicle/v1/rule_service/rest" - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - module RuleService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/chronicle/v1/rule_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb deleted file mode 100644 index e29466693f60..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/client.rb +++ /dev/null @@ -1,1564 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service/rest/service_stub" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - module Rest - ## - # REST client for the RuleService service. - # - # RuleService provides interface for user-created rules. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :rule_service_stub - - ## - # Configure the RuleService Client class. - # - # See {::Google::Cloud::Chronicle::V1::RuleService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all RuleService clients - # ::Google::Cloud::Chronicle::V1::RuleService::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", "Chronicle", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.create_rule.timeout = 60.0 - - default_config.rpcs.get_rule.timeout = 60.0 - default_config.rpcs.get_rule.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rules.timeout = 600.0 - default_config.rpcs.list_rules.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule.timeout = 600.0 - - default_config.rpcs.delete_rule.timeout = 60.0 - - default_config.rpcs.list_rule_revisions.timeout = 600.0 - default_config.rpcs.list_rule_revisions.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_retrohunt.timeout = 600.0 - - default_config.rpcs.get_retrohunt.timeout = 60.0 - default_config.rpcs.get_retrohunt.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_retrohunts.timeout = 60.0 - default_config.rpcs.list_retrohunts.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_rule_deployment.timeout = 600.0 - default_config.rpcs.get_rule_deployment.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_rule_deployments.timeout = 600.0 - default_config.rpcs.list_rule_deployments.retry_policy = { - initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_rule_deployment.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the RuleService 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::Chronicle::V1::RuleService::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 - @rule_service_stub.universe_domain - end - - ## - # Create a new RuleService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the RuleService 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::Chronicle::V1::RuleService::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 - - @rule_service_stub = ::Google::Cloud::Chronicle::V1::RuleService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @rule_service_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Chronicle::V1::RuleService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @rule_service_stub.logger - end - - # Service calls - - ## - # Creates a new Rule. - # - # @overload create_rule(request, options = nil) - # Pass arguments to `create_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(parent: nil, rule: nil) - # Pass arguments to `create_rule` via keyword arguments. Note that at - # least one keyword argument is 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 resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - # - # # Call the create_rule method. - # result = client.create_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def create_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRuleRequest - - # Converts hash 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_rule.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::Chronicle::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.create_rule 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 a Rule. - # - # @overload get_rule(request, options = nil) - # Pass arguments to `get_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(name: nil, view: nil) - # Pass arguments to `get_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - # - # # Call the get_rule method. - # result = client.get_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def get_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleRequest - - # Converts hash 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_rule.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::Chronicle::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Rules. - # - # @overload list_rules(request, options = nil) - # Pass arguments to `list_rules` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rules(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil) - # Pass arguments to `list_rules` via keyword arguments. Note that at - # least one keyword argument is 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, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @param page_size [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @param filter [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - # - # # Call the list_rules method. - # result = client.list_rules 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRulesRequest - - # Converts hash 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_rules.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::Chronicle::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_rules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rules request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rules, "rules", 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 - - ## - # Updates a Rule. - # - # @overload update_rule(request, options = nil) - # Pass arguments to `update_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(rule: nil, update_mask: nil) - # Pass arguments to `update_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule [::Google::Cloud::Chronicle::V1::Rule, ::Hash] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - # - # # Call the update_rule method. - # result = client.update_rule request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - # p result - # - def update_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleRequest - - # Converts hash 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_rule.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::Chronicle::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.update_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Rule. - # - # @overload delete_rule(request, options = nil) - # Pass arguments to `delete_rule` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::DeleteRuleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule(name: nil, force: nil) - # Pass arguments to `delete_rule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param force [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also 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/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - # - # # Call the delete_rule method. - # result = client.delete_rule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_rule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::DeleteRuleRequest - - # Converts hash 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_rule.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::Chronicle::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_rule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_rule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.delete_rule request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all revisions of the rule. - # - # @overload list_rule_revisions(request, options = nil) - # Pass arguments to `list_rule_revisions` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_revisions(name: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_rule_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @param view [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Rule>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - # - # # Call the list_rule_revisions method. - # result = client.list_rule_revisions 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::Chronicle::V1::Rule. - # p item - # end - # - def list_rule_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest - - # Converts hash 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_rule_revisions.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::Chronicle::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_rule_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rule_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rule_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_revisions, "rules", 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 - - ## - # Create a Retrohunt. - # - # @overload create_retrohunt(request, options = nil) - # Pass arguments to `create_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_retrohunt(parent: nil, retrohunt: nil) - # Pass arguments to `create_retrohunt` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param retrohunt [::Google::Cloud::Chronicle::V1::Retrohunt, ::Hash] - # Required. The retrohunt 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/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - # - # # Call the create_retrohunt method. - # result = client.create_retrohunt 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_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest - - # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.create_retrohunt 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 - - ## - # Get a Retrohunt. - # - # @overload get_retrohunt(request, options = nil) - # Pass arguments to `get_retrohunt` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRetrohuntRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_retrohunt(name: nil) - # Pass arguments to `get_retrohunt` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::Retrohunt] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - # - # # Call the get_retrohunt method. - # result = client.get_retrohunt request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - # p result - # - def get_retrohunt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest - - # Converts hash 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_retrohunt.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::Chronicle::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_retrohunt.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_retrohunt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_retrohunt 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 - - ## - # List Retrohunts. - # - # @overload list_retrohunts(request, options = nil) - # Pass arguments to `list_retrohunts` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_retrohunts(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_retrohunts` via keyword arguments. Note that at - # least one keyword argument is 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 rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @param page_size [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::Retrohunt>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - # - # # Call the list_retrohunts method. - # result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - # p item - # end - # - def list_retrohunts request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest - - # Converts hash 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_retrohunts.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::Chronicle::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_retrohunts.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_retrohunts.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_retrohunts request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_retrohunts, "retrohunts", 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 a RuleDeployment. - # - # @overload get_rule_deployment(request, options = nil) - # Pass arguments to `get_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_deployment(name: nil) - # Pass arguments to `get_rule_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - # - # # Call the get_rule_deployment method. - # result = client.get_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def get_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest - - # Converts hash 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_rule_deployment.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::Chronicle::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_rule_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.get_rule_deployment request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists RuleDeployments across all Rules. - # - # @overload list_rule_deployments(request, options = nil) - # Pass arguments to `list_rule_deployments` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_deployments(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_rule_deployments` via keyword arguments. Note that at - # least one keyword argument is 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 collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @param page_size [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @param page_token [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @param filter [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - # - # # Call the list_rule_deployments method. - # result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - # p item - # end - # - def list_rule_deployments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest - - # Converts hash 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_rule_deployments.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::Chronicle::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_rule_deployments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_rule_deployments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.list_rule_deployments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @rule_service_stub, :list_rule_deployments, "rule_deployments", 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 - - ## - # Updates a RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - # - # @overload update_rule_deployment(request, options = nil) - # Pass arguments to `update_rule_deployment` via a request object, either of type - # {::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_rule_deployment(rule_deployment: nil, update_mask: nil) - # Pass arguments to `update_rule_deployment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param rule_deployment [::Google::Cloud::Chronicle::V1::RuleDeployment, ::Hash] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields to update. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/chronicle/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - # - # # Call the update_rule_deployment method. - # result = client.update_rule_deployment request - # - # # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - # p result - # - def update_rule_deployment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest - - # Converts hash 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_rule_deployment.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::Chronicle::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_rule_deployment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_rule_deployment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @rule_service_stub.update_rule_deployment 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 RuleService REST API. - # - # This class represents the configuration for RuleService 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::Chronicle::V1::RuleService::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 - # # create_rule to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_rule.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 = "chronicle.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 RuleService 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 `create_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_rule - ## - # RPC-specific configuration for `get_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule - ## - # RPC-specific configuration for `list_rules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rules - ## - # RPC-specific configuration for `update_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule - ## - # RPC-specific configuration for `delete_rule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_rule - ## - # RPC-specific configuration for `list_rule_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_revisions - ## - # RPC-specific configuration for `create_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :create_retrohunt - ## - # RPC-specific configuration for `get_retrohunt` - # @return [::Gapic::Config::Method] - # - attr_reader :get_retrohunt - ## - # RPC-specific configuration for `list_retrohunts` - # @return [::Gapic::Config::Method] - # - attr_reader :list_retrohunts - ## - # RPC-specific configuration for `get_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_rule_deployment - ## - # RPC-specific configuration for `list_rule_deployments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_rule_deployments - ## - # RPC-specific configuration for `update_rule_deployment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_rule_deployment - - # @private - def initialize parent_rpcs = nil - create_rule_config = parent_rpcs.create_rule if parent_rpcs.respond_to? :create_rule - @create_rule = ::Gapic::Config::Method.new create_rule_config - get_rule_config = parent_rpcs.get_rule if parent_rpcs.respond_to? :get_rule - @get_rule = ::Gapic::Config::Method.new get_rule_config - list_rules_config = parent_rpcs.list_rules if parent_rpcs.respond_to? :list_rules - @list_rules = ::Gapic::Config::Method.new list_rules_config - update_rule_config = parent_rpcs.update_rule if parent_rpcs.respond_to? :update_rule - @update_rule = ::Gapic::Config::Method.new update_rule_config - delete_rule_config = parent_rpcs.delete_rule if parent_rpcs.respond_to? :delete_rule - @delete_rule = ::Gapic::Config::Method.new delete_rule_config - list_rule_revisions_config = parent_rpcs.list_rule_revisions if parent_rpcs.respond_to? :list_rule_revisions - @list_rule_revisions = ::Gapic::Config::Method.new list_rule_revisions_config - create_retrohunt_config = parent_rpcs.create_retrohunt if parent_rpcs.respond_to? :create_retrohunt - @create_retrohunt = ::Gapic::Config::Method.new create_retrohunt_config - get_retrohunt_config = parent_rpcs.get_retrohunt if parent_rpcs.respond_to? :get_retrohunt - @get_retrohunt = ::Gapic::Config::Method.new get_retrohunt_config - list_retrohunts_config = parent_rpcs.list_retrohunts if parent_rpcs.respond_to? :list_retrohunts - @list_retrohunts = ::Gapic::Config::Method.new list_retrohunts_config - get_rule_deployment_config = parent_rpcs.get_rule_deployment if parent_rpcs.respond_to? :get_rule_deployment - @get_rule_deployment = ::Gapic::Config::Method.new get_rule_deployment_config - list_rule_deployments_config = parent_rpcs.list_rule_deployments if parent_rpcs.respond_to? :list_rule_deployments - @list_rule_deployments = ::Gapic::Config::Method.new list_rule_deployments_config - update_rule_deployment_config = parent_rpcs.update_rule_deployment if parent_rpcs.respond_to? :update_rule_deployment - @update_rule_deployment = ::Gapic::Config::Method.new update_rule_deployment_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/operations.rb deleted file mode 100644 index f989eba5c49e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/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 Chronicle - module V1 - module RuleService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the RuleService 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 RuleService 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::Chronicle::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::Chronicle::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::Chronicle::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::Chronicle::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 = "chronicle.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/[^/]+/instances/[^/]+/?$}, 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/[^/]+/instances/[^/]+/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/[^/]+/instances/[^/]+/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/[^/]+/instances/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb deleted file mode 100644 index 021e04869cad..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_service/rest/service_stub.rb +++ /dev/null @@ -1,817 +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/chronicle/v1/rule_pb" - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - module Rest - ## - # REST service stub for the RuleService 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 create_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def create_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def get_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rules REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] - # 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::Chronicle::V1::ListRulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRulesResponse] - # A result object deserialized from the server's reply - def list_rules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rules_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_rules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] - # 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::Chronicle::V1::Rule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Rule] - # A result object deserialized from the server's reply - def update_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Rule.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] - # 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_rule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_rule_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_rule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_rule_revisions REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] - # 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::Chronicle::V1::ListRuleRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse] - # A result object deserialized from the server's reply - def list_rule_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_revisions_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_rule_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] - # 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_retrohunt request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_retrohunt_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_retrohunt", - 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_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] - # 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::Chronicle::V1::Retrohunt] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # A result object deserialized from the server's reply - def get_retrohunt request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_retrohunt_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_retrohunt", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] - # 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::Chronicle::V1::ListRetrohuntsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse] - # A result object deserialized from the server's reply - def list_retrohunts request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_retrohunts_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_retrohunts", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] - # 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::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # A result object deserialized from the server's reply - def get_rule_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_rule_deployment_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_rule_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployments REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] - # 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::Chronicle::V1::ListRuleDeploymentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse] - # A result object deserialized from the server's reply - def list_rule_deployments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_rule_deployments_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_rule_deployments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] - # 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::Chronicle::V1::RuleDeployment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # A result object deserialized from the server's reply - def update_rule_deployment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_rule_deployment_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_rule_deployment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rules", - body: "rule", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rules REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRulesRequest] - # 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_rules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rules", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule.name}", - body: "rule", - matches: [ - ["rule.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_rule REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::DeleteRuleRequest] - # 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_rule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rule_revisions REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest] - # 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_rule_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest] - # 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_retrohunt_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/retrohunts", - body: "retrohunt", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_retrohunt REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRetrohuntRequest] - # 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_retrohunt_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/retrohunts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_retrohunts REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest] - # 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_retrohunts_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/retrohunts", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest] - # 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_rule_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_rule_deployments REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest] - # 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_rule_deployments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/deployments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_rule_deployment REST call - # - # @param request_pb [::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest] - # 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_rule_deployment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rule_deployment.name}", - body: "rule_deployment", - matches: [ - ["rule_deployment.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/rules/[^/]+/deployment/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb deleted file mode 100644 index a893fb504269..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/rule_services_pb.rb +++ /dev/null @@ -1,70 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/chronicle/v1/rule.proto for package 'Google.Cloud.Chronicle.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/chronicle/v1/rule_pb' - -module Google - module Cloud - module Chronicle - module V1 - module RuleService - # RuleService provides interface for user-created rules. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.chronicle.v1.RuleService' - - # Creates a new Rule. - rpc :CreateRule, ::Google::Cloud::Chronicle::V1::CreateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Gets a Rule. - rpc :GetRule, ::Google::Cloud::Chronicle::V1::GetRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Lists Rules. - rpc :ListRules, ::Google::Cloud::Chronicle::V1::ListRulesRequest, ::Google::Cloud::Chronicle::V1::ListRulesResponse - # Updates a Rule. - rpc :UpdateRule, ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, ::Google::Cloud::Chronicle::V1::Rule - # Deletes a Rule. - rpc :DeleteRule, ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, ::Google::Protobuf::Empty - # Lists all revisions of the rule. - rpc :ListRuleRevisions, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse - # Create a Retrohunt. - rpc :CreateRetrohunt, ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, ::Google::Longrunning::Operation - # Get a Retrohunt. - rpc :GetRetrohunt, ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, ::Google::Cloud::Chronicle::V1::Retrohunt - # List Retrohunts. - rpc :ListRetrohunts, ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse - # Gets a RuleDeployment. - rpc :GetRuleDeployment, ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment - # Lists RuleDeployments across all Rules. - rpc :ListRuleDeployments, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse - # Updates a RuleDeployment. - # Failures are not necessarily atomic. If there is a request to update - # multiple fields, and any update to a single field fails, an error will be - # returned, but other fields may remain successfully updated. - rpc :UpdateRuleDeployment, ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, ::Google::Cloud::Chronicle::V1::RuleDeployment - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb b/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/v1/version.rb deleted file mode 100644 index 6224648b9b26..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/lib/google/cloud/chronicle/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 Chronicle - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md deleted file mode 100644 index 70a487ac4c0f..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Chronicle 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-chronicle-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb deleted file mode 100644 index 1342c3da69d2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/data_access_control.rb +++ /dev/null @@ -1,364 +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 Chronicle - module V1 - # Request message for CreateDataAccessLabel. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this Data Access Label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] data_access_label - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # Required. Data access label to create. - # @!attribute [rw] data_access_label_id - # @return [::String] - # Required. The ID to use for the data access label, which will become the - # label's display name and the final component of the label's resource name. - # The maximum number of characters should be 63. Regex pattern is as per AIP: - # https://google.aip.dev/122#resource-id-segments - class CreateDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to retrieve a data access label. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access label to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - class GetDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDataAccessLabels. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data access label will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data access labels to return. The service may return - # fewer than this value. If unspecified, at most 100 data access labels will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListDataAccessLabelsRequest` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessLabel and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - class ListDataAccessLabelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDataAccessLabels. - # @!attribute [rw] data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabel>] - # List of data access labels. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataAccessLabelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDataAccessLabel method. - # @!attribute [rw] data_access_label - # @return [::Google::Cloud::Chronicle::V1::DataAccessLabel] - # Required. The data access label to update. - # - # The label's `name` field is used to identify the label to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description and definition - # fields are supported for update; an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - class UpdateDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete a data access label. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access label to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessLabels/{data_access_label}` - class DeleteDataAccessLabelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateDataAccessScope. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this Data Access Scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] data_access_scope - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # Required. Data access scope to create. - # @!attribute [rw] data_access_scope_id - # @return [::String] - # Required. The user provided scope id which will become the last part of the - # name of the scope resource. Needs to be compliant with - # https://google.aip.dev/122 - class CreateDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to retrieve a data access scope. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access scope to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - class GetDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListDataAccessScopes. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this data access scope will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of data access scopes to return. The service may return - # fewer than this value. If unspecified, at most 100 data access scopes will - # be returned. The maximum value is 1000; values above 1000 will be coerced - # to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListDataAccessScopesRequest` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. A filter which should follow the guidelines of AIP-160. - # Supports filtering on all fieds of DataAccessScope and all operations as - # mentioned in https://google.aip.dev/160. - # example filter: "create_time greater than \"2023-04-21T11:30:00-04:00\" OR - # display_name:\"-21-1\"". - class ListDataAccessScopesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListDataAccessScopes. - # @!attribute [rw] data_access_scopes - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessScope>] - # List of data access scopes. - # @!attribute [rw] global_data_access_scope_granted - # @return [::Boolean] - # Whether or not global scope is granted to the user. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListDataAccessScopesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateDataAccessScope method. - # @!attribute [rw] data_access_scope - # @return [::Google::Cloud::Chronicle::V1::DataAccessScope] - # Required. The data access scope to update. - # - # The scope's `name` field is used to identify the scope to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. Currently, only the description, the allowed - # and denied labels list fields are supported for update; - # an update call that attempts to update any - # other fields will return INVALID_ARGUMENT. - class UpdateDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message to delete a data access scope. - # @!attribute [rw] name - # @return [::String] - # Required. The ID of the data access scope to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{data_access_scope}` - class DeleteDataAccessScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A DataAccessLabel is a label on events to define user access to data. - # @!attribute [rw] udm_query - # @return [::String] - # A UDM query over event data. - # @!attribute [rw] name - # @return [::String] - # The unique resource name of the data access label. - # @!attribute [r] display_name - # @return [::String] - # Output only. The short name displayed for the label as it appears on event - # data. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access label was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access label was last updated. - # @!attribute [r] author - # @return [::String] - # Output only. The user who created the data access label. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The user who last updated the data access label. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the data access label for a human reader. - class DataAccessLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A DataAccessScope is a boolean expression of data access labels used - # to restrict access to data for users. - # @!attribute [rw] name - # @return [::String] - # Required. The unique full name of the data access scope. - # The name should comply with https://google.aip.dev/122 standards. - # @!attribute [rw] allowed_data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] - # Optional. The allowed labels for the scope. - # Either allow_all or allowed_data_access_labels needs to be provided. - # When provided, there has to be at least one label allowed for the scope to - # be valid. - # The logical operator for evaluation of the allowed labels is OR. - # E.g.: A customer with scope with allowed labels A and B will be able - # to see data with labeled with A or B or (A and B). - # @!attribute [rw] denied_data_access_labels - # @return [::Array<::Google::Cloud::Chronicle::V1::DataAccessLabelReference>] - # Optional. The denied labels for the scope. - # The logical operator for evaluation of the denied labels is AND. - # E.g.: A customer with scope with denied labels A and B won't be able - # to see data labeled with A and data labeled with B - # and data with labels A and B. - # @!attribute [r] display_name - # @return [::String] - # Output only. The name to be used for display to customers of the data - # access scope. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access scope was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the data access scope was last updated. - # @!attribute [r] author - # @return [::String] - # Output only. The user who created the data access scope. - # @!attribute [r] last_editor - # @return [::String] - # Output only. The user who last updated the data access scope. - # @!attribute [rw] description - # @return [::String] - # Optional. A description of the data access scope for a human reader. - # @!attribute [rw] allow_all - # @return [::Boolean] - # Optional. Whether or not the scope allows all labels, allow_all and - # allowed_data_access_labels are mutually exclusive and one of them must be - # present. denied_data_access_labels can still be used along with allow_all. - # When combined with denied_data_access_labels, access will be granted to all - # data that doesn't have labels mentioned in denied_data_access_labels. E.g.: - # A customer with scope with denied labels A and B and allow_all will be able - # to see all data except data labeled with A and data labeled with B and data - # with labels A and B. - class DataAccessScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Reference object to a data access label. - # @!attribute [rw] data_access_label - # @return [::String] - # The name of the data access label. - # - # Note: The following fields are mutually exclusive: `data_access_label`, `log_type`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] log_type - # @return [::String] - # The name of the log type. - # - # Note: The following fields are mutually exclusive: `log_type`, `data_access_label`, `asset_namespace`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] asset_namespace - # @return [::String] - # The asset namespace configured in the forwarder - # of the customer's events. - # - # Note: The following fields are mutually exclusive: `asset_namespace`, `data_access_label`, `log_type`, `ingestion_label`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ingestion_label - # @return [::Google::Cloud::Chronicle::V1::IngestionLabel] - # The ingestion label configured in the forwarder of the customer's events. - # - # Note: The following fields are mutually exclusive: `ingestion_label`, `data_access_label`, `log_type`, `asset_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] display_name - # @return [::String] - # Output only. The display name of the label. - # Data access label and log types's name - # will match the display name of the resource. - # The asset namespace will match the namespace itself. - # The ingestion key value pair will match the key of the tuple. - class DataAccessLabelReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Representation of an ingestion label type. - # @!attribute [rw] ingestion_label_key - # @return [::String] - # Required. The key of the ingestion label. Always required. - # @!attribute [rw] ingestion_label_value - # @return [::String] - # Optional. The value of the ingestion label. Optional. An object - # with no provided value and some key provided would match - # against the given key and ANY value. - class IngestionLabel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb deleted file mode 100644 index 89cef26897a2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/entity.rb +++ /dev/null @@ -1,210 +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 Chronicle - module V1 - # A watchlist is a list of entities that allows for bulk operations over the - # included entities. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the watchlist. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name of the watchlist. - # Note that it must be at least one character and less than 63 characters - # (https://google.aip.dev/148). - # @!attribute [rw] description - # @return [::String] - # Optional. Description of the watchlist. - # @!attribute [rw] multiplying_factor - # @return [::Float] - # Optional. Weight applied to the risk score for entities - # in this watchlist. - # The default is 1.0 if it is not specified. - # @!attribute [rw] entity_population_mechanism - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism] - # Required. Mechanism to populate entities in the watchlist. - # @!attribute [r] entity_count - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityCount] - # Output only. Entity count in the watchlist. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the watchlist was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the watchlist was last updated. - # @!attribute [rw] watchlist_user_preferences - # @return [::Google::Cloud::Chronicle::V1::WatchlistUserPreferences] - # Optional. User preferences for watchlist configuration. - class Watchlist - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Mechanism to populate entities in the watchlist. - # @!attribute [rw] manual - # @return [::Google::Cloud::Chronicle::V1::Watchlist::EntityPopulationMechanism::Manual] - # Optional. Entities are added manually. - class EntityPopulationMechanism - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Entities are added manually. - class Manual - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Count of different types of entities in the watchlist. - # @!attribute [r] user - # @return [::Integer] - # Output only. Count of user type entities in the watchlist. - # @!attribute [r] asset - # @return [::Integer] - # Output only. Count of asset type entities in the watchlist. - class EntityCount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A collection of user preferences for watchlist UI configuration. - # @!attribute [rw] pinned - # @return [::Boolean] - # Optional. Whether the watchlist is pinned on the dashboard. - class WatchlistUserPreferences - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for getting a watchlist. - # @!attribute [rw] name - # @return [::String] - # Required. The parent, which owns this collection of watchlists. - # The name of the watchlist to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - class GetWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for listing watchlists. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of watchlists. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of watchlists to return. - # The service may return fewer than this value. - # If unspecified, at most 200 watchlists will be returned. - # The maximum value is 200; values above 200 will be coerced to 200. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListWatchlists` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to - # `ListWatchlists` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Which watchlist to return in aip.dev/160 form. - # Currently, only the following filters are supported: - # - `watchlist_user_preferences.pinned=true` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE])` - # - `has_entity([ENTITY_INDICATOR],[ENTITY_TYPE],[NAMESPACE])` - class ListWatchlistsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for listing watchlists. - # @!attribute [rw] watchlists - # @return [::Array<::Google::Cloud::Chronicle::V1::Watchlist>] - # Optional. The watchlists from the specified instance. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. A token, which can be sent as `page_token` to retrieve the next - # page. If this field is omitted, there are no subsequent pages. - class ListWatchlistsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for creating watchlist. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this watchlist will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] watchlist_id - # @return [::String] - # Optional. The ID to use for the watchlist, - # which will become the final component of the watchlist's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @!attribute [rw] watchlist - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # Required. The watchlist to create. - class CreateWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for updating watchlist. - # @!attribute [rw] watchlist - # @return [::Google::Cloud::Chronicle::V1::Watchlist] - # Required. The watchlist to update. - # - # The watchlist's `name` field is used to identify the watchlist to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. - class UpdateWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for deleting watchlist. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the watchlist to delete. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/watchlists/{watchlist}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any entities under this watchlist will also be - # deleted. (Otherwise, the request will only work if the watchlist has no - # entities.) - class DeleteWatchlistRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.rb deleted file mode 100644 index dde3c3cbf88d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/instance.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! - - -module Google - module Cloud - module Chronicle - module V1 - # A Instance represents an instantiation of the Instance product. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of this instance. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to get a Instance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the instance to retrieve. - # Format: - # `projects/{project_id}/locations/{location}/instances/{instance}` - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb deleted file mode 100644 index 2ab663d35a0d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/reference_list.rb +++ /dev/null @@ -1,232 +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 Chronicle - module V1 - # ScopeInfo specifies the scope info of the reference list. - # @!attribute [rw] reference_list_scope - # @return [::Google::Cloud::Chronicle::V1::ReferenceListScope] - # Required. The list of scope names of the reference list, if the list is - # empty the reference list is treated as unscoped. - class ScopeInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ReferenceListScope specifies the list of scope names of the reference list. - # @!attribute [rw] scope_names - # @return [::Array<::String>] - # Optional. The list of scope names of the reference list. The scope names - # should be full resource names and should be of the format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope_name}`. - class ReferenceListScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get details about a reference list. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the reference list to retrieve. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of the ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_FULL. - class GetReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request for a list of reference lists. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of reference lists. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of reference lists to return. - # The service may return fewer than this value. - # If unspecified, at most 100 reference lists will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListReferenceLists` call. - # Provide this to retrieve the subsequent page. - # When paginating, all other parameters provided to `ListReferenceLists` must - # match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::ReferenceListView] - # How much of each ReferenceList to view. Defaults to - # REFERENCE_LIST_VIEW_BASIC. - class ListReferenceListsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A response to a request for a list of reference lists. - # @!attribute [rw] reference_lists - # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceList>] - # The reference lists. - # Ordered in ascending alphabetical order by name. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListReferenceListsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a reference list. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this reference list will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] reference_list - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # Required. The reference list to create. - # @!attribute [rw] reference_list_id - # @return [::String] - # Required. The ID to use for the reference list. This is also the display - # name for the reference list. It must satisfy the following requirements: - # - Starts with letter. - # - Contains only letters, numbers and underscore. - # - Has length less than 256. - # - Must be unique. - class CreateReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a reference list. - # @!attribute [rw] reference_list - # @return [::Google::Cloud::Chronicle::V1::ReferenceList] - # Required. The reference list to update. - # - # The reference list's `name` field is used to identify the reference list to - # update. - # Format: - # `projects/{project}/locations/{locations}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. - # When no field mask is supplied, all non-empty fields will be updated. - # A field mask of "*" will update all fields, whether empty or not. - class UpdateReferenceListRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reference list. - # Reference lists are user-defined lists of values which users can - # use in multiple Rules. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the reference list. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/referenceLists/{reference_list}` - # @!attribute [r] display_name - # @return [::String] - # Output only. The unique display name of the reference list. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the reference list was last updated. - # @!attribute [rw] description - # @return [::String] - # Required. A user-provided description of the reference list. - # @!attribute [rw] entries - # @return [::Array<::Google::Cloud::Chronicle::V1::ReferenceListEntry>] - # Required. The entries of the reference list. - # When listed, they are returned in the order that was specified at creation - # or update. The combined size of the values of the reference list may not - # exceed 6MB. - # This is returned only when the view is REFERENCE_LIST_VIEW_FULL. - # @!attribute [r] rules - # @return [::Array<::String>] - # Output only. The resource names for the associated self-authored Rules that - # use this reference list. This is returned only when the view is - # REFERENCE_LIST_VIEW_FULL. - # @!attribute [rw] syntax_type - # @return [::Google::Cloud::Chronicle::V1::ReferenceListSyntaxType] - # Required. The syntax type indicating how list entries should be validated. - # @!attribute [r] rule_associations_count - # @return [::Integer] - # Output only. The count of self-authored rules using the reference list. - # @!attribute [rw] scope_info - # @return [::Google::Cloud::Chronicle::V1::ScopeInfo] - # The scope info of the reference list. - # During reference list creation, if this field is not set, the reference - # list without scopes (an unscoped list) will be created for an unscoped - # user. For a scoped user, this field must be set. During reference list - # update, if scope_info is requested to be updated, this field must be set. - class ReferenceList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An entry in a reference list. - # @!attribute [rw] value - # @return [::String] - # Required. The value of the entry. Maximum length is 512 characters. - class ReferenceListEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The syntax type indicating how list entries should be validated. - module ReferenceListSyntaxType - # Defaults to REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING. - REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED = 0 - - # List contains plain text patterns. - REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING = 1 - - # List contains only Regular Expression patterns. - REFERENCE_LIST_SYNTAX_TYPE_REGEX = 2 - - # List contains only CIDR patterns. - REFERENCE_LIST_SYNTAX_TYPE_CIDR = 3 - end - - # ReferenceListView is a mechanism for viewing partial responses of the - # ReferenceList resource. - module ReferenceListView - # The default / unset value. - # The API will default to the BASIC view for ListReferenceLists. - # The API will default to the FULL view for methods that return a single - # ReferenceList resource. - REFERENCE_LIST_VIEW_UNSPECIFIED = 0 - - # Include metadata about the ReferenceList. - # This is the default view for ListReferenceLists. - REFERENCE_LIST_VIEW_BASIC = 1 - - # Include all details about the ReferenceList: metadata, content lines, - # associated rule counts. This is the default view for GetReferenceList. - REFERENCE_LIST_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb deleted file mode 100644 index 0b2584f226f8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/cloud/chronicle/v1/rule.rb +++ /dev/null @@ -1,701 +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 Chronicle - module V1 - # The Rule resource represents a user-created rule. - # NEXT TAG: 21 - # @!attribute [rw] name - # @return [::String] - # Identifier. Full resource name for the rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] revision_id - # @return [::String] - # Output only. The revision ID of the rule. - # A new revision is created whenever the rule text is changed in any way. - # Format: `v_{10 digits}_{9 digits}` - # Populated in REVISION_METADATA_ONLY view and FULL view. - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of the rule. - # Populated in BASIC view and FULL view. - # @!attribute [rw] text - # @return [::String] - # The YARA-L content of the rule. - # Populated in FULL view. - # @!attribute [r] author - # @return [::String] - # Output only. The author of the rule. Extracted from the meta section of - # text. Populated in BASIC view and FULL view. - # @!attribute [r] severity - # @return [::Google::Cloud::Chronicle::V1::Severity] - # Output only. The severity of the rule as specified in the meta section of - # text. Populated in BASIC view and FULL view. - # @!attribute [r] metadata - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. Additional metadata specified in the meta section of text. - # Populated in FULL view. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the rule was created. - # Populated in FULL view. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the rule revision was created. - # Populated in FULL, REVISION_METADATA_ONLY views. - # @!attribute [r] compilation_state - # @return [::Google::Cloud::Chronicle::V1::Rule::CompilationState] - # Output only. The current compilation state of the rule. - # Populated in FULL view. - # @!attribute [r] type - # @return [::Google::Cloud::Chronicle::V1::RuleType] - # Output only. User-facing type of the rule. Extracted from the events - # section of rule text. Populated in BASIC view and FULL view. - # @!attribute [r] reference_lists - # @return [::Array<::String>] - # Output only. Resource names of the reference lists used in this rule. - # Populated in FULL view. - # @!attribute [r] allowed_run_frequencies - # @return [::Array<::Google::Cloud::Chronicle::V1::RunFrequency>] - # Output only. The run frequencies that are allowed for the rule. - # Populated in BASIC view and FULL view. - # @!attribute [rw] etag - # @return [::String] - # The etag for this rule. - # If this is provided on update, the request will succeed if and only if it - # matches the server-computed value, and will fail with an ABORTED error - # otherwise. - # Populated in BASIC view and FULL view. - # @!attribute [rw] scope - # @return [::String] - # Resource name of the DataAccessScope bound to this rule. - # Populated in BASIC view and FULL view. - # If reference lists are used in the rule, validations will be performed - # against this scope to ensure that the reference lists are compatible with - # both the user's and the rule's scopes. - # The scope should be in the format: - # `projects/{project}/locations/{location}/instances/{instance}/dataAccessScopes/{scope}`. - # @!attribute [r] compilation_diagnostics - # @return [::Array<::Google::Cloud::Chronicle::V1::CompilationDiagnostic>] - # Output only. A list of a rule's corresponding compilation diagnostic - # messages such as compilation errors and compilation warnings. Populated in - # FULL view. - # @!attribute [r] near_real_time_live_rule_eligible - # @return [::Boolean] - # Output only. Indicate the rule can run in near real time live rule. - # If this is true, the rule uses the near real time live rule when the run - # frequency is set to LIVE. - # @!attribute [r] inputs_used - # @return [::Google::Cloud::Chronicle::V1::InputsUsed] - # Output only. The set of inputs used in the rule. For example, if the rule - # uses $e.principal.hostname, then the uses_udm field will be true. - class Rule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class MetadataEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The current compilation state of the rule. - module CompilationState - # The compilation state is unspecified/unknown. - COMPILATION_STATE_UNSPECIFIED = 0 - - # The Rule can successfully compile. - SUCCEEDED = 1 - - # The Rule cannot successfully compile. - # This is possible if a backwards-incompatible change was made to the - # compiler. - FAILED = 2 - end - end - - # The RuleDeployment resource represents the deployment state of a Rule. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the rule deployment. - # Note that RuleDeployment is a child of the overall Rule, not any individual - # revision, so the resource ID segment for the Rule resource must not - # reference a specific revision. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @!attribute [rw] enabled - # @return [::Boolean] - # Whether the rule is currently deployed continuously against incoming data. - # @!attribute [rw] alerting - # @return [::Boolean] - # Whether detections resulting from this deployment should be considered - # alerts. - # @!attribute [rw] archived - # @return [::Boolean] - # The archive state of the rule deployment. - # Cannot be set to true unless enabled is set to false. - # If set to true, alerting will automatically be set to false. - # If currently set to true, enabled, alerting, and run_frequency cannot be - # updated. - # @!attribute [r] archive_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the rule deployment archive state was last - # set to true. If the rule deployment's current archive state is not set to - # true, the field will be empty. - # @!attribute [rw] run_frequency - # @return [::Google::Cloud::Chronicle::V1::RunFrequency] - # The run frequency of the rule deployment. - # @!attribute [r] execution_state - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment::ExecutionState] - # Output only. The execution state of the rule deployment. - # @!attribute [r] producer_rules - # @return [::Array<::String>] - # Output only. The names of the associated/chained producer rules. Rules are - # considered producers for this rule if this rule explicitly filters on their - # ruleid. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] consumer_rules - # @return [::Array<::String>] - # Output only. The names of the associated/chained consumer rules. Rules are - # considered consumers of this rule if their rule text explicitly filters on - # this rule's ruleid. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [r] last_alert_status_change_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the rule deployment alert state was lastly - # changed. This is filled regardless of the current alert state. E.g. if the - # current alert status is false, this timestamp will be the timestamp when - # the alert status was changed to false. - class RuleDeployment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible execution states the rule deployment can be in. - module ExecutionState - # Unspecified or unknown execution state. - EXECUTION_STATE_UNSPECIFIED = 0 - - # Default execution state. - DEFAULT = 1 - - # Rules in limited state may not have their executions guaranteed. - LIMITED = 2 - - # Paused rules are not executed at all. - PAUSED = 3 - end - end - - # Retrohunt is an execution of a Rule over a time range in the past. - # @!attribute [rw] name - # @return [::String] - # The resource name of the retrohunt. - # Retrohunt is the child of a rule revision. \\{rule} in the format below is - # structured as \\{rule_id@revision_id}. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @!attribute [rw] process_interval - # @return [::Google::Type::Interval] - # Required. The start and end time of the event time range this retrohunt - # processes. - # @!attribute [r] execution_interval - # @return [::Google::Type::Interval] - # Output only. The start and end time of the retrohunt execution. If the - # retrohunt is not yet finished, the end time of the interval will not be - # populated. - # @!attribute [r] state - # @return [::Google::Cloud::Chronicle::V1::Retrohunt::State] - # Output only. The state of the retrohunt. - # @!attribute [r] progress_percentage - # @return [::Float] - # Output only. Percent progress of the retrohunt towards completion, from - # 0.00 to 100.00. - class Retrohunt - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The possible states a retrohunt can be in. - module State - # Unspecified or unknown retrohunt state. - STATE_UNSPECIFIED = 0 - - # Running state. - RUNNING = 1 - - # Done state. - DONE = 2 - - # Cancelled state. - CANCELLED = 3 - - # Failed state. - FAILED = 4 - end - end - - # Request message for CreateRule method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource where this rule will be created. - # Format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] rule - # @return [::Google::Cloud::Chronicle::V1::Rule] - # Required. The rule to create. - class CreateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRule method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the Rule being - # returned. If unspecified, defaults to FULL. - class GetRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRules method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent, which owns this collection of rules. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rules to return. The service may return fewer than - # this value. If unspecified, at most 100 rules will be returned. The - # maximum value is 1000; values above 1000 will be coerced to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRules` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRules` - # must match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # view indicates the scope of fields to populate for the Rule being returned. - # If unspecified, defaults to BASIC. - # @!attribute [rw] filter - # @return [::String] - # Only the following filters are allowed: - # "reference_lists:\\{reference_list_name}" - # "data_tables:\\{data_table_name}" - # "display_name:\\{display_name}" - class ListRulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRules method. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] - # The rules from the specified instance. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRule method. - # @!attribute [rw] rule - # @return [::Google::Cloud::Chronicle::V1::Rule] - # Required. The rule to update. - # - # The rule's `name` field is used to identify the rule to update. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to update. If not included, all fields with a non-empty - # value will be overwritten. - class UpdateRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the DeleteRule method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to delete. A rule revision timestamp cannot - # be specified as part of the name, as deleting specific revisions is not - # supported. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any retrohunts and any detections associated with - # the rule will also be deleted. If set to false, the call will only succeed - # if the rule has no associated retrohunts, including completed retrohunts, - # and no associated detections. Regardless of this field's value, the rule - # deployment associated with this rule will also be deleted. - class DeleteRuleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRuleRevisions method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule to list revisions for. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. The service may return - # fewer than this value. If unspecified, at most 100 revisions will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous `ListRuleRevisions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleRevisions` - # must match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Chronicle::V1::RuleView] - # The view field indicates the scope of fields to populate for the revision - # being returned. If unspecified, defaults to BASIC. - class ListRuleRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRuleRevisions method. - # @!attribute [rw] rules - # @return [::Array<::Google::Cloud::Chronicle::V1::Rule>] - # The revisions of the rule. - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRuleRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateRetrohunt method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of retrohunt, which is a rule. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] retrohunt - # @return [::Google::Cloud::Chronicle::V1::Retrohunt] - # Required. The retrohunt to create. - class CreateRetrohuntRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRetrohunt method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the retrohunt to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - class GetRetrohuntRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRetrohunts method. - # @!attribute [rw] parent - # @return [::String] - # Required. The rule that the retrohunts belong to. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of retrohunt to return. The service may return fewer - # than this value. If unspecified, at most 100 retrohunts will be returned. - # The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRetrohunts` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRetrohunts` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # state - class ListRetrohuntsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRetrohunts method. - # @!attribute [rw] retrohunts - # @return [::Array<::Google::Cloud::Chronicle::V1::Retrohunt>] - # The retrohunts from the specified rule. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRetrohuntsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRuleDeployment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the rule deployment to retrieve. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - class GetRuleDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRuleDeployments. - # @!attribute [rw] parent - # @return [::String] - # Required. The collection of all parents which own all rule deployments. The - # "-" wildcard token must be used as the rule identifier in the resource - # path. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/-` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of rule deployments to return. The service may return - # fewer than this value. If unspecified, at most 100 rule deployments will be - # returned. The maximum value is 1000; values above 1000 will be coerced to - # 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListRuleDeployments` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListRuleDeployments` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # A filter that can be used to retrieve specific rule deployments. - # The following fields are filterable: - # archived, name - class ListRuleDeploymentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRuleDeployments. - # @!attribute [rw] rule_deployments - # @return [::Array<::Google::Cloud::Chronicle::V1::RuleDeployment>] - # The rule deployments from all rules. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListRuleDeploymentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRuleDeployment. - # @!attribute [rw] rule_deployment - # @return [::Google::Cloud::Chronicle::V1::RuleDeployment] - # Required. The rule deployment to update. - # - # The rule deployment's `name` field is used to identify the rule deployment - # to update. Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields to update. - class UpdateRuleDeploymentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CompilationPosition represents the location of a compilation diagnostic in - # rule text. - # @!attribute [r] start_line - # @return [::Integer] - # Output only. Start line number, beginning at 1. - # @!attribute [r] start_column - # @return [::Integer] - # Output only. Start column number, beginning at 1. - # @!attribute [r] end_line - # @return [::Integer] - # Output only. End line number, beginning at 1. - # @!attribute [r] end_column - # @return [::Integer] - # Output only. End column number, beginning at 1. - class CompilationPosition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CompilationDiagnostic represents a compilation diagnostic generated - # during a rule's compilation, such as a compilation error or a compilation - # warning. - # @!attribute [r] message - # @return [::String] - # Output only. The diagnostic message. - # @!attribute [r] position - # @return [::Google::Cloud::Chronicle::V1::CompilationPosition] - # Output only. The approximate position in the rule text associated with the - # compilation diagnostic. - # Compilation Position may be empty. - # @!attribute [r] severity - # @return [::Google::Cloud::Chronicle::V1::CompilationDiagnostic::Severity] - # Output only. The severity of a rule's compilation diagnostic. - # @!attribute [r] uri - # @return [::String] - # Output only. Link to documentation that describes a diagnostic in more - # detail. - class CompilationDiagnostic - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity level of the compilation diagnostic. - module Severity - # An unspecified severity level. - SEVERITY_UNSPECIFIED = 0 - - # A compilation warning. - WARNING = 1 - - # A compilation error. - ERROR = 2 - end - end - - # Severity represents the severity level of the rule. - # @!attribute [rw] display_name - # @return [::String] - # The display name of the severity level. Extracted from the meta section of - # the rule text. - class Severity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Operation Metadata for Retrohunts. - # @!attribute [rw] retrohunt - # @return [::String] - # The name of the retrohunt. - # Format: - # `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` - # @!attribute [rw] execution_interval - # @return [::Google::Type::Interval] - # The start and end time of the retrohunt execution. If the retrohunt is not - # yet finished, the end time of the interval will not be filled. - # @!attribute [rw] progress_percentage - # @return [::Float] - # Percent progress of the retrohunt towards completion, from 0.00 to 100.00. - class RetrohuntMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # InputsUsed is a convenience field that tells us which sources - # of events (if any) were used in the rule. - # NEXT TAG: 4 - # @!attribute [rw] uses_udm - # @return [::Boolean] - # Optional. Whether the rule queries UDM events. - # @!attribute [rw] uses_entity - # @return [::Boolean] - # Optional. Whether the rule queries entity events. - # @!attribute [rw] uses_detection - # @return [::Boolean] - # Optional. Whether the rule queries detections. - class InputsUsed - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RunFrequency indicates the run frequency at which a YARA-L 2 rule will run if - # enabled. - module RunFrequency - # The run frequency is unspecified/unknown. - RUN_FREQUENCY_UNSPECIFIED = 0 - - # Executes in real time. - LIVE = 1 - - # Executes once per hour. - HOURLY = 2 - - # Executes once per day. - DAILY = 3 - end - - # RuleType indicates the YARA-L rule type of user-created and Google Cloud - # Threat Intelligence (GCTI) authored rules. - module RuleType - # The rule type is unspecified/unknown. - RULE_TYPE_UNSPECIFIED = 0 - - # Rule checks for the existence of a single event. - SINGLE_EVENT = 1 - - # Rule checks for correlation between multiple events - MULTI_EVENT = 2 - end - - # RuleView indicates the scope of fields to populate when returning the Rule - # resource. - module RuleView - # The default/unset value. - # The API will default to the BASIC view for ListRules/ListRuleRevisions. - # The API will default to the FULL view for GetRule. - RULE_VIEW_UNSPECIFIED = 0 - - # Include basic metadata about the rule, but not the full contents. - # Returned fields include: revision_id, revision_create_time, display_name, - # author, severity, type, allowed_run_frequency, - # near_real_time_live_rule_eligible, etag, and scope. - # This is the default value for ListRules and ListRuleRevisions. - BASIC = 1 - - # Include all fields. - # This is the default value for GetRule. - FULL = 2 - - # Include basic metadata about the rule's revision only. - # Returned fields include: revision_id and revision_create_time. - REVISION_METADATA_ONLY = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/proto_docs/google/type/interval.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! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-chronicle-v1/snippets/Gemfile deleted file mode 100644 index 8856abb69960..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-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-chronicle-v1", path: "../" -else - gem "google-cloud-chronicle-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-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.rb deleted file mode 100644 index 3bfe7e104b89..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_label.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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_label. -# -def create_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new - - # Call the create_data_access_label method. - result = client.create_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.rb deleted file mode 100644 index 870849c6db47..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/create_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope. -# -def create_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new - - # Call the create_data_access_scope method. - result = client.create_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.rb deleted file mode 100644 index e12c3440d608..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_label.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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label. -# -def delete_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new - - # Call the delete_data_access_label method. - result = client.delete_data_access_label request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.rb deleted file mode 100644 index 0341030faa5c..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/delete_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope. -# -def delete_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new - - # Call the delete_data_access_scope method. - result = client.delete_data_access_scope request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.rb deleted file mode 100644 index 988f66268da5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_label.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 chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_label. -# -def get_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new - - # Call the get_data_access_label method. - result = client.get_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.rb deleted file mode 100644 index d9de6dbf8b84..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/get_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope. -# -def get_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new - - # Call the get_data_access_scope method. - result = client.get_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.rb deleted file mode 100644 index e62e53adb905..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_labels.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 chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_access_labels call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels. -# -def list_data_access_labels - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.new - - # Call the list_data_access_labels method. - result = client.list_data_access_labels 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::Chronicle::V1::DataAccessLabel. - p item - end -end -# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.rb deleted file mode 100644 index 4b11c99375f7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/list_data_access_scopes.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 chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_data_access_scopes call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes. -# -def list_data_access_scopes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.new - - # Call the list_data_access_scopes method. - result = client.list_data_access_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::Chronicle::V1::DataAccessScope. - p item - end -end -# [END chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.rb deleted file mode 100644 index 2974c40a7a70..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_label.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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_access_label call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_label. -# -def update_data_access_label - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new - - # Call the update_data_access_label method. - result = client.update_data_access_label request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessLabel. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.rb deleted file mode 100644 index 81a0e349a4fa..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/data_access_control_service/update_data_access_scope.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 chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_data_access_scope call in the DataAccessControlService 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::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope. -# -def update_data_access_scope - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new - - # Call the update_data_access_scope method. - result = client.update_data_access_scope request - - # The returned object is of type Google::Cloud::Chronicle::V1::DataAccessScope. - p result -end -# [END chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.rb deleted file mode 100644 index 76ac024b263d..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/create_watchlist.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 chronicle_v1_generated_EntityService_CreateWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#create_watchlist. -# -def create_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new - - # Call the create_watchlist method. - result = client.create_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_CreateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.rb deleted file mode 100644 index dce65e1ea1f1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/delete_watchlist.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 chronicle_v1_generated_EntityService_DeleteWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#delete_watchlist. -# -def delete_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new - - # Call the delete_watchlist method. - result = client.delete_watchlist request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_EntityService_DeleteWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.rb deleted file mode 100644 index 429a7abe7363..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/get_watchlist.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 chronicle_v1_generated_EntityService_GetWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#get_watchlist. -# -def get_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetWatchlistRequest.new - - # Call the get_watchlist method. - result = client.get_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_GetWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.rb deleted file mode 100644 index 07fb0f279542..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/list_watchlists.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 chronicle_v1_generated_EntityService_ListWatchlists_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_watchlists call in the EntityService 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::Chronicle::V1::EntityService::Client#list_watchlists. -# -def list_watchlists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListWatchlistsRequest.new - - # Call the list_watchlists method. - result = client.list_watchlists 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::Chronicle::V1::Watchlist. - p item - end -end -# [END chronicle_v1_generated_EntityService_ListWatchlists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.rb deleted file mode 100644 index fe92dd9d1924..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/entity_service/update_watchlist.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 chronicle_v1_generated_EntityService_UpdateWatchlist_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_watchlist call in the EntityService 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::Chronicle::V1::EntityService::Client#update_watchlist. -# -def update_watchlist - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::EntityService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new - - # Call the update_watchlist method. - result = client.update_watchlist request - - # The returned object is of type Google::Cloud::Chronicle::V1::Watchlist. - p result -end -# [END chronicle_v1_generated_EntityService_UpdateWatchlist_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.rb deleted file mode 100644 index 8fdeb2d7ad47..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/instance_service/get_instance.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 chronicle_v1_generated_InstanceService_GetInstance_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_instance call in the InstanceService 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::Chronicle::V1::InstanceService::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::InstanceService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::Chronicle::V1::Instance. - p result -end -# [END chronicle_v1_generated_InstanceService_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.rb deleted file mode 100644 index 56680299d2ab..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/create_reference_list.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 chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#create_reference_list. -# -def create_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new - - # Call the create_reference_list method. - result = client.create_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.rb deleted file mode 100644 index 9fee3cf12ff5..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/get_reference_list.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 chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#get_reference_list. -# -def get_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetReferenceListRequest.new - - # Call the get_reference_list method. - result = client.get_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_GetReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.rb deleted file mode 100644 index 11926590f8d3..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/list_reference_lists.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 chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_reference_lists call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#list_reference_lists. -# -def list_reference_lists - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new - - # Call the list_reference_lists method. - result = client.list_reference_lists 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::Chronicle::V1::ReferenceList. - p item - end -end -# [END chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.rb deleted file mode 100644 index a914529bd2b1..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/reference_list_service/update_reference_list.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 chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_reference_list call in the ReferenceListService 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::Chronicle::V1::ReferenceListService::Client#update_reference_list. -# -def update_reference_list - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::ReferenceListService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new - - # Call the update_reference_list method. - result = client.update_reference_list request - - # The returned object is of type Google::Cloud::Chronicle::V1::ReferenceList. - p result -end -# [END chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.rb deleted file mode 100644 index 0cac677634bb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_retrohunt.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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#create_retrohunt. -# -def create_retrohunt - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new - - # Call the create_retrohunt method. - result = client.create_retrohunt 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 chronicle_v1_generated_RuleService_CreateRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.rb deleted file mode 100644 index 57e6c2e2a973..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/create_rule.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 chronicle_v1_generated_RuleService_CreateRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the create_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#create_rule. -# -def create_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::CreateRuleRequest.new - - # Call the create_rule method. - result = client.create_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_CreateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.rb deleted file mode 100644 index db56a864183a..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/delete_rule.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 chronicle_v1_generated_RuleService_DeleteRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the delete_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#delete_rule. -# -def delete_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::DeleteRuleRequest.new - - # Call the delete_rule method. - result = client.delete_rule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END chronicle_v1_generated_RuleService_DeleteRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.rb deleted file mode 100644 index 481026822412..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_retrohunt.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 chronicle_v1_generated_RuleService_GetRetrohunt_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_retrohunt call in the RuleService 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::Chronicle::V1::RuleService::Client#get_retrohunt. -# -def get_retrohunt - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new - - # Call the get_retrohunt method. - result = client.get_retrohunt request - - # The returned object is of type Google::Cloud::Chronicle::V1::Retrohunt. - p result -end -# [END chronicle_v1_generated_RuleService_GetRetrohunt_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.rb deleted file mode 100644 index eb550559d7a9..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule.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 chronicle_v1_generated_RuleService_GetRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule. -# -def get_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRuleRequest.new - - # Call the get_rule method. - result = client.get_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_GetRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.rb deleted file mode 100644 index c4d8a125f230..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/get_rule_deployment.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 chronicle_v1_generated_RuleService_GetRuleDeployment_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the get_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#get_rule_deployment. -# -def get_rule_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new - - # Call the get_rule_deployment method. - result = client.get_rule_deployment request - - # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - p result -end -# [END chronicle_v1_generated_RuleService_GetRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.rb deleted file mode 100644 index fd21d3d155c8..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_retrohunts.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 chronicle_v1_generated_RuleService_ListRetrohunts_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_retrohunts call in the RuleService 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::Chronicle::V1::RuleService::Client#list_retrohunts. -# -def list_retrohunts - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.new - - # Call the list_retrohunts method. - result = client.list_retrohunts 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::Chronicle::V1::Retrohunt. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRetrohunts_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.rb deleted file mode 100644 index 061793135cde..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_deployments.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 chronicle_v1_generated_RuleService_ListRuleDeployments_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rule_deployments call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_deployments. -# -def list_rule_deployments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.new - - # Call the list_rule_deployments method. - result = client.list_rule_deployments 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::Chronicle::V1::RuleDeployment. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRuleDeployments_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.rb deleted file mode 100644 index ee56939b8586..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rule_revisions.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 chronicle_v1_generated_RuleService_ListRuleRevisions_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rule_revisions call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rule_revisions. -# -def list_rule_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new - - # Call the list_rule_revisions method. - result = client.list_rule_revisions 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::Chronicle::V1::Rule. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRuleRevisions_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.rb deleted file mode 100644 index 607a52db7bbb..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/list_rules.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 chronicle_v1_generated_RuleService_ListRules_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the list_rules call in the RuleService 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::Chronicle::V1::RuleService::Client#list_rules. -# -def list_rules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::ListRulesRequest.new - - # Call the list_rules method. - result = client.list_rules 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::Chronicle::V1::Rule. - p item - end -end -# [END chronicle_v1_generated_RuleService_ListRules_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.rb deleted file mode 100644 index 612a59e32e81..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule.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 chronicle_v1_generated_RuleService_UpdateRule_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_rule call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule. -# -def update_rule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateRuleRequest.new - - # Call the update_rule method. - result = client.update_rule request - - # The returned object is of type Google::Cloud::Chronicle::V1::Rule. - p result -end -# [END chronicle_v1_generated_RuleService_UpdateRule_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb b/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.rb deleted file mode 100644 index c8c3638a445e..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/rule_service/update_rule_deployment.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 chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] -require "google/cloud/chronicle/v1" - -## -# Snippet for the update_rule_deployment call in the RuleService 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::Chronicle::V1::RuleService::Client#update_rule_deployment. -# -def update_rule_deployment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Chronicle::V1::RuleService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new - - # Call the update_rule_deployment method. - result = client.update_rule_deployment request - - # The returned object is of type Google::Cloud::Chronicle::V1::RuleDeployment. - p result -end -# [END chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync] diff --git a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json b/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json deleted file mode 100644 index 97757c48b4dd..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/snippets/snippet_metadata_google.cloud.chronicle.v1.json +++ /dev/null @@ -1,1295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-chronicle-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.chronicle.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessLabel_sync", - "title": "Snippet for the create_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label.", - "file": "data_access_control_service/create_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "CreateDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessLabel_sync", - "title": "Snippet for the get_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label.", - "file": "data_access_control_service/get_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "GetDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessLabels_sync", - "title": "Snippet for the list_data_access_labels call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels.", - "file": "data_access_control_service/list_data_access_labels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_access_labels", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_labels", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "ListDataAccessLabels", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessLabels", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessLabel_sync", - "title": "Snippet for the update_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label.", - "file": "data_access_control_service/update_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessLabel", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "UpdateDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessLabel_sync", - "title": "Snippet for the delete_data_access_label call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label.", - "file": "data_access_control_service/delete_data_access_label.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_access_label", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_label", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "DeleteDataAccessLabel", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessLabel", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_CreateDataAccessScope_sync", - "title": "Snippet for the create_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope.", - "file": "data_access_control_service/create_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#create_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "CreateDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.CreateDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_GetDataAccessScope_sync", - "title": "Snippet for the get_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope.", - "file": "data_access_control_service/get_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#get_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "GetDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.GetDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_ListDataAccessScopes_sync", - "title": "Snippet for the list_data_access_scopes call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes.", - "file": "data_access_control_service/list_data_access_scopes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_data_access_scopes", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#list_data_access_scopes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "ListDataAccessScopes", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.ListDataAccessScopes", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_UpdateDataAccessScope_sync", - "title": "Snippet for the update_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope.", - "file": "data_access_control_service/update_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#update_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::DataAccessScope", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "UpdateDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.UpdateDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_DataAccessControlService_DeleteDataAccessScope_sync", - "title": "Snippet for the delete_data_access_scope call in the DataAccessControlService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope.", - "file": "data_access_control_service/delete_data_access_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_data_access_scope", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client#delete_data_access_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "DataAccessControlService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::DataAccessControlService::Client" - }, - "method": { - "short_name": "DeleteDataAccessScope", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService.DeleteDataAccessScope", - "service": { - "short_name": "DataAccessControlService", - "full_name": "google.cloud.chronicle.v1.DataAccessControlService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_GetWatchlist_sync", - "title": "Snippet for the get_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist.", - "file": "entity_service/get_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#get_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "GetWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.GetWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_ListWatchlists_sync", - "title": "Snippet for the list_watchlists call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists.", - "file": "entity_service/list_watchlists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_watchlists", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#list_watchlists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListWatchlistsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListWatchlistsResponse", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "ListWatchlists", - "full_name": "google.cloud.chronicle.v1.EntityService.ListWatchlists", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_CreateWatchlist_sync", - "title": "Snippet for the create_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist.", - "file": "entity_service/create_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#create_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "CreateWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.CreateWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_UpdateWatchlist_sync", - "title": "Snippet for the update_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist.", - "file": "entity_service/update_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#update_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Watchlist", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "UpdateWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.UpdateWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_EntityService_DeleteWatchlist_sync", - "title": "Snippet for the delete_watchlist call in the EntityService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist.", - "file": "entity_service/delete_watchlist.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_watchlist", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client#delete_watchlist", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "EntityService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::EntityService::Client" - }, - "method": { - "short_name": "DeleteWatchlist", - "full_name": "google.cloud.chronicle.v1.EntityService.DeleteWatchlist", - "service": { - "short_name": "EntityService", - "full_name": "google.cloud.chronicle.v1.EntityService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_InstanceService_GetInstance_sync", - "title": "Snippet for the get_instance call in the InstanceService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance.", - "file": "instance_service/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Instance", - "client": { - "short_name": "InstanceService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::InstanceService::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.chronicle.v1.InstanceService.GetInstance", - "service": { - "short_name": "InstanceService", - "full_name": "google.cloud.chronicle.v1.InstanceService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_GetReferenceList_sync", - "title": "Snippet for the get_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list.", - "file": "reference_list_service/get_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#get_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "GetReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.GetReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_ListReferenceLists_sync", - "title": "Snippet for the list_reference_lists call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists.", - "file": "reference_list_service/list_reference_lists.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_reference_lists", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#list_reference_lists", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListReferenceListsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListReferenceListsResponse", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "ListReferenceLists", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.ListReferenceLists", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_CreateReferenceList_sync", - "title": "Snippet for the create_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list.", - "file": "reference_list_service/create_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#create_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "CreateReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.CreateReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_ReferenceListService_UpdateReferenceList_sync", - "title": "Snippet for the update_reference_list call in the ReferenceListService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list.", - "file": "reference_list_service/update_reference_list.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_reference_list", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client#update_reference_list", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ReferenceList", - "client": { - "short_name": "ReferenceListService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::ReferenceListService::Client" - }, - "method": { - "short_name": "UpdateReferenceList", - "full_name": "google.cloud.chronicle.v1.ReferenceListService.UpdateReferenceList", - "service": { - "short_name": "ReferenceListService", - "full_name": "google.cloud.chronicle.v1.ReferenceListService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_CreateRule_sync", - "title": "Snippet for the create_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_rule.", - "file": "rule_service/create_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "CreateRule", - "full_name": "google.cloud.chronicle.v1.RuleService.CreateRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRule_sync", - "title": "Snippet for the get_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule.", - "file": "rule_service/get_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRule", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRules_sync", - "title": "Snippet for the list_rules call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rules.", - "file": "rule_service/list_rules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rules", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRulesResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRules", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRules", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_UpdateRule_sync", - "title": "Snippet for the update_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule.", - "file": "rule_service/update_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Rule", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "UpdateRule", - "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_DeleteRule_sync", - "title": "Snippet for the delete_rule call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule.", - "file": "rule_service/delete_rule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_rule", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#delete_rule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::DeleteRuleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "DeleteRule", - "full_name": "google.cloud.chronicle.v1.RuleService.DeleteRule", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRuleRevisions_sync", - "title": "Snippet for the list_rule_revisions call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions.", - "file": "rule_service/list_rule_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rule_revisions", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRuleRevisions", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleRevisions", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_CreateRetrohunt_sync", - "title": "Snippet for the create_retrohunt call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt.", - "file": "rule_service/create_retrohunt.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_retrohunt", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#create_retrohunt", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "CreateRetrohunt", - "full_name": "google.cloud.chronicle.v1.RuleService.CreateRetrohunt", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRetrohunt_sync", - "title": "Snippet for the get_retrohunt call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt.", - "file": "rule_service/get_retrohunt.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_retrohunt", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_retrohunt", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRetrohuntRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::Retrohunt", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRetrohunt", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRetrohunt", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRetrohunts_sync", - "title": "Snippet for the list_retrohunts call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts.", - "file": "rule_service/list_retrohunts.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_retrohunts", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_retrohunts", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRetrohunts", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRetrohunts", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_GetRuleDeployment_sync", - "title": "Snippet for the get_rule_deployment call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment.", - "file": "rule_service/get_rule_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_rule_deployment", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#get_rule_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "GetRuleDeployment", - "full_name": "google.cloud.chronicle.v1.RuleService.GetRuleDeployment", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_ListRuleDeployments_sync", - "title": "Snippet for the list_rule_deployments call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments.", - "file": "rule_service/list_rule_deployments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_rule_deployments", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#list_rule_deployments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "ListRuleDeployments", - "full_name": "google.cloud.chronicle.v1.RuleService.ListRuleDeployments", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "chronicle_v1_generated_RuleService_UpdateRuleDeployment_sync", - "title": "Snippet for the update_rule_deployment call in the RuleService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment.", - "file": "rule_service/update_rule_deployment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_rule_deployment", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client#update_rule_deployment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Chronicle::V1::RuleDeployment", - "client": { - "short_name": "RuleService::Client", - "full_name": "::Google::Cloud::Chronicle::V1::RuleService::Client" - }, - "method": { - "short_name": "UpdateRuleDeployment", - "full_name": "google.cloud.chronicle.v1.RuleService.UpdateRuleDeployment", - "service": { - "short_name": "RuleService", - "full_name": "google.cloud.chronicle.v1.RuleService" - } - } - }, - "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-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb deleted file mode 100644 index 8ef29809b076..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_paths_test.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/chronicle/v1/data_access_control_service" - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_data_access_label_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_label_path project: "value0", location: "value1", instance: "value2", data_access_label: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessLabels/value3", path - end - end - - def test_data_access_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::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb deleted file mode 100644 index a20b2c953e40..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_rest_test.rb +++ /dev/null @@ -1,651 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service/rest" - - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_create_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_access_label = {} - data_access_label_id = "hello world" - - create_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_access_label_client_stub.call_count - end - end - end - - def test_get_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_access_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_access_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_access_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_access_label_client_stub.call_count - end - end - end - - def test_list_data_access_labels - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_labels_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_labels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_access_labels_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_access_labels({ 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_data_access_labels 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_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels({ 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_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels_client_stub.call_count - end - end - end - - def test_update_data_access_label - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessLabel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_access_label = {} - update_mask = {} - - update_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_data_access_label_client_stub.call_count - end - end - end - - def test_delete_data_access_label - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_access_label_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_label_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_access_label({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_access_label name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_access_label({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_access_label_client_stub.call_count - end - end - end - - def test_create_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - data_access_scope = {} - data_access_scope_id = "hello world" - - create_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_create_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_data_access_scope_client_stub.call_count - end - end - end - - def test_get_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_get_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_data_access_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_data_access_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_data_access_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_data_access_scope_client_stub.call_count - end - end - end - - def test_list_data_access_scopes - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_list_data_access_scopes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_data_access_scopes_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_data_access_scopes({ 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_data_access_scopes 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_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes({ 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_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes_client_stub.call_count - end - end - end - - def test_update_data_access_scope - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::DataAccessScope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - data_access_scope = {} - update_mask = {} - - update_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_update_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_data_access_scope({ data_access_scope: data_access_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_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_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_data_access_scope_client_stub.call_count - end - end - end - - def test_delete_data_access_scope - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_data_access_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::Chronicle::V1::DataAccessControlService::Rest::ServiceStub.stub :transcode_delete_data_access_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_data_access_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_data_access_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_data_access_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb deleted file mode 100644 index 32e8f27fe8cf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/data_access_control_service_test.rb +++ /dev/null @@ -1,718 +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/chronicle/v1/data_access_control_pb" -require "google/cloud/chronicle/v1/data_access_control_service" - -class ::Google::Cloud::Chronicle::V1::DataAccessControlService::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_create_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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" - data_access_label = {} - data_access_label_id = "hello world" - - create_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] - assert_equal "hello world", request["data_access_label_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_access_label parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_access_label ::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_access_label({ parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_access_label(::Google::Cloud::Chronicle::V1::CreateDataAccessLabelRequest.new(parent: parent, data_access_label: data_access_label, data_access_label_id: data_access_label_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_access_label_client_stub.call_rpc_count - end - end - - def test_get_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_access_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_access_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_access_label ::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_access_label({ 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_data_access_label(::Google::Cloud::Chronicle::V1::GetDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count - end - end - - def test_list_data_access_labels - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsResponse.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_data_access_labels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_access_labels, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest, 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_data_access_labels_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_access_labels({ 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_data_access_labels 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_data_access_labels ::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels({ 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_data_access_labels(::Google::Cloud::Chronicle::V1::ListDataAccessLabelsRequest.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_data_access_labels_client_stub.call_rpc_count - end - end - - def test_update_data_access_label - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessLabel.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. - data_access_label = {} - update_mask = {} - - update_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessLabel), request["data_access_label"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_access_label data_access_label: data_access_label, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_access_label ::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_access_label({ data_access_label: data_access_label, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_access_label(::Google::Cloud::Chronicle::V1::UpdateDataAccessLabelRequest.new(data_access_label: data_access_label, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_access_label_client_stub.call_rpc_count - end - end - - def test_delete_data_access_label - # 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_data_access_label_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_access_label, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_access_label_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_access_label({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_access_label name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_access_label ::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_access_label({ 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_data_access_label(::Google::Cloud::Chronicle::V1::DeleteDataAccessLabelRequest.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_data_access_label_client_stub.call_rpc_count - end - end - - def test_create_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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" - data_access_scope = {} - data_access_scope_id = "hello world" - - create_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] - assert_equal "hello world", request["data_access_scope_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_data_access_scope parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_data_access_scope ::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_data_access_scope({ parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_data_access_scope(::Google::Cloud::Chronicle::V1::CreateDataAccessScopeRequest.new(parent: parent, data_access_scope: data_access_scope, data_access_scope_id: data_access_scope_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_data_access_scope_client_stub.call_rpc_count - end - end - - def test_get_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_data_access_scope({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_data_access_scope name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_data_access_scope ::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_data_access_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_data_access_scope(::Google::Cloud::Chronicle::V1::GetDataAccessScopeRequest.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_data_access_scope_client_stub.call_rpc_count - end - end - - def test_list_data_access_scopes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListDataAccessScopesResponse.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_data_access_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_data_access_scopes, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest, 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_data_access_scopes_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_data_access_scopes({ 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_data_access_scopes 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_data_access_scopes ::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes({ 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_data_access_scopes(::Google::Cloud::Chronicle::V1::ListDataAccessScopesRequest.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_data_access_scopes_client_stub.call_rpc_count - end - end - - def test_update_data_access_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::DataAccessScope.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. - data_access_scope = {} - update_mask = {} - - update_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::DataAccessScope), request["data_access_scope"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_data_access_scope data_access_scope: data_access_scope, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_data_access_scope ::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_data_access_scope({ data_access_scope: data_access_scope, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_data_access_scope(::Google::Cloud::Chronicle::V1::UpdateDataAccessScopeRequest.new(data_access_scope: data_access_scope, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_data_access_scope_client_stub.call_rpc_count - end - end - - def test_delete_data_access_scope - # 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_data_access_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_data_access_scope, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_data_access_scope_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_data_access_scope({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_data_access_scope name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_data_access_scope ::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_data_access_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.delete_data_access_scope(::Google::Cloud::Chronicle::V1::DeleteDataAccessScopeRequest.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_data_access_scope_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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::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::Chronicle::V1::DataAccessControlService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::DataAccessControlService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb deleted file mode 100644 index 5d9dc9f08219..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_paths_test.rb +++ /dev/null @@ -1,67 +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/chronicle/v1/entity_service" - -class ::Google::Cloud::Chronicle::V1::EntityService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_watchlist_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.watchlist_path project: "value0", location: "value1", instance: "value2", watchlist: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/watchlists/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb deleted file mode 100644 index eaea39586386..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_rest_test.rb +++ /dev/null @@ -1,376 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service/rest" - - -class ::Google::Cloud::Chronicle::V1::EntityService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_get_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_watchlist({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_watchlist name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_watchlist({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_watchlist_client_stub.call_count - end - end - end - - def test_list_watchlists - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlists_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_list_watchlists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_watchlists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_watchlists({ 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_watchlists 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_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists({ 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_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists_client_stub.call_count - end - end - end - - def test_create_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - watchlist_id = "hello world" - watchlist = {} - - create_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_create_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_watchlist_client_stub.call_count - end - end - end - - def test_update_watchlist - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Watchlist.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - watchlist = {} - update_mask = {} - - update_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_update_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_watchlist watchlist: watchlist, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_watchlist_client_stub.call_count - end - end - end - - def test_delete_watchlist - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_watchlist_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::Chronicle::V1::EntityService::Rest::ServiceStub.stub :transcode_delete_watchlist_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_watchlist({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_watchlist name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_watchlist({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb deleted file mode 100644 index 33700fc8c675..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/entity_service_test.rb +++ /dev/null @@ -1,413 +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/chronicle/v1/entity_pb" -require "google/cloud/chronicle/v1/entity_service" - -class ::Google::Cloud::Chronicle::V1::EntityService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetWatchlistRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_watchlist({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_watchlist name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_watchlist ::Google::Cloud::Chronicle::V1::GetWatchlistRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_watchlist({ 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_watchlist(::Google::Cloud::Chronicle::V1::GetWatchlistRequest.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_watchlist_client_stub.call_rpc_count - end - end - - def test_list_watchlists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListWatchlistsResponse.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_watchlists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_watchlists, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest, 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_watchlists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_watchlists({ 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_watchlists 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_watchlists ::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists({ 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_watchlists(::Google::Cloud::Chronicle::V1::ListWatchlistsRequest.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_watchlists_client_stub.call_rpc_count - end - end - - def test_create_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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" - watchlist_id = "hello world" - watchlist = {} - - create_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["watchlist_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_watchlist parent: parent, watchlist_id: watchlist_id, watchlist: watchlist do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_watchlist ::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_watchlist({ parent: parent, watchlist_id: watchlist_id, watchlist: watchlist }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_watchlist(::Google::Cloud::Chronicle::V1::CreateWatchlistRequest.new(parent: parent, watchlist_id: watchlist_id, watchlist: watchlist), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_watchlist_client_stub.call_rpc_count - end - end - - def test_update_watchlist - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Watchlist.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. - watchlist = {} - update_mask = {} - - update_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Watchlist), request["watchlist"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_watchlist watchlist: watchlist, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_watchlist ::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_watchlist({ watchlist: watchlist, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_watchlist(::Google::Cloud::Chronicle::V1::UpdateWatchlistRequest.new(watchlist: watchlist, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_watchlist_client_stub.call_rpc_count - end - end - - def test_delete_watchlist - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_watchlist_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_watchlist, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_watchlist_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_watchlist({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_watchlist name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_watchlist ::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_watchlist({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_watchlist(::Google::Cloud::Chronicle::V1::DeleteWatchlistRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_watchlist_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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::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::Chronicle::V1::EntityService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::EntityService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb deleted file mode 100644 index 07fe0e7efd30..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_paths_test.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/chronicle/v1/instance_service" - -class ::Google::Cloud::Chronicle::V1::InstanceService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb deleted file mode 100644 index 68e2d76e63cf..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_rest_test.rb +++ /dev/null @@ -1,153 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service/rest" - - -class ::Google::Cloud::Chronicle::V1::InstanceService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_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::Chronicle::V1::InstanceService::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::InstanceService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb deleted file mode 100644 index 267cd03ea876..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/instance_service_test.rb +++ /dev/null @@ -1,162 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/chronicle/v1/instance_pb" -require "google/cloud/chronicle/v1/instance_service" - -class ::Google::Cloud::Chronicle::V1::InstanceService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Instance.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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Chronicle::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ 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_instance(::Google::Cloud::Chronicle::V1::GetInstanceRequest.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_instance_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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::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::Chronicle::V1::InstanceService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::InstanceService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb deleted file mode 100644 index 0a3e0e6f9025..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_paths_test.rb +++ /dev/null @@ -1,67 +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/chronicle/v1/reference_list_service" - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::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_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_reference_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb deleted file mode 100644 index e077a4322795..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_rest_test.rb +++ /dev/null @@ -1,322 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service/rest" - - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - get_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_get_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_reference_list({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_reference_list name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_reference_list({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_reference_list_client_stub.call_count - end - end - end - - def test_list_reference_lists - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - list_reference_lists_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_list_reference_lists_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_reference_lists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_reference_lists_client_stub.call_count - end - end - end - - def test_create_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - reference_list = {} - reference_list_id = "hello world" - - create_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_create_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_reference_list_client_stub.call_count - end - end - end - - def test_update_reference_list - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ReferenceList.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - reference_list = {} - update_mask = {} - - update_reference_list_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::Chronicle::V1::ReferenceListService::Rest::ServiceStub.stub :transcode_update_reference_list_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_reference_list reference_list: reference_list, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb deleted file mode 100644 index 02598fddb1c6..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/reference_list_service_test.rb +++ /dev/null @@ -1,355 +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/chronicle/v1/reference_list_pb" -require "google/cloud/chronicle/v1/reference_list_service" - -class ::Google::Cloud::Chronicle::V1::ReferenceListService::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - get_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetReferenceListRequest, request - assert_equal "hello world", request["name"] - assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_reference_list({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_reference_list name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_reference_list ::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_reference_list({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_reference_list(::Google::Cloud::Chronicle::V1::GetReferenceListRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_reference_list_client_stub.call_rpc_count - end - end - - def test_list_reference_lists - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListReferenceListsResponse.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" - view = :REFERENCE_LIST_VIEW_UNSPECIFIED - - list_reference_lists_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_reference_lists, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :REFERENCE_LIST_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_reference_lists_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }) 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_reference_lists parent: parent, page_size: page_size, page_token: page_token, view: view 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_reference_lists ::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) 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_reference_lists({ parent: parent, page_size: page_size, page_token: page_token, view: view }, 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_reference_lists(::Google::Cloud::Chronicle::V1::ListReferenceListsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), 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_reference_lists_client_stub.call_rpc_count - end - end - - def test_create_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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" - reference_list = {} - reference_list_id = "hello world" - - create_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] - assert_equal "hello world", request["reference_list_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_reference_list parent: parent, reference_list: reference_list, reference_list_id: reference_list_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_reference_list ::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_reference_list({ parent: parent, reference_list: reference_list, reference_list_id: reference_list_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_reference_list(::Google::Cloud::Chronicle::V1::CreateReferenceListRequest.new(parent: parent, reference_list: reference_list, reference_list_id: reference_list_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_reference_list_client_stub.call_rpc_count - end - end - - def test_update_reference_list - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ReferenceList.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. - reference_list = {} - update_mask = {} - - update_reference_list_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_reference_list, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::ReferenceList), request["reference_list"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_reference_list_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_reference_list reference_list: reference_list, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_reference_list ::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_reference_list({ reference_list: reference_list, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_reference_list(::Google::Cloud::Chronicle::V1::UpdateReferenceListRequest.new(reference_list: reference_list, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_reference_list_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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::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::Chronicle::V1::ReferenceListService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::ReferenceListService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_operations_test.rb deleted file mode 100644 index 91602a5d5414..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_services_pb" -require "google/cloud/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb deleted file mode 100644 index cc40252d4fea..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_paths_test.rb +++ /dev/null @@ -1,115 +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/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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_data_access_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::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.data_access_scope_path project: "value0", location: "value1", instance: "value2", data_access_scope: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/dataAccessScopes/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/value2", path - end - end - - def test_reference_list_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.reference_list_path project: "value0", location: "value1", instance: "value2", reference_list: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/referenceLists/value3", path - end - end - - def test_retrohunt_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.retrohunt_path project: "value0", location: "value1", instance: "value2", rule: "value3", retrohunt: "value4" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/retrohunts/value4", path - end - end - - def test_rule_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_path project: "value0", location: "value1", instance: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3", path - end - end - - def test_rule_deployment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rule_deployment_path project: "value0", location: "value1", instance: "value2", rule: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/rules/value3/deployment", path - end - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb deleted file mode 100644 index 22d16284fac2..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_rest_test.rb +++ /dev/null @@ -1,766 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service/rest" - - -class ::Google::Cloud::Chronicle::V1::RuleService::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_create_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rule = {} - - create_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_rule({ parent: parent, rule: rule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_rule parent: parent, rule: rule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_rule({ parent: parent, rule: rule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_count - end - end - end - - def test_get_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - get_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_rule({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_rule name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_rule({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_count - end - end - end - - def test_list_rules - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" - view = :RULE_VIEW_UNSPECIFIED - filter = "hello world" - - list_rules_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rules parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rules_client_stub.call_count - end - end - end - - def test_update_rule - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Rule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule = {} - update_mask = {} - - update_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_rule({ rule: rule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_count - end - end - end - - def test_delete_rule - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_rule_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_delete_rule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_rule({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_rule name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_rule({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_count - end - end - end - - def test_list_rule_revisions - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - list_rule_revisions_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rule_revisions_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_rule_revisions_client_stub.call_count - end - end - end - - def test_create_retrohunt - # 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" - retrohunt = {} - - create_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_create_retrohunt_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_retrohunt parent: parent, retrohunt: retrohunt do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_retrohunt_client_stub.call_count - end - end - end - - def test_get_retrohunt - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::Retrohunt.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_retrohunt_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_retrohunt_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_retrohunt({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_retrohunt name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_retrohunt({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_retrohunt_client_stub.call_count - end - end - end - - def test_list_retrohunts - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_retrohunts_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_retrohunts_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_retrohunts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_retrohunts({ 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_retrohunts 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_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts({ 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_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts_client_stub.call_count - end - end - end - - def test_get_rule_deployment - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_get_rule_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_rule_deployment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_rule_deployment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_rule_deployment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_rule_deployment_client_stub.call_count - end - end - end - - def test_list_rule_deployments - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployments_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_list_rule_deployments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_rule_deployments_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_rule_deployments({ 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_rule_deployments 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_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments({ 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_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments_client_stub.call_count - end - end - end - - def test_update_rule_deployment - # Create test objects. - client_result = ::Google::Cloud::Chronicle::V1::RuleDeployment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rule_deployment = {} - update_mask = {} - - update_rule_deployment_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::Chronicle::V1::RuleService::Rest::ServiceStub.stub :transcode_update_rule_deployment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb deleted file mode 100644 index 75d72ff1a561..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/google/cloud/chronicle/v1/rule_service_test.rb +++ /dev/null @@ -1,877 +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/chronicle/v1/rule_pb" -require "google/cloud/chronicle/v1/rule_service" - -class ::Google::Cloud::Chronicle::V1::RuleService::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_create_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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" - rule = {} - - create_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRuleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_rule({ parent: parent, rule: rule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_rule parent: parent, rule: rule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_rule ::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_rule({ parent: parent, rule: rule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_rule(::Google::Cloud::Chronicle::V1::CreateRuleRequest.new(parent: parent, rule: rule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_rule_client_stub.call_rpc_count - end - end - - def test_get_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - get_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_rule({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_rule name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_rule ::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_rule({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_rule(::Google::Cloud::Chronicle::V1::GetRuleRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_rule_client_stub.call_rpc_count - end - end - - def test_list_rules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRulesResponse.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" - view = :RULE_VIEW_UNSPECIFIED - filter = "hello world" - - list_rules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rules, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRulesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rules_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules ::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules({ parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules(::Google::Cloud::Chronicle::V1::ListRulesRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_rules_client_stub.call_rpc_count - end - end - - def test_update_rule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Rule.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. - rule = {} - update_mask = {} - - update_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Rule), request["rule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_rule({ rule: rule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_rule rule: rule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_rule ::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_rule({ rule: rule, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_rule(::Google::Cloud::Chronicle::V1::UpdateRuleRequest.new(rule: rule, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_rule_client_stub.call_rpc_count - end - end - - def test_delete_rule - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_rule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_rule, name - assert_kind_of ::Google::Cloud::Chronicle::V1::DeleteRuleRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_rule_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_rule({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_rule name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_rule ::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_rule({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_rule(::Google::Cloud::Chronicle::V1::DeleteRuleRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_rule_client_stub.call_rpc_count - end - end - - def test_list_rule_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleRevisionsResponse.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" - page_size = 42 - page_token = "hello world" - view = :RULE_VIEW_UNSPECIFIED - - list_rule_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rule_revisions, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :RULE_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_rule_revisions_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }) 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_rule_revisions name: name, page_size: page_size, page_token: page_token, view: view 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_rule_revisions ::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view) 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_rule_revisions({ name: name, page_size: page_size, page_token: page_token, view: view }, 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_rule_revisions(::Google::Cloud::Chronicle::V1::ListRuleRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token, view: view), 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_rule_revisions_client_stub.call_rpc_count - end - end - - def test_create_retrohunt - # 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" - retrohunt = {} - - create_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_retrohunt, name - assert_kind_of ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::Retrohunt), request["retrohunt"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_retrohunt({ parent: parent, retrohunt: retrohunt }) 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_retrohunt parent: parent, retrohunt: retrohunt 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_retrohunt ::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt) 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_retrohunt({ parent: parent, retrohunt: retrohunt }, 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_retrohunt(::Google::Cloud::Chronicle::V1::CreateRetrohuntRequest.new(parent: parent, retrohunt: retrohunt), 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_retrohunt_client_stub.call_rpc_count - end - end - - def test_get_retrohunt - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::Retrohunt.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_retrohunt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_retrohunt, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_retrohunt_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_retrohunt({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_retrohunt name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_retrohunt ::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_retrohunt({ 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_retrohunt(::Google::Cloud::Chronicle::V1::GetRetrohuntRequest.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_retrohunt_client_stub.call_rpc_count - end - end - - def test_list_retrohunts - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRetrohuntsResponse.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_retrohunts_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_retrohunts, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest, 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_retrohunts_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_retrohunts({ 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_retrohunts 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_retrohunts ::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts({ 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_retrohunts(::Google::Cloud::Chronicle::V1::ListRetrohuntsRequest.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_retrohunts_client_stub.call_rpc_count - end - end - - def test_get_rule_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_rule_deployment, name - assert_kind_of ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_rule_deployment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_rule_deployment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_rule_deployment ::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_rule_deployment({ 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_rule_deployment(::Google::Cloud::Chronicle::V1::GetRuleDeploymentRequest.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_rule_deployment_client_stub.call_rpc_count - end - end - - def test_list_rule_deployments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsResponse.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_rule_deployments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_rule_deployments, name - assert_kind_of ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest, 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_rule_deployments_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_rule_deployments({ 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_rule_deployments 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_rule_deployments ::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments({ 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_rule_deployments(::Google::Cloud::Chronicle::V1::ListRuleDeploymentsRequest.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_rule_deployments_client_stub.call_rpc_count - end - end - - def test_update_rule_deployment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Chronicle::V1::RuleDeployment.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. - rule_deployment = {} - update_mask = {} - - update_rule_deployment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_rule_deployment, name - assert_kind_of ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Chronicle::V1::RuleDeployment), request["rule_deployment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_rule_deployment_client_stub do - # Create client - client = ::Google::Cloud::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_rule_deployment rule_deployment: rule_deployment, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_rule_deployment ::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_rule_deployment({ rule_deployment: rule_deployment, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_rule_deployment(::Google::Cloud::Chronicle::V1::UpdateRuleDeploymentRequest.new(rule_deployment: rule_deployment, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_rule_deployment_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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::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::Chronicle::V1::RuleService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Chronicle::V1::RuleService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb b/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-chronicle-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.gitignore b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.repo-metadata.json deleted file mode 100644 index a2581d7a2255..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "cloudcontrolspartner.googleapis.com", - "api_shortname": "cloudcontrolspartner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest", - "distribution_name": "google-cloud-cloud_controls_partner-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudcontrolspartner", - "name_pretty": "Cloud Controls Partner V1 API", - "product_documentation": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml deleted file mode 100644 index 17c9971c2682..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1.rb" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.toys.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/.yardopts b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.yardopts deleted file mode 100644 index 73e8aa9b217d..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Controls Partner 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-cloud_controls_partner-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/AUTHENTICATION.md deleted file mode 100644 index 51638ae5dfbd..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-cloud_controls_partner-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-cloud_controls_partner-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/cloud_controls_partner/v1" - -client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/cloud_controls_partner/v1" - -::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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-cloud_controls_partner-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/cloud_controls_partner/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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-cloud_controls_partner-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/LICENSE.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/README.md deleted file mode 100644 index 5eb67ea1236e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Controls Partner V1 API - -Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. - -Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Controls Partner V1 API. Most users should consider using -the main client gem, -[google-cloud-cloud_controls_partner](https://rubygems.org/gems/google-cloud-cloud_controls_partner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-cloud_controls_partner-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/cloudcontrolspartner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/cloud_controls_partner/v1" - -client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new -request = ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new # (request fields as keyword arguments...) -response = client.get_workload request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest) -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/cloud_controls_partner/v1" -require "logger" - -client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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-cloud_controls_partner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-cloud_controls_partner-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-cloud_controls_partner`. -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-cloud_controls_partner-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-cloud_controls_partner-v1/Rakefile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/Rakefile deleted file mode 100644 index 7c9e46917fdf..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials" - ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-cloud_controls_partner-v1" - header "google-cloud-cloud_controls_partner-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-cloud_controls_partner-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-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-cloud_controls_partner-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/gapic_metadata.json deleted file mode 100644 index 253ca87bbba5..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.cloudcontrolspartner.v1", - "libraryPackage": "::Google::Cloud::CloudControlsPartner::V1", - "services": { - "CloudControlsPartnerCore": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client", - "rpcs": { - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - }, - "GetCustomer": { - "methods": [ - "get_customer" - ] - }, - "ListCustomers": { - "methods": [ - "list_customers" - ] - }, - "GetEkmConnections": { - "methods": [ - "get_ekm_connections" - ] - }, - "GetPartnerPermissions": { - "methods": [ - "get_partner_permissions" - ] - }, - "ListAccessApprovalRequests": { - "methods": [ - "list_access_approval_requests" - ] - }, - "GetPartner": { - "methods": [ - "get_partner" - ] - }, - "CreateCustomer": { - "methods": [ - "create_customer" - ] - }, - "UpdateCustomer": { - "methods": [ - "update_customer" - ] - }, - "DeleteCustomer": { - "methods": [ - "delete_customer" - ] - } - } - } - } - }, - "CloudControlsPartnerMonitoring": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client", - "rpcs": { - "ListViolations": { - "methods": [ - "list_violations" - ] - }, - "GetViolation": { - "methods": [ - "get_violation" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec deleted file mode 100644 index 91d6dda79765..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/google-cloud-cloud_controls_partner-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/cloud_controls_partner/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-cloud_controls_partner-v1" - gem.version = Google::Cloud::CloudControlsPartner::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details." - gem.summary = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-v1.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-v1.rb deleted file mode 100644 index 8a1d44564d43..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google-cloud-cloud_controls_partner-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/cloud_controls_partner/v1" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb deleted file mode 100644 index 0f081ef8c941..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring" -require "google/cloud/cloud_controls_partner/v1/version" - -module Google - module Cloud - module CloudControlsPartner - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/cloud_controls_partner/v1" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/cloud_controls_partner/v1" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/cloud_controls_partner/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb deleted file mode 100644 index f7633d8c43c7..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_controls_partner/v1/version" - -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" - -module Google - module Cloud - module CloudControlsPartner - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - module CloudControlsPartnerCore - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_controls_partner_core", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb deleted file mode 100644 index 111383c3c748..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/client.rb +++ /dev/null @@ -1,1504 +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/cloudcontrolspartner/v1/core_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerCore - ## - # Client for the CloudControlsPartnerCore service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_core_stub - - ## - # Configure the CloudControlsPartnerCore Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerCore clients - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_customer.timeout = 60.0 - default_config.rpcs.get_customer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_customers.timeout = 60.0 - default_config.rpcs.list_customers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_ekm_connections.timeout = 60.0 - default_config.rpcs.get_ekm_connections.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_partner_permissions.timeout = 60.0 - default_config.rpcs.get_partner_permissions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_access_approval_requests.timeout = 60.0 - default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_core_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerCore client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerCore 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/cloudcontrolspartner/v1/core_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_core_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_controls_partner_core_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_core_stub.logger - end - - # Service calls - - ## - # Gets details of a single workload - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest - - # Converts hash 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_workload.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::CloudControlsPartner::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_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customer workloads for a given customer org id - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param page_size [::Integer] - # The maximum number of workloads to return. The service may return fewer - # than this value. If unspecified, at most 500 workloads will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListWorkloads` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads 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::CloudControlsPartner::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest - - # Converts hash 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_workloads.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::CloudControlsPartner::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_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single customer - # - # @overload get_customer(request, options = nil) - # Pass arguments to `get_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `get_customer` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new - # - # # Call the get_customer method. - # result = client.get_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - # p result - # - def get_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_customer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customers of a partner identified by its Google Cloud organization ID - # - # @overload list_customers(request, options = nil) - # Pass arguments to `list_customers` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_customers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of Customers to return. The service may return fewer - # than this value. If unspecified, at most 500 Customers will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCustomers` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.new - # - # # Call the list_customers method. - # result = client.list_customers 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::CloudControlsPartner::V1::Customer. - # p item - # end - # - def list_customers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest - - # Converts hash 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_customers.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::CloudControlsPartner::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_customers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_customers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :list_customers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, 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 EKM connections associated with a workload - # - # @overload get_ekm_connections(request, options = nil) - # Pass arguments to `get_ekm_connections` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) - # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new - # - # # Call the get_ekm_connections method. - # result = client.get_ekm_connections request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::EkmConnections. - # p result - # - def get_ekm_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest - - # Converts hash 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_ekm_connections.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::CloudControlsPartner::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_ekm_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_ekm_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_ekm_connections, 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 the partner permissions granted for a workload - # - # @overload get_partner_permissions(request, options = nil) - # Pass arguments to `get_partner_permissions` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) - # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource to get in the format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new - # - # # Call the get_partner_permissions method. - # result = client.get_partner_permissions request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::PartnerPermissions. - # p result - # - def get_partner_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest - - # Converts hash 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_partner_permissions.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::CloudControlsPartner::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_partner_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_partner_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_partner_permissions, 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 - - ## - # Deprecated: Only returns access approval requests directly associated with - # an assured workload folder. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_access_approval_requests(request, options = nil) - # Pass arguments to `list_access_approval_requests` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of access requests to return. The service may - # return fewer than this value. If unspecified, at most 500 access requests - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent - # page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.new - # - # # Call the list_access_approval_requests method. - # result = client.list_access_approval_requests 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::CloudControlsPartner::V1::AccessApprovalRequest. - # p item - # end - # - def list_access_approval_requests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest - - # Converts hash 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_access_approval_requests.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::CloudControlsPartner::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_access_approval_requests.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_approval_requests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :list_access_approval_requests, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a Partner. - # - # @overload get_partner(request, options = nil) - # Pass arguments to `get_partner` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner(name: nil) - # Pass arguments to `get_partner` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/partner` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Partner] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Partner] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new - # - # # Call the get_partner method. - # result = client.get_partner request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Partner. - # p result - # - def get_partner request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest - - # Converts hash 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_partner.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::CloudControlsPartner::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_partner.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_partner.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_partner, 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 customer. - # - # @overload create_customer(request, options = nil) - # Pass arguments to `create_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) - # Pass arguments to `create_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] - # Required. The customer to create. - # @param customer_id [::String] - # Required. The customer id to use for the customer, which will become the - # final component of the customer's resource name. The specified value must - # be a valid Google cloud organization id. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new - # - # # Call the create_customer method. - # result = client.create_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - # p result - # - def create_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :create_customer, 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 - - ## - # Update details of a single customer - # - # @overload update_customer(request, options = nil) - # Pass arguments to `update_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) - # Pass arguments to `update_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] - # Required. The customer to update - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new - # - # # Call the update_customer method. - # result = client.update_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - # p result - # - def update_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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.customer&.name - header_params["customer.name"] = request.customer.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_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :update_customer, 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 - - ## - # Delete details of a single customer - # - # @overload delete_customer(request, options = nil) - # Pass arguments to `delete_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `delete_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. name of the resource to be deleted - # format: name=organizations/*/locations/*/customers/* - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new - # - # # Call the delete_customer method. - # result = client.delete_customer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :delete_customer, 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 CloudControlsPartnerCore API. - # - # This class represents the configuration for CloudControlsPartnerCore, - # 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.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::CloudControlsPartner::V1::CloudControlsPartnerCore::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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `get_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer - ## - # RPC-specific configuration for `list_customers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customers - ## - # RPC-specific configuration for `get_ekm_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ekm_connections - ## - # RPC-specific configuration for `get_partner_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner_permissions - ## - # RPC-specific configuration for `list_access_approval_requests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_approval_requests - ## - # RPC-specific configuration for `get_partner` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner - ## - # RPC-specific configuration for `create_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer - ## - # RPC-specific configuration for `update_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer - ## - # RPC-specific configuration for `delete_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer - - # @private - def initialize parent_rpcs = nil - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer - @get_customer = ::Gapic::Config::Method.new get_customer_config - list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers - @list_customers = ::Gapic::Config::Method.new list_customers_config - get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections - @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config - get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions - @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config - list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests - @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config - get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner - @get_partner = ::Gapic::Config::Method.new get_partner_config - create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer - @create_customer = ::Gapic::Config::Method.new create_customer_config - update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer - @update_customer = ::Gapic::Config::Method.new update_customer_config - delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer - @delete_customer = ::Gapic::Config::Method.new delete_customer_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb deleted file mode 100644 index e02c2662d0e3..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerCore - # Credentials for the CloudControlsPartnerCore API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb deleted file mode 100644 index 33445fcd9914..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths.rb +++ /dev/null @@ -1,149 +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 CloudControlsPartner - module V1 - module CloudControlsPartnerCore - # Path helper methods for the CloudControlsPartnerCore API. - module Paths - ## - # Create a fully-qualified Customer resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # - # @return [::String] - def customer_path organization:, location:, customer: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}" - end - - ## - # Create a fully-qualified EkmConnections resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def ekm_connections_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/ekmConnections" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Partner resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/partner` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def partner_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/partner" - end - - ## - # Create a fully-qualified PartnerPermissions resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def partner_permissions_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/partnerPermissions" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb deleted file mode 100644 index a84f2c823eb4..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest.rb +++ /dev/null @@ -1,52 +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/cloud_controls_partner/v1/version" - -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/credentials" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/paths" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client" - -module Google - module Cloud - module CloudControlsPartner - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - module CloudControlsPartnerCore - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb deleted file mode 100644 index ef32079a378f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/client.rb +++ /dev/null @@ -1,1382 +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/cloudcontrolspartner/v1/core_pb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerCore - module Rest - ## - # REST client for the CloudControlsPartnerCore service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_core_stub - - ## - # Configure the CloudControlsPartnerCore Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerCore clients - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_customer.timeout = 60.0 - default_config.rpcs.get_customer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_customers.timeout = 60.0 - default_config.rpcs.list_customers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_ekm_connections.timeout = 60.0 - default_config.rpcs.get_ekm_connections.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_partner_permissions.timeout = 60.0 - default_config.rpcs.get_partner_permissions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_access_approval_requests.timeout = 60.0 - default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_core_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerCore REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerCore client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_core_stub = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_controls_partner_core_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_core_stub.logger - end - - # Service calls - - ## - # Gets details of a single workload - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest - - # Converts hash 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_workload.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::CloudControlsPartner::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_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customer workloads for a given customer org id - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param page_size [::Integer] - # The maximum number of workloads to return. The service may return fewer - # than this value. If unspecified, at most 500 workloads will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListWorkloads` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Workload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads 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::CloudControlsPartner::V1::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest - - # Converts hash 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_workloads.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::CloudControlsPartner::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_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.list_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, "workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single customer - # - # @overload get_customer(request, options = nil) - # Pass arguments to `get_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `get_customer` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new - # - # # Call the get_customer method. - # result = client.get_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - # p result - # - def get_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_customer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customers of a partner identified by its Google Cloud organization ID - # - # @overload list_customers(request, options = nil) - # Pass arguments to `list_customers` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_customers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of Customers to return. The service may return fewer - # than this value. If unspecified, at most 500 Customers will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCustomers` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Customer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.new - # - # # Call the list_customers method. - # result = client.list_customers 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::CloudControlsPartner::V1::Customer. - # p item - # end - # - def list_customers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest - - # Converts hash 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_customers.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::CloudControlsPartner::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_customers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_customers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.list_customers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, "customers", 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 EKM connections associated with a workload - # - # @overload get_ekm_connections(request, options = nil) - # Pass arguments to `get_ekm_connections` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) - # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new - # - # # Call the get_ekm_connections method. - # result = client.get_ekm_connections request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::EkmConnections. - # p result - # - def get_ekm_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest - - # Converts hash 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_ekm_connections.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::CloudControlsPartner::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_ekm_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_ekm_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_ekm_connections 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 the partner permissions granted for a workload - # - # @overload get_partner_permissions(request, options = nil) - # Pass arguments to `get_partner_permissions` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) - # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource to get in the format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new - # - # # Call the get_partner_permissions method. - # result = client.get_partner_permissions request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::PartnerPermissions. - # p result - # - def get_partner_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest - - # Converts hash 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_partner_permissions.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::CloudControlsPartner::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_partner_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_partner_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_partner_permissions 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 - - ## - # Deprecated: Only returns access approval requests directly associated with - # an assured workload folder. - # - # @overload list_access_approval_requests(request, options = nil) - # Pass arguments to `list_access_approval_requests` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of access requests to return. The service may - # return fewer than this value. If unspecified, at most 500 access requests - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent - # page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.new - # - # # Call the list_access_approval_requests method. - # result = client.list_access_approval_requests 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::CloudControlsPartner::V1::AccessApprovalRequest. - # p item - # end - # - def list_access_approval_requests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest - - # Converts hash 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_access_approval_requests.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::CloudControlsPartner::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_access_approval_requests.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_approval_requests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.list_access_approval_requests request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, "access_approval_requests", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a Partner. - # - # @overload get_partner(request, options = nil) - # Pass arguments to `get_partner` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner(name: nil) - # Pass arguments to `get_partner` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/partner` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Partner] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Partner] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new - # - # # Call the get_partner method. - # result = client.get_partner request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Partner. - # p result - # - def get_partner request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest - - # Converts hash 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_partner.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::CloudControlsPartner::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_partner.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_partner.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_partner 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 customer. - # - # @overload create_customer(request, options = nil) - # Pass arguments to `create_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) - # Pass arguments to `create_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] - # Required. The customer to create. - # @param customer_id [::String] - # Required. The customer id to use for the customer, which will become the - # final component of the customer's resource name. The specified value must - # be a valid Google cloud organization id. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new - # - # # Call the create_customer method. - # result = client.create_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - # p result - # - def create_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.create_customer 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 - - ## - # Update details of a single customer - # - # @overload update_customer(request, options = nil) - # Pass arguments to `update_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) - # Pass arguments to `update_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::Google::Cloud::CloudControlsPartner::V1::Customer, ::Hash] - # Required. The customer to update - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new - # - # # Call the update_customer method. - # result = client.update_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - # p result - # - def update_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.update_customer 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 - - ## - # Delete details of a single customer - # - # @overload delete_customer(request, options = nil) - # Pass arguments to `delete_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `delete_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. name of the resource to be deleted - # format: name=organizations/*/locations/*/customers/* - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new - # - # # Call the delete_customer method. - # result = client.delete_customer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::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_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.delete_customer 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 CloudControlsPartnerCore REST API. - # - # This class represents the configuration for CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `get_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer - ## - # RPC-specific configuration for `list_customers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customers - ## - # RPC-specific configuration for `get_ekm_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ekm_connections - ## - # RPC-specific configuration for `get_partner_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner_permissions - ## - # RPC-specific configuration for `list_access_approval_requests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_approval_requests - ## - # RPC-specific configuration for `get_partner` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner - ## - # RPC-specific configuration for `create_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer - ## - # RPC-specific configuration for `update_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer - ## - # RPC-specific configuration for `delete_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer - - # @private - def initialize parent_rpcs = nil - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer - @get_customer = ::Gapic::Config::Method.new get_customer_config - list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers - @list_customers = ::Gapic::Config::Method.new list_customers_config - get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections - @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config - get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions - @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config - list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests - @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config - get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner - @get_partner = ::Gapic::Config::Method.new get_partner_config - create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer - @create_customer = ::Gapic::Config::Method.new create_customer_config - update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer - @update_customer = ::Gapic::Config::Method.new update_customer_config - delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer - @delete_customer = ::Gapic::Config::Method.new delete_customer_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb deleted file mode 100644 index f6067357e839..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest/service_stub.rb +++ /dev/null @@ -1,754 +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/cloudcontrolspartner/v1/core_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerCore - module Rest - ## - # REST service stub for the CloudControlsPartnerCore service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_workload REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest] - # 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::CloudControlsPartner::V1::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Workload] - # A result object deserialized from the server's reply - def get_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_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_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::Workload.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_workloads REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest] - # 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::CloudControlsPartner::V1::ListWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse] - # A result object deserialized from the server's reply - def list_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_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_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest] - # 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::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # A result object deserialized from the server's reply - def get_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customers REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest] - # 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::CloudControlsPartner::V1::ListCustomersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse] - # A result object deserialized from the server's reply - def list_customers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_customers_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_customers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse.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_ekm_connections REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest] - # 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::CloudControlsPartner::V1::EkmConnections] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnections] - # A result object deserialized from the server's reply - def get_ekm_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_ekm_connections_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_ekm_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::EkmConnections.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_partner_permissions REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest] - # 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::CloudControlsPartner::V1::PartnerPermissions] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions] - # A result object deserialized from the server's reply - def get_partner_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_permissions_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_partner_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions.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_access_approval_requests REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest] - # 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::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse] - # A result object deserialized from the server's reply - def list_access_approval_requests request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_approval_requests_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_access_approval_requests", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse.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_partner REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest] - # 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::CloudControlsPartner::V1::Partner] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Partner] - # A result object deserialized from the server's reply - def get_partner request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_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_partner", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::Partner.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest] - # 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::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # A result object deserialized from the server's reply - def create_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest] - # 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::CloudControlsPartner::V1::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # A result object deserialized from the server's reply - def update_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest] - # 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_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workload REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest] - # 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_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workloads", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_customers REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest] - # 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_customers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/customers", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_ekm_connections REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest] - # 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_ekm_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/ekmConnections/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_partner_permissions REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest] - # 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_partner_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/partnerPermissions/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_approval_requests REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest] - # 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_access_approval_requests_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/accessApprovalRequests", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_partner REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest] - # 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_partner_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/partner/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/customers", - body: "customer", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{customer.name}", - body: "customer", - matches: [ - ["customer.name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb deleted file mode 100644 index 79459bf48dc2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_controls_partner/v1/version" - -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" - -module Google - module Cloud - module CloudControlsPartner - module V1 - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new - # - module CloudControlsPartnerMonitoring - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_controls_partner_monitoring", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb deleted file mode 100644 index c8d1710e4630..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/client.rb +++ /dev/null @@ -1,605 +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/cloudcontrolspartner/v1/monitoring_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerMonitoring - ## - # Client for the CloudControlsPartnerMonitoring service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_monitoring_stub - - ## - # Configure the CloudControlsPartnerMonitoring Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerMonitoring clients - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_violations.timeout = 60.0 - default_config.rpcs.list_violations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_violation.timeout = 60.0 - default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_monitoring_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerMonitoring client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerMonitoring 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/cloudcontrolspartner/v1/monitoring_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_monitoring_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_controls_partner_monitoring_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_monitoring_stub.logger - end - - # Service calls - - ## - # Lists Violations for a workload - # Callers may also choose to read across multiple Customers or for a single - # customer as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of \\{customer} & \\{workload}. - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @overload list_violations(request, options = nil) - # Pass arguments to `list_violations` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) - # Pass arguments to `list_violations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of customers row to return. The service may - # return fewer than this value. If unspecified, at most 10 customers will be - # returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListViolations` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @param interval [::Google::Type::Interval, ::Hash] - # Optional. Specifies the interval for retrieving violations. - # if unspecified, all violations will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new - # - # # Call the list_violations method. - # result = client.list_violations 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::CloudControlsPartner::V1::Violation. - # p item - # end - # - def list_violations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest - - # Converts hash 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_violations.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::CloudControlsPartner::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_violations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_violations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.call_rpc :list_violations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Violation. - # - # @overload get_violation(request, options = nil) - # Pass arguments to `get_violation` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violation(name: nil) - # Pass arguments to `get_violation` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1::Violation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new - # - # # Call the get_violation method. - # result = client.get_violation request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Violation. - # p result - # - def get_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest - - # Converts hash 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_violation.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::CloudControlsPartner::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_violation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.call_rpc :get_violation, 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 CloudControlsPartnerMonitoring API. - # - # This class represents the configuration for CloudControlsPartnerMonitoring, - # 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_violations - ## - # RPC-specific configuration for `get_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_violation - - # @private - def initialize parent_rpcs = nil - list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations - @list_violations = ::Gapic::Config::Method.new list_violations_config - get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation - @get_violation = ::Gapic::Config::Method.new get_violation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb deleted file mode 100644 index 3c65665d39f2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerMonitoring - # Credentials for the CloudControlsPartnerMonitoring API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb deleted file mode 100644 index dcbadc742464..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths.rb +++ /dev/null @@ -1,77 +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 CloudControlsPartner - module V1 - module CloudControlsPartnerMonitoring - # Path helper methods for the CloudControlsPartnerMonitoring API. - module Paths - ## - # Create a fully-qualified Violation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # @param violation [String] - # - # @return [::String] - def violation_path organization:, location:, customer:, workload:, violation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/violations/#{violation}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb deleted file mode 100644 index f9da9cf55bb1..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest.rb +++ /dev/null @@ -1,52 +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/cloud_controls_partner/v1/version" - -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/credentials" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/paths" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client" - -module Google - module Cloud - module CloudControlsPartner - module V1 - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new - # - module CloudControlsPartnerMonitoring - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb deleted file mode 100644 index 21a1f9396290..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/client.rb +++ /dev/null @@ -1,548 +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/cloudcontrolspartner/v1/monitoring_pb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerMonitoring - module Rest - ## - # REST client for the CloudControlsPartnerMonitoring service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_monitoring_stub - - ## - # Configure the CloudControlsPartnerMonitoring Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerMonitoring clients - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_violations.timeout = 60.0 - default_config.rpcs.list_violations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_violation.timeout = 60.0 - default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_monitoring_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerMonitoring REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerMonitoring client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_monitoring_stub = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_controls_partner_monitoring_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_monitoring_stub.logger - end - - # Service calls - - ## - # Lists Violations for a workload - # Callers may also choose to read across multiple Customers or for a single - # customer as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of \\{customer} & \\{workload}. - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @overload list_violations(request, options = nil) - # Pass arguments to `list_violations` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) - # Pass arguments to `list_violations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of customers row to return. The service may - # return fewer than this value. If unspecified, at most 10 customers will be - # returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListViolations` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @param interval [::Google::Type::Interval, ::Hash] - # Optional. Specifies the interval for retrieving violations. - # if unspecified, all violations will be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1::Violation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new - # - # # Call the list_violations method. - # result = client.list_violations 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::CloudControlsPartner::V1::Violation. - # p item - # end - # - def list_violations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest - - # Converts hash 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_violations.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::CloudControlsPartner::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_violations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_violations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.list_violations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, "violations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Violation. - # - # @overload get_violation(request, options = nil) - # Pass arguments to `get_violation` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violation(name: nil) - # Pass arguments to `get_violation` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1::Violation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new - # - # # Call the get_violation method. - # result = client.get_violation request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Violation. - # p result - # - def get_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest - - # Converts hash 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_violation.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::CloudControlsPartner::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_violation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.get_violation 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 CloudControlsPartnerMonitoring REST API. - # - # This class represents the configuration for CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_violations - ## - # RPC-specific configuration for `get_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_violation - - # @private - def initialize parent_rpcs = nil - list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations - @list_violations = ::Gapic::Config::Method.new list_violations_config - get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation - @get_violation = ::Gapic::Config::Method.new get_violation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb deleted file mode 100644 index 3bebb5bd5e3d..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest/service_stub.rb +++ /dev/null @@ -1,203 +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/cloudcontrolspartner/v1/monitoring_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerMonitoring - module Rest - ## - # REST service stub for the CloudControlsPartnerMonitoring 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_violations REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest] - # 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::CloudControlsPartner::V1::ListViolationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse] - # A result object deserialized from the server's reply - def list_violations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_violations_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_violations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse.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_violation REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest] - # 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::CloudControlsPartner::V1::Violation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation] - # A result object deserialized from the server's reply - def get_violation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_violation_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_violation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1::Violation.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_violations REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest] - # 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_violations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/violations", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_violation REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest] - # 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_violation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/violations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb deleted file mode 100644 index fd5df820859c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" -require "google/cloud/cloud_controls_partner/v1/version" - -module Google - module Cloud - module CloudControlsPartner - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/cloud_controls_partner/v1/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/version.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/v1/version.rb deleted file mode 100644 index 4b918f0e53ff..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloud_controls_partner/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 CloudControlsPartner - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb deleted file mode 100644 index 3641ff686ac5..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/access_approval_requests_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/access_approval_requests.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nCgoogle/cloud/cloudcontrolspartner/v1/access_approval_requests.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe9\x03\n\x15\x41\x63\x63\x65ssApprovalRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12L\n\x10requested_reason\x18\x03 \x01(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1.AccessReason\x12=\n\x19requested_expiration_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xfd\x01\xea\x41\xf9\x01\n9cloudcontrolspartner.googleapis.com/AccessApprovalRequest\x12\x8c\x01organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}*\x16\x61\x63\x63\x65ssApprovalRequests2\x15\x61\x63\x63\x65ssApprovalRequest\"\xd3\x01\n!ListAccessApprovalRequestsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39\x63loudcontrolspartner.googleapis.com/AccessApprovalRequest\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\"\xb1\x01\n\"ListAccessApprovalRequestsResponse\x12]\n\x18\x61\x63\x63\x65ss_approval_requests\x18\x01 \x03(\x0b\x32;.google.cloud.cloudcontrolspartner.v1.AccessApprovalRequest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc2\x02\n\x0c\x41\x63\x63\x65ssReason\x12\x45\n\x04type\x18\x01 \x01(\x0e\x32\x37.google.cloud.cloudcontrolspartner.v1.AccessReason.Type\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xda\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43USTOMER_INITIATED_SUPPORT\x10\x01\x12\x1c\n\x18GOOGLE_INITIATED_SERVICE\x10\x02\x12\x1b\n\x17GOOGLE_INITIATED_REVIEW\x10\x03\x12\x1c\n\x18THIRD_PARTY_DATA_REQUEST\x10\x04\x12\'\n#GOOGLE_RESPONSE_TO_PRODUCTION_ALERT\x10\x05\x12\x1a\n\x16\x43LOUD_INITIATED_ACCESS\x10\x06\x42\x9f\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x1b\x41\x63\x63\x65ssApprovalRequestsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - AccessApprovalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.AccessApprovalRequest").msgclass - ListAccessApprovalRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest").msgclass - ListAccessApprovalRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsResponse").msgclass - AccessReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.AccessReason").msgclass - AccessReason::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.AccessReason.Type").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb deleted file mode 100644 index 4e4ac51dd617..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/completion_state_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/completion_state.proto - -require 'google/protobuf' - - -descriptor_data = "\n;google/cloud/cloudcontrolspartner/v1/completion_state.proto\x12$google.cloud.cloudcontrolspartner.v1*o\n\x0f\x43ompletionState\x12 \n\x1c\x43OMPLETION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x12\n\x0eNOT_APPLICABLE\x10\x04\x42\x98\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x14\x43ompletionStateProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - CompletionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CompletionState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb deleted file mode 100644 index bc9bf98de3c9..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/core.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/cloudcontrolspartner/v1/access_approval_requests_pb' -require 'google/cloud/cloudcontrolspartner/v1/customer_workloads_pb' -require 'google/cloud/cloudcontrolspartner/v1/customers_pb' -require 'google/cloud/cloudcontrolspartner/v1/ekm_connections_pb' -require 'google/cloud/cloudcontrolspartner/v1/partner_permissions_pb' -require 'google/cloud/cloudcontrolspartner/v1/partners_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/cloudcontrolspartner/v1/core.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x43google/cloud/cloudcontrolspartner/v1/access_approval_requests.proto\x1a=google/cloud/cloudcontrolspartner/v1/customer_workloads.proto\x1a\x34google/cloud/cloudcontrolspartner/v1/customers.proto\x1a:google/cloud/cloudcontrolspartner/v1/ekm_connections.proto\x1a>google/cloud/cloudcontrolspartner/v1/partner_permissions.proto\x1a\x33google/cloud/cloudcontrolspartner/v1/partners.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\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\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xd3\x13\n\x18\x43loudControlsPartnerCore\x12\xc6\x01\n\x0bGetWorkload\x12\x38.google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest\x1a..google.cloud.cloudcontrolspartner.v1.Workload\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=organizations/*/locations/*/customers/*/workloads/*}\x12\xd9\x01\n\rListWorkloads\x12:.google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest\x1a;.google.cloud.cloudcontrolspartner.v1.ListWorkloadsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=organizations/*/locations/*/customers/*}/workloads\x12\xba\x01\n\x0bGetCustomer\x12\x38.google.cloud.cloudcontrolspartner.v1.GetCustomerRequest\x1a..google.cloud.cloudcontrolspartner.v1.Customer\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=organizations/*/locations/*/customers/*}\x12\xcd\x01\n\rListCustomers\x12:.google.cloud.cloudcontrolspartner.v1.ListCustomersRequest\x1a;.google.cloud.cloudcontrolspartner.v1.ListCustomersResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=organizations/*/locations/*}/customers\x12\xe7\x01\n\x11GetEkmConnections\x12>.google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest\x1a\x34.google.cloud.cloudcontrolspartner.v1.EkmConnections\"\\\xda\x41\x04name\x82\xd3\xe4\x93\x02O\x12M/v1/{name=organizations/*/locations/*/customers/*/workloads/*/ekmConnections}\x12\xf7\x01\n\x15GetPartnerPermissions\x12\x42.google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest\x1a\x38.google.cloud.cloudcontrolspartner.v1.PartnerPermissions\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\x12Q/v1/{name=organizations/*/locations/*/customers/*/workloads/*/partnerPermissions}\x12\x9c\x02\n\x1aListAccessApprovalRequests\x12G.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsRequest\x1aH.google.cloud.cloudcontrolspartner.v1.ListAccessApprovalRequestsResponse\"k\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02Y\x12W/v1/{parent=organizations/*/locations/*/customers/*/workloads/*}/accessApprovalRequests\x12\xb3\x01\n\nGetPartner\x12\x37.google.cloud.cloudcontrolspartner.v1.GetPartnerRequest\x1a-.google.cloud.cloudcontrolspartner.v1.Partner\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=organizations/*/locations/*/partner}\x12\xe1\x01\n\x0e\x43reateCustomer\x12;.google.cloud.cloudcontrolspartner.v1.CreateCustomerRequest\x1a..google.cloud.cloudcontrolspartner.v1.Customer\"b\xda\x41\x1bparent,customer,customer_id\x82\xd3\xe4\x93\x02>\"2/v1/{parent=organizations/*/locations/*}/customers:\x08\x63ustomer\x12\xe3\x01\n\x0eUpdateCustomer\x12;.google.cloud.cloudcontrolspartner.v1.UpdateCustomerRequest\x1a..google.cloud.cloudcontrolspartner.v1.Customer\"d\xda\x41\x14\x63ustomer,update_mask\x82\xd3\xe4\x93\x02G2;/v1/{customer.name=organizations/*/locations/*/customers/*}:\x08\x63ustomer\x12\xa8\x01\n\x0e\x44\x65leteCustomer\x12;.google.cloud.cloudcontrolspartner.v1.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=organizations/*/locations/*/customers/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfd\x02\n(com.google.cloud.cloudcontrolspartner.v1B\tCoreProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1\xea\x41m\n8cloudcontrolspartner.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb deleted file mode 100644 index ed54cd6f0ff2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/core_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudcontrolspartner/v1/core.proto for package 'Google.Cloud.CloudControlsPartner.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1/core_pb' - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerCore - # Service describing handlers for resources - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore' - - # Gets details of a single workload - rpc :GetWorkload, ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, ::Google::Cloud::CloudControlsPartner::V1::Workload - # Lists customer workloads for a given customer org id - rpc :ListWorkloads, ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse - # Gets details of a single customer - rpc :GetCustomer, ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1::Customer - # Lists customers of a partner identified by its Google Cloud organization ID - rpc :ListCustomers, ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse - # Gets the EKM connections associated with a workload - rpc :GetEkmConnections, ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, ::Google::Cloud::CloudControlsPartner::V1::EkmConnections - # Gets the partner permissions granted for a workload - rpc :GetPartnerPermissions, ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions - # Deprecated: Only returns access approval requests directly associated with - # an assured workload folder. - rpc :ListAccessApprovalRequests, ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse - # Get details of a Partner. - rpc :GetPartner, ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, ::Google::Cloud::CloudControlsPartner::V1::Partner - # Creates a new customer. - rpc :CreateCustomer, ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1::Customer - # Update details of a single customer - rpc :UpdateCustomer, ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1::Customer - # Delete details of a single customer - rpc :DeleteCustomer, ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb deleted file mode 100644 index ee435a4499d2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customer_workloads_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/customer_workloads.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudcontrolspartner/v1/completion_state_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n=google/cloud/cloudcontrolspartner/v1/customer_workloads.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/cloudcontrolspartner/v1/completion_state.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc2\x06\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tfolder_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x66older\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12`\n\x19workload_onboarding_state\x18\x05 \x01(\x0b\x32=.google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingState\x12\x14\n\x0cis_onboarded\x18\x06 \x01(\x08\x12!\n\x19key_management_project_id\x18\x07 \x01(\t\x12\x10\n\x08location\x18\x08 \x01(\t\x12G\n\x07partner\x18\t \x01(\x0e\x32\x36.google.cloud.cloudcontrolspartner.v1.Workload.Partner\"\xa2\x02\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\"\n\x1ePARTNER_LOCAL_CONTROLS_BY_S3NS\x10\x01\x12+\n\'PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS\x10\x02\x12-\n)PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT\x10\x03\x12%\n!PARTNER_SOVEREIGN_CONTROLS_BY_PSN\x10\x04\x12\'\n#PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT\x10\x06\x12.\n*PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM\x10\x07:\xa4\x01\xea\x41\xa0\x01\n,cloudcontrolspartner.googleapis.com/Workload\x12[organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}*\tworkloads2\x08workload\"\xaf\x01\n\x14ListWorkloadsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x88\x01\n\x15ListWorkloadsResponse\x12\x41\n\tworkloads\x18\x01 \x03(\x0b\x32..google.cloud.cloudcontrolspartner.v1.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x12GetWorkloadRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Workload\"q\n\x17WorkloadOnboardingState\x12V\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32<.google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep\"\xfe\x02\n\x16WorkloadOnboardingStep\x12O\n\x04step\x18\x01 \x01(\x0e\x32\x41.google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x35.google.cloud.cloudcontrolspartner.v1.CompletionStateB\x03\xe0\x41\x03\"X\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45KM_PROVISIONED\x10\x01\x12%\n!SIGNED_ACCESS_APPROVAL_CONFIGURED\x10\x02\x42\x9a\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x16\x43ustomerWorkloadsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Workload").msgclass - Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Workload.Partner").enummodule - ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListWorkloadsRequest").msgclass - ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListWorkloadsResponse").msgclass - GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetWorkloadRequest").msgclass - WorkloadOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingState").msgclass - WorkloadOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep").msgclass - WorkloadOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.WorkloadOnboardingStep.Step").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb deleted file mode 100644 index 2059551b6d72..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/customers_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/customers.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudcontrolspartner/v1/completion_state_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/cloudcontrolspartner/v1/customers.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a;google/cloud/cloudcontrolspartner/v1/completion_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xee\x02\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x65\n\x19\x63ustomer_onboarding_state\x18\x03 \x01(\x0b\x32=.google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStateB\x03\xe0\x41\x03\x12\x19\n\x0cis_onboarded\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12 \n\x13organization_domain\x18\x05 \x01(\tB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n,cloudcontrolspartner.googleapis.com/Customer\x12\x46organizations/{organization}/locations/{location}/customers/{customer}*\tcustomers2\x08\x63ustomer\"\xaf\x01\n\x14ListCustomersRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x88\x01\n\x15ListCustomersResponse\x12\x41\n\tcustomers\x18\x01 \x03(\x0b\x32..google.cloud.cloudcontrolspartner.v1.Customer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbe\x01\n\x15\x43reateCustomerRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12\x45\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32..google.cloud.cloudcontrolspartner.v1.CustomerB\x03\xe0\x41\x02\x12\x18\n\x0b\x63ustomer_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"X\n\x12GetCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Customer\"q\n\x17\x43ustomerOnboardingState\x12V\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32<.google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep\"\xf0\x02\n\x16\x43ustomerOnboardingStep\x12O\n\x04step\x18\x01 \x01(\x0e\x32\x41.google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12T\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x35.google.cloud.cloudcontrolspartner.v1.CompletionStateB\x03\xe0\x41\x03\"J\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x12\n\x0eKAJ_ENROLLMENT\x10\x01\x12\x18\n\x14\x43USTOMER_ENVIRONMENT\x10\x02\"\x94\x01\n\x15UpdateCustomerRequest\x12\x45\n\x08\x63ustomer\x18\x01 \x01(\x0b\x32..google.cloud.cloudcontrolspartner.v1.CustomerB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x15\x44\x65leteCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/CustomerB\x92\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x0e\x43ustomersProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Customer").msgclass - ListCustomersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListCustomersRequest").msgclass - ListCustomersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListCustomersResponse").msgclass - CreateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CreateCustomerRequest").msgclass - GetCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetCustomerRequest").msgclass - CustomerOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CustomerOnboardingState").msgclass - CustomerOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep").msgclass - CustomerOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.CustomerOnboardingStep.Step").enummodule - UpdateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.UpdateCustomerRequest").msgclass - DeleteCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.DeleteCustomerRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb deleted file mode 100644 index 3ff330de7af0..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/ekm_connections_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/ekm_connections.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n:google/cloud/cloudcontrolspartner/v1/ekm_connections.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x98\x02\n\x0e\x45kmConnections\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x0f\x65km_connections\x18\x02 \x03(\x0b\x32\x33.google.cloud.cloudcontrolspartner.v1.EkmConnection:\xa4\x01\xea\x41\xa0\x01\n2cloudcontrolspartner.googleapis.com/EkmConnections\x12jorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections\"d\n\x18GetEkmConnectionsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2cloudcontrolspartner.googleapis.com/EkmConnections\"\xa4\x03\n\rEkmConnection\x12\x17\n\x0f\x63onnection_name\x18\x01 \x01(\t\x12\x62\n\x10\x63onnection_state\x18\x02 \x01(\x0e\x32\x43.google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionStateB\x03\xe0\x41\x03\x12]\n\x10\x63onnection_error\x18\x03 \x01(\x0b\x32\x43.google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionError\x1a>\n\x0f\x43onnectionError\x12\x14\n\x0c\x65rror_domain\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\"w\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\x11\n\rNOT_AVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\x97\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x13\x45kmConnectionsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - EkmConnections = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnections").msgclass - GetEkmConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetEkmConnectionsRequest").msgclass - EkmConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnection").msgclass - EkmConnection::ConnectionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionError").msgclass - EkmConnection::ConnectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmConnection.ConnectionState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb deleted file mode 100644 index 25a80bcad97d..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/monitoring.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/cloudcontrolspartner/v1/violations_pb' - - -descriptor_data = "\n5google/cloud/cloudcontrolspartner/v1/monitoring.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x35google/cloud/cloudcontrolspartner/v1/violations.proto2\xbe\x04\n\x1e\x43loudControlsPartnerMonitoring\x12\xe9\x01\n\x0eListViolations\x12;.google.cloud.cloudcontrolspartner.v1.ListViolationsRequest\x1a<.google.cloud.cloudcontrolspartner.v1.ListViolationsResponse\"\\\xda\x41\x06parent\x82\xd3\xe4\x93\x02M\x12K/v1/{parent=organizations/*/locations/*/customers/*/workloads/*}/violations\x12\xd6\x01\n\x0cGetViolation\x12\x39.google.cloud.cloudcontrolspartner.v1.GetViolationRequest\x1a/.google.cloud.cloudcontrolspartner.v1.Violation\"Z\xda\x41\x04name\x82\xd3\xe4\x93\x02M\x12K/v1/{name=organizations/*/locations/*/customers/*/workloads/*/violations/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x93\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x0fMonitoringProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb deleted file mode 100644 index 0c721df0f898..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/monitoring_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudcontrolspartner/v1/monitoring.proto for package 'Google.Cloud.CloudControlsPartner.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1/monitoring_pb' - -module Google - module Cloud - module CloudControlsPartner - module V1 - module CloudControlsPartnerMonitoring - # Service describing handlers for resources - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring' - - # Lists Violations for a workload - # Callers may also choose to read across multiple Customers or for a single - # customer as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of {customer} & {workload}. - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - rpc :ListViolations, ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse - # Gets details of a single Violation. - rpc :GetViolation, ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, ::Google::Cloud::CloudControlsPartner::V1::Violation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb deleted file mode 100644 index 02bceae6486a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partner_permissions_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/partner_permissions.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n>google/cloud/cloudcontrolspartner/v1/partner_permissions.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb5\x04\n\x12PartnerPermissions\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12`\n\x13partner_permissions\x18\x02 \x03(\x0e\x32\x43.google.cloud.cloudcontrolspartner.v1.PartnerPermissions.Permission\"\xfa\x01\n\nPermission\x12\x1a\n\x16PERMISSION_UNSPECIFIED\x10\x00\x12\x31\n-ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS\x10\x01\x12 \n\x1c\x41SSURED_WORKLOADS_MONITORING\x10\x02\x12\x1c\n\x18\x41\x43\x43\x45SS_APPROVAL_REQUESTS\x10\x03\x12+\n\'ASSURED_WORKLOADS_EKM_CONNECTION_STATUS\x10\x04\x12\x30\n,ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER\x10\x05:\xac\x01\xea\x41\xa8\x01\n6cloudcontrolspartner.googleapis.com/PartnerPermissions\x12norganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions\"l\n\x1cGetPartnerPermissionsRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6cloudcontrolspartner.googleapis.com/PartnerPermissionsB\x9b\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x17PartnerPermissionsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - PartnerPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.PartnerPermissions").msgclass - PartnerPermissions::Permission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.PartnerPermissions.Permission").enummodule - GetPartnerPermissionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetPartnerPermissionsRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb deleted file mode 100644 index 2df1e161f7bd..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/partners_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/partners.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/cloudcontrolspartner/v1/partners.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x03\n\x07Partner\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x37\n\x04skus\x18\x03 \x03(\x0b\x32).google.cloud.cloudcontrolspartner.v1.Sku\x12H\n\rekm_solutions\x18\x04 \x03(\x0b\x32\x31.google.cloud.cloudcontrolspartner.v1.EkmMetadata\x12\x1e\n\x16operated_cloud_regions\x18\x05 \x03(\t\x12\x1a\n\x12partner_project_id\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:t\xea\x41q\n+cloudcontrolspartner.googleapis.com/Partner\x12\x39organizations/{organization}/locations/{location}/partner2\x07partner\"V\n\x11GetPartnerRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudcontrolspartner.googleapis.com/Partner\"\'\n\x03Sku\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xe0\x01\n\x0b\x45kmMetadata\x12S\n\x0c\x65km_solution\x18\x01 \x01(\x0e\x32=.google.cloud.cloudcontrolspartner.v1.EkmMetadata.EkmSolution\x12\x18\n\x10\x65km_endpoint_uri\x18\x02 \x01(\t\"b\n\x0b\x45kmSolution\x12\x1c\n\x18\x45KM_SOLUTION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46ORTANIX\x10\x01\x12\x0b\n\x07\x46UTUREX\x10\x02\x12\n\n\x06THALES\x10\x03\x12\x0e\n\x06VIRTRU\x10\x04\x1a\x02\x08\x01\x42\x91\x02\n(com.google.cloud.cloudcontrolspartner.v1B\rPartnersProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Partner").msgclass - GetPartnerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetPartnerRequest").msgclass - Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Sku").msgclass - EkmMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmMetadata").msgclass - EkmMetadata::EkmSolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.EkmMetadata.EkmSolution").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb deleted file mode 100644 index 5250447bae6a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/lib/google/cloud/cloudcontrolspartner/v1/violations_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1/violations.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n5google/cloud/cloudcontrolspartner/v1/violations.proto\x12$google.cloud.cloudcontrolspartner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xa1\r\n\tViolation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_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\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12I\n\x05state\x18\x07 \x01(\x0e\x32\x35.google.cloud.cloudcontrolspartner.v1.Violation.StateB\x03\xe0\x41\x03\x12(\n\x18non_compliant_org_policy\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x11\n\tfolder_id\x18\t \x01(\x03\x12U\n\x0bremediation\x18\r \x01(\x0b\x32;.google.cloud.cloudcontrolspartner.v1.Violation.RemediationB\x03\xe0\x41\x03\x1a\xc0\x07\n\x0bRemediation\x12\x63\n\x0cinstructions\x18\x01 \x01(\x0b\x32H.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12j\n\x10remediation_type\x18\x03 \x01(\x0e\x32K.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\x82\x03\n\x0cInstructions\x12l\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32O.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Gcloud\x12n\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32P.google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\xc0\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\x12\"\n\x1eREMEDIATION_RESOURCE_VIOLATION\x10\x05\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x01\x12\x0e\n\nUNRESOLVED\x10\x02\x12\r\n\tEXCEPTION\x10\x03:\xbe\x01\xea\x41\xba\x01\n-cloudcontrolspartner.googleapis.com/Violation\x12rorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}*\nviolations2\tviolation\"\xe9\x01\n\x15ListViolationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-cloudcontrolspartner.googleapis.com/Violation\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\x12,\n\x08interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\"\x8b\x01\n\x16ListViolationsResponse\x12\x43\n\nviolations\x18\x01 \x03(\x0b\x32/.google.cloud.cloudcontrolspartner.v1.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Z\n\x13GetViolationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-cloudcontrolspartner.googleapis.com/ViolationB\x93\x02\n(com.google.cloud.cloudcontrolspartner.v1B\x0fViolationsProtoP\x01Z\\cloud.google.com/go/cloudcontrolspartner/apiv1/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02$Google.Cloud.CloudControlsPartner.V1\xca\x02$Google\\Cloud\\CloudControlsPartner\\V1\xea\x02\'Google::Cloud::CloudControlsPartner::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1 - Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation").msgclass - Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation").msgclass - Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions").msgclass - Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Gcloud").msgclass - Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.Instructions.Console").msgclass - Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.Remediation.RemediationType").enummodule - Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.Violation.State").enummodule - ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListViolationsRequest").msgclass - ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.ListViolationsResponse").msgclass - GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1.GetViolationRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md deleted file mode 100644 index d6f4544cf2de..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Controls Partner 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-cloud_controls_partner-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb deleted file mode 100644 index e421293d389b..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/access_approval_requests.rb +++ /dev/null @@ -1,143 +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 CloudControlsPartner - module V1 - # Details about the Access request. - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}` - # @!attribute [rw] request_time - # @return [::Google::Protobuf::Timestamp] - # The time at which approval was requested. - # @!attribute [rw] requested_reason - # @return [::Google::Cloud::CloudControlsPartner::V1::AccessReason] - # The justification for which approval is being requested. - # @!attribute [rw] requested_expiration_time - # @return [::Google::Protobuf::Timestamp] - # The requested expiration for the approval. If the request is approved, - # access will be granted from the time of approval until the expiration time. - class AccessApprovalRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting the access requests associated with a workload. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of access requests to return. The service may - # return fewer than this value. If unspecified, at most 500 access requests - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent - # page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListAccessApprovalRequestsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list access requests. - # @!attribute [rw] access_approval_requests - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::AccessApprovalRequest>] - # List of access approval requests - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAccessApprovalRequestsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Reason for the access. - # @!attribute [rw] type - # @return [::Google::Cloud::CloudControlsPartner::V1::AccessReason::Type] - # Type of access justification. - # @!attribute [rw] detail - # @return [::String] - # More detail about certain reason types. See comments for each type above. - class AccessReason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of access justification. - module Type - # Default value for proto, shouldn't be used. - TYPE_UNSPECIFIED = 0 - - # Customer made a request or raised an issue that required the principal to - # access customer data. `detail` is of the form ("#####" is the issue ID): - # - # - "Feedback Report: #####" - # - "Case Number: #####" - # - "Case ID: #####" - # - "E-PIN Reference: #####" - # - "Google-#####" - # - "T-#####" - CUSTOMER_INITIATED_SUPPORT = 1 - - # The principal accessed customer data in order to diagnose or resolve a - # suspected issue in services. Often this access is used to confirm that - # customers are not affected by a suspected service issue or to remediate a - # reversible system issue. - GOOGLE_INITIATED_SERVICE = 2 - - # Google initiated service for security, fraud, abuse, or compliance - # purposes. - GOOGLE_INITIATED_REVIEW = 3 - - # The principal was compelled to access customer data in order to respond - # to a legal third party data request or process, including legal processes - # from customers themselves. - THIRD_PARTY_DATA_REQUEST = 4 - - # The principal accessed customer data in order to diagnose or resolve a - # suspected issue in services or a known outage. - GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 5 - - # Similar to 'GOOGLE_INITIATED_SERVICE' or 'GOOGLE_INITIATED_REVIEW', but - # with universe agnostic naming. The principal accessed customer data in - # order to diagnose or resolve a suspected issue in services or a known - # outage, or for security, fraud, abuse, or compliance review purposes. - CLOUD_INITIATED_ACCESS = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb deleted file mode 100644 index 9eba2e93c76c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/completion_state.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudControlsPartner - module V1 - # Enum for possible completion states. - module CompletionState - # Unspecified completion state. - COMPLETION_STATE_UNSPECIFIED = 0 - - # Task started (has start date) but not yet completed. - PENDING = 1 - - # Succeeded state. - SUCCEEDED = 2 - - # Failed state. - FAILED = 3 - - # Not applicable state. - NOT_APPLICABLE = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb deleted file mode 100644 index 8c4ed960d60e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/core.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudControlsPartner - module V1 - # 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_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [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-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb deleted file mode 100644 index 8613fad349b8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customer_workloads.rb +++ /dev/null @@ -1,177 +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 CloudControlsPartner - module V1 - # Contains metadata around the [Workload - # resource](https://cloud.google.com/assured-workloads/docs/reference/rest/Shared.Types/Workload) - # in the Assured Workloads API. - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @!attribute [r] folder_id - # @return [::Integer] - # Output only. Folder id this workload is associated with - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the resource was created. - # @!attribute [r] folder - # @return [::String] - # Output only. The name of container folder of the assured workload - # @!attribute [rw] workload_onboarding_state - # @return [::Google::Cloud::CloudControlsPartner::V1::WorkloadOnboardingState] - # Container for workload onboarding steps. - # @!attribute [rw] is_onboarded - # @return [::Boolean] - # Indicates whether a workload is fully onboarded. - # @!attribute [rw] key_management_project_id - # @return [::String] - # The project id of the key management project for the workload - # @!attribute [rw] location - # @return [::String] - # The Google Cloud location of the workload - # @!attribute [rw] partner - # @return [::Google::Cloud::CloudControlsPartner::V1::Workload::Partner] - # Partner associated with this workload. - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported Assured Workloads Partners. - module Partner - # Unknown Partner. - PARTNER_UNSPECIFIED = 0 - - # Enum representing S3NS (Thales) partner. - PARTNER_LOCAL_CONTROLS_BY_S3NS = 1 - - # Enum representing T_SYSTEM (TSI) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS = 2 - - # Enum representing SIA_MINSAIT (Indra) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 3 - - # Enum representing PSN (TIM) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_PSN = 4 - - # Enum representing CNTXT (Kingdom of Saudi Arabia) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT = 6 - - # Enum representing CNXT (Kingdom of Saudi Arabia) partner offering without - # EKM provisioning. - PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7 - end - end - - # Request to list customer workloads. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of workloads to return. The service may return fewer - # than this value. If unspecified, at most 500 workloads will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListWorkloads` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list customer workloads requests. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Workload>] - # List of customer workloads - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a customer workload. - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for workload onboarding steps. - # @!attribute [rw] onboarding_steps - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::WorkloadOnboardingStep>] - # List of workload onboarding steps. - class WorkloadOnboardingState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for workload onboarding information. - # @!attribute [rw] step - # @return [::Google::Cloud::CloudControlsPartner::V1::WorkloadOnboardingStep::Step] - # The onboarding step. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The starting time of the onboarding step. - # @!attribute [rw] completion_time - # @return [::Google::Protobuf::Timestamp] - # The completion time of the onboarding step. - # @!attribute [r] completion_state - # @return [::Google::Cloud::CloudControlsPartner::V1::CompletionState] - # Output only. The completion state of the onboarding step. - class WorkloadOnboardingStep - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for possible onboarding steps. - module Step - # Unspecified step. - STEP_UNSPECIFIED = 0 - - # EKM Provisioned step. - EKM_PROVISIONED = 1 - - # Signed Access Approval step. - SIGNED_ACCESS_APPROVAL_CONFIGURED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb deleted file mode 100644 index 79358616c1ac..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/customers.rb +++ /dev/null @@ -1,180 +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 CloudControlsPartner - module V1 - # Contains metadata around a Cloud Controls Partner Customer - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name for the customer - # @!attribute [r] customer_onboarding_state - # @return [::Google::Cloud::CloudControlsPartner::V1::CustomerOnboardingState] - # Output only. Container for customer onboarding steps - # @!attribute [r] is_onboarded - # @return [::Boolean] - # Output only. Indicates whether a customer is fully onboarded - # @!attribute [r] organization_domain - # @return [::String] - # Output only. The customer organization domain, extracted from - # CRM Organization’s display_name field. e.g. "google.com" - class Customer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list customers - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of Customers to return. The service may return fewer - # than this value. If unspecified, at most 500 Customers will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListCustomers` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListCustomersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list customer Customers requests - # @!attribute [rw] customers - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Customer>] - # List of customers - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListCustomersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a customer - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @!attribute [rw] customer - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # Required. The customer to create. - # @!attribute [rw] customer_id - # @return [::String] - # Required. The customer id to use for the customer, which will become the - # final component of the customer's resource name. The specified value must - # be a valid Google cloud organization id. - class CreateCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a customer - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - class GetCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for customer onboarding steps - # @!attribute [rw] onboarding_steps - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::CustomerOnboardingStep>] - # List of customer onboarding steps - class CustomerOnboardingState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for customer onboarding information - # @!attribute [rw] step - # @return [::Google::Cloud::CloudControlsPartner::V1::CustomerOnboardingStep::Step] - # The onboarding step - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The starting time of the onboarding step - # @!attribute [rw] completion_time - # @return [::Google::Protobuf::Timestamp] - # The completion time of the onboarding step - # @!attribute [r] completion_state - # @return [::Google::Cloud::CloudControlsPartner::V1::CompletionState] - # Output only. Current state of the step - class CustomerOnboardingStep - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for possible onboarding steps - module Step - # Unspecified step - STEP_UNSPECIFIED = 0 - - # KAJ Enrollment - KAJ_ENROLLMENT = 1 - - # Customer Environment - CUSTOMER_ENVIRONMENT = 2 - end - end - - # Request to update a customer - # @!attribute [rw] customer - # @return [::Google::Cloud::CloudControlsPartner::V1::Customer] - # Required. The customer to update - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdateCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting customer - # @!attribute [rw] name - # @return [::String] - # Required. name of the resource to be deleted - # format: name=organizations/*/locations/*/customers/* - class DeleteCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb deleted file mode 100644 index b3b41336e305..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/ekm_connections.rb +++ /dev/null @@ -1,96 +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 CloudControlsPartner - module V1 - # The EKM connections associated with a workload - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # @!attribute [rw] ekm_connections - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::EkmConnection>] - # The EKM connections associated with the workload - class EkmConnections - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting the EKM connections associated with a workload - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - class GetEkmConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the EKM connection - # @!attribute [rw] connection_name - # @return [::String] - # Resource name of the EKM connection in the format: - # projects/\\{project}/locations/\\{location}/ekmConnections/\\{ekm_connection} - # @!attribute [r] connection_state - # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnection::ConnectionState] - # Output only. The connection state - # @!attribute [rw] connection_error - # @return [::Google::Cloud::CloudControlsPartner::V1::EkmConnection::ConnectionError] - # The connection error that occurred if any - class EkmConnection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information around the error that occurred if the connection state is - # anything other than available or unspecified - # @!attribute [rw] error_domain - # @return [::String] - # The error domain for the error - # @!attribute [rw] error_message - # @return [::String] - # The error message for the error - class ConnectionError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The EKM connection state. - module ConnectionState - # Unspecified EKM connection state - CONNECTION_STATE_UNSPECIFIED = 0 - - # Available EKM connection state - AVAILABLE = 1 - - # Not available EKM connection state - NOT_AVAILABLE = 2 - - # Error EKM connection state - ERROR = 3 - - # Permission denied EKM connection state - PERMISSION_DENIED = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.rb deleted file mode 100644 index dd897b0f5733..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partner_permissions.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! - - -module Google - module Cloud - module CloudControlsPartner - module V1 - # The permissions granted to the partner for a workload - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # @!attribute [rw] partner_permissions - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions::Permission>] - # The partner permissions granted for the workload - class PartnerPermissions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Permission - # Unspecified partner permission - PERMISSION_UNSPECIFIED = 0 - - # Permission for Access Transparency and emergency logs - ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS = 1 - - # Permission for Assured Workloads monitoring violations - ASSURED_WORKLOADS_MONITORING = 2 - - # Permission for Access Approval requests - ACCESS_APPROVAL_REQUESTS = 3 - - # Permission for External Key Manager connection status - ASSURED_WORKLOADS_EKM_CONNECTION_STATUS = 4 - - # Permission for support case details for Access Transparency log entries - ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER = 5 - end - end - - # Request for getting the partner permissions granted for a workload - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource to get in the format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - class GetPartnerPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb deleted file mode 100644 index b3cfb8c708ff..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/partners.rb +++ /dev/null @@ -1,117 +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 CloudControlsPartner - module V1 - # Message describing Partner resource - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the partner. - # Format: `organizations/{organization}/locations/{location}/partner` - # Example: "organizations/123456/locations/us-central1/partner" - # @!attribute [rw] skus - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Sku>] - # List of SKUs the partner is offering - # @!attribute [rw] ekm_solutions - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::EkmMetadata>] - # List of Google Cloud supported EKM partners supported by the partner - # @!attribute [rw] operated_cloud_regions - # @return [::Array<::String>] - # List of Google Cloud regions that the partner sells services to customers. - # Valid Google Cloud regions found here: - # https://cloud.google.com/compute/docs/regions-zones - # @!attribute [rw] partner_project_id - # @return [::String] - # Google Cloud project ID in the partner's Google Cloud organization for - # receiving enhanced Logs for Partners. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the resource was created - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time the resource was updated - class Partner - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a Partner - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/partner` - class GetPartnerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the SKU a partner owns inside Google Cloud to sell to customers. - # @!attribute [rw] id - # @return [::String] - # Argentum product SKU, that is associated with the partner offerings to - # customers used by Syntro for billing purposes. SKUs can represent resold - # Google products or support services. - # @!attribute [rw] display_name - # @return [::String] - # Display name of the product identified by the SKU. A partner may want to - # show partner branded names for their offerings such as local sovereign - # cloud solutions. - class Sku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds information needed by Mudbray to use partner EKMs for workloads. - # @!attribute [rw] ekm_solution - # @return [::Google::Cloud::CloudControlsPartner::V1::EkmMetadata::EkmSolution] - # The Cloud EKM partner. - # @!attribute [rw] ekm_endpoint_uri - # @return [::String] - # Endpoint for sending requests to the EKM for key provisioning during - # Assured Workload creation. - class EkmMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents Google Cloud supported external key management partners - # [Google Cloud EKM partners - # docs](https://cloud.google.com/kms/docs/ekm#supported_partners). - module EkmSolution - # Unspecified EKM solution - EKM_SOLUTION_UNSPECIFIED = 0 - - # EKM Partner Fortanix - FORTANIX = 1 - - # EKM Partner FutureX - FUTUREX = 2 - - # EKM Partner Thales - THALES = 3 - - # This enum value is never used. - VIRTRU = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.rb deleted file mode 100644 index ec1d17ab6f34..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/cloud/cloudcontrolspartner/v1/violations.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 Cloud - module CloudControlsPartner - module V1 - # Details of resource Violation - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # @!attribute [r] description - # @return [::String] - # Output only. Description for the Violation. - # e.g. OrgPolicy gcp.resourceLocations has non compliant value. - # @!attribute [r] begin_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which triggered the Violation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time when the Violation record was updated. - # @!attribute [r] resolve_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which fixed the Violation. - # If the violation is ACTIVE this will be empty. - # @!attribute [r] category - # @return [::String] - # Output only. Category under which this violation is mapped. - # e.g. Location, Service Usage, Access, Encryption, etc. - # @!attribute [r] state - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::State] - # Output only. State of the violation - # @!attribute [r] non_compliant_org_policy - # @return [::String] - # Output only. Immutable. Name of the OrgPolicy which was modified with - # non-compliant change and resulted this violation. Format: - # `projects/{project_number}/policies/{constraint_name}` - # `folders/{folder_id}/policies/{constraint_name}` - # `organizations/{organization_id}/policies/{constraint_name}` - # @!attribute [rw] folder_id - # @return [::Integer] - # The folder_id of the violation - # @!attribute [r] remediation - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation] - # Output only. Compliance violation remediation - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents remediation guidance to resolve compliance violation for - # AssuredWorkload - # @!attribute [rw] instructions - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::Instructions] - # Required. Remediation instructions to resolve violations - # @!attribute [rw] compliant_values - # @return [::Array<::String>] - # Values that can resolve the violation - # For example: for list org policy violations, this will either be the list - # of allowed or denied values - # @!attribute [r] remediation_type - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::RemediationType] - # Output only. Remediation type based on the type of org policy values - # violated - class Remediation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Instructions to remediate violation - # @!attribute [rw] gcloud_instructions - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::Instructions::Gcloud] - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] console_instructions - # @return [::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation::Instructions::Console] - # Remediation instructions to resolve violation via cloud console - class Instructions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] gcloud_commands - # @return [::Array<::String>] - # Gcloud command to resolve violation - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via gcloud cli - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Gcloud - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Remediation instructions to resolve violation via cloud console - # @!attribute [rw] console_uris - # @return [::Array<::String>] - # Link to console page where violations can be resolved - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via cloud console - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Console - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Classifying remediation into various types based on the kind of - # violation. For example, violations caused due to changes in boolean org - # policy requires different remediation instructions compared to violation - # caused due to changes in allowed values of list org policy. - module RemediationType - # Unspecified remediation type - REMEDIATION_TYPE_UNSPECIFIED = 0 - - # Remediation type for boolean org policy - REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 - - # Remediation type for list org policy which have allowed values in the - # monitoring rule - REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 - - # Remediation type for list org policy which have denied values in the - # monitoring rule - REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 - - # Remediation type for gcp.restrictCmekCryptoKeyProjects - REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 - - # Remediation type for resource violation. - REMEDIATION_RESOURCE_VIOLATION = 5 - end - end - - # Violation State Values - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Violation is resolved. - RESOLVED = 1 - - # Violation is Unresolved - UNRESOLVED = 2 - - # Violation is Exception - EXCEPTION = 3 - end - end - - # Message for requesting list of Violations - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of customers row to return. The service may - # return fewer than this value. If unspecified, at most 10 customers will be - # returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListViolations` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - # @!attribute [rw] interval - # @return [::Google::Type::Interval] - # Optional. Specifies the interval for retrieving violations. - # if unspecified, all violations will be returned. - class ListViolationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list customer violation requests - # @!attribute [rw] violations - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1::Violation>] - # List of violation - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Workloads that could not be reached due to permission errors or any other - # error. Ref: https://google.aip.dev/217 - class ListViolationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a Violation - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - class GetViolationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/proto_docs/google/type/interval.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! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/Gemfile deleted file mode 100644 index b932a960b8e2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1", path: "../" -else - gem "google-cloud-cloud_controls_partner-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-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.rb deleted file mode 100644 index a45ceac9d292..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/create_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_CreateCustomer_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the create_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#create_customer. -# -def create_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new - - # Call the create_customer method. - result = client.create_customer request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_CreateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.rb deleted file mode 100644 index 9774212278a2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/delete_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_DeleteCustomer_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the delete_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#delete_customer. -# -def delete_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new - - # Call the delete_customer method. - result = client.delete_customer request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_DeleteCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.rb deleted file mode 100644 index 42cd7ccb19ef..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetCustomer_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the get_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_customer. -# -def get_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new - - # Call the get_customer method. - result = client.get_customer request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.rb deleted file mode 100644 index 2dac573c8f19..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_ekm_connections.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetEkmConnections_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the get_ekm_connections call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_ekm_connections. -# -def get_ekm_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new - - # Call the get_ekm_connections method. - result = client.get_ekm_connections request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::EkmConnections. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetEkmConnections_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.rb deleted file mode 100644 index cb954a687ad7..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartner_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the get_partner call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner. -# -def get_partner - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new - - # Call the get_partner method. - result = client.get_partner request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Partner. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartner_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.rb deleted file mode 100644 index 626a82198253..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_partner_permissions.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the get_partner_permissions call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner_permissions. -# -def get_partner_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new - - # Call the get_partner_permissions method. - result = client.get_partner_permissions request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::PartnerPermissions. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.rb deleted file mode 100644 index a5aec167d113..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/get_workload.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetWorkload_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the get_workload call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Workload. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.rb deleted file mode 100644 index 7e5dd2978d0e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_access_approval_requests.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_access_approval_requests. -# -def list_access_approval_requests - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.new - - # Call the list_access_approval_requests method. - result = client.list_access_approval_requests 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::CloudControlsPartner::V1::AccessApprovalRequest. - p item - end -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.rb deleted file mode 100644 index d54537961a36..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_customers.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListCustomers_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the list_customers call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_customers. -# -def list_customers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.new - - # Call the list_customers method. - result = client.list_customers 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::CloudControlsPartner::V1::Customer. - p item - end -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListCustomers_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.rb deleted file mode 100644 index 68f8734c7870..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/list_workloads.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListWorkloads_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the list_workloads call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads 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::CloudControlsPartner::V1::Workload. - p item - end -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.rb deleted file mode 100644 index 7503fab3475c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_core/update_customer.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_UpdateCustomer_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the update_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#update_customer. -# -def update_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new - - # Call the update_customer method. - result = client.update_customer request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Customer. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_UpdateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.rb deleted file mode 100644 index 0112ef781977..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/get_violation.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_GetViolation_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the get_violation call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#get_violation. -# -def get_violation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new - - # Call the get_violation method. - result = client.get_violation request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1::Violation. - p result -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.rb deleted file mode 100644 index f57a56e7073e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/cloud_controls_partner_monitoring/list_violations.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 cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_ListViolations_sync] -require "google/cloud/cloud_controls_partner/v1" - -## -# Snippet for the list_violations call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#list_violations. -# -def list_violations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new - - # Call the list_violations method. - result = client.list_violations 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::CloudControlsPartner::V1::Violation. - p item - end -end -# [END cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json deleted file mode 100644 index 0da1a79028cd..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-cloud_controls_partner-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.cloudcontrolspartner.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetWorkload_sync", - "title": "Snippet for the get_workload call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_workload.", - "file": "cloud_controls_partner_core/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::Workload", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetWorkload", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_workloads.", - "file": "cloud_controls_partner_core/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.ListWorkloads", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetCustomer_sync", - "title": "Snippet for the get_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_customer.", - "file": "cloud_controls_partner_core/get_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::Customer", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListCustomers_sync", - "title": "Snippet for the list_customers call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_customers.", - "file": "cloud_controls_partner_core/list_customers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_customers", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_customers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "ListCustomers", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.ListCustomers", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetEkmConnections_sync", - "title": "Snippet for the get_ekm_connections call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_ekm_connections.", - "file": "cloud_controls_partner_core/get_ekm_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_ekm_connections", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_ekm_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::EkmConnections", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetEkmConnections", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetEkmConnections", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync", - "title": "Snippet for the get_partner_permissions call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner_permissions.", - "file": "cloud_controls_partner_core/get_partner_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_partner_permissions", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetPartnerPermissions", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetPartnerPermissions", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync", - "title": "Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_access_approval_requests.", - "file": "cloud_controls_partner_core/list_access_approval_requests.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_approval_requests", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#list_access_approval_requests", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "ListAccessApprovalRequests", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.ListAccessApprovalRequests", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_GetPartner_sync", - "title": "Snippet for the get_partner call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner.", - "file": "cloud_controls_partner_core/get_partner.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_partner", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#get_partner", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::Partner", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetPartner", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.GetPartner", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_CreateCustomer_sync", - "title": "Snippet for the create_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#create_customer.", - "file": "cloud_controls_partner_core/create_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#create_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::Customer", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "CreateCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.CreateCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_UpdateCustomer_sync", - "title": "Snippet for the update_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#update_customer.", - "file": "cloud_controls_partner_core/update_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#update_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::Customer", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "UpdateCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.UpdateCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerCore_DeleteCustomer_sync", - "title": "Snippet for the delete_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#delete_customer.", - "file": "cloud_controls_partner_core/delete_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client#delete_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "DeleteCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore.DeleteCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_ListViolations_sync", - "title": "Snippet for the list_violations call in the CloudControlsPartnerMonitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#list_violations.", - "file": "cloud_controls_partner_monitoring/list_violations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_violations", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#list_violations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse", - "client": { - "short_name": "CloudControlsPartnerMonitoring::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client" - }, - "method": { - "short_name": "ListViolations", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring.ListViolations", - "service": { - "short_name": "CloudControlsPartnerMonitoring", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1_generated_CloudControlsPartnerMonitoring_GetViolation_sync", - "title": "Snippet for the get_violation call in the CloudControlsPartnerMonitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#get_violation.", - "file": "cloud_controls_partner_monitoring/get_violation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_violation", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client#get_violation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1::Violation", - "client": { - "short_name": "CloudControlsPartnerMonitoring::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client" - }, - "method": { - "short_name": "GetViolation", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring.GetViolation", - "service": { - "short_name": "CloudControlsPartnerMonitoring", - "full_name": "google.cloud.cloudcontrolspartner.v1.CloudControlsPartnerMonitoring" - } - } - }, - "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-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb deleted file mode 100644 index dea574dfa3b1..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_paths_test.rb +++ /dev/null @@ -1,115 +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/cloud_controls_partner/v1/cloud_controls_partner_core" - -class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::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_customer_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.customer_path organization: "value0", location: "value1", customer: "value2" - assert_equal "organizations/value0/locations/value1/customers/value2", path - end - end - - def test_ekm_connections_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.ekm_connections_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/ekmConnections", path - end - end - - def test_organization_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_partner_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.partner_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1/partner", path - end - end - - def test_partner_permissions_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.partner_permissions_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/partnerPermissions", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb deleted file mode 100644 index 89ba8bbf34b0..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_rest_test.rb +++ /dev/null @@ -1,708 +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/cloudcontrolspartner/v1/core_pb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core/rest" - - -class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_workload - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workload ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_count - end - end - end - - def test_list_workloads - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse.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_workloads_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads_client_stub.call_count - end - end - end - - def test_get_customer - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_customer({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_customer name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_customer ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_customer({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_customer(::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_customer_client_stub.call_count - end - end - end - - def test_list_customers - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse.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_customers_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_customers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_customers_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers_client_stub.call_count - end - end - end - - def test_get_ekm_connections - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::EkmConnections.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_ekm_connections_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_ekm_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_ekm_connections_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_ekm_connections({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_ekm_connections name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_ekm_connections({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_ekm_connections(::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_ekm_connections_client_stub.call_count - end - end - end - - def test_get_partner_permissions - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partner_permissions_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_partner_permissions_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_partner_permissions({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_partner_permissions name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_partner_permissions({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_partner_permissions(::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_partner_permissions_client_stub.call_count - end - end - end - - def test_list_access_approval_requests - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse.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_access_approval_requests_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_access_approval_requests_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_approval_requests_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_count - end - end - end - - def test_get_partner - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::Partner.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partner_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_partner_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_partner({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_partner name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_partner ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_partner({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_partner(::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_partner_client_stub.call_count - end - end - end - - def test_create_customer - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - customer = {} - customer_id = "hello world" - - create_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_create_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_customer parent: parent, customer: customer, customer_id: customer_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_customer ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_customer(::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_customer_client_stub.call_count - end - end - end - - def test_update_customer - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - customer = {} - update_mask = {} - - update_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_update_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_customer({ customer: customer, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_customer customer: customer, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_customer ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_customer({ customer: customer, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_customer(::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_customer_client_stub.call_count - end - end - end - - def test_delete_customer - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_delete_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_customer({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_customer name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_customer ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_customer({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_customer(::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::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::CloudControlsPartner::V1::CloudControlsPartnerCore::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb deleted file mode 100644 index a108e391f9a3..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core_test.rb +++ /dev/null @@ -1,787 +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/cloudcontrolspartner/v1/core_pb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_core" - -class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Workload.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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workload ::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workload({ 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_workload(::Google::Cloud::CloudControlsPartner::V1::GetWorkloadRequest.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_workload_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsResponse.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_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest, 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_workloads_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1::ListWorkloadsRequest.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_workloads_client_stub.call_rpc_count - end - end - - def test_get_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Customer.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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_customer({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_customer name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_customer ::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1::GetCustomerRequest.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_customer_client_stub.call_rpc_count - end - end - - def test_list_customers - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListCustomersResponse.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_customers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_customers, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest, 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_customers_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1::ListCustomersRequest.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_customers_client_stub.call_rpc_count - end - end - - def test_get_ekm_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::EkmConnections.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_ekm_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_ekm_connections, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_ekm_connections_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_ekm_connections({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_ekm_connections name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_ekm_connections({ 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_ekm_connections(::Google::Cloud::CloudControlsPartner::V1::GetEkmConnectionsRequest.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_ekm_connections_client_stub.call_rpc_count - end - end - - def test_get_partner_permissions - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::PartnerPermissions.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_partner_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_partner_permissions, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_partner_permissions_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_partner_permissions({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_partner_permissions name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_partner_permissions({ 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_partner_permissions(::Google::Cloud::CloudControlsPartner::V1::GetPartnerPermissionsRequest.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_partner_permissions_client_stub.call_rpc_count - end - end - - def test_list_access_approval_requests - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsResponse.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_access_approval_requests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_approval_requests, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest, 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_access_approval_requests_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_rpc_count - end - end - - def test_get_partner - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Partner.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_partner_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_partner, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_partner_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_partner({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_partner name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_partner ::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_partner({ 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_partner(::Google::Cloud::CloudControlsPartner::V1::GetPartnerRequest.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_partner_client_stub.call_rpc_count - end - end - - def test_create_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Customer.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" - customer = {} - customer_id = "hello world" - - create_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1::Customer), request["customer"] - assert_equal "hello world", request["customer_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_customer parent: parent, customer: customer, customer_id: customer_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_customer ::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_customer(::Google::Cloud::CloudControlsPartner::V1::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_customer_client_stub.call_rpc_count - end - end - - def test_update_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Customer.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. - customer = {} - update_mask = {} - - update_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1::Customer), request["customer"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_customer({ customer: customer, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_customer customer: customer, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_customer ::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_customer({ customer: customer, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_customer(::Google::Cloud::CloudControlsPartner::V1::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_customer_client_stub.call_rpc_count - end - end - - def test_delete_customer - # 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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_customer({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_customer name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_customer ::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1::DeleteCustomerRequest.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_customer_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::CloudControlsPartner::V1::CloudControlsPartnerCore::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::CloudControlsPartner::V1::CloudControlsPartnerCore::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::CloudControlsPartner::V1::CloudControlsPartnerCore::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerCore::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb deleted file mode 100644 index 4d65927bc426..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_paths_test.rb +++ /dev/null @@ -1,67 +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/cloud_controls_partner/v1/cloud_controls_partner_monitoring" - -class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.violation_path organization: "value0", location: "value1", customer: "value2", workload: "value3", violation: "value4" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/violations/value4", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb deleted file mode 100644 index ccaf6df922ff..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_rest_test.rb +++ /dev/null @@ -1,212 +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/cloudcontrolspartner/v1/monitoring_pb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring/rest" - - -class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse.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" - interval = {} - - list_violations_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_list_violations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_violations_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_violations ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_violations(::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_violations_client_stub.call_count - end - end - end - - def test_get_violation - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1::Violation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_violation_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_get_violation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_violation_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_violation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_violation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_violation ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_violation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_violation(::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_violation_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb deleted file mode 100644 index 1223db0933fa..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring_test.rb +++ /dev/null @@ -1,235 +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/cloudcontrolspartner/v1/monitoring_pb" -require "google/cloud/cloud_controls_partner/v1/cloud_controls_partner_monitoring" - -class ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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_violations - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::ListViolationsResponse.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" - interval = {} - - list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_violations, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest, 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 Gapic::Protobuf.coerce({}, to: ::Google::Type::Interval), request["interval"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_violations_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) 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_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval 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_violations ::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) 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_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, 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_violations(::Google::Cloud::CloudControlsPartner::V1::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), 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_violations_client_stub.call_rpc_count - end - end - - def test_get_violation - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1::Violation.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_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_violation, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_violation_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_violation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_violation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_violation ::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_violation({ 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_violation(::Google::Cloud::CloudControlsPartner::V1::GetViolationRequest.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_violation_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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1::CloudControlsPartnerMonitoring::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.gitignore b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.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-cloud_controls_partner-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.repo-metadata.json deleted file mode 100644 index 77528c756e3d..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "cloudcontrolspartner.googleapis.com", - "api_shortname": "cloudcontrolspartner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1beta/latest", - "distribution_name": "google-cloud-cloud_controls_partner-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "cloudcontrolspartner", - "name_pretty": "Cloud Controls Partner V1BETA API", - "product_documentation": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml deleted file mode 100644 index 619c07cd8b2a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-cloud_controls_partner-v1beta.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-cloud_controls_partner-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts deleted file mode 100644 index 7d8dee2fe5f2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Controls Partner V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md deleted file mode 100644 index 29ac24429250..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-cloud_controls_partner-v1beta library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-cloud_controls_partner-v1beta library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/cloud_controls_partner/v1beta" - -client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/cloud_controls_partner/v1beta" - -::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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-cloud_controls_partner-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/cloud_controls_partner/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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-cloud_controls_partner-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Gemfile +++ /dev/null @@ -1,14 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md deleted file mode 100644 index c34429e01dbd..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Controls Partner V1BETA API - -Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. - -Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Controls Partner V1BETA API. Most users should consider using -the main client gem, -[google-cloud-cloud_controls_partner](https://rubygems.org/gems/google-cloud-cloud_controls_partner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-cloud_controls_partner-v1beta -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/cloudcontrolspartner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/cloud_controls_partner/v1beta" - -client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new -request = ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new # (request fields as keyword arguments...) -response = client.get_workload request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/sovereign-controls-by-partners/docs/sovereign-partners/reference/rest) -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/cloud_controls_partner/v1beta" -require "logger" - -client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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-cloud_controls_partner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-cloud_controls_partner-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-cloud_controls_partner`. -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-cloud_controls_partner-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile deleted file mode 100644 index 811ad03c15c9..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-cloud_controls_partner-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials" - ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-cloud_controls_partner-v1beta gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-cloud_controls_partner-v1beta gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-cloud_controls_partner-v1beta gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-cloud_controls_partner-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-cloud_controls_partner-v1beta" - header "google-cloud-cloud_controls_partner-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-cloud_controls_partner-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-cloud_controls_partner-v1beta test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-cloud_controls_partner-v1beta smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-cloud_controls_partner-v1beta acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json deleted file mode 100644 index b5cceeab3104..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/gapic_metadata.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.cloudcontrolspartner.v1beta", - "libraryPackage": "::Google::Cloud::CloudControlsPartner::V1beta", - "services": { - "CloudControlsPartnerCore": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client", - "rpcs": { - "GetWorkload": { - "methods": [ - "get_workload" - ] - }, - "ListWorkloads": { - "methods": [ - "list_workloads" - ] - }, - "GetCustomer": { - "methods": [ - "get_customer" - ] - }, - "ListCustomers": { - "methods": [ - "list_customers" - ] - }, - "GetEkmConnections": { - "methods": [ - "get_ekm_connections" - ] - }, - "GetPartnerPermissions": { - "methods": [ - "get_partner_permissions" - ] - }, - "ListAccessApprovalRequests": { - "methods": [ - "list_access_approval_requests" - ] - }, - "GetPartner": { - "methods": [ - "get_partner" - ] - }, - "CreateCustomer": { - "methods": [ - "create_customer" - ] - }, - "UpdateCustomer": { - "methods": [ - "update_customer" - ] - }, - "DeleteCustomer": { - "methods": [ - "delete_customer" - ] - } - } - } - } - }, - "CloudControlsPartnerMonitoring": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client", - "rpcs": { - "ListViolations": { - "methods": [ - "list_violations" - ] - }, - "GetViolation": { - "methods": [ - "get_violation" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec deleted file mode 100644 index c46b3446c8e8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/google-cloud-cloud_controls_partner-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/cloud_controls_partner/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-cloud_controls_partner-v1beta" - gem.version = Google::Cloud::CloudControlsPartner::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering. Note that google-cloud-cloud_controls_partner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-cloud_controls_partner instead. See the readme for more details." - gem.summary = "Provides insights about your customers and their Assured Workloads based on your Sovereign Controls by Partners offering." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb deleted file mode 100644 index f34b1627d4fb..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google-cloud-cloud_controls_partner-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/cloud_controls_partner/v1beta" diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb deleted file mode 100644 index 4428df5755ae..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" -require "google/cloud/cloud_controls_partner/v1beta/version" - -module Google - module Cloud - module CloudControlsPartner - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/cloud_controls_partner/v1beta" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/cloud_controls_partner/v1beta" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/cloud_controls_partner/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb deleted file mode 100644 index 3859b1bd3923..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_controls_partner/v1beta/version" - -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - module CloudControlsPartnerCore - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_controls_partner_core", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb deleted file mode 100644 index 5aee76498c42..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/client.rb +++ /dev/null @@ -1,1504 +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/cloudcontrolspartner/v1beta/core_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerCore - ## - # Client for the CloudControlsPartnerCore service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_core_stub - - ## - # Configure the CloudControlsPartnerCore Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerCore clients - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_customer.timeout = 60.0 - default_config.rpcs.get_customer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_customers.timeout = 60.0 - default_config.rpcs.list_customers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_ekm_connections.timeout = 60.0 - default_config.rpcs.get_ekm_connections.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_partner_permissions.timeout = 60.0 - default_config.rpcs.get_partner_permissions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_access_approval_requests.timeout = 60.0 - default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_core_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerCore client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerCore 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/cloudcontrolspartner/v1beta/core_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_core_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_controls_partner_core_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_core_stub.logger - end - - # Service calls - - ## - # Gets details of a single workload - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Workload] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest - - # Converts hash 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_workload.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_workload, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customer workloads for a given customer org id - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param page_size [::Integer] - # The maximum number of workloads to return. The service may return fewer - # than this value. If unspecified, at most 500 workloads will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListWorkloads` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads 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::CloudControlsPartner::V1beta::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest - - # Converts hash 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_workloads.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :list_workloads, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single customer - # - # @overload get_customer(request, options = nil) - # Pass arguments to `get_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `get_customer` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new - # - # # Call the get_customer method. - # result = client.get_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - # p result - # - def get_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_customer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customers of a partner identified by its Google Cloud organization ID - # - # @overload list_customers(request, options = nil) - # Pass arguments to `list_customers` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_customers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of Customers to return. The service may return fewer - # than this value. If unspecified, at most 500 Customers will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCustomers` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.new - # - # # Call the list_customers method. - # result = client.list_customers 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::CloudControlsPartner::V1beta::Customer. - # p item - # end - # - def list_customers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest - - # Converts hash 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_customers.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_customers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_customers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :list_customers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, 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 EKM connections associated with a workload - # - # @overload get_ekm_connections(request, options = nil) - # Pass arguments to `get_ekm_connections` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) - # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new - # - # # Call the get_ekm_connections method. - # result = client.get_ekm_connections request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::EkmConnections. - # p result - # - def get_ekm_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest - - # Converts hash 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_ekm_connections.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_ekm_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_ekm_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_ekm_connections, 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 the partner permissions granted for a workload - # - # @overload get_partner_permissions(request, options = nil) - # Pass arguments to `get_partner_permissions` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) - # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource to get in the format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new - # - # # Call the get_partner_permissions method. - # result = client.get_partner_permissions request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions. - # p result - # - def get_partner_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest - - # Converts hash 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_partner_permissions.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_partner_permissions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_partner_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_partner_permissions, 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 - - ## - # Deprecated: Only returns access approval requests directly associated with - # an assured workload folder. - # - # @deprecated This method is deprecated and may be removed in the next major version update. - # - # @overload list_access_approval_requests(request, options = nil) - # Pass arguments to `list_access_approval_requests` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of access requests to return. The service may - # return fewer than this value. If unspecified, at most 500 access requests - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent - # page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.new - # - # # Call the list_access_approval_requests method. - # result = client.list_access_approval_requests 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::CloudControlsPartner::V1beta::AccessApprovalRequest. - # p item - # end - # - def list_access_approval_requests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest - - # Converts hash 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_access_approval_requests.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_access_approval_requests.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_access_approval_requests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :list_access_approval_requests, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a Partner. - # - # @overload get_partner(request, options = nil) - # Pass arguments to `get_partner` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner(name: nil) - # Pass arguments to `get_partner` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/partner` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Partner] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Partner] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new - # - # # Call the get_partner method. - # result = client.get_partner request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Partner. - # p result - # - def get_partner request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest - - # Converts hash 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_partner.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_partner.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_partner.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :get_partner, 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 customer. - # - # @overload create_customer(request, options = nil) - # Pass arguments to `create_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) - # Pass arguments to `create_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] - # Required. The customer to create. - # @param customer_id [::String] - # Required. The customer id to use for the customer, which will become the - # final component of the customer's resource name. The specified value must - # be a valid Google cloud organization id. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new - # - # # Call the create_customer method. - # result = client.create_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - # p result - # - def create_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :create_customer, 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 - - ## - # Update details of a single customer - # - # @overload update_customer(request, options = nil) - # Pass arguments to `update_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) - # Pass arguments to `update_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] - # Required. The customer to update - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new - # - # # Call the update_customer method. - # result = client.update_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - # p result - # - def update_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.customer&.name - header_params["customer.name"] = request.customer.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_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :update_customer, 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 - - ## - # Delete details of a single customer - # - # @overload delete_customer(request, options = nil) - # Pass arguments to `delete_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `delete_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. name of the resource to be deleted - # format: name=organizations/*/locations/*/customers/* - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new - # - # # Call the delete_customer method. - # result = client.delete_customer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.call_rpc :delete_customer, 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 CloudControlsPartnerCore API. - # - # This class represents the configuration for CloudControlsPartnerCore, - # 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `get_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer - ## - # RPC-specific configuration for `list_customers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customers - ## - # RPC-specific configuration for `get_ekm_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ekm_connections - ## - # RPC-specific configuration for `get_partner_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner_permissions - ## - # RPC-specific configuration for `list_access_approval_requests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_approval_requests - ## - # RPC-specific configuration for `get_partner` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner - ## - # RPC-specific configuration for `create_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer - ## - # RPC-specific configuration for `update_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer - ## - # RPC-specific configuration for `delete_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer - - # @private - def initialize parent_rpcs = nil - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer - @get_customer = ::Gapic::Config::Method.new get_customer_config - list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers - @list_customers = ::Gapic::Config::Method.new list_customers_config - get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections - @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config - get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions - @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config - list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests - @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config - get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner - @get_partner = ::Gapic::Config::Method.new get_partner_config - create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer - @create_customer = ::Gapic::Config::Method.new create_customer_config - update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer - @update_customer = ::Gapic::Config::Method.new update_customer_config - delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer - @delete_customer = ::Gapic::Config::Method.new delete_customer_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb deleted file mode 100644 index 9576517a9adf..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerCore - # Credentials for the CloudControlsPartnerCore API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb deleted file mode 100644 index b6cae714497f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths.rb +++ /dev/null @@ -1,149 +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 CloudControlsPartner - module V1beta - module CloudControlsPartnerCore - # Path helper methods for the CloudControlsPartnerCore API. - module Paths - ## - # Create a fully-qualified Customer resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # - # @return [::String] - def customer_path organization:, location:, customer: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}" - end - - ## - # Create a fully-qualified EkmConnections resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def ekm_connections_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/ekmConnections" - end - - ## - # Create a fully-qualified OrganizationLocation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def organization_location_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}" - end - - ## - # Create a fully-qualified Partner resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/partner` - # - # @param organization [String] - # @param location [String] - # - # @return [::String] - def partner_path organization:, location: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/partner" - end - - ## - # Create a fully-qualified PartnerPermissions resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def partner_permissions_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/partnerPermissions" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb deleted file mode 100644 index 9db4aa3cf9ec..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest.rb +++ /dev/null @@ -1,52 +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/cloud_controls_partner/v1beta/version" - -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/credentials" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/paths" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - module CloudControlsPartnerCore - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb deleted file mode 100644 index ffbae9c077fc..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/client.rb +++ /dev/null @@ -1,1382 +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/cloudcontrolspartner/v1beta/core_pb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerCore - module Rest - ## - # REST client for the CloudControlsPartnerCore service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_core_stub - - ## - # Configure the CloudControlsPartnerCore Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerCore clients - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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", "CloudControlsPartner", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_workload.timeout = 60.0 - default_config.rpcs.get_workload.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workloads.timeout = 60.0 - default_config.rpcs.list_workloads.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_customer.timeout = 60.0 - default_config.rpcs.get_customer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_customers.timeout = 60.0 - default_config.rpcs.list_customers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_ekm_connections.timeout = 60.0 - default_config.rpcs.get_ekm_connections.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_partner_permissions.timeout = 60.0 - default_config.rpcs.get_partner_permissions.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_access_approval_requests.timeout = 60.0 - default_config.rpcs.list_access_approval_requests.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 CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_core_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerCore REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerCore client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_core_stub = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_controls_partner_core_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_core_stub.logger - end - - # Service calls - - ## - # Gets details of a single workload - # - # @overload get_workload(request, options = nil) - # Pass arguments to `get_workload` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workload(name: nil) - # Pass arguments to `get_workload` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new - # - # # Call the get_workload method. - # result = client.get_workload request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Workload. - # p result - # - def get_workload request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest - - # Converts hash 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_workload.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workload.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workload.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_workload request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customer workloads for a given customer org id - # - # @overload list_workloads(request, options = nil) - # Pass arguments to `list_workloads` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workloads(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_workloads` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param page_size [::Integer] - # The maximum number of workloads to return. The service may return fewer - # than this value. If unspecified, at most 500 workloads will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListWorkloads` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.new - # - # # Call the list_workloads method. - # result = client.list_workloads 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::CloudControlsPartner::V1beta::Workload. - # p item - # end - # - def list_workloads request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest - - # Converts hash 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_workloads.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workloads.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workloads.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.list_workloads request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_workloads, "workloads", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single customer - # - # @overload get_customer(request, options = nil) - # Pass arguments to `get_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `get_customer` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new - # - # # Call the get_customer method. - # result = client.get_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - # p result - # - def get_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_customer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists customers of a partner identified by its Google Cloud organization ID - # - # @overload list_customers(request, options = nil) - # Pass arguments to `list_customers` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_customers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param page_size [::Integer] - # The maximum number of Customers to return. The service may return fewer - # than this value. If unspecified, at most 500 Customers will be returned. - # @param page_token [::String] - # A page token, received from a previous `ListCustomers` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.new - # - # # Call the list_customers method. - # result = client.list_customers 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::CloudControlsPartner::V1beta::Customer. - # p item - # end - # - def list_customers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest - - # Converts hash 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_customers.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_customers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_customers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.list_customers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_customers, "customers", 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 EKM connections associated with a workload - # - # @overload get_ekm_connections(request, options = nil) - # Pass arguments to `get_ekm_connections` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_ekm_connections(name: nil) - # Pass arguments to `get_ekm_connections` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new - # - # # Call the get_ekm_connections method. - # result = client.get_ekm_connections request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::EkmConnections. - # p result - # - def get_ekm_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest - - # Converts hash 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_ekm_connections.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_ekm_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_ekm_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_ekm_connections 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 the partner permissions granted for a workload - # - # @overload get_partner_permissions(request, options = nil) - # Pass arguments to `get_partner_permissions` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner_permissions(name: nil) - # Pass arguments to `get_partner_permissions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource to get in the format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new - # - # # Call the get_partner_permissions method. - # result = client.get_partner_permissions request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions. - # p result - # - def get_partner_permissions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest - - # Converts hash 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_partner_permissions.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_partner_permissions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_partner_permissions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_partner_permissions 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 - - ## - # Deprecated: Only returns access approval requests directly associated with - # an assured workload folder. - # - # @overload list_access_approval_requests(request, options = nil) - # Pass arguments to `list_access_approval_requests` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_approval_requests(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_access_approval_requests` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of access requests to return. The service may - # return fewer than this value. If unspecified, at most 500 access requests - # will be returned. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent - # page. - # @param filter [::String] - # Optional. Filtering results. - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.new - # - # # Call the list_access_approval_requests method. - # result = client.list_access_approval_requests 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::CloudControlsPartner::V1beta::AccessApprovalRequest. - # p item - # end - # - def list_access_approval_requests request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest - - # Converts hash 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_access_approval_requests.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_access_approval_requests.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_access_approval_requests.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.list_access_approval_requests request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_core_stub, :list_access_approval_requests, "access_approval_requests", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Get details of a Partner. - # - # @overload get_partner(request, options = nil) - # Pass arguments to `get_partner` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_partner(name: nil) - # Pass arguments to `get_partner` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/partner` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Partner] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Partner] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new - # - # # Call the get_partner method. - # result = client.get_partner request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Partner. - # p result - # - def get_partner request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest - - # Converts hash 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_partner.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_partner.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_partner.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.get_partner 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 customer. - # - # @overload create_customer(request, options = nil) - # Pass arguments to `create_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(parent: nil, customer: nil, customer_id: nil) - # Pass arguments to `create_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] - # Required. The customer to create. - # @param customer_id [::String] - # Required. The customer id to use for the customer, which will become the - # final component of the customer's resource name. The specified value must - # be a valid Google cloud organization id. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new - # - # # Call the create_customer method. - # result = client.create_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - # p result - # - def create_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.create_customer 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 - - ## - # Update details of a single customer - # - # @overload update_customer(request, options = nil) - # Pass arguments to `update_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(customer: nil, update_mask: nil) - # Pass arguments to `update_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param customer [::Google::Cloud::CloudControlsPartner::V1beta::Customer, ::Hash] - # Required. The customer to update - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new - # - # # Call the update_customer method. - # result = client.update_customer request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - # p result - # - def update_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.update_customer 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 - - ## - # Delete details of a single customer - # - # @overload delete_customer(request, options = nil) - # Pass arguments to `delete_customer` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_customer(name: nil) - # Pass arguments to `delete_customer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. name of the resource to be deleted - # format: name=organizations/*/locations/*/customers/* - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new - # - # # Call the delete_customer method. - # result = client.delete_customer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_customer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest - - # Converts hash 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_customer.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_customer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_customer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_core_stub.delete_customer 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 CloudControlsPartnerCore REST API. - # - # This class represents the configuration for CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # get_workload to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workload.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 = "cloudcontrolspartner.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 CloudControlsPartnerCore 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 `get_workload` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workload - ## - # RPC-specific configuration for `list_workloads` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workloads - ## - # RPC-specific configuration for `get_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_customer - ## - # RPC-specific configuration for `list_customers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_customers - ## - # RPC-specific configuration for `get_ekm_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :get_ekm_connections - ## - # RPC-specific configuration for `get_partner_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner_permissions - ## - # RPC-specific configuration for `list_access_approval_requests` - # @return [::Gapic::Config::Method] - # - attr_reader :list_access_approval_requests - ## - # RPC-specific configuration for `get_partner` - # @return [::Gapic::Config::Method] - # - attr_reader :get_partner - ## - # RPC-specific configuration for `create_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_customer - ## - # RPC-specific configuration for `update_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_customer - ## - # RPC-specific configuration for `delete_customer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_customer - - # @private - def initialize parent_rpcs = nil - get_workload_config = parent_rpcs.get_workload if parent_rpcs.respond_to? :get_workload - @get_workload = ::Gapic::Config::Method.new get_workload_config - list_workloads_config = parent_rpcs.list_workloads if parent_rpcs.respond_to? :list_workloads - @list_workloads = ::Gapic::Config::Method.new list_workloads_config - get_customer_config = parent_rpcs.get_customer if parent_rpcs.respond_to? :get_customer - @get_customer = ::Gapic::Config::Method.new get_customer_config - list_customers_config = parent_rpcs.list_customers if parent_rpcs.respond_to? :list_customers - @list_customers = ::Gapic::Config::Method.new list_customers_config - get_ekm_connections_config = parent_rpcs.get_ekm_connections if parent_rpcs.respond_to? :get_ekm_connections - @get_ekm_connections = ::Gapic::Config::Method.new get_ekm_connections_config - get_partner_permissions_config = parent_rpcs.get_partner_permissions if parent_rpcs.respond_to? :get_partner_permissions - @get_partner_permissions = ::Gapic::Config::Method.new get_partner_permissions_config - list_access_approval_requests_config = parent_rpcs.list_access_approval_requests if parent_rpcs.respond_to? :list_access_approval_requests - @list_access_approval_requests = ::Gapic::Config::Method.new list_access_approval_requests_config - get_partner_config = parent_rpcs.get_partner if parent_rpcs.respond_to? :get_partner - @get_partner = ::Gapic::Config::Method.new get_partner_config - create_customer_config = parent_rpcs.create_customer if parent_rpcs.respond_to? :create_customer - @create_customer = ::Gapic::Config::Method.new create_customer_config - update_customer_config = parent_rpcs.update_customer if parent_rpcs.respond_to? :update_customer - @update_customer = ::Gapic::Config::Method.new update_customer_config - delete_customer_config = parent_rpcs.delete_customer if parent_rpcs.respond_to? :delete_customer - @delete_customer = ::Gapic::Config::Method.new delete_customer_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb deleted file mode 100644 index 5b84acedf10a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest/service_stub.rb +++ /dev/null @@ -1,754 +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/cloudcontrolspartner/v1beta/core_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerCore - module Rest - ## - # REST service stub for the CloudControlsPartnerCore service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the get_workload REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest] - # 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::CloudControlsPartner::V1beta::Workload] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload] - # A result object deserialized from the server's reply - def get_workload request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workload_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_workload", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::Workload.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_workloads REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest] - # 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::CloudControlsPartner::V1beta::ListWorkloadsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse] - # A result object deserialized from the server's reply - def list_workloads request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workloads_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_workloads", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest] - # 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::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # A result object deserialized from the server's reply - def get_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customers REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest] - # 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::CloudControlsPartner::V1beta::ListCustomersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse] - # A result object deserialized from the server's reply - def list_customers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_customers_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_customers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse.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_ekm_connections REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest] - # 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::CloudControlsPartner::V1beta::EkmConnections] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections] - # A result object deserialized from the server's reply - def get_ekm_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_ekm_connections_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_ekm_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections.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_partner_permissions REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest] - # 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::CloudControlsPartner::V1beta::PartnerPermissions] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions] - # A result object deserialized from the server's reply - def get_partner_permissions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_permissions_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_partner_permissions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions.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_access_approval_requests REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest] - # 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::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse] - # A result object deserialized from the server's reply - def list_access_approval_requests request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_access_approval_requests_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_access_approval_requests", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse.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_partner REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest] - # 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::CloudControlsPartner::V1beta::Partner] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Partner] - # A result object deserialized from the server's reply - def get_partner request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_partner_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_partner", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::Partner.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest] - # 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::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # A result object deserialized from the server's reply - def create_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest] - # 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::CloudControlsPartner::V1beta::Customer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # A result object deserialized from the server's reply - def update_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest] - # 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_customer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_customer_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_customer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workload REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest] - # 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_workload_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workloads REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest] - # 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_workloads_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/workloads", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_customers REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest] - # 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_customers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/customers", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_ekm_connections REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest] - # 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_ekm_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/ekmConnections/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_partner_permissions REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest] - # 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_partner_permissions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/partnerPermissions/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_access_approval_requests REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest] - # 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_access_approval_requests_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/accessApprovalRequests", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_partner REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest] - # 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_partner_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/partner/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/customers", - body: "customer", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{customer.name}", - body: "customer", - matches: [ - ["customer.name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_customer REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest] - # 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_customer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb deleted file mode 100644 index 8e6b0f80d54f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/cloud_controls_partner/v1beta/version" - -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - ## - # Service describing handlers for resources - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new - # - module CloudControlsPartnerMonitoring - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_controls_partner_monitoring", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb deleted file mode 100644 index 86c388758591..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/client.rb +++ /dev/null @@ -1,605 +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/cloudcontrolspartner/v1beta/monitoring_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerMonitoring - ## - # Client for the CloudControlsPartnerMonitoring service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_monitoring_stub - - ## - # Configure the CloudControlsPartnerMonitoring Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerMonitoring clients - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_violations.timeout = 60.0 - default_config.rpcs.list_violations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_violation.timeout = 60.0 - default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_monitoring_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerMonitoring client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerMonitoring 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/cloudcontrolspartner/v1beta/monitoring_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_monitoring_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @cloud_controls_partner_monitoring_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_monitoring_stub.logger - end - - # Service calls - - ## - # Lists Violations for a workload - # Callers may also choose to read across multiple Customers or for a single - # customer as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of \\{customer} & \\{workload}. - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @overload list_violations(request, options = nil) - # Pass arguments to `list_violations` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) - # Pass arguments to `list_violations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of customers row to return. The service may - # return fewer than this value. If unspecified, at most 10 customers will be - # returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListViolations` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @param interval [::Google::Type::Interval, ::Hash] - # Optional. Specifies the interval for retrieving violations. - # if unspecified, all violations will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new - # - # # Call the list_violations method. - # result = client.list_violations 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::CloudControlsPartner::V1beta::Violation. - # p item - # end - # - def list_violations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest - - # Converts hash 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_violations.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_violations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_violations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.call_rpc :list_violations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Violation. - # - # @overload get_violation(request, options = nil) - # Pass arguments to `get_violation` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violation(name: nil) - # Pass arguments to `get_violation` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CloudControlsPartner::V1beta::Violation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new - # - # # Call the get_violation method. - # result = client.get_violation request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Violation. - # p result - # - def get_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest - - # Converts hash 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_violation.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::CloudControlsPartner::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_violation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.call_rpc :get_violation, 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 CloudControlsPartnerMonitoring API. - # - # This class represents the configuration for CloudControlsPartnerMonitoring, - # 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_violations - ## - # RPC-specific configuration for `get_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_violation - - # @private - def initialize parent_rpcs = nil - list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations - @list_violations = ::Gapic::Config::Method.new list_violations_config - get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation - @get_violation = ::Gapic::Config::Method.new get_violation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb deleted file mode 100644 index 5bf9106b13c0..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerMonitoring - # Credentials for the CloudControlsPartnerMonitoring API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb deleted file mode 100644 index 114dd3a7f708..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths.rb +++ /dev/null @@ -1,77 +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 CloudControlsPartner - module V1beta - module CloudControlsPartnerMonitoring - # Path helper methods for the CloudControlsPartnerMonitoring API. - module Paths - ## - # Create a fully-qualified Violation resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # @param violation [String] - # - # @return [::String] - def violation_path organization:, location:, customer:, workload:, violation: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - raise ::ArgumentError, "workload cannot contain /" if workload.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}/violations/#{violation}" - end - - ## - # Create a fully-qualified Workload resource string. - # - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @param organization [String] - # @param location [String] - # @param customer [String] - # @param workload [String] - # - # @return [::String] - def workload_path organization:, location:, customer:, workload: - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/customers/#{customer}/workloads/#{workload}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb deleted file mode 100644 index 037f72b394fc..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest.rb +++ /dev/null @@ -1,52 +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/cloud_controls_partner/v1beta/version" - -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/credentials" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/paths" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - ## - # Service describing handlers for resources - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new - # - module CloudControlsPartnerMonitoring - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb deleted file mode 100644 index 883871bdfd3b..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/client.rb +++ /dev/null @@ -1,548 +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/cloudcontrolspartner/v1beta/monitoring_pb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerMonitoring - module Rest - ## - # REST client for the CloudControlsPartnerMonitoring service. - # - # Service describing handlers for resources - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudcontrolspartner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_controls_partner_monitoring_stub - - ## - # Configure the CloudControlsPartnerMonitoring Client class. - # - # See {::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudControlsPartnerMonitoring clients - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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", "CloudControlsPartner", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_violations.timeout = 60.0 - default_config.rpcs.list_violations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_violation.timeout = 60.0 - default_config.rpcs.get_violation.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 CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @cloud_controls_partner_monitoring_stub.universe_domain - end - - ## - # Create a new CloudControlsPartnerMonitoring REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudControlsPartnerMonitoring client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @cloud_controls_partner_monitoring_stub = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_controls_partner_monitoring_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_controls_partner_monitoring_stub.logger - end - - # Service calls - - ## - # Lists Violations for a workload - # Callers may also choose to read across multiple Customers or for a single - # customer as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of \\{customer} & \\{workload}. - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # - # @overload list_violations(request, options = nil) - # Pass arguments to `list_violations` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violations(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, interval: nil) - # Pass arguments to `list_violations` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent resource - # Format - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @param page_size [::Integer] - # Optional. The maximum number of customers row to return. The service may - # return fewer than this value. If unspecified, at most 10 customers will be - # returned. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListViolations` call. - # Provide this to retrieve the subsequent page. - # @param filter [::String] - # Optional. Filtering results - # @param order_by [::String] - # Optional. Hint for how to order the results - # @param interval [::Google::Type::Interval, ::Hash] - # Optional. Specifies the interval for retrieving violations. - # if unspecified, all violations will be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new - # - # # Call the list_violations method. - # result = client.list_violations 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::CloudControlsPartner::V1beta::Violation. - # p item - # end - # - def list_violations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest - - # Converts hash 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_violations.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_violations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_violations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.list_violations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_controls_partner_monitoring_stub, :list_violations, "violations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Violation. - # - # @overload get_violation(request, options = nil) - # Pass arguments to `get_violation` via a request object, either of type - # {::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_violation(name: nil) - # Pass arguments to `get_violation` via keyword arguments. Note that at - # least one keyword argument is 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. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CloudControlsPartner::V1beta::Violation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/cloud_controls_partner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new - # - # # Call the get_violation method. - # result = client.get_violation request - # - # # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Violation. - # p result - # - def get_violation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest - - # Converts hash 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_violation.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::CloudControlsPartner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_violation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_violation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_controls_partner_monitoring_stub.get_violation 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 CloudControlsPartnerMonitoring REST API. - # - # This class represents the configuration for CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_violations.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 = "cloudcontrolspartner.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 CloudControlsPartnerMonitoring 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_violations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_violations - ## - # RPC-specific configuration for `get_violation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_violation - - # @private - def initialize parent_rpcs = nil - list_violations_config = parent_rpcs.list_violations if parent_rpcs.respond_to? :list_violations - @list_violations = ::Gapic::Config::Method.new list_violations_config - get_violation_config = parent_rpcs.get_violation if parent_rpcs.respond_to? :get_violation - @get_violation = ::Gapic::Config::Method.new get_violation_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb deleted file mode 100644 index 5e2200cc4630..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest/service_stub.rb +++ /dev/null @@ -1,203 +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/cloudcontrolspartner/v1beta/monitoring_pb" - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerMonitoring - module Rest - ## - # REST service stub for the CloudControlsPartnerMonitoring 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_violations REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest] - # 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::CloudControlsPartner::V1beta::ListViolationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse] - # A result object deserialized from the server's reply - def list_violations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_violations_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_violations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse.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_violation REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest] - # 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::CloudControlsPartner::V1beta::Violation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation] - # A result object deserialized from the server's reply - def get_violation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_violation_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_violation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CloudControlsPartner::V1beta::Violation.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_violations REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest] - # 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_violations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/violations", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_violation REST call - # - # @param request_pb [::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest] - # 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_violation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^organizations/[^/]+/locations/[^/]+/customers/[^/]+/workloads/[^/]+/violations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb deleted file mode 100644 index a8a5a2af9320..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" -require "google/cloud/cloud_controls_partner/v1beta/version" - -module Google - module Cloud - module CloudControlsPartner - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/cloud_controls_partner/v1beta/rest" - # client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb deleted file mode 100644 index e2b34ad15416..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloud_controls_partner/v1beta/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudControlsPartner - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb deleted file mode 100644 index 595cc841668f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nGgoogle/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xed\x03\n\x15\x41\x63\x63\x65ssApprovalRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x30\n\x0crequest_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12P\n\x10requested_reason\x18\x03 \x01(\x0b\x32\x36.google.cloud.cloudcontrolspartner.v1beta.AccessReason\x12=\n\x19requested_expiration_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp:\xfd\x01\xea\x41\xf9\x01\n9cloudcontrolspartner.googleapis.com/AccessApprovalRequest\x12\x8c\x01organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}*\x16\x61\x63\x63\x65ssApprovalRequests2\x15\x61\x63\x63\x65ssApprovalRequest\"\xd3\x01\n!ListAccessApprovalRequestsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39\x63loudcontrolspartner.googleapis.com/AccessApprovalRequest\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\"\xb5\x01\n\"ListAccessApprovalRequestsResponse\x12\x61\n\x18\x61\x63\x63\x65ss_approval_requests\x18\x01 \x03(\x0b\x32?.google.cloud.cloudcontrolspartner.v1beta.AccessApprovalRequest\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc6\x02\n\x0c\x41\x63\x63\x65ssReason\x12I\n\x04type\x18\x01 \x01(\x0e\x32;.google.cloud.cloudcontrolspartner.v1beta.AccessReason.Type\x12\x0e\n\x06\x64\x65tail\x18\x02 \x01(\t\"\xda\x01\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43USTOMER_INITIATED_SUPPORT\x10\x01\x12\x1c\n\x18GOOGLE_INITIATED_SERVICE\x10\x02\x12\x1b\n\x17GOOGLE_INITIATED_REVIEW\x10\x03\x12\x1c\n\x18THIRD_PARTY_DATA_REQUEST\x10\x04\x12\'\n#GOOGLE_RESPONSE_TO_PRODUCTION_ALERT\x10\x05\x12\x1a\n\x16\x43LOUD_INITIATED_ACCESS\x10\x06\x42\xb3\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x1b\x41\x63\x63\x65ssApprovalRequestsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - AccessApprovalRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.AccessApprovalRequest").msgclass - ListAccessApprovalRequestsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest").msgclass - ListAccessApprovalRequestsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsResponse").msgclass - AccessReason = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.AccessReason").msgclass - AccessReason::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.AccessReason.Type").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb deleted file mode 100644 index e2239ab23c8c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/completion_state_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/completion_state.proto - -require 'google/protobuf' - - -descriptor_data = "\n?google/cloud/cloudcontrolspartner/v1beta/completion_state.proto\x12(google.cloud.cloudcontrolspartner.v1beta*o\n\x0f\x43ompletionState\x12 \n\x1c\x43OMPLETION_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x12\n\x0eNOT_APPLICABLE\x10\x04\x42\xac\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x14\x43ompletionStateProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - CompletionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CompletionState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb deleted file mode 100644 index 9685d2152e3e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_pb.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/core.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/cloudcontrolspartner/v1beta/access_approval_requests_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/customers_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/partners_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/cloudcontrolspartner/v1beta/core.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1aGgoogle/cloud/cloudcontrolspartner/v1beta/access_approval_requests.proto\x1a\x41google/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto\x1a\x38google/cloud/cloudcontrolspartner/v1beta/customers.proto\x1a>google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto\x1a\x42google/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto\x1a\x37google/cloud/cloudcontrolspartner/v1beta/partners.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x02\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\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xd3\x14\n\x18\x43loudControlsPartnerCore\x12\xd2\x01\n\x0bGetWorkload\x12<.google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Workload\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*}\x12\xe5\x01\n\rListWorkloads\x12>.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest\x1a?.google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1beta/{parent=organizations/*/locations/*/customers/*}/workloads\x12\xc6\x01\n\x0bGetCustomer\x12<.google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{name=organizations/*/locations/*/customers/*}\x12\xd9\x01\n\rListCustomers\x12>.google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest\x1a?.google.cloud.cloudcontrolspartner.v1beta.ListCustomersResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1beta/{parent=organizations/*/locations/*}/customers\x12\xf3\x01\n\x11GetEkmConnections\x12\x42.google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest\x1a\x38.google.cloud.cloudcontrolspartner.v1beta.EkmConnections\"`\xda\x41\x04name\x82\xd3\xe4\x93\x02S\x12Q/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/ekmConnections}\x12\x83\x02\n\x15GetPartnerPermissions\x12\x46.google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest\x1a<.google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions\"d\xda\x41\x04name\x82\xd3\xe4\x93\x02W\x12U/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/partnerPermissions}\x12\xa8\x02\n\x1aListAccessApprovalRequests\x12K.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsRequest\x1aL.google.cloud.cloudcontrolspartner.v1beta.ListAccessApprovalRequestsResponse\"o\x88\x02\x01\xda\x41\x06parent\x82\xd3\xe4\x93\x02]\x12[/v1beta/{parent=organizations/*/locations/*/customers/*/workloads/*}/accessApprovalRequests\x12\xbf\x01\n\nGetPartner\x12;.google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest\x1a\x31.google.cloud.cloudcontrolspartner.v1beta.Partner\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{name=organizations/*/locations/*/partner}\x12\xed\x01\n\x0e\x43reateCustomer\x12?.google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\"f\xda\x41\x1bparent,customer,customer_id\x82\xd3\xe4\x93\x02\x42\"6/v1beta/{parent=organizations/*/locations/*}/customers:\x08\x63ustomer\x12\xef\x01\n\x0eUpdateCustomer\x12?.google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest\x1a\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\"h\xda\x41\x14\x63ustomer,update_mask\x82\xd3\xe4\x93\x02K2?/v1beta/{customer.name=organizations/*/locations/*/customers/*}:\x08\x63ustomer\x12\xb0\x01\n\x0e\x44\x65leteCustomer\x12?.google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest\x1a\x16.google.protobuf.Empty\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1beta/{name=organizations/*/locations/*/customers/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x91\x03\n,com.google.cloud.cloudcontrolspartner.v1betaB\tCoreProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1beta\xea\x41m\n8cloudcontrolspartner.googleapis.com/OrganizationLocation\x12\x31organizations/{organization}/locations/{location}b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb deleted file mode 100644 index 0db28e73dfd7..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/core_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudcontrolspartner/v1beta/core.proto for package 'Google.Cloud.CloudControlsPartner.V1beta' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1beta/core_pb' - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerCore - # Service describing handlers for resources - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore' - - # Gets details of a single workload - rpc :GetWorkload, ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Workload - # Lists customer workloads for a given customer org id - rpc :ListWorkloads, ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse - # Gets details of a single customer - rpc :GetCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Customer - # Lists customers of a partner identified by its Google Cloud organization ID - rpc :ListCustomers, ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse - # Gets the EKM connections associated with a workload - rpc :GetEkmConnections, ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections - # Gets the partner permissions granted for a workload - rpc :GetPartnerPermissions, ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions - # Deprecated: Only returns access approval requests directly associated with - # an assured workload folder. - rpc :ListAccessApprovalRequests, ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse - # Get details of a Partner. - rpc :GetPartner, ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Partner - # Creates a new customer. - rpc :CreateCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Customer - # Update details of a single customer - rpc :UpdateCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Customer - # Delete details of a single customer - rpc :DeleteCustomer, ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb deleted file mode 100644 index 60e3b68258e2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customer_workloads_pb.rb +++ /dev/null @@ -1,33 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/completion_state_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nAgoogle/cloud/cloudcontrolspartner/v1beta/customer_workloads.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a?google/cloud/cloudcontrolspartner/v1beta/completion_state.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x06\n\x08Workload\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x16\n\tfolder_id\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06\x66older\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x19workload_onboarding_state\x18\x05 \x01(\x0b\x32\x41.google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingState\x12\x14\n\x0cis_onboarded\x18\x06 \x01(\x08\x12!\n\x19key_management_project_id\x18\x07 \x01(\t\x12\x10\n\x08location\x18\x08 \x01(\t\x12K\n\x07partner\x18\t \x01(\x0e\x32:.google.cloud.cloudcontrolspartner.v1beta.Workload.Partner\"\xa2\x02\n\x07Partner\x12\x17\n\x13PARTNER_UNSPECIFIED\x10\x00\x12\"\n\x1ePARTNER_LOCAL_CONTROLS_BY_S3NS\x10\x01\x12+\n\'PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS\x10\x02\x12-\n)PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT\x10\x03\x12%\n!PARTNER_SOVEREIGN_CONTROLS_BY_PSN\x10\x04\x12\'\n#PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT\x10\x06\x12.\n*PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM\x10\x07:\xa4\x01\xea\x41\xa0\x01\n,cloudcontrolspartner.googleapis.com/Workload\x12[organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}*\tworkloads2\x08workload\"\xaf\x01\n\x14ListWorkloadsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Workload\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x8c\x01\n\x15ListWorkloadsResponse\x12\x45\n\tworkloads\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.Workload\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"X\n\x12GetWorkloadRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Workload\"u\n\x17WorkloadOnboardingState\x12Z\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32@.google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep\"\x86\x03\n\x16WorkloadOnboardingStep\x12S\n\x04step\x18\x01 \x01(\x0e\x32\x45.google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x39.google.cloud.cloudcontrolspartner.v1beta.CompletionStateB\x03\xe0\x41\x03\"X\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x45KM_PROVISIONED\x10\x01\x12%\n!SIGNED_ACCESS_APPROVAL_CONFIGURED\x10\x02\x42\xae\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x16\x43ustomerWorkloadsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - Workload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Workload").msgclass - Workload::Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Workload.Partner").enummodule - ListWorkloadsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsRequest").msgclass - ListWorkloadsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListWorkloadsResponse").msgclass - GetWorkloadRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetWorkloadRequest").msgclass - WorkloadOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingState").msgclass - WorkloadOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep").msgclass - WorkloadOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.WorkloadOnboardingStep.Step").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb deleted file mode 100644 index 69c1a90d16e9..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/customers_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/customers.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/completion_state_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/cloudcontrolspartner/v1beta/customers.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a?google/cloud/cloudcontrolspartner/v1beta/completion_state.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf2\x02\n\x08\x43ustomer\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12i\n\x19\x63ustomer_onboarding_state\x18\x03 \x01(\x0b\x32\x41.google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStateB\x03\xe0\x41\x03\x12\x19\n\x0cis_onboarded\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12 \n\x13organization_domain\x18\x05 \x01(\tB\x03\xe0\x41\x03:\x8f\x01\xea\x41\x8b\x01\n,cloudcontrolspartner.googleapis.com/Customer\x12\x46organizations/{organization}/locations/{location}/customers/{customer}*\tcustomers2\x08\x63ustomer\"\xaf\x01\n\x14ListCustomersRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\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\"\x8c\x01\n\x15ListCustomersResponse\x12\x45\n\tcustomers\x18\x01 \x03(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.Customer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc2\x01\n\x15\x43reateCustomerRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,cloudcontrolspartner.googleapis.com/Customer\x12I\n\x08\x63ustomer\x18\x02 \x01(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.CustomerB\x03\xe0\x41\x02\x12\x18\n\x0b\x63ustomer_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"X\n\x12GetCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/Customer\"u\n\x17\x43ustomerOnboardingState\x12Z\n\x10onboarding_steps\x18\x01 \x03(\x0b\x32@.google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep\"\xf8\x02\n\x16\x43ustomerOnboardingStep\x12S\n\x04step\x18\x01 \x01(\x0e\x32\x45.google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep.Step\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x63ompletion_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12X\n\x10\x63ompletion_state\x18\x04 \x01(\x0e\x32\x39.google.cloud.cloudcontrolspartner.v1beta.CompletionStateB\x03\xe0\x41\x03\"J\n\x04Step\x12\x14\n\x10STEP_UNSPECIFIED\x10\x00\x12\x12\n\x0eKAJ_ENROLLMENT\x10\x01\x12\x18\n\x14\x43USTOMER_ENVIRONMENT\x10\x02\"\x98\x01\n\x15UpdateCustomerRequest\x12I\n\x08\x63ustomer\x18\x01 \x01(\x0b\x32\x32.google.cloud.cloudcontrolspartner.v1beta.CustomerB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"[\n\x15\x44\x65leteCustomerRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,cloudcontrolspartner.googleapis.com/CustomerB\xa6\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x0e\x43ustomersProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - Customer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Customer").msgclass - ListCustomersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListCustomersRequest").msgclass - ListCustomersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListCustomersResponse").msgclass - CreateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CreateCustomerRequest").msgclass - GetCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetCustomerRequest").msgclass - CustomerOnboardingState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingState").msgclass - CustomerOnboardingStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep").msgclass - CustomerOnboardingStep::Step = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.CustomerOnboardingStep.Step").enummodule - UpdateCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.UpdateCustomerRequest").msgclass - DeleteCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.DeleteCustomerRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb deleted file mode 100644 index b0cbbbbc5e33..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/ekm_connections_pb.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n>google/cloud/cloudcontrolspartner/v1beta/ekm_connections.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\x9c\x02\n\x0e\x45kmConnections\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12P\n\x0f\x65km_connections\x18\x02 \x03(\x0b\x32\x37.google.cloud.cloudcontrolspartner.v1beta.EkmConnection:\xa4\x01\xea\x41\xa0\x01\n2cloudcontrolspartner.googleapis.com/EkmConnections\x12jorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections\"d\n\x18GetEkmConnectionsRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2cloudcontrolspartner.googleapis.com/EkmConnections\"\xac\x03\n\rEkmConnection\x12\x17\n\x0f\x63onnection_name\x18\x01 \x01(\t\x12\x66\n\x10\x63onnection_state\x18\x02 \x01(\x0e\x32G.google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionStateB\x03\xe0\x41\x03\x12\x61\n\x10\x63onnection_error\x18\x03 \x01(\x0b\x32G.google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionError\x1a>\n\x0f\x43onnectionError\x12\x14\n\x0c\x65rror_domain\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\"w\n\x0f\x43onnectionState\x12 \n\x1c\x43ONNECTION_STATE_UNSPECIFIED\x10\x00\x12\r\n\tAVAILABLE\x10\x01\x12\x11\n\rNOT_AVAILABLE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x15\n\x11PERMISSION_DENIED\x10\x04\x42\xab\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x13\x45kmConnectionsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - EkmConnections = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnections").msgclass - GetEkmConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetEkmConnectionsRequest").msgclass - EkmConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnection").msgclass - EkmConnection::ConnectionError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionError").msgclass - EkmConnection::ConnectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmConnection.ConnectionState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb deleted file mode 100644 index 658a14f6e22c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/monitoring.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/cloudcontrolspartner/v1beta/violations_pb' - - -descriptor_data = "\n9google/cloud/cloudcontrolspartner/v1beta/monitoring.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x39google/cloud/cloudcontrolspartner/v1beta/violations.proto2\xd6\x04\n\x1e\x43loudControlsPartnerMonitoring\x12\xf5\x01\n\x0eListViolations\x12?.google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest\x1a@.google.cloud.cloudcontrolspartner.v1beta.ListViolationsResponse\"`\xda\x41\x06parent\x82\xd3\xe4\x93\x02Q\x12O/v1beta/{parent=organizations/*/locations/*/customers/*/workloads/*}/violations\x12\xe2\x01\n\x0cGetViolation\x12=.google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest\x1a\x33.google.cloud.cloudcontrolspartner.v1beta.Violation\"^\xda\x41\x04name\x82\xd3\xe4\x93\x02Q\x12O/v1beta/{name=organizations/*/locations/*/customers/*/workloads/*/violations/*}\x1aW\xca\x41#cloudcontrolspartner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa7\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x0fMonitoringProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb deleted file mode 100644 index 4959b4841e5b..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/monitoring_services_pb.rb +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/cloudcontrolspartner/v1beta/monitoring.proto for package 'Google.Cloud.CloudControlsPartner.V1beta' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/cloudcontrolspartner/v1beta/monitoring_pb' - -module Google - module Cloud - module CloudControlsPartner - module V1beta - module CloudControlsPartnerMonitoring - # Service describing handlers for resources - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring' - - # Lists Violations for a workload - # Callers may also choose to read across multiple Customers or for a single - # customer as per - # [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash - # character) as a wildcard character instead of {customer} & {workload}. - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - rpc :ListViolations, ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse - # Gets details of a single Violation. - rpc :GetViolation, ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, ::Google::Cloud::CloudControlsPartner::V1beta::Violation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb deleted file mode 100644 index d853b4a57047..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partner_permissions_pb.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\nBgoogle/cloud/cloudcontrolspartner/v1beta/partner_permissions.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb9\x04\n\x12PartnerPermissions\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x64\n\x13partner_permissions\x18\x02 \x03(\x0e\x32G.google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission\"\xfa\x01\n\nPermission\x12\x1a\n\x16PERMISSION_UNSPECIFIED\x10\x00\x12\x31\n-ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS\x10\x01\x12 \n\x1c\x41SSURED_WORKLOADS_MONITORING\x10\x02\x12\x1c\n\x18\x41\x43\x43\x45SS_APPROVAL_REQUESTS\x10\x03\x12+\n\'ASSURED_WORKLOADS_EKM_CONNECTION_STATUS\x10\x04\x12\x30\n,ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER\x10\x05:\xac\x01\xea\x41\xa8\x01\n6cloudcontrolspartner.googleapis.com/PartnerPermissions\x12norganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions\"l\n\x1cGetPartnerPermissionsRequest\x12L\n\x04name\x18\x01 \x01(\tB>\xe0\x41\x02\xfa\x41\x38\n6cloudcontrolspartner.googleapis.com/PartnerPermissionsB\xaf\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x17PartnerPermissionsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - PartnerPermissions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions").msgclass - PartnerPermissions::Permission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission").enummodule - GetPartnerPermissionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetPartnerPermissionsRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb deleted file mode 100644 index 86f98ef64c90..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/partners_pb.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/partners.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/cloudcontrolspartner/v1beta/partners.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc5\x03\n\x07Partner\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12;\n\x04skus\x18\x03 \x03(\x0b\x32-.google.cloud.cloudcontrolspartner.v1beta.Sku\x12L\n\rekm_solutions\x18\x04 \x03(\x0b\x32\x35.google.cloud.cloudcontrolspartner.v1beta.EkmMetadata\x12\x1e\n\x16operated_cloud_regions\x18\x05 \x03(\t\x12\x1a\n\x12partner_project_id\x18\x07 \x01(\t\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:t\xea\x41q\n+cloudcontrolspartner.googleapis.com/Partner\x12\x39organizations/{organization}/locations/{location}/partner2\x07partner\"V\n\x11GetPartnerRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudcontrolspartner.googleapis.com/Partner\"\'\n\x03Sku\x12\n\n\x02id\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\"\xe4\x01\n\x0b\x45kmMetadata\x12W\n\x0c\x65km_solution\x18\x01 \x01(\x0e\x32\x41.google.cloud.cloudcontrolspartner.v1beta.EkmMetadata.EkmSolution\x12\x18\n\x10\x65km_endpoint_uri\x18\x02 \x01(\t\"b\n\x0b\x45kmSolution\x12\x1c\n\x18\x45KM_SOLUTION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x46ORTANIX\x10\x01\x12\x0b\n\x07\x46UTUREX\x10\x02\x12\n\n\x06THALES\x10\x03\x12\x0e\n\x06VIRTRU\x10\x04\x1a\x02\x08\x01\x42\xa5\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\rPartnersProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - Partner = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Partner").msgclass - GetPartnerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetPartnerRequest").msgclass - Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Sku").msgclass - EkmMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmMetadata").msgclass - EkmMetadata::EkmSolution = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.EkmMetadata.EkmSolution").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb deleted file mode 100644 index 6c00192dd2d8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/lib/google/cloud/cloudcontrolspartner/v1beta/violations_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/cloudcontrolspartner/v1beta/violations.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/interval_pb' - - -descriptor_data = "\n9google/cloud/cloudcontrolspartner/v1beta/violations.proto\x12(google.cloud.cloudcontrolspartner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1agoogle/type/interval.proto\"\xb9\r\n\tViolation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nbegin_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\x35\n\x0cresolve_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x15\n\x08\x63\x61tegory\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12M\n\x05state\x18\x07 \x01(\x0e\x32\x39.google.cloud.cloudcontrolspartner.v1beta.Violation.StateB\x03\xe0\x41\x03\x12(\n\x18non_compliant_org_policy\x18\x08 \x01(\tB\x06\xe0\x41\x03\xe0\x41\x05\x12\x11\n\tfolder_id\x18\t \x01(\x03\x12Y\n\x0bremediation\x18\r \x01(\x0b\x32?.google.cloud.cloudcontrolspartner.v1beta.Violation.RemediationB\x03\xe0\x41\x03\x1a\xd0\x07\n\x0bRemediation\x12g\n\x0cinstructions\x18\x01 \x01(\x0b\x32L.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.InstructionsB\x03\xe0\x41\x02\x12\x18\n\x10\x63ompliant_values\x18\x02 \x03(\t\x12n\n\x10remediation_type\x18\x03 \x01(\x0e\x32O.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.RemediationTypeB\x03\xe0\x41\x03\x1a\x8a\x03\n\x0cInstructions\x12p\n\x13gcloud_instructions\x18\x01 \x01(\x0b\x32S.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Gcloud\x12r\n\x14\x63onsole_instructions\x18\x02 \x01(\x0b\x32T.google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Console\x1aJ\n\x06Gcloud\x12\x17\n\x0fgcloud_commands\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\x1aH\n\x07\x43onsole\x12\x14\n\x0c\x63onsole_uris\x18\x01 \x03(\t\x12\r\n\x05steps\x18\x02 \x03(\t\x12\x18\n\x10\x61\x64\x64itional_links\x18\x03 \x03(\t\"\xc0\x02\n\x0fRemediationType\x12 \n\x1cREMEDIATION_TYPE_UNSPECIFIED\x10\x00\x12,\n(REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION\x10\x01\x12\x38\n4REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION\x10\x02\x12\x37\n3REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION\x10\x03\x12\x46\nBREMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION\x10\x04\x12\"\n\x1eREMEDIATION_RESOURCE_VIOLATION\x10\x05\"K\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08RESOLVED\x10\x01\x12\x0e\n\nUNRESOLVED\x10\x02\x12\r\n\tEXCEPTION\x10\x03:\xbe\x01\xea\x41\xba\x01\n-cloudcontrolspartner.googleapis.com/Violation\x12rorganizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}*\nviolations2\tviolation\"\xe9\x01\n\x15ListViolationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-cloudcontrolspartner.googleapis.com/Violation\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\x12,\n\x08interval\x18\x06 \x01(\x0b\x32\x15.google.type.IntervalB\x03\xe0\x41\x01\"\x8f\x01\n\x16ListViolationsResponse\x12G\n\nviolations\x18\x01 \x03(\x0b\x32\x33.google.cloud.cloudcontrolspartner.v1beta.Violation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Z\n\x13GetViolationRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-cloudcontrolspartner.googleapis.com/ViolationB\xa7\x02\n,com.google.cloud.cloudcontrolspartner.v1betaB\x0fViolationsProtoP\x01Z`cloud.google.com/go/cloudcontrolspartner/apiv1beta/cloudcontrolspartnerpb;cloudcontrolspartnerpb\xaa\x02(Google.Cloud.CloudControlsPartner.V1Beta\xca\x02(Google\\Cloud\\CloudControlsPartner\\V1beta\xea\x02+Google::Cloud::CloudControlsPartner::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CloudControlsPartner - module V1beta - Violation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation").msgclass - Violation::Remediation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation").msgclass - Violation::Remediation::Instructions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions").msgclass - Violation::Remediation::Instructions::Gcloud = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Gcloud").msgclass - Violation::Remediation::Instructions::Console = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.Instructions.Console").msgclass - Violation::Remediation::RemediationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.Remediation.RemediationType").enummodule - Violation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.Violation.State").enummodule - ListViolationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListViolationsRequest").msgclass - ListViolationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.ListViolationsResponse").msgclass - GetViolationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.cloudcontrolspartner.v1beta.GetViolationRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md deleted file mode 100644 index ca5eabdde450..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Controls Partner V1BETA Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 5089551e9ea4..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,589 +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: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb deleted file mode 100644 index 4b8bcf42cc7d..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/access_approval_requests.rb +++ /dev/null @@ -1,143 +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 CloudControlsPartner - module V1beta - # Details about the Access request. - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/accessApprovalRequests/{access_approval_request}` - # @!attribute [rw] request_time - # @return [::Google::Protobuf::Timestamp] - # The time at which approval was requested. - # @!attribute [rw] requested_reason - # @return [::Google::Cloud::CloudControlsPartner::V1beta::AccessReason] - # The justification for which approval is being requested. - # @!attribute [rw] requested_expiration_time - # @return [::Google::Protobuf::Timestamp] - # The requested expiration for the approval. If the request is approved, - # access will be granted from the time of approval until the expiration time. - class AccessApprovalRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting the access requests associated with a workload. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of access requests to return. The service may - # return fewer than this value. If unspecified, at most 500 access requests - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListAccessApprovalRequests` call. Provide this to retrieve the subsequent - # page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListAccessApprovalRequestsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list access requests. - # @!attribute [rw] access_approval_requests - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::AccessApprovalRequest>] - # List of access approval requests - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListAccessApprovalRequestsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Reason for the access. - # @!attribute [rw] type - # @return [::Google::Cloud::CloudControlsPartner::V1beta::AccessReason::Type] - # Type of access justification. - # @!attribute [rw] detail - # @return [::String] - # More detail about certain reason types. See comments for each type above. - class AccessReason - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Type of access justification. - module Type - # Default value for proto, shouldn't be used. - TYPE_UNSPECIFIED = 0 - - # Customer made a request or raised an issue that required the principal to - # access customer data. `detail` is of the form ("#####" is the issue ID): - # - # - "Feedback Report: #####" - # - "Case Number: #####" - # - "Case ID: #####" - # - "E-PIN Reference: #####" - # - "Google-#####" - # - "T-#####" - CUSTOMER_INITIATED_SUPPORT = 1 - - # The principal accessed customer data in order to diagnose or resolve a - # suspected issue in services. Often this access is used to confirm that - # customers are not affected by a suspected service issue or to remediate a - # reversible system issue. - GOOGLE_INITIATED_SERVICE = 2 - - # Google initiated service for security, fraud, abuse, or compliance - # purposes. - GOOGLE_INITIATED_REVIEW = 3 - - # The principal was compelled to access customer data in order to respond - # to a legal third party data request or process, including legal processes - # from customers themselves. - THIRD_PARTY_DATA_REQUEST = 4 - - # The principal accessed customer data in order to diagnose or resolve a - # suspected issue in services or a known outage. - GOOGLE_RESPONSE_TO_PRODUCTION_ALERT = 5 - - # Similar to 'GOOGLE_INITIATED_SERVICE' or 'GOOGLE_INITIATED_REVIEW', but - # with universe agnostic naming. The principal accessed customer data in - # order to diagnose or resolve a suspected issue in services or a known - # outage, or for security, fraud, abuse, or compliance review purposes. - CLOUD_INITIATED_ACCESS = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb deleted file mode 100644 index b2b78a51af66..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/completion_state.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudControlsPartner - module V1beta - # Enum for possible completion states. - module CompletionState - # Unspecified completion state. - COMPLETION_STATE_UNSPECIFIED = 0 - - # Task started (has start date) but not yet completed. - PENDING = 1 - - # Succeeded state. - SUCCEEDED = 2 - - # Failed state. - FAILED = 3 - - # Not applicable state. - NOT_APPLICABLE = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb deleted file mode 100644 index 0303e86d1521..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/core.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CloudControlsPartner - module V1beta - # 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_message - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] requested_cancellation - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have been cancelled successfully - # have [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-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb deleted file mode 100644 index c4116694fedf..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customer_workloads.rb +++ /dev/null @@ -1,177 +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 CloudControlsPartner - module V1beta - # Contains metadata around the [Workload - # resource](https://cloud.google.com/assured-workloads/docs/reference/rest/Shared.Types/Workload) - # in the Assured Workloads API. - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @!attribute [r] folder_id - # @return [::Integer] - # Output only. Folder id this workload is associated with - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the resource was created. - # @!attribute [r] folder - # @return [::String] - # Output only. The name of container folder of the assured workload - # @!attribute [rw] workload_onboarding_state - # @return [::Google::Cloud::CloudControlsPartner::V1beta::WorkloadOnboardingState] - # Container for workload onboarding steps. - # @!attribute [rw] is_onboarded - # @return [::Boolean] - # Indicates whether a workload is fully onboarded. - # @!attribute [rw] key_management_project_id - # @return [::String] - # The project id of the key management project for the workload - # @!attribute [rw] location - # @return [::String] - # The Google Cloud location of the workload - # @!attribute [rw] partner - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Workload::Partner] - # Partner associated with this workload. - class Workload - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported Assured Workloads Partners. - module Partner - # Unknown Partner. - PARTNER_UNSPECIFIED = 0 - - # Enum representing S3NS (Thales) partner. - PARTNER_LOCAL_CONTROLS_BY_S3NS = 1 - - # Enum representing T_SYSTEM (TSI) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_T_SYSTEMS = 2 - - # Enum representing SIA_MINSAIT (Indra) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_SIA_MINSAIT = 3 - - # Enum representing PSN (TIM) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_PSN = 4 - - # Enum representing CNTXT (Kingdom of Saudi Arabia) partner. - PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT = 6 - - # Enum representing CNXT (Kingdom of Saudi Arabia) partner offering without - # EKM provisioning. - PARTNER_SOVEREIGN_CONTROLS_BY_CNTXT_NO_EKM = 7 - end - end - - # Request to list customer workloads. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of workloads to return. The service may return fewer - # than this value. If unspecified, at most 500 workloads will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListWorkloads` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListWorkloadsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list customer workloads requests. - # @!attribute [rw] workloads - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Workload>] - # List of customer workloads - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListWorkloadsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a customer workload. - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - class GetWorkloadRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for workload onboarding steps. - # @!attribute [rw] onboarding_steps - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::WorkloadOnboardingStep>] - # List of workload onboarding steps. - class WorkloadOnboardingState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for workload onboarding information. - # @!attribute [rw] step - # @return [::Google::Cloud::CloudControlsPartner::V1beta::WorkloadOnboardingStep::Step] - # The onboarding step. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The starting time of the onboarding step. - # @!attribute [rw] completion_time - # @return [::Google::Protobuf::Timestamp] - # The completion time of the onboarding step. - # @!attribute [r] completion_state - # @return [::Google::Cloud::CloudControlsPartner::V1beta::CompletionState] - # Output only. The completion state of the onboarding step. - class WorkloadOnboardingStep - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for possible onboarding steps. - module Step - # Unspecified step. - STEP_UNSPECIFIED = 0 - - # EKM Provisioned step. - EKM_PROVISIONED = 1 - - # Signed Access Approval step. - SIGNED_ACCESS_APPROVAL_CONFIGURED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb deleted file mode 100644 index a3f2009988ab..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/customers.rb +++ /dev/null @@ -1,180 +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 CloudControlsPartner - module V1beta - # Contains metadata around a Cloud Controls Partner Customer - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @!attribute [rw] display_name - # @return [::String] - # Required. Display name for the customer - # @!attribute [r] customer_onboarding_state - # @return [::Google::Cloud::CloudControlsPartner::V1beta::CustomerOnboardingState] - # Output only. Container for customer onboarding steps - # @!attribute [r] is_onboarded - # @return [::Boolean] - # Output only. Indicates whether a customer is fully onboarded - # @!attribute [r] organization_domain - # @return [::String] - # Output only. The customer organization domain, extracted from - # CRM Organization’s display_name field. e.g. "google.com" - class Customer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list customers - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of Customers to return. The service may return fewer - # than this value. If unspecified, at most 500 Customers will be returned. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListCustomers` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - class ListCustomersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list customer Customers requests - # @!attribute [rw] customers - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Customer>] - # List of customers - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListCustomersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a customer - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format: `organizations/{organization}/locations/{location}` - # @!attribute [rw] customer - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # Required. The customer to create. - # @!attribute [rw] customer_id - # @return [::String] - # Required. The customer id to use for the customer, which will become the - # final component of the customer's resource name. The specified value must - # be a valid Google cloud organization id. - class CreateCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a customer - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - class GetCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for customer onboarding steps - # @!attribute [rw] onboarding_steps - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::CustomerOnboardingStep>] - # List of customer onboarding steps - class CustomerOnboardingState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Container for customer onboarding information - # @!attribute [rw] step - # @return [::Google::Cloud::CloudControlsPartner::V1beta::CustomerOnboardingStep::Step] - # The onboarding step - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The starting time of the onboarding step - # @!attribute [rw] completion_time - # @return [::Google::Protobuf::Timestamp] - # The completion time of the onboarding step - # @!attribute [r] completion_state - # @return [::Google::Cloud::CloudControlsPartner::V1beta::CompletionState] - # Output only. Current state of the step - class CustomerOnboardingStep - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for possible onboarding steps - module Step - # Unspecified step - STEP_UNSPECIFIED = 0 - - # KAJ Enrollment - KAJ_ENROLLMENT = 1 - - # Customer Environment - CUSTOMER_ENVIRONMENT = 2 - end - end - - # Request to update a customer - # @!attribute [rw] customer - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Customer] - # Required. The customer to update - # Format: - # `organizations/{organization}/locations/{location}/customers/{customer}` - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update - class UpdateCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting customer - # @!attribute [rw] name - # @return [::String] - # Required. name of the resource to be deleted - # format: name=organizations/*/locations/*/customers/* - class DeleteCustomerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb deleted file mode 100644 index 94d26e9bf728..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/ekm_connections.rb +++ /dev/null @@ -1,96 +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 CloudControlsPartner - module V1beta - # The EKM connections associated with a workload - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - # @!attribute [rw] ekm_connections - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::EkmConnection>] - # The EKM connections associated with the workload - class EkmConnections - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting the EKM connections associated with a workload - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/ekmConnections` - class GetEkmConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about the EKM connection - # @!attribute [rw] connection_name - # @return [::String] - # Resource name of the EKM connection in the format: - # projects/\\{project}/locations/\\{location}/ekmConnections/\\{ekm_connection} - # @!attribute [r] connection_state - # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnection::ConnectionState] - # Output only. The connection state - # @!attribute [rw] connection_error - # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmConnection::ConnectionError] - # The connection error that occurred if any - class EkmConnection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information around the error that occurred if the connection state is - # anything other than available or unspecified - # @!attribute [rw] error_domain - # @return [::String] - # The error domain for the error - # @!attribute [rw] error_message - # @return [::String] - # The error message for the error - class ConnectionError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The EKM connection state. - module ConnectionState - # Unspecified EKM connection state - CONNECTION_STATE_UNSPECIFIED = 0 - - # Available EKM connection state - AVAILABLE = 1 - - # Not available EKM connection state - NOT_AVAILABLE = 2 - - # Error EKM connection state - ERROR = 3 - - # Permission denied EKM connection state - PERMISSION_DENIED = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.rb deleted file mode 100644 index b9ad01e93ef2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partner_permissions.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! - - -module Google - module Cloud - module CloudControlsPartner - module V1beta - # The permissions granted to the partner for a workload - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - # @!attribute [rw] partner_permissions - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions::Permission>] - # The partner permissions granted for the workload - class PartnerPermissions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module Permission - # Unspecified partner permission - PERMISSION_UNSPECIFIED = 0 - - # Permission for Access Transparency and emergency logs - ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS = 1 - - # Permission for Assured Workloads monitoring violations - ASSURED_WORKLOADS_MONITORING = 2 - - # Permission for Access Approval requests - ACCESS_APPROVAL_REQUESTS = 3 - - # Permission for External Key Manager connection status - ASSURED_WORKLOADS_EKM_CONNECTION_STATUS = 4 - - # Permission for support case details for Access Transparency log entries - ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER = 5 - end - end - - # Request for getting the partner permissions granted for a workload - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource to get in the format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/partnerPermissions` - class GetPartnerPermissionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb deleted file mode 100644 index 6cd330668d88..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/partners.rb +++ /dev/null @@ -1,117 +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 CloudControlsPartner - module V1beta - # Message describing Partner resource - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the partner. - # Format: `organizations/{organization}/locations/{location}/partner` - # Example: "organizations/123456/locations/us-central1/partner" - # @!attribute [rw] skus - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Sku>] - # List of SKUs the partner is offering - # @!attribute [rw] ekm_solutions - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::EkmMetadata>] - # List of Google Cloud supported EKM partners supported by the partner - # @!attribute [rw] operated_cloud_regions - # @return [::Array<::String>] - # List of Google Cloud regions that the partner sells services to customers. - # Valid Google Cloud regions found here: - # https://cloud.google.com/compute/docs/regions-zones - # @!attribute [rw] partner_project_id - # @return [::String] - # Google Cloud project ID in the partner's Google Cloud organization for - # receiving enhanced Logs for Partners. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time the resource was created - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time the resource was updated - class Partner - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a Partner - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/partner` - class GetPartnerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the SKU a partner owns inside Google Cloud to sell to customers. - # @!attribute [rw] id - # @return [::String] - # Argentum product SKU, that is associated with the partner offerings to - # customers used by Syntro for billing purposes. SKUs can represent resold - # Google products or support services. - # @!attribute [rw] display_name - # @return [::String] - # Display name of the product identified by the SKU. A partner may want to - # show partner branded names for their offerings such as local sovereign - # cloud solutions. - class Sku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Holds information needed by Mudbray to use partner EKMs for workloads. - # @!attribute [rw] ekm_solution - # @return [::Google::Cloud::CloudControlsPartner::V1beta::EkmMetadata::EkmSolution] - # The Cloud EKM partner. - # @!attribute [rw] ekm_endpoint_uri - # @return [::String] - # Endpoint for sending requests to the EKM for key provisioning during - # Assured Workload creation. - class EkmMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents Google Cloud supported external key management partners - # [Google Cloud EKM partners - # docs](https://cloud.google.com/kms/docs/ekm#supported_partners). - module EkmSolution - # Unspecified EKM solution - EKM_SOLUTION_UNSPECIFIED = 0 - - # EKM Partner Fortanix - FORTANIX = 1 - - # EKM Partner FutureX - FUTUREX = 2 - - # EKM Partner Thales - THALES = 3 - - # This enum value is never used. - VIRTRU = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.rb deleted file mode 100644 index 137c14ba03e9..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/cloud/cloudcontrolspartner/v1beta/violations.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 Cloud - module CloudControlsPartner - module V1beta - # Details of resource Violation - # @!attribute [rw] name - # @return [::String] - # Identifier. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - # @!attribute [r] description - # @return [::String] - # Output only. Description for the Violation. - # e.g. OrgPolicy gcp.resourceLocations has non compliant value. - # @!attribute [r] begin_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which triggered the Violation. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last time when the Violation record was updated. - # @!attribute [r] resolve_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time of the event which fixed the Violation. - # If the violation is ACTIVE this will be empty. - # @!attribute [r] category - # @return [::String] - # Output only. Category under which this violation is mapped. - # e.g. Location, Service Usage, Access, Encryption, etc. - # @!attribute [r] state - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::State] - # Output only. State of the violation - # @!attribute [r] non_compliant_org_policy - # @return [::String] - # Output only. Immutable. Name of the OrgPolicy which was modified with - # non-compliant change and resulted this violation. Format: - # `projects/{project_number}/policies/{constraint_name}` - # `folders/{folder_id}/policies/{constraint_name}` - # `organizations/{organization_id}/policies/{constraint_name}` - # @!attribute [rw] folder_id - # @return [::Integer] - # The folder_id of the violation - # @!attribute [r] remediation - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation] - # Output only. Compliance violation remediation - class Violation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents remediation guidance to resolve compliance violation for - # AssuredWorkload - # @!attribute [rw] instructions - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::Instructions] - # Required. Remediation instructions to resolve violations - # @!attribute [rw] compliant_values - # @return [::Array<::String>] - # Values that can resolve the violation - # For example: for list org policy violations, this will either be the list - # of allowed or denied values - # @!attribute [r] remediation_type - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::RemediationType] - # Output only. Remediation type based on the type of org policy values - # violated - class Remediation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Instructions to remediate violation - # @!attribute [rw] gcloud_instructions - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::Instructions::Gcloud] - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] console_instructions - # @return [::Google::Cloud::CloudControlsPartner::V1beta::Violation::Remediation::Instructions::Console] - # Remediation instructions to resolve violation via cloud console - class Instructions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Remediation instructions to resolve violation via gcloud cli - # @!attribute [rw] gcloud_commands - # @return [::Array<::String>] - # Gcloud command to resolve violation - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via gcloud cli - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Gcloud - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Remediation instructions to resolve violation via cloud console - # @!attribute [rw] console_uris - # @return [::Array<::String>] - # Link to console page where violations can be resolved - # @!attribute [rw] steps - # @return [::Array<::String>] - # Steps to resolve violation via cloud console - # @!attribute [rw] additional_links - # @return [::Array<::String>] - # Additional urls for more information about steps - class Console - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Classifying remediation into various types based on the kind of - # violation. For example, violations caused due to changes in boolean org - # policy requires different remediation instructions compared to violation - # caused due to changes in allowed values of list org policy. - module RemediationType - # Unspecified remediation type - REMEDIATION_TYPE_UNSPECIFIED = 0 - - # Remediation type for boolean org policy - REMEDIATION_BOOLEAN_ORG_POLICY_VIOLATION = 1 - - # Remediation type for list org policy which have allowed values in the - # monitoring rule - REMEDIATION_LIST_ALLOWED_VALUES_ORG_POLICY_VIOLATION = 2 - - # Remediation type for list org policy which have denied values in the - # monitoring rule - REMEDIATION_LIST_DENIED_VALUES_ORG_POLICY_VIOLATION = 3 - - # Remediation type for gcp.restrictCmekCryptoKeyProjects - REMEDIATION_RESTRICT_CMEK_CRYPTO_KEY_PROJECTS_ORG_POLICY_VIOLATION = 4 - - # Remediation type for resource violation. - REMEDIATION_RESOURCE_VIOLATION = 5 - end - end - - # Violation State Values - module State - # Unspecified state. - STATE_UNSPECIFIED = 0 - - # Violation is resolved. - RESOLVED = 1 - - # Violation is Unresolved - UNRESOLVED = 2 - - # Violation is Exception - EXCEPTION = 3 - end - end - - # Message for requesting list of Violations - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource - # Format - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of customers row to return. The service may - # return fewer than this value. If unspecified, at most 10 customers will be - # returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListViolations` call. - # Provide this to retrieve the subsequent page. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering results - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results - # @!attribute [rw] interval - # @return [::Google::Type::Interval] - # Optional. Specifies the interval for retrieving violations. - # if unspecified, all violations will be returned. - class ListViolationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for list customer violation requests - # @!attribute [rw] violations - # @return [::Array<::Google::Cloud::CloudControlsPartner::V1beta::Violation>] - # List of violation - # @!attribute [rw] next_page_token - # @return [::String] - # A token that can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Workloads that could not be reached due to permission errors or any other - # error. Ref: https://google.aip.dev/217 - class ListViolationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a Violation - # @!attribute [rw] name - # @return [::String] - # Required. Format: - # `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}` - class GetViolationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/proto_docs/google/type/interval.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! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile deleted file mode 100644 index a091fbb5659a..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-cloud_controls_partner-v1beta", path: "../" -else - gem "google-cloud-cloud_controls_partner-v1beta" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.rb deleted file mode 100644 index d6f85e8509ce..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/create_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the create_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#create_customer. -# -def create_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new - - # Call the create_customer method. - result = client.create_customer request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.rb deleted file mode 100644 index 2b1afc033f4d..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/delete_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the delete_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#delete_customer. -# -def delete_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new - - # Call the delete_customer method. - result = client.delete_customer request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.rb deleted file mode 100644 index 4715fe342c69..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetCustomer_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the get_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_customer. -# -def get_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new - - # Call the get_customer method. - result = client.get_customer request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.rb deleted file mode 100644 index d140fd22b3d0..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_ekm_connections.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetEkmConnections_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the get_ekm_connections call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_ekm_connections. -# -def get_ekm_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new - - # Call the get_ekm_connections method. - result = client.get_ekm_connections request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::EkmConnections. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetEkmConnections_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.rb deleted file mode 100644 index a4f9b998195e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartner_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the get_partner call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner. -# -def get_partner - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new - - # Call the get_partner method. - result = client.get_partner request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Partner. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartner_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.rb deleted file mode 100644 index f1199e9a3c0e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_partner_permissions.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the get_partner_permissions call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner_permissions. -# -def get_partner_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new - - # Call the get_partner_permissions method. - result = client.get_partner_permissions request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.rb deleted file mode 100644 index 72a92981c75e..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/get_workload.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetWorkload_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the get_workload call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_workload. -# -def get_workload - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new - - # Call the get_workload method. - result = client.get_workload request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Workload. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetWorkload_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.rb deleted file mode 100644 index ff06ead45058..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_access_approval_requests.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_access_approval_requests. -# -def list_access_approval_requests - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.new - - # Call the list_access_approval_requests method. - result = client.list_access_approval_requests 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::CloudControlsPartner::V1beta::AccessApprovalRequest. - p item - end -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.rb deleted file mode 100644 index 0f91c15e4a46..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_customers.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListCustomers_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the list_customers call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_customers. -# -def list_customers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.new - - # Call the list_customers method. - result = client.list_customers 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::CloudControlsPartner::V1beta::Customer. - p item - end -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListCustomers_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.rb deleted file mode 100644 index 1630e3bb72b0..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/list_workloads.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListWorkloads_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the list_workloads call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_workloads. -# -def list_workloads - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.new - - # Call the list_workloads method. - result = client.list_workloads 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::CloudControlsPartner::V1beta::Workload. - p item - end -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListWorkloads_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.rb deleted file mode 100644 index 30bf4a93f9d2..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_core/update_customer.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_UpdateCustomer_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the update_customer call in the CloudControlsPartnerCore 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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#update_customer. -# -def update_customer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new - - # Call the update_customer method. - result = client.update_customer request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Customer. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_UpdateCustomer_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.rb deleted file mode 100644 index 793ef997abcd..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/get_violation.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_GetViolation_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the get_violation call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#get_violation. -# -def get_violation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new - - # Call the get_violation method. - result = client.get_violation request - - # The returned object is of type Google::Cloud::CloudControlsPartner::V1beta::Violation. - p result -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_GetViolation_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.rb deleted file mode 100644 index e49b5f624836..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/cloud_controls_partner_monitoring/list_violations.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 cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_ListViolations_sync] -require "google/cloud/cloud_controls_partner/v1beta" - -## -# Snippet for the list_violations call in the CloudControlsPartnerMonitoring 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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#list_violations. -# -def list_violations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new - - # Call the list_violations method. - result = client.list_violations 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::CloudControlsPartner::V1beta::Violation. - p item - end -end -# [END cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_ListViolations_sync] diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json deleted file mode 100644 index 2e32d796b88c..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/snippets/snippet_metadata_google.cloud.cloudcontrolspartner.v1beta.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-cloud_controls_partner-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.cloudcontrolspartner.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetWorkload_sync", - "title": "Snippet for the get_workload call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_workload.", - "file": "cloud_controls_partner_core/get_workload.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workload", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_workload", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Workload", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetWorkload", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetWorkload", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListWorkloads_sync", - "title": "Snippet for the list_workloads call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_workloads.", - "file": "cloud_controls_partner_core/list_workloads.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workloads", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_workloads", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "ListWorkloads", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.ListWorkloads", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetCustomer_sync", - "title": "Snippet for the get_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_customer.", - "file": "cloud_controls_partner_core/get_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Customer", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListCustomers_sync", - "title": "Snippet for the list_customers call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_customers.", - "file": "cloud_controls_partner_core/list_customers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_customers", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_customers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "ListCustomers", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.ListCustomers", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetEkmConnections_sync", - "title": "Snippet for the get_ekm_connections call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_ekm_connections.", - "file": "cloud_controls_partner_core/get_ekm_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_ekm_connections", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_ekm_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetEkmConnections", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetEkmConnections", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartnerPermissions_sync", - "title": "Snippet for the get_partner_permissions call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner_permissions.", - "file": "cloud_controls_partner_core/get_partner_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_partner_permissions", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetPartnerPermissions", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetPartnerPermissions", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_ListAccessApprovalRequests_sync", - "title": "Snippet for the list_access_approval_requests call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_access_approval_requests.", - "file": "cloud_controls_partner_core/list_access_approval_requests.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_access_approval_requests", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#list_access_approval_requests", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "ListAccessApprovalRequests", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.ListAccessApprovalRequests", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_GetPartner_sync", - "title": "Snippet for the get_partner call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner.", - "file": "cloud_controls_partner_core/get_partner.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_partner", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#get_partner", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Partner", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "GetPartner", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.GetPartner", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_CreateCustomer_sync", - "title": "Snippet for the create_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#create_customer.", - "file": "cloud_controls_partner_core/create_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#create_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Customer", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "CreateCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.CreateCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_UpdateCustomer_sync", - "title": "Snippet for the update_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#update_customer.", - "file": "cloud_controls_partner_core/update_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#update_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Customer", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "UpdateCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.UpdateCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerCore_DeleteCustomer_sync", - "title": "Snippet for the delete_customer call in the CloudControlsPartnerCore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#delete_customer.", - "file": "cloud_controls_partner_core/delete_customer.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_customer", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client#delete_customer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CloudControlsPartnerCore::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client" - }, - "method": { - "short_name": "DeleteCustomer", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore.DeleteCustomer", - "service": { - "short_name": "CloudControlsPartnerCore", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerCore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_ListViolations_sync", - "title": "Snippet for the list_violations call in the CloudControlsPartnerMonitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#list_violations.", - "file": "cloud_controls_partner_monitoring/list_violations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_violations", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#list_violations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse", - "client": { - "short_name": "CloudControlsPartnerMonitoring::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client" - }, - "method": { - "short_name": "ListViolations", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring.ListViolations", - "service": { - "short_name": "CloudControlsPartnerMonitoring", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudcontrolspartner_v1beta_generated_CloudControlsPartnerMonitoring_GetViolation_sync", - "title": "Snippet for the get_violation call in the CloudControlsPartnerMonitoring service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#get_violation.", - "file": "cloud_controls_partner_monitoring/get_violation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_violation", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client#get_violation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CloudControlsPartner::V1beta::Violation", - "client": { - "short_name": "CloudControlsPartnerMonitoring::Client", - "full_name": "::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client" - }, - "method": { - "short_name": "GetViolation", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring.GetViolation", - "service": { - "short_name": "CloudControlsPartnerMonitoring", - "full_name": "google.cloud.cloudcontrolspartner.v1beta.CloudControlsPartnerMonitoring" - } - } - }, - "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-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb deleted file mode 100644 index 4c1fddc0f919..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_paths_test.rb +++ /dev/null @@ -1,115 +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/cloud_controls_partner/v1beta/cloud_controls_partner_core" - -class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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_customer_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.customer_path organization: "value0", location: "value1", customer: "value2" - assert_equal "organizations/value0/locations/value1/customers/value2", path - end - end - - def test_ekm_connections_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.ekm_connections_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/ekmConnections", path - end - end - - def test_organization_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.organization_location_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1", path - end - end - - def test_partner_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.partner_path organization: "value0", location: "value1" - assert_equal "organizations/value0/locations/value1/partner", path - end - end - - def test_partner_permissions_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.partner_permissions_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/partnerPermissions", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb deleted file mode 100644 index 7f2c6b45e896..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_rest_test.rb +++ /dev/null @@ -1,708 +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/cloudcontrolspartner/v1beta/core_pb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core/rest" - - -class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_workload - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Workload.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workload_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_workload_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workload({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workload name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workload ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workload({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workload(::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workload_client_stub.call_count - end - end - end - - def test_list_workloads - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse.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_workloads_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_workloads_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workloads_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads_client_stub.call_count - end - end - end - - def test_get_customer - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_customer({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_customer name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_customer ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_customer({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_customer(::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_customer_client_stub.call_count - end - end - end - - def test_list_customers - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse.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_customers_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_customers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_customers_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers_client_stub.call_count - end - end - end - - def test_get_ekm_connections - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_ekm_connections_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_ekm_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_ekm_connections_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_ekm_connections({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_ekm_connections name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_ekm_connections({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_ekm_connections(::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_ekm_connections_client_stub.call_count - end - end - end - - def test_get_partner_permissions - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partner_permissions_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_permissions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_partner_permissions_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_partner_permissions({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_partner_permissions name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_partner_permissions({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_partner_permissions(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_partner_permissions_client_stub.call_count - end - end - end - - def test_list_access_approval_requests - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse.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_access_approval_requests_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_list_access_approval_requests_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_access_approval_requests_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_count - end - end - end - - def test_get_partner - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Partner.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_partner_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_get_partner_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_partner_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_partner({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_partner name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_partner ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_partner({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_partner(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_partner_client_stub.call_count - end - end - end - - def test_create_customer - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - customer = {} - customer_id = "hello world" - - create_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_create_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_customer parent: parent, customer: customer, customer_id: customer_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_customer ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_customer(::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_customer_client_stub.call_count - end - end - end - - def test_update_customer - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - customer = {} - update_mask = {} - - update_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_update_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_customer({ customer: customer, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_customer customer: customer, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_customer ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_customer({ customer: customer, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_customer(::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_customer_client_stub.call_count - end - end - end - - def test_delete_customer - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::ServiceStub.stub :transcode_delete_customer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_customer({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_customer name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_customer ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_customer({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_customer(::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb deleted file mode 100644 index bc2e69792fb8..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core_test.rb +++ /dev/null @@ -1,787 +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/cloudcontrolspartner/v1beta/core_pb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_core" - -class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_get_workload - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Workload.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_workload_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workload, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workload_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workload({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workload name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workload ::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workload({ 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_workload(::Google::Cloud::CloudControlsPartner::V1beta::GetWorkloadRequest.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_workload_client_stub.call_rpc_count - end - end - - def test_list_workloads - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsResponse.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_workloads_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workloads, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest, 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_workloads_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workloads({ 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_workloads 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_workloads ::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads({ 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_workloads(::Google::Cloud::CloudControlsPartner::V1beta::ListWorkloadsRequest.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_workloads_client_stub.call_rpc_count - end - end - - def test_get_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_customer({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_customer name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_customer ::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1beta::GetCustomerRequest.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_customer_client_stub.call_rpc_count - end - end - - def test_list_customers - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersResponse.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_customers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_customers, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest, 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_customers_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_customers({ 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_customers 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_customers ::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers({ 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_customers(::Google::Cloud::CloudControlsPartner::V1beta::ListCustomersRequest.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_customers_client_stub.call_rpc_count - end - end - - def test_get_ekm_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::EkmConnections.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_ekm_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_ekm_connections, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_ekm_connections_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_ekm_connections({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_ekm_connections name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_ekm_connections ::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_ekm_connections({ 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_ekm_connections(::Google::Cloud::CloudControlsPartner::V1beta::GetEkmConnectionsRequest.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_ekm_connections_client_stub.call_rpc_count - end - end - - def test_get_partner_permissions - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::PartnerPermissions.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_partner_permissions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_partner_permissions, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_partner_permissions_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_partner_permissions({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_partner_permissions name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_partner_permissions ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_partner_permissions({ 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_partner_permissions(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerPermissionsRequest.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_partner_permissions_client_stub.call_rpc_count - end - end - - def test_list_access_approval_requests - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsResponse.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_access_approval_requests_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_access_approval_requests, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest, 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_access_approval_requests_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_access_approval_requests({ 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_access_approval_requests 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_access_approval_requests ::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests({ 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_access_approval_requests(::Google::Cloud::CloudControlsPartner::V1beta::ListAccessApprovalRequestsRequest.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_access_approval_requests_client_stub.call_rpc_count - end - end - - def test_get_partner - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Partner.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_partner_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_partner, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_partner_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_partner({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_partner name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_partner ::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_partner({ 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_partner(::Google::Cloud::CloudControlsPartner::V1beta::GetPartnerRequest.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_partner_client_stub.call_rpc_count - end - end - - def test_create_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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" - customer = {} - customer_id = "hello world" - - create_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1beta::Customer), request["customer"] - assert_equal "hello world", request["customer_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_customer parent: parent, customer: customer, customer_id: customer_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_customer ::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_customer({ parent: parent, customer: customer, customer_id: customer_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_customer(::Google::Cloud::CloudControlsPartner::V1beta::CreateCustomerRequest.new(parent: parent, customer: customer, customer_id: customer_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_customer_client_stub.call_rpc_count - end - end - - def test_update_customer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Customer.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. - customer = {} - update_mask = {} - - update_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CloudControlsPartner::V1beta::Customer), request["customer"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_customer({ customer: customer, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_customer customer: customer, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_customer ::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_customer({ customer: customer, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_customer(::Google::Cloud::CloudControlsPartner::V1beta::UpdateCustomerRequest.new(customer: customer, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_customer_client_stub.call_rpc_count - end - end - - def test_delete_customer - # 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_customer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_customer, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_customer_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_customer({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_customer name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_customer ::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_customer({ 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_customer(::Google::Cloud::CloudControlsPartner::V1beta::DeleteCustomerRequest.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_customer_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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::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::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerCore::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb deleted file mode 100644 index 57fb77cada50..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_paths_test.rb +++ /dev/null @@ -1,67 +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/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" - -class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.violation_path organization: "value0", location: "value1", customer: "value2", workload: "value3", violation: "value4" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3/violations/value4", path - end - end - - def test_workload_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workload_path organization: "value0", location: "value1", customer: "value2", workload: "value3" - assert_equal "organizations/value0/locations/value1/customers/value2/workloads/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb deleted file mode 100644 index d13641fb267f..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_rest_test.rb +++ /dev/null @@ -1,212 +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/cloudcontrolspartner/v1beta/monitoring_pb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring/rest" - - -class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse.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" - interval = {} - - list_violations_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_list_violations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_violations_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_violations ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_violations(::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_violations_client_stub.call_count - end - end - end - - def test_get_violation - # Create test objects. - client_result = ::Google::Cloud::CloudControlsPartner::V1beta::Violation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_violation_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::ServiceStub.stub :transcode_get_violation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_violation_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_violation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_violation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_violation ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_violation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_violation(::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_violation_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb deleted file mode 100644 index ce2125d69622..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring_test.rb +++ /dev/null @@ -1,235 +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/cloudcontrolspartner/v1beta/monitoring_pb" -require "google/cloud/cloud_controls_partner/v1beta/cloud_controls_partner_monitoring" - -class ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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_violations - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsResponse.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" - interval = {} - - list_violations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_violations, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest, 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 Gapic::Protobuf.coerce({}, to: ::Google::Type::Interval), request["interval"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_violations_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }) 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_violations parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval 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_violations ::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval) 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_violations({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval }, 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_violations(::Google::Cloud::CloudControlsPartner::V1beta::ListViolationsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, interval: interval), 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_violations_client_stub.call_rpc_count - end - end - - def test_get_violation - # Create GRPC objects. - grpc_response = ::Google::Cloud::CloudControlsPartner::V1beta::Violation.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_violation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_violation, name - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_violation_client_stub do - # Create client - client = ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_violation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_violation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_violation ::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_violation({ 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_violation(::Google::Cloud::CloudControlsPartner::V1beta::GetViolationRequest.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_violation_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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::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::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CloudControlsPartner::V1beta::CloudControlsPartnerMonitoring::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-cloud_controls_partner-v1beta/test/helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"